/* ============================================================
   MesBanty – Design System v2
   ============================================================ */

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

:root {
    --primary:       #1565C0;
    --primary-dark:  #0D47A1;
    --primary-light: #E3F2FD;
    --secondary:     #546e7a;
    --success:       #2e7d32;
    --success-light: #f1f8e9;
    --danger:        #c62828;
    --danger-light:  #ffebee;
    --warning:       #F57C00;
    --warning-light: #FFF3E0;
    --info:          #0277BD;
    --info-light:    #E1F5FE;
    --accent:        #F57C00;
    --accent-light:  #FFF3E0;
    --surface:       #ffffff;
    --bg:            #f0f4f8;
    --dark:          #0D2137;
    --muted:         #90a4ae;
    --border:        #dde3ea;
    --border-strong: #b0bec5;
    --nav-bg:        #0D2137;
    --nav-text:      #90a4ae;
    --nav-active:    #ffffff;
    --nav-hover-bg:  rgba(255,255,255,0.07);
    --radius-sm:     0.375rem;
    --radius:        0.5rem;
    --radius-lg:     0.75rem;
    --radius-xl:     1rem;
    --shadow-xs:     0 1px 2px rgba(0,0,0,0.06);
    --shadow:        0 1px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg:     0 8px 32px rgba(0,0,0,0.14);
    --transition:    0.18s ease;
}

/* ── Base ─────────────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    font-size: 14.5px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ───────────────────────────────────────────────── */
.page-body {
    min-height: calc(100vh - 60px);
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ── Auth ─────────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    background: var(--nav-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.75rem 2.5rem;
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 2rem;
}

.auth-logo-mark {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-logo-mark svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-logo-text h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.auth-logo-text p {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.auth-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0 1.25rem;
}

.auth-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* ── Sidebar layout ───────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--nav-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 300;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1.375rem 1.25rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-brand-mark {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand-mark svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    list-style: none;
}

.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 0.875rem 0.625rem 0.375rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.855rem;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}

.sidebar-nav a svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    opacity: 0.8;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.9);
}

.sidebar-nav a.active {
    background: rgba(245,124,0,0.18);
    color: #fff;
    font-weight: 600;
    border-left: 2px solid var(--accent);
}

.sidebar-nav a.active svg { opacity: 1; }

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.sidebar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; }

.sidebar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    text-transform: capitalize;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.45);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    letter-spacing: 0.01em;
    font-family: inherit;
    text-decoration: none;
}

.btn-logout svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    flex-shrink: 0;
}

.btn-logout:hover {
    background: rgba(220,38,38,0.15);
    color: #fca5a5;
    border-color: rgba(220,38,38,0.3);
}

/* Main content area */
.main-content {
    margin-left: 240px;
    flex: 1;
    min-width: 0;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 0.875rem;
    left: 0.875rem;
    z-index: 400;
    background: var(--nav-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 290;
}

/* ── Page header ──────────────────────────────────────────── */
.page-header {
    margin-bottom: 1.75rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--secondary);
    margin-top: 0.25rem;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 1.625rem;
    margin-bottom: 1.25rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.375rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}

.card-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.01em;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.125rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition),
                box-shadow var(--transition), transform 0.1s;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 0.01em;
    font-family: inherit;
}

.btn:active { transform: scale(0.975); }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 1px 3px rgba(37,99,235,0.3);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 10px rgba(37,99,235,0.35);
}

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
    box-shadow: 0 1px 3px rgba(22,163,74,0.3);
}
.btn-success:hover {
    background: #15803d;
    border-color: #15803d;
    box-shadow: 0 4px 10px rgba(22,163,74,0.35);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-ghost {
    background: transparent;
    color: var(--secondary);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--dark); }

.btn-dark {
    background: var(--dark);
    color: #fff;
    border-color: var(--dark);
}
.btn-dark:hover { background: #1e293b; border-color: #1e293b; }

.btn-sm {
    padding: 0.38rem 0.75rem;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.btn-block { width: 100%; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.125rem; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--dark);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--dark);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.5;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-control::placeholder { color: var(--muted); }

textarea.form-control { min-height: 88px; resize: vertical; }
select.form-control { cursor: pointer; }
input[type="datetime-local"].form-control { cursor: pointer; }

.form-hint {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.alert::before {
    content: '';
    display: block;
    width: 4px;
    min-height: 100%;
    border-radius: 99px;
    flex-shrink: 0;
    align-self: stretch;
}

.alert-success {
    background: var(--success-light);
    color: #15803d;
    border-color: #bbf7d0;
}
.alert-success::before { background: var(--success); }

.alert-danger {
    background: var(--danger-light);
    color: #b91c1c;
    border-color: #fecaca;
}
.alert-danger::before { background: var(--danger); }

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

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.375rem 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card:nth-child(2)::after { background: var(--accent); }
.stat-card:nth-child(3)::after { background: var(--info); }
.stat-card:nth-child(4)::after { background: var(--success); }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 0.375rem;
    letter-spacing: -0.04em;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.625rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-urgent    { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-normal    { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.badge-waiting   { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-collected { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-washing   { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.badge-ready     { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.badge-delivered { background: #f8fafc; color: #475569; border-color: #e2e8f0; }

/* ── Apartment cards ──────────────────────────────────────── */
.apt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1rem;
}

.apt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    box-shadow: var(--shadow-xs);
}

.apt-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.apt-code-badge {
    display: inline-flex;
    align-items: center;
    background: var(--dark);
    color: #fff;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.08em;
    width: fit-content;
    text-transform: uppercase;
}

.apt-name {
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
}

.apt-client-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    width: fit-content;
}

.apt-address {
    color: var(--secondary);
    font-size: 0.82rem;
    line-height: 1.4;
}

.apt-notes {
    color: var(--muted);
    font-size: 0.78rem;
    font-style: italic;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.625rem;
}

.apt-meta-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--secondary);
}

.apt-meta-row svg {
    width: 13px;
    height: 13px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.apt-meta-row a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.apt-actions {
    margin-top: auto;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

/* ── Order cards ──────────────────────────────────────────── */
.order-list { display: flex; flex-direction: column; gap: 0.75rem; }

.order-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: box-shadow var(--transition), border-color var(--transition);
    box-shadow: var(--shadow-xs);
}

.order-card:hover { box-shadow: var(--shadow); }
.order-card.is-urgent { border-left: 3px solid var(--danger); }

.order-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.625rem;
    flex-wrap: wrap;
}

.order-code {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
    line-height: 1;
}

.order-apt-name {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 0.2rem;
    font-weight: 500;
}

.order-badges {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin: 0.625rem 0;
}

.order-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--secondary);
    font-size: 0.8rem;
}

.order-meta-item svg {
    width: 12px;
    height: 12px;
    stroke: var(--muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    flex-shrink: 0;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
}

.order-notice {
    margin-top: 0.625rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.order-notice-ready {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.order-notice-delivered {
    background: #f8fafc;
    color: #475569;
    border: 1px solid var(--border);
}

/* ── Select list (checkboxes / radios) ────────────────────── */
.select-list { display: flex; flex-direction: column; gap: 0.5rem; }

.select-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    user-select: none;
    background: var(--surface);
}

.select-item:hover { border-color: var(--primary); background: var(--primary-light); }

.select-item input[type="checkbox"],
.select-item input[type="radio"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.select-item-body { flex: 1; min-width: 0; }
.select-item-title { font-weight: 600; font-size: 0.875rem; color: var(--dark); }
.select-item-sub   { font-size: 0.775rem; color: var(--secondary); margin-top: 0.1rem; }

.radio-row { display: flex; gap: 0.625rem; flex-wrap: wrap; }
.radio-row .select-item { flex: 1; min-width: 120px; }

/* ── Table ────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    padding: 0.625rem 0.875rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.data-table td {
    padding: 0.875rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.data-table tr:hover td { background: #fafbfc; }

.td-name { font-weight: 600; color: var(--dark); }
.td-sub  { font-size: 0.775rem; color: var(--secondary); margin-top: 0.125rem; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(2px);
    z-index: 900;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 1.875rem;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: modalIn 0.2s ease;
}

.modal-box-lg { max-width: 680px; }

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.375rem;
    gap: 1rem;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.modal-close {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
    line-height: 1;
}

.modal-close:hover { background: var(--danger-light); color: var(--danger); border-color: #fecaca; }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    width: 48px;
    height: 48px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.empty-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--muted);
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 1.25rem;
}

/* ── Section title ────────────────────────────────────────── */
.section-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 0.625rem;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-backdrop.open { display: block; }
    .sidebar-toggle { display: flex; }
    .main-content { margin-left: 0; padding-top: 56px; }
}

@media (max-width: 768px) {
    .container { padding: 1rem; }
    .auth-card  { padding: 2rem 1.5rem; }
    .card       { padding: 1.25rem; }
    .stats-grid  { grid-template-columns: repeat(2, 1fr); }
    .order-card-top { flex-direction: column; }
    .order-actions .btn { flex: 1; min-width: 0; }
    .radio-row .select-item { min-width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .modal-box { padding: 1.5rem; }
    .apt-grid { grid-template-columns: 1fr; }
}
