/* ═══════════════════════════════════════════════════════════════
   ZIBATO DESIGN SYSTEM
   Style: Minimal Professional (Linear/Stripe inspired)
   ── White space, strong typography, limited color, thin lines ──
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. DESIGN TOKENS ── */
:root {
    /* Brand — injected per-request from the Django theme context processor.
       These defaults are the calm 60-30-10 platform palette (owner direction
       2026-09-03): muted sage accent, same family as the pre-login zh-* system
       so the site is one colour on every page. */
    --c-primary: #d6336c;
    --c-primary-light: #7d5773;
    --c-primary-dark: #a02454;
    --c-accent: #7c4fe0;
    --c-gradient-from: #533449;
    --c-gradient-to: #a02454;
    --c-bg-light: #f2edf1;
    --c-bg-card: #e6dbe4;

    /* Neutral palette */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;

    /* Semantic */
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #0891b2;
    --info-light: #cffafe;

    /* Typography — UX-15: body 15-16px, minimum UI 13px */
    --font-sans: 'Vazirmatn', sans-serif;
    --font-display: 'Vazirmatn', sans-serif;  /* heavy Persian for headings */
    --text-xs: 0.8125rem;   /* 13px — minimum UI (was 11px) */
    --text-sm: 0.875rem;    /* 14px — secondary text (was 12px) */
    --text-base: 0.9375rem; /* 15px — body text (was 13px) */
    --text-lg: 1.0625rem;   /* 17px — lead text (was 15px) */
    --text-xl: 1.25rem;     /* 20px (was 18px) */
    --text-2xl: 1.5rem;     /* 24px (unchanged) */
    --text-3xl: 1.875rem;   /* 30px (unchanged) */
    --text-4xl: 2.25rem;    /* 36px (unchanged) */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Radii */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows — subtle, professional */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 150ms;
    --duration: 250ms;
    --duration-slow: 400ms;

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

/* ── 2. RESET & BASE ── */
* { font-family: var(--font-sans); -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: contain; background: var(--gray-50); color: var(--gray-900); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
/* Tailwind preflight is off (existing pages own their reset via this file),
   but daisyUI's components assume preflight's border defaults are present -
   without this, border-width alone is invisible (initial border-style is
   none), breaking every outlined/bordered daisyUI component (du-btn-outline,
   du-input, du-select, du-join, ...). This is the one preflight rule daisyUI
   truly depends on. */
*, ::before, ::after { border-width: 0; border-style: solid; border-color: currentColor; }

/* ── 3. TYPOGRAPHY ── */
/* UX-15: display font for headings, heavier weights for Persian */
h1 { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 800; line-height: var(--leading-tight); letter-spacing: -0.02em; }
h2 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; line-height: var(--leading-tight); letter-spacing: -0.01em; }
h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; line-height: var(--leading-tight); }
h4 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; line-height: var(--leading-normal); }
.text-display { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.text-muted { color: var(--gray-500); }
.text-subtle { color: var(--gray-400); }

/* ── 4. FORMS ── */
/* UX-14/UX-15: font-size 16px on mobile to prevent iOS focus-zoom */
/* [PORT-A1] اندازهٔ فرم هم‌تراز salon-booking شد (padding ‏0.6/0.8، bg ‏#fafafa،
   media ۶۴۰px) تا با استایل inline پایه و تم داشبورد نجنگد */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem; /* 16px — prevents iOS auto-zoom on focus */
    transition: all var(--duration-fast) var(--ease);
    background: #fafafa;
    color: var(--gray-900);
}
@media (min-width: 640px) {
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 0.875rem;
        padding: 0.65rem 0.9rem;
    }
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 10%, transparent); /* [PORT-A1] ≈ {primary}18 */
    background: white;
}
.form-input.error,
.form-select.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-light);
}
.form-input::placeholder { color: var(--gray-400); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-checkbox { width: 1.25rem; height: 1.25rem; accent-color: var(--c-primary); border-radius: var(--radius-sm); }
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: left 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-left: 2.5rem;
}

/* Floating Label */
.form-floating { position: relative; }
.form-floating .form-input,
.form-floating .form-select,
.form-floating .form-textarea {
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}
.form-floating label {
    position: absolute;
    top: 50%;
    right: 0.875rem;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: var(--text-base);
    pointer-events: none;
    transition: all var(--duration-fast) var(--ease);
    background: transparent;
    padding: 0 0.25rem;
}
.form-floating .form-input:focus + label,
.form-floating .form-input:not(:placeholder-shown) + label,
.form-floating .form-select:focus + label,
.form-floating .form-select:valid + label,
.form-floating .form-textarea:focus + label,
.form-floating .form-textarea:not(:placeholder-shown) + label {
    top: 0.5rem;
    transform: translateY(0);
    font-size: var(--text-xs);
    color: var(--c-primary);
    font-weight: 600;
    background: white;
}

/* Field Error */
.field-error {
    color: var(--danger);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-top: 0.375rem;
    display: none;
    align-items: center;
    gap: 0.25rem;
}
.field-error.show { display: flex; animation: fadeInUp 0.2s ease; }
.field-error::before { content: '⚠'; font-size: 0.875rem; }

/* Form Label (non-floating) */
.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}
.form-label .req { color: var(--danger); margin-right: 0.125rem; }
.form-hint { font-size: var(--text-xs); color: var(--gray-400); margin-top: 0.25rem; }

/* ── 5. BUTTONS ── */
.btn-primary {
    background: linear-gradient(135deg, var(--c-gradient-from), var(--c-gradient-to));
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: var(--text-base);
    transition: all var(--duration) var(--ease);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* [PORT-A1] بوردر ‏۲px طبق salon-booking (بود: 1.5px)؛ هاور بدون تغییر رنگ بوردر */
.btn-secondary {
    background: white;
    color: var(--c-primary);
    border: 2px solid var(--c-primary);
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-base);
    transition: all var(--duration-fast) var(--ease);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-secondary:hover { background: var(--c-bg-light); }

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-base);
    transition: all var(--duration-fast) var(--ease);
    cursor: pointer;
    border: none;
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-base);
    transition: all var(--duration-fast) var(--ease);
    cursor: pointer;
    border: none;
}
.btn-success:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-base);
    transition: all var(--duration-fast) var(--ease);
    cursor: pointer;
    border: none;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: var(--text-xs); }
.btn-lg { padding: 0.875rem 2rem; font-size: var(--text-lg); }
.btn-block { width: 100%; }

/* [PORT-A1] افکت ripple (::after دکمه‌ها) حذف شد — در salon-booking وجود ندارد
   و با hover lift/سایهٔ رنگی دکمه‌های آن تضاد داشت */

/* ── 6. CARDS ── */
/* [PORT-A1] بوردر کارت‌ها حذف شد — کارت salon-booking بدون border است و
   آناتومی سایه/پدینگ آن (قاعدهٔ inline پایه) را خراب می‌کرد */
.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    transition: all var(--duration) var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-flat {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.card-salon {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--duration) var(--ease);
    cursor: pointer;
}
.card-salon:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-card {
    background: linear-gradient(135deg, var(--c-gradient-from), var(--c-gradient-to));
    color: white;
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.analytics-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-5);
}

/* ── 7. SIDEBAR ── */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--gray-600);
    transition: all var(--duration-fast) var(--ease);
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: 500;
}
/* [PORT-A1] هاور هم‌تراز salon-booking: ‏bg-light + رنگ primary (بود: gray-100/gray-900) */
.sidebar-link:hover { background: var(--c-bg-light); color: var(--c-primary); }
.sidebar-link.active {
    font-weight: 700;
    background: var(--c-bg-light);
    color: var(--c-primary);
    box-shadow: inset 3px 0 0 var(--c-primary);
}

/* ── 8. BADGES ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
}
.badge-success { background: var(--success-light); color: #065f46; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-info { background: var(--info-light); color: #155e75; }
.badge-primary { background: var(--c-bg-light); color: var(--c-primary-dark); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ── 9. ALERTS ── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-light); color: #065f46; border-color: #6ee7b7; }
.alert-danger { background: var(--danger-light); color: #991b1b; border-color: #fca5a5; }
.alert-warning { background: var(--warning-light); color: #92400e; border-color: #fcd34d; }
.alert-info { background: var(--info-light); color: #155e75; border-color: #67e8f9; }

/* ── 10. TOAST NOTIFICATIONS ── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--gray-800);
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    animation: toastIn 0.3s var(--ease-out) forwards;
}
.toast.removing { animation: toastOut 0.3s var(--ease) forwards; }
.toast-success { border-right: 4px solid var(--success); }
.toast-error { border-right: 4px solid var(--danger); }
.toast-warning { border-right: 4px solid var(--warning); }
.toast-info { border-right: 4px solid var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-100%); } }

/* ── 11. SKELETON LOADING ── */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}
.skeleton-text { height: 0.75rem; margin-bottom: 0.5rem; }
.skeleton-text:last-child { width: 60%; }
.skeleton-card { height: 200px; border-radius: var(--radius-xl); }
.skeleton-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── 12. EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--gray-400);
}
.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto var(--space-4);
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}
.empty-state-title { font-size: var(--text-lg); font-weight: 700; color: var(--gray-600); margin-bottom: 0.5rem; }
.empty-state-desc { font-size: var(--text-base); color: var(--gray-400); margin-bottom: var(--space-4); }

/* ── 13. DATA TABLE ── */
/* [PORT-A1] سربرگ هم‌تراز آناتومی جدول salon-booking: پس‌زمینهٔ ‏bg-gray-50/80
   و حذف uppercase/letter-spacing جدول مینیمال قبلی */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.data-table thead th {
    text-align: right;
    padding: 0.625rem 0.875rem;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--gray-500);
    background: rgba(249, 250, 251, 0.8);
    border-bottom: 1.5px solid var(--gray-200);
    white-space: nowrap;
}
.data-table tbody td {
    padding: 0.75rem 0.875rem;
    font-size: var(--text-base);
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}
.data-table tbody tr {
    transition: background var(--duration-fast) var(--ease);
}
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Table wrapper with horizontal scroll */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: white;
}

/* ── 14. BREADCRUMB ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-bottom: var(--space-4);
}
.breadcrumb a { color: var(--gray-500); text-decoration: none; transition: color var(--duration-fast); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb-sep { color: var(--gray-300); }
.breadcrumb-current { color: var(--gray-800); font-weight: 600; }

/* ── 15. STEP INDICATOR (Wizard) ── */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-sm);
    transition: all var(--duration) var(--ease);
    border: 2px solid var(--gray-200);
    background: white;
    color: var(--gray-400);
}
.step-indicator.active .step-number {
    background: var(--c-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 15%, transparent);
}
.step-indicator.completed .step-number {
    background: var(--success);
    color: white;
    border-color: transparent;
}
.step-label { font-size: var(--text-sm); font-weight: 600; color: var(--gray-400); }
.step-indicator.active .step-label { color: var(--gray-900); font-weight: 700; }
.step-indicator.completed .step-label { color: var(--gray-500); }

/* [PORT-A1] نوار پیشرفت هم‌تراز salon-booking: ‏۶px (۸px دسکتاپ) و fill گرادیان ۹۰°
   (بود: ۴px ثابت) */
.progress-bar { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; margin-bottom: var(--space-6); }
@media (min-width: 640px) { .progress-bar { height: 8px; border-radius: 4px; } }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--c-gradient-from), var(--c-gradient-to)); transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); border-radius: inherit; }

/* ── 16. MODAL/DIALOG ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    animation: fadeIn 0.2s ease;
}
.modal {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s var(--ease-out);
}
.modal-header { padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--gray-200); }
.modal-body { padding: var(--space-6); }
.modal-footer { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--gray-200); display: flex; gap: var(--space-3); justify-content: flex-start; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ── 17. ANIMATIONS ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.anim-up { animation: fadeInUp 0.4s var(--ease-out) forwards; }
.anim-fade { animation: fadeIn 0.3s ease forwards; }
.anim-slide { animation: slideInRight 0.3s var(--ease-out) forwards; }

/* Stagger animation */
.anim-stagger > * { opacity: 0; animation: fadeInUp 0.4s var(--ease-out) forwards; }
.anim-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.anim-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.anim-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.anim-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.anim-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.anim-stagger > *:nth-child(6) { animation-delay: 0.3s; }
.anim-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.anim-stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ── 18. UTILITIES ── */
.glass {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
}
.gradient-text {
    background: linear-gradient(135deg, var(--c-gradient-from), var(--c-gradient-to));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.divider { height: 1px; background: var(--gray-200); margin: var(--space-4) 0; }
.scrollbar-thin::-webkit-scrollbar { width: 6px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

/* ── 19. RESPONSIVE ── */
@media (max-width: 640px) {
    h1 { font-size: var(--text-2xl); }
    h2 { font-size: var(--text-xl); }
    .card { padding: var(--space-4); }
    .modal { max-width: 100%; border-radius: var(--radius-xl); }
    .toast { min-width: auto; width: calc(100vw - 2rem); }
}

/* ═══════════════════════════════════════════════════════════════
   20. DARK MODE (class strategy — html.dark)
   Deep ocean surfaces + same brand hues, tuned for night reading
   ═══════════════════════════════════════════════════════════════ */
html.dark {
    --surface-0: #0b1220;        /* page background */
    --surface-1: #101a2c;        /* cards */
    --surface-2: #16233a;        /* raised / hover */
    --surface-input: #0e1728;

    --gray-50: #101a2c;
    --gray-100: #16233a;
    --gray-200: #1f3050;
    --gray-300: #2c405f;
    --gray-400: #7d8db0;
    --gray-500: #94a3c4;
    --gray-600: #b3c0dd;
    --gray-700: #cdd7ec;
    --gray-800: #e2e9f7;
    --gray-900: #f1f5fd;
    --gray-950: #f8fafe;

    --success-light: rgba(16, 185, 129, 0.16);
    --danger-light: rgba(239, 68, 68, 0.16);
    --warning-light: rgba(245, 158, 11, 0.16);
    --info-light: rgba(8, 145, 178, 0.18);

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5), 0 2px 4px -2px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.55), 0 4px 6px -4px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.6), 0 8px 10px -6px rgba(0,0,0,0.45);
}
html.dark body { background: var(--surface-0); color: var(--gray-900); }

/* Surfaces that hardcode white in light mode */
html.dark .card,
html.dark .card-flat,
html.dark .analytics-card,
html.dark .card-salon,
html.dark .table-wrapper { background: var(--surface-1); border-color: var(--gray-200); }
html.dark .card-salon:hover { border-color: var(--gray-300); }

html.dark .form-input,
html.dark .form-select,
html.dark .form-textarea {
    background: var(--surface-input);
    border-color: var(--gray-200);
    color: var(--gray-900);
}
html.dark .form-input:focus,
html.dark .form-select:focus,
html.dark .form-textarea:focus { background: var(--surface-input); }
html.dark .form-floating label { color: var(--gray-400); }
html.dark .form-floating .form-input:focus + label,
html.dark .form-floating .form-input:not(:placeholder-shown) + label { background: var(--surface-input); }

html.dark .btn-secondary { background: transparent; color: var(--c-primary-light); border-color: var(--c-primary); }
html.dark .btn-secondary:hover { background: rgba(13, 148, 136, 0.12); }
html.dark .btn-ghost { color: var(--gray-400); }
html.dark .btn-ghost:hover { background: var(--surface-2); color: var(--gray-900); }

html.dark .sidebar-link { color: var(--gray-400); }
html.dark .sidebar-link:hover { background: var(--surface-2); color: var(--gray-900); }

html.dark .badge-success { color: #6ee7b7; }
html.dark .badge-danger { color: #fca5a5; }
html.dark .badge-warning { color: #fcd34d; }
html.dark .badge-info { color: #67e8f9; }
html.dark .badge-primary { color: var(--c-primary-light); }
html.dark .badge-gray { background: var(--surface-2); color: var(--gray-400); }

html.dark .toast { background: var(--surface-1); border-color: var(--gray-200); color: var(--gray-800); }
html.dark .modal { background: var(--surface-1); }
html.dark .modal-header, html.dark .modal-footer { border-color: var(--gray-200); }

html.dark .empty-state-icon { background: var(--surface-2); }
html.dark .empty-state-title { color: var(--gray-600); }

html.dark .navbar-glass {
    background: rgba(11, 18, 32, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
html.dark .navbar-glass.scrolled {
    background: rgba(11, 18, 32, 0.92);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
html.dark .glass { background: rgba(16, 26, 44, 0.7); border-color: rgba(255,255,255,0.08); }

html.dark .skeleton {
    background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 50%, var(--surface-1) 75%);
    background-size: 200% 100%;
}

html.dark .step-number { background: var(--surface-1); }
html.dark .data-table tbody tr:hover { background: var(--surface-2); }

/* Dark-mode-safe semantic helpers */
.surface-card { background: var(--surface-1, white); }
.text-app { color: var(--gray-900); }

/* Theme transition — smooth when toggling */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.15s ease !important;
}
