@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    --navy: #0B2D4F;
    --gold: #C9A227;
    --white: #FFFFFF;
    --bg: #F1F5F9;
    --border: #E2E8F0;
    --text-muted: #64748B;
    --radius: 12px;
    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: #333;
    min-height: 100vh;
}

.admin-header {
    background: var(--navy);
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-header h1 {
    font-family: var(--font-head);
    font-size: 18px;
    flex-shrink: 0;
}

.admin-nav {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.admin-nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
}

.admin-nav a:hover,
.admin-nav a.is-active {
    color: white;
    background: rgba(255, 255, 255, 0.12);
}

.admin-header-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.admin-header-user span {
    opacity: 0.85;
}

.admin-header a {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
}

.admin-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

.login-card, .stats-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 40px;
    max-width: 420px;
    margin: 60px auto;
}

.stats-card { max-width: 100%; }

.login-card h1, .stats-card h2 {
    font-family: var(--font-head);
    color: var(--navy);
    margin-bottom: 24px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.btn {
    background: var(--navy);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-box {
    background: var(--bg);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.stat-box .num {
    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 700;
    color: var(--gold);
}

.stat-box .label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success { background: #D1FAE5; color: #065F46; }
.alert-error { background: #FEE2E2; color: #991B1B; }

.hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}

.hint a {
    color: var(--navy);
    font-weight: 600;
}

.admin-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-page h2 {
    font-family: var(--font-head);
    color: var(--navy);
    font-size: 24px;
    margin-bottom: 6px;
}

.admin-page-lead {
    color: var(--text-muted);
    font-size: 14px;
}

.admin-page-lead--tight {
    margin-bottom: 20px;
}

.admin-section-title {
    font-family: var(--font-head);
    font-size: 16px;
    color: var(--navy);
    margin: 28px 0 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.pickup-schedule-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 8px;
}

.pickup-schedule-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px;
    align-items: center;
}

.pickup-day-check {
    font-weight: 600;
}

.pickup-time-select {
    max-width: 220px;
}

@media (max-width: 560px) {
    .pickup-schedule-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .pickup-time-select {
        max-width: none;
    }
}

.btn--inline,
.btn--disabled {
    display: inline-block;
    width: auto;
    padding: 10px 18px;
    font-size: 13px;
    text-decoration: none;
}

.btn--secondary {
    background: white;
    color: var(--navy);
    border: 1px solid var(--border);
}

.btn--secondary:hover {
    background: var(--bg);
}

.btn--disabled {
    background: #94A3B8;
    cursor: not-allowed;
    opacity: 0.85;
}

.admin-form-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 32px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.admin-form-grid .form-group--checkbox {
    display: flex;
    align-items: flex-end;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.admin-form-actions {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.admin-form-reset {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px dashed var(--border);
}

.admin-table-actions a {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}

.admin-empty {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 48px 32px;
    text-align: center;
}

.admin-empty p {
    margin-bottom: 8px;
}

.admin-table-wrap {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.admin-table th {
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr.is-inactive {
    opacity: 0.65;
}

.admin-table code {
    font-size: 13px;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.admin-table-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.badge--active {
    background: #D1FAE5;
    color: #065F46;
}

.badge--inactive {
    background: #F1F5F9;
    color: #64748B;
}

.badge--warn {
    background: #FEF3C7;
    color: #92400E;
}

.admin-table-meta {
    margin-top: 12px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-nav {
        justify-content: flex-start;
    }

    .admin-header-user {
        justify-content: space-between;
    }
}
