/* PFRegistry Base Styles
 * Minimalist, monospace, card-based design
 */

:root {
    /* Typography */
    --font-family: monospace;
    --line-height: 1.4;

    /* Colors */
    --color-bg: #f9f9f9;
    --color-text: #333;
    --color-text-muted: #666;
    --color-link: #0066cc;
    --color-link-hover: #004499;
    --color-border: #ddd;
    --color-card-bg: #fff;

    /* Status colors */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #dc2626;
    --color-info: #3b82f6;

    /* Layout */
    --page-width: 900px;
    --page-width-wide: 900px;
    --card-padding: 30px;
    --card-radius: 8px;
    --spacing: 15px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base */
body {
    font-family: var(--font-family);
    font-size: 15px;
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 20px;
}

body.wide {
    max-width: var(--page-width-wide);
}

/* Typography */
h1,
h2,
h3 {
    margin-bottom: var(--spacing);
}

h1 {
    font-size: 1.5em;
}

h2 {
    font-size: 1.25em;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-top: 2em;
}

p {
    margin-bottom: var(--spacing);
}

ul {
    margin-bottom: var(--spacing);
}

a {
    color: var(--color-link);
    text-decoration: none;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* Lists */
ul,
ol {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

li {
    margin-bottom: 5px;
}

/* Card */
.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    margin-bottom: var(--spacing);
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.85em;
    color: var(--color-text-muted);
    margin: 0 0 15px 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.breadcrumb a {
    color: var(--color-text-muted);
}

.breadcrumb a:hover {
    color: var(--color-link);
}

.breadcrumb .separator {
    margin: 0 2px;
    color: #999;
}

.breadcrumb .current {
    color: var(--color-text);
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 15px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}

nav .logo {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--color-text);
}

nav .logo:hover {
    text-decoration: none;
}

nav .menu {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav .menu a {
    font-weight: bold;
}

/* Footer */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 0.9em;
    color: var(--color-text-muted);
    text-align: center;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: var(--spacing);
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Forms */
form {
    margin-bottom: var(--spacing);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1em;
    margin-bottom: var(--spacing);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-link);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* Buttons */
button,
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--color-link);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
.btn:hover {
    background: var(--color-link-hover);
    color: white;
    text-decoration: none;
}

button.secondary,
.btn.secondary {
    background: var(--color-text-muted);
}

button.danger,
.btn.danger {
    background: var(--color-error);
}

button.success,
.btn.success {
    background: var(--color-success);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing);
}

th,
td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
}

th {
    background: var(--color-bg);
    font-weight: bold;
}

tr:hover {
    background: #fafafa;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Status badges */
.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-paused {
    background: #fef3c7;
    color: #92400e;
}

.badge-closed {
    background: #374151;
    color: white;
}

.badge-unknown {
    background: #e5e7eb;
    color: #4b5563;
}

.badge-warning {
    background: #fee2e2;
    color: #991b1b;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: var(--spacing);
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.pagination a.active {
    background: var(--color-link);
    color: white;
    border-color: var(--color-link);
}

/* Stats grid */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing);
    margin-bottom: var(--spacing);
}

.stat-card {
    background: var(--color-bg);
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9em;
    color: var(--color-text-muted);
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: var(--spacing);
    align-items: flex-end;
}

.filters input,
.filters select {
    margin-bottom: 0;
    width: auto;
}

/* Bulk actions */
.bulk-actions {
    display: flex;
    gap: 10px;
    margin-bottom: var(--spacing);
    padding: 10px;
    background: var(--color-bg);
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .card {
        padding: 20px;
    }

    nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 3px 10px;
        padding-bottom: 8px;
        margin-bottom: 0;
    }

    nav .menu {
        gap: 3px 10px;
    }

    .breadcrumb {
        margin: 0 0 20px 0;
        padding: 8px 0;
    }

    table {
        font-size: 0.85em;
    }

    th,
    td {
        padding: 8px 5px;
    }

    .filters {
        flex-direction: column;
    }

    .filters input,
    .filters select {
        width: 100%;
    }

    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: inline !important;
    }

    .col-discount {
        width: 60px;
    }

    .col-verified {
        width: 50px;
    }
}

/* Default: show desktop, hide mobile */
.show-mobile {
    display: none;
}