/* ============================================================
   Enterprise Fiscal Calendar System v4.2
   Tailwind CSS Custom Components - Dark/Light Theme
   Primary: #a5152d | Dark: #8c1126 | Light: #ffe6ea
   ============================================================ */

/* ---- Theme Variables ---- */
:root {
    --brand: #a5152d;
    --brand-dark: #8c1126;
    --brand-light: #ffe6ea;
    --brand-glow: rgba(165, 21, 45, 0.35);
    --transition: 250ms cubic-bezier(.4,0,.2,1);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--brand); color: #fff; }

/* ---- Dark theme (default) ---- */
.dark body { background: #0b0e13; color: #e8eaed; }
.dark .nav-bar { background: rgba(11,14,19,0.85); border-color: rgba(255,255,255,0.06); }
.dark .nav-brand { color: #fff; }
.dark .nav-text-muted { color: #9aa0ab; }
.dark .footer-area { border-color: rgba(255,255,255,0.06); color: #5f6673; }
.dark .border-separator { border-color: rgba(255,255,255,0.06); }

/* Nav Links */
.nav-link { color: #9aa0ab; font-size: .8rem; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; padding: .45rem .7rem; border-radius: 6px; transition: all var(--transition); display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.dark .nav-link:hover { color: #fff; background: rgba(165,21,45,0.15); }
.dark .nav-link.active { color: #fff; background: var(--brand); box-shadow: 0 0 16px var(--brand-glow); }

/* Panels */
.panel { background: #12161d; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: transform var(--transition), box-shadow var(--transition); }
.panel:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.panel-header { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; padding: .9rem 1.25rem; font-weight: 700; font-size: .85rem; letter-spacing: .3px; text-transform: uppercase; }

/* Stat Cards */
.stat-card { background: #12161d; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 1.25rem; text-align: center; position: relative; overflow: hidden; transition: all var(--transition); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--brand), #d4273e); }
.stat-card:hover { border-color: var(--brand); box-shadow: 0 0 30px var(--brand-glow); transform: translateY(-2px); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--brand-light); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .65rem; text-transform: uppercase; letter-spacing: 1.5px; color: #5f6673; margin-top: .4rem; font-weight: 600; }

/* Buttons */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-weight: 600; font-size: .82rem; letter-spacing: .3px; padding: .5rem 1.1rem; border-radius: 6px; border: none; cursor: pointer; text-decoration: none; text-transform: uppercase; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: 0 2px 8px var(--brand-glow); transition: all var(--transition); }
.btn-primary:hover { background: linear-gradient(135deg, #d4273e, var(--brand)); box-shadow: 0 4px 20px var(--brand-glow); transform: translateY(-1px); color: #fff; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-weight: 600; font-size: .82rem; letter-spacing: .3px; padding: .5rem 1.1rem; border-radius: 6px; border: 1px solid var(--brand); cursor: pointer; text-decoration: none; text-transform: uppercase; background: transparent; color: var(--brand-light); transition: all var(--transition); }
.btn-outline:hover { background: var(--brand); color: #fff; box-shadow: 0 0 16px var(--brand-glow); }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-weight: 600; font-size: .82rem; letter-spacing: .3px; padding: .5rem 1.1rem; border-radius: 6px; border: 1px solid rgba(255,255,255,0.06); cursor: pointer; text-decoration: none; text-transform: uppercase; background: rgba(255,255,255,0.04); color: #9aa0ab; transition: all var(--transition); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-lg { padding: .7rem 1.8rem; font-size: .9rem; }

/* Forms */
.label { display: block; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9aa0ab; margin-bottom: .35rem; }
.input { width: 100%; background: #181d27; border: 1px solid rgba(255,255,255,0.06); color: #e8eaed; border-radius: 6px; padding: .55rem .8rem; font-size: .88rem; transition: all var(--transition); outline: none; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.input::placeholder { color: #5f6673; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; padding: .35rem .8rem; border-radius: 20px; cursor: pointer; text-decoration: none; background: rgba(255,255,255,0.06); color: #9aa0ab; border: 1px solid transparent; transition: all var(--transition); }
.pill:hover { background: rgba(255,255,255,0.1); color: #fff; }
.pill-active { background: var(--brand) !important; color: #fff !important; box-shadow: 0 0 12px var(--brand-glow); border-color: transparent; }

/* Pill Badges */
.pill-badge { display: inline-block; padding: .15rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 700; letter-spacing: .3px; background: rgba(255,255,255,0.08); color: #e8eaed; }
.pill-badge-muted { display: inline-block; padding: .15rem .5rem; border-radius: 6px; font-size: .7rem; font-weight: 600; background: rgba(255,255,255,0.06); color: #9aa0ab; }
.pill-badge-info { display: inline-block; padding: .15rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 700; background: rgba(59,130,246,0.1); color: #60a5fa; }
.pill-badge-success { display: inline-block; padding: .15rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 700; background: rgba(34,197,94,0.1); color: #4ade80; }
.pill-badge-warning { display: inline-block; padding: .15rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 700; background: rgba(245,158,11,0.1); color: #fbbf24; }
.pill-badge-brand { display: inline-block; padding: .15rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 700; background: var(--brand); color: #fff; }

/* Alerts */
.alert-success { background: rgba(34,197,94,0.1); color: #4ade80; border-left: 4px solid #22c55e; border-radius: 10px; padding: .85rem 1.1rem; font-size: .88rem; font-weight: 500; }
.alert-danger { background: rgba(239,68,68,0.1); color: #f87171; border-left: 4px solid #ef4444; border-radius: 10px; padding: .85rem 1.1rem; font-size: .88rem; font-weight: 500; }
.alert-warning { background: rgba(245,158,11,0.1); color: #fbbf24; border-left: 4px solid #f59e0b; border-radius: 10px; padding: .85rem 1.1rem; font-size: .88rem; font-weight: 500; }

/* Data Tables */
.data-table thead th { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; border: none; }
.data-table thead th:first-child { border-radius: 0; }
.data-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.06); transition: background var(--transition); }
.data-table tbody tr:hover { background: rgba(165,21,45,0.06); }
.data-table tbody tr.row-weekend { background: rgba(255,255,255,0.015); }
.data-table tbody tr.row-holiday { background: rgba(165,21,45,0.05); }

/* Modals */
.modal-content { background: #181d27; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.modal-header { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); padding: 1rem 1.25rem; border-radius: 16px 16px 0 0; display: flex; justify-content: space-between; align-items: center; }

/* Feature Cards */
.feature-card { background: #12161d; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 1.5rem; transition: all var(--transition); }
.feature-card:hover { border-color: var(--brand); box-shadow: 0 0 30px rgba(165,21,45,0.15); transform: translateY(-3px); }
.feature-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; background: rgba(165,21,45,0.12); color: var(--brand-light); font-size: 1.5rem; }

/* Status boxes */
.status-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); color: #4ade80; padding: 1rem 1.25rem; border-radius: 10px; margin: 1rem 0; }
.status-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #f87171; padding: 1rem 1.25rem; border-radius: 10px; margin: 1rem 0; }
.status-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); color: #fbbf24; padding: 1rem 1.25rem; border-radius: 10px; margin: 1rem 0; }

/* Setup */
.setup-step { background: #12161d; border: 1px solid rgba(255,255,255,0.06); border-left: 3px solid var(--brand); border-radius: 10px; padding: 1.5rem; margin-bottom: 1.5rem; }
.setup-step h4 { color: var(--brand-light); font-size: 1rem; text-transform: uppercase; letter-spacing: .5px; }

/* Scrollbar (dark) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0b0e13; }
::-webkit-scrollbar-thumb { background: rgba(165,21,45,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* Theme toggle icons */
.dark .dark-icon { display: inline; }
.dark .light-icon { display: none !important; }
html:not(.dark) .dark-icon { display: none !important; }
html:not(.dark) .light-icon { display: inline !important; }

/* ============================================================
   LIGHT THEME
   ============================================================ */
html:not(.dark) body { background: #f8f9fb; color: #1e2330; }
html:not(.dark) .nav-bar { background: rgba(248,249,251,0.92); border-color: #d4d8e0; }
html:not(.dark) .nav-brand { color: #1e2330; }
html:not(.dark) .nav-text-muted { color: #5f6673; }
html:not(.dark) .nav-link { color: #5f6673; }
html:not(.dark) .nav-link:hover { color: #1e2330; background: rgba(165,21,45,0.08); }
html:not(.dark) .nav-link.active { color: #fff; background: var(--brand); }
html:not(.dark) .footer-area { border-color: #d4d8e0; color: #9aa0ab; }
html:not(.dark) .border-separator { border-color: #d4d8e0; }

html:not(.dark) .panel { background: #fff; border-color: #d4d8e0; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
html:not(.dark) .panel:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
html:not(.dark) .stat-card { background: #fff; border-color: #d4d8e0; }
html:not(.dark) .stat-card:hover { border-color: var(--brand); }
html:not(.dark) .stat-value { color: var(--brand); }
html:not(.dark) .stat-label { color: #5f6673; }

html:not(.dark) .btn-ghost { border-color: #d4d8e0; background: #fff; color: #5f6673; }
html:not(.dark) .btn-ghost:hover { background: #eef0f4; color: #1e2330; }

html:not(.dark) .label { color: #5f6673; }
html:not(.dark) .input { background: #fff; border-color: #d4d8e0; color: #1e2330; }
html:not(.dark) .input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(165,21,45,0.15); }
html:not(.dark) .input::placeholder { color: #9aa0ab; }

html:not(.dark) .pill { background: #eef0f4; color: #5f6673; }
html:not(.dark) .pill:hover { background: #d4d8e0; color: #1e2330; }
html:not(.dark) .pill-badge { background: #eef0f4; color: #1e2330; }
html:not(.dark) .pill-badge-muted { background: #eef0f4; color: #5f6673; }
html:not(.dark) .pill-badge-info { background: rgba(59,130,246,0.1); color: #2563eb; }
html:not(.dark) .pill-badge-success { background: rgba(34,197,94,0.1); color: #16a34a; }
html:not(.dark) .pill-badge-warning { background: rgba(245,158,11,0.1); color: #d97706; }

html:not(.dark) .data-table tbody tr { border-bottom: 1px solid #eef0f4; }
html:not(.dark) .data-table tbody tr:hover { background: rgba(165,21,45,0.04); }
html:not(.dark) .data-table tbody tr.row-weekend { background: #f8f9fb; }
html:not(.dark) .data-table tbody tr.row-holiday { background: rgba(165,21,45,0.04); }

html:not(.dark) .modal-content { background: #fff; border-color: #d4d8e0; }

html:not(.dark) .alert-success { background: rgba(34,197,94,0.08); color: #16a34a; }
html:not(.dark) .alert-danger { background: rgba(239,68,68,0.08); color: #dc2626; }
html:not(.dark) .alert-warning { background: rgba(245,158,11,0.08); color: #d97706; }

html:not(.dark) .status-success { background: rgba(34,197,94,0.08); color: #16a34a; border-color: rgba(34,197,94,0.2); }
html:not(.dark) .status-error { background: rgba(239,68,68,0.08); color: #dc2626; border-color: rgba(239,68,68,0.2); }
html:not(.dark) .status-warning { background: rgba(245,158,11,0.08); color: #d97706; border-color: rgba(245,158,11,0.2); }

html:not(.dark) .setup-step { background: #fff; border-color: #d4d8e0; }
html:not(.dark) .setup-step h4 { color: var(--brand); }

html:not(.dark) .feature-card { background: #fff; border-color: #d4d8e0; }
html:not(.dark) .feature-card:hover { border-color: var(--brand); }
html:not(.dark) .feature-icon { background: rgba(165,21,45,0.08); color: var(--brand); }

html:not(.dark) ::-webkit-scrollbar-track { background: #f8f9fb; }
html:not(.dark) ::-webkit-scrollbar-thumb { background: #d4d8e0; }
html:not(.dark) ::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ============================================================
   LIGHT THEME - Tailwind Utility Class Overrides
   These override inline Tailwind classes that use transparent
   white values (invisible on white/light backgrounds).
   Using CSS attribute selectors for reliable matching.
   ============================================================ */

/* -- btn-outline: text was var(--brand-light) #ffe6ea, invisible on white -- */
html:not(.dark) .btn-outline { color: var(--brand); }
html:not(.dark) .btn-outline:hover { color: #fff; }

/* -- Translucent white backgrounds → translucent dark on light -- */
/* bg-white/3 and bg-white/5 are used on panel/card interiors (light bg) */
/* bg-white/10 and bg-white/15 are on gradient backgrounds - leave unchanged */
html:not(.dark) [class~="bg-white/3"] { background-color: rgba(0,0,0,0.025) !important; }
html:not(.dark) [class~="bg-white/5"] { background-color: rgba(0,0,0,0.035) !important; }
html:not(.dark) [class*="bg-white/\[0.02\]"] { background-color: rgba(0,0,0,0.02) !important; }

/* -- Translucent white borders → visible borders on light -- */
html:not(.dark) [class~="border-white/5"] { border-color: rgba(0,0,0,0.08) !important; }
html:not(.dark) [class*="border-white/6"] { border-color: rgba(0,0,0,0.08) !important; }
html:not(.dark) [class~="border-white/10"] { border-color: rgba(0,0,0,0.1) !important; }

/* -- Hover states: white overlay → dark overlay on light -- */
html:not(.dark) [class*="hover\:bg-white\/10"]:hover { background-color: rgba(0,0,0,0.06) !important; }
html:not(.dark) [class*="hover\:bg-white\/25"]:hover { background-color: rgba(0,0,0,0.08) !important; }
html:not(.dark) [class*="hover\:bg-white\/5"]:hover { background-color: rgba(0,0,0,0.04) !important; }

/* -- Dark-optimized text colors → better contrast for light bg -- */
html:not(.dark) .text-brand-300 { color: var(--brand) !important; }
html:not(.dark) .text-brand-400 { color: var(--brand) !important; }
html:not(.dark) .text-emerald-400 { color: #16a34a !important; }
html:not(.dark) .text-emerald-300 { color: #16a34a !important; }
html:not(.dark) .text-red-400 { color: #dc2626 !important; }
html:not(.dark) .text-red-300 { color: #b91c1c !important; }
html:not(.dark) .text-blue-400 { color: #2563eb !important; }
html:not(.dark) .text-blue-300 { color: #2563eb !important; }
html:not(.dark) .text-amber-400 { color: #d97706 !important; }
html:not(.dark) .text-purple-400 { color: #7c3aed !important; }

/* -- Logout link uses Tailwind !important classes -- */
html:not(.dark) [class*="\!text-red-400"] { color: #dc2626 !important; }
html:not(.dark) [class*="hover\:\!text-red-300"]:hover { color: #b91c1c !important; }

/* -- text-white opacity variants in light (e.g. modals, hero overlays) -- */
/* These are on brand-gradient backgrounds, so they stay white */

/* -- Admin panel info rows that use bg-white/3 as subtle strip bg -- */
/* Already handled by the bg-white/3 rule above */

/* -- FAQ chevron open state -- */
html:not(.dark) .faq-item.open .faq-question .chevron { color: var(--brand); }

/* -- FAQ question hover on light -- */
html:not(.dark) .faq-question:hover { background: rgba(165,21,45,0.04); }

/* -- Badge/chip backgrounds on light (emerald, blue, red tints) -- */
html:not(.dark) [class~="bg-emerald-500/10"] { background-color: rgba(16,185,129,0.1) !important; }
html:not(.dark) [class~="bg-blue-500/10"] { background-color: rgba(59,130,246,0.1) !important; }
html:not(.dark) [class~="bg-red-500/10"] { background-color: rgba(239,68,68,0.1) !important; }
html:not(.dark) [class~="bg-brand-500/10"] { background-color: rgba(165,21,45,0.08) !important; }
html:not(.dark) [class*="bg-purple-500/10"] { background-color: rgba(124,58,237,0.1) !important; }
html:not(.dark) [class*="bg-amber-500/10"] { background-color: rgba(245,158,11,0.1) !important; }

/* -- Subtle border on colored cards in docs (blue/red role cards) -- */
html:not(.dark) [class*="border-blue-500/10"] { border-color: rgba(59,130,246,0.15) !important; }
html:not(.dark) [class*="border-red-500/10"] { border-color: rgba(239,68,68,0.15) !important; }
html:not(.dark) [class*="bg-blue-500/5"] { background-color: rgba(59,130,246,0.04) !important; }
html:not(.dark) [class*="bg-red-500/5"] { background-color: rgba(239,68,68,0.04) !important; }

/* -- Code snippets in panels/docs (brand-tinted on light) -- */
html:not(.dark) .panel code,
html:not(.dark) .faq-answer code,
html:not(.dark) .doc-step-content code { color: var(--brand) !important; background-color: rgba(165,21,45,0.06) !important; padding: .15rem .4rem; border-radius: 4px; }

/* -- Admin panel: shadow on brand badge -- */
html:not(.dark) [class*="shadow-brand-500/30"] { box-shadow: 0 4px 12px rgba(165,21,45,0.15) !important; }

/* -- Login page specific -- */
html:not(.dark) .text-surface-400 { color: #9aa0ab !important; }

/* ---- Animations ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp .5s ease-out forwards; }

/* ---- Print ---- */
@media print {
    body { background: #fff !important; color: #000 !important; }
    .nav-bar, footer, .btn-primary, .btn-outline, .btn-ghost, #themeToggle, .no-print { display: none !important; }
    .panel { box-shadow: none !important; border: 1px solid #ddd !important; background: #fff !important; }
    .data-table thead th { background: #333 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .stat-card { border: 1px solid #ddd !important; background: #fff !important; }
    .stat-value { color: #000 !important; }
}

/* ---- Tooltips (hover quick-help) ---- */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) scale(0.95);
    background: #1e2330; color: #e8eaed; border: 1px solid rgba(165,21,45,0.3);
    font-size: .72rem; font-weight: 500; line-height: 1.4; letter-spacing: 0; text-transform: none;
    padding: .5rem .75rem; border-radius: 8px; white-space: normal; width: max-content; max-width: 280px;
    box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 100;
    opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 200ms ease;
}
[data-tooltip]::before {
    content: ''; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: rgba(165,21,45,0.3);
    z-index: 101; opacity: 0; pointer-events: none; transition: opacity 200ms ease;
}
[data-tooltip]:hover::after, [data-tooltip]:hover::before { opacity: 1; }
[data-tooltip]:hover::after { transform: translateX(-50%) scale(1); }

/* Tooltip position variants */
[data-tooltip-pos="right"]::after { bottom: auto; left: calc(100% + 8px); top: 50%; transform: translateY(-50%) scale(0.95); }
[data-tooltip-pos="right"]:hover::after { transform: translateY(-50%) scale(1); }
[data-tooltip-pos="right"]::before { bottom: auto; left: calc(100% + 2px); top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-right-color: rgba(165,21,45,0.3); }
[data-tooltip-pos="bottom"]::after { bottom: auto; top: calc(100% + 8px); transform: translateX(-50%) scale(0.95); }
[data-tooltip-pos="bottom"]:hover::after { transform: translateX(-50%) scale(1); }
[data-tooltip-pos="bottom"]::before { bottom: auto; top: calc(100% + 2px); border: 6px solid transparent; border-bottom-color: rgba(165,21,45,0.3); border-top-color: transparent; }

html:not(.dark) [data-tooltip]::after { background: #fff; color: #1e2330; border-color: #d4d8e0; box-shadow: 0 8px 24px rgba(0,0,0,.1); }
html:not(.dark) [data-tooltip]::before { border-top-color: #d4d8e0; }
html:not(.dark) [data-tooltip-pos="right"]::before { border-right-color: #d4d8e0; border-top-color: transparent; }
html:not(.dark) [data-tooltip-pos="bottom"]::before { border-bottom-color: #d4d8e0; border-top-color: transparent; }

/* ---- Documentation page ---- */
.doc-section { scroll-margin-top: 5rem; }
.doc-sidebar-link { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border-radius: 8px; font-size: .82rem; font-weight: 500; color: #9aa0ab; transition: all var(--transition); text-decoration: none; border-left: 2px solid transparent; }
.doc-sidebar-link:hover { color: #fff; background: rgba(165,21,45,0.1); border-left-color: var(--brand); }
.doc-sidebar-link.active { color: var(--brand-light); background: rgba(165,21,45,0.12); border-left-color: var(--brand); font-weight: 700; }
html:not(.dark) .doc-sidebar-link { color: #5f6673; }
html:not(.dark) .doc-sidebar-link:hover { color: #1e2330; background: rgba(165,21,45,0.06); }
html:not(.dark) .doc-sidebar-link.active { color: var(--brand); background: rgba(165,21,45,0.06); }

.doc-step { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.doc-step-num { flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; font-size: .8rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: .15rem; }
.doc-step-content { flex: 1; }
.doc-step-content h4 { font-weight: 700; font-size: .95rem; margin-bottom: .25rem; }
.doc-step-content p { font-size: .85rem; color: #9aa0ab; line-height: 1.6; }
html:not(.dark) .doc-step-content p { color: #5f6673; }

.doc-badge-admin { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .5rem; border-radius: 20px; font-size: .65rem; font-weight: 700; background: rgba(239,68,68,0.1); color: #f87171; text-transform: uppercase; letter-spacing: .5px; }
.doc-badge-user { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .5rem; border-radius: 20px; font-size: .65rem; font-weight: 700; background: rgba(59,130,246,0.1); color: #60a5fa; text-transform: uppercase; letter-spacing: .5px; }
html:not(.dark) .doc-badge-admin { background: rgba(239,68,68,0.08); color: #dc2626; }
html:not(.dark) .doc-badge-user { background: rgba(59,130,246,0.08); color: #2563eb; }

.faq-item { border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; overflow: hidden; transition: all var(--transition); }
.faq-item:hover { border-color: rgba(165,21,45,0.2); }
.faq-question { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; font-size: .9rem; transition: background var(--transition); }
.faq-question:hover { background: rgba(165,21,45,0.05); }
.faq-question .chevron { transition: transform 300ms ease; font-size: .8rem; color: #9aa0ab; }
.faq-item.open .faq-question .chevron { transform: rotate(180deg); color: var(--brand-light); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 350ms ease, padding 250ms ease; }
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer-inner { padding: 0 1.25rem 1.25rem; font-size: .85rem; line-height: 1.7; color: #9aa0ab; }
html:not(.dark) .faq-item { border-color: #d4d8e0; }
html:not(.dark) .faq-answer-inner { color: #5f6673; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .stat-value { font-size: 1.5rem; }
    .stat-card { padding: .85rem; }
    h1 { font-size: 1.5rem !important; }
}
