/* =========================================================
   Tripjen Plus – Master Admin  |  style.css  (v3)
   Theme tokens, components, dark mode, responsive, print
   ========================================================= */

:root {
    --bg: #F8F9FA;
    --surface: #FFFFFF;
    --surface2: #F8F9FA;
    --line: #E5E7EB;
    --text: #111111;
    --muted: #666666;
    --brand: #FF2A00;
    --brand-soft: #FFF1ED;
    --green: #10B981;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
    --chart-text: #6B7280;
    --chart-grid: #E5E7EB;
    color-scheme: light;
}
html.dark {
    --bg: #0C0C10;
    --surface: #15151B;
    --surface2: #1B1B23;
    --line: #2A2A34;
    --text: #ECECF1;
    --muted: #9A9AA8;
    --brand-soft: rgba(255, 42, 0, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --chart-text: #9A9AA8;
    --chart-grid: #2A2A34;
    color-scheme: dark;
}

html, body { height: 100%; }
body { height: 100vh; height: 100dvh; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface2); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #FF2A00; }

/* ---------- Legacy utility remaps (so existing Tailwind classes follow the theme) ---------- */
.surface { background: var(--surface); }
.surface2 { background: var(--surface2); }
.surface-glass { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); }
.muted { color: var(--muted); }
.line { border-color: var(--line); }
.line-bg { background: var(--line); }

html.dark .bg-white { background-color: var(--surface) !important; }
html.dark .bg-tripjen-bg { background-color: var(--bg) !important; }
html.dark .bg-gray-50 { background-color: var(--surface2) !important; }
html.dark .bg-gray-100 { background-color: #23232d !important; }
html.dark .border-gray-100, html.dark .border-gray-200 { border-color: var(--line) !important; }
html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: var(--line) !important; }
html.dark .text-tripjen-dark { color: var(--text) !important; }
html.dark .text-tripjen-gray { color: var(--muted) !important; }
html.dark .hover\:bg-gray-50:hover { background-color: var(--surface2) !important; }
html.dark .bg-tripjen-light, html.dark .bg-tripjen-light\/50 { background-color: var(--brand-soft) !important; }
html.dark .bg-emerald-50 { background-color: rgba(16, 185, 129, .12) !important; }
html.dark .bg-indigo-50 { background-color: rgba(99, 102, 241, .14) !important; }
html.dark .bg-emerald-100 { background-color: rgba(16, 185, 129, .18) !important; }
html.dark .bg-red-100 { background-color: rgba(239, 68, 68, .18) !important; }
html.dark .bg-amber-100 { background-color: rgba(245, 158, 11, .18) !important; }
html.dark .text-emerald-700, html.dark .text-emerald-600 { color: #34D399 !important; }
html.dark .text-red-700 { color: #FCA5A5 !important; }
html.dark .text-amber-700, html.dark .text-amber-600 { color: #FCD34D !important; }
html.dark .text-indigo-700, html.dark .text-indigo-600 { color: #A5B4FC !important; }
html.dark .text-gray-300 { color: #4B5563 !important; }
html.dark .hover\:bg-tripjen-light\/30:hover { background-color: var(--brand-soft) !important; }
html.dark .hover\:bg-emerald-50\/50:hover { background-color: rgba(16, 185, 129, .1) !important; }
html.dark .hover\:bg-indigo-50\/50:hover { background-color: rgba(99, 102, 241, .1) !important; }

/* ---------- Ambient + shapes ---------- */
.ambient-glow-1 { position: absolute; top: -10%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(255,42,0,0.06) 0%, rgba(248,249,250,0) 70%); z-index: 0; pointer-events: none; }
.ambient-glow-2 { position: absolute; bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(255,42,0,0.04) 0%, rgba(248,249,250,0) 70%); z-index: 0; pointer-events: none; }
html.dark .ambient-glow-1, html.dark .ambient-glow-2 { opacity: .5; }
.squircle-sm { border-radius: 24px; }
.animate-fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Surfaces & type ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); }
.label { display: block; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.card-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--text); margin-bottom: 1rem; }
.panel-head { padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.thead { background: var(--surface2); color: var(--muted); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; box-shadow: 0 1px 0 var(--line); }
.kbd { font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface2); color: var(--muted); }

/* ---------- Inputs ---------- */
.field { width: 100%; padding: .875rem 1rem; background: var(--surface2); border: 1px solid var(--line); border-radius: .75rem; color: var(--text); font-weight: 700; outline: none; transition: all .15s; box-shadow: inset 0 1px 2px rgba(0,0,0,.04); }
.field::placeholder { color: var(--muted); opacity: .55; font-weight: 500; }
.field:focus { background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field-sm { padding: .625rem 1rem; font-size: .875rem; font-weight: 500; }
.select { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--line); border-radius: .6rem; padding: .55rem .6rem; background: var(--surface); color: var(--muted); outline: none; min-width: 0; }
.select:focus { border-color: var(--brand); }
input[type="date"].select { text-transform: none; letter-spacing: 0; }
html.dark input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem .9rem; border-radius: .75rem; font-weight: 900; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; transition: all .15s; white-space: nowrap; cursor: pointer; border: 1px solid transparent; color: #fff; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: #FF2A00; } .btn-primary:hover { background: #E62600; }
.btn-green { background: #10B981; } .btn-green:hover { background: #059669; }
.btn-warn { background: #F59E0B; } .btn-warn:hover { background: #D97706; }
.btn-blue { background: #2563EB; } .btn-blue:hover { background: #1D4ED8; }
.btn-dark { background: #1E293B; } .btn-dark:hover { background: #0F172A; }
html.dark .btn-dark { background: #2A2A36; } html.dark .btn-dark:hover { background: #343444; }
.btn-wa { background: #16A34A; } .btn-wa:hover { background: #15803D; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); font-weight: 700; box-shadow: var(--shadow); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn { width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .75rem; background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: all .15s; flex-shrink: 0; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.chip { padding: .15rem .6rem; border-radius: .4rem; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; background: var(--surface2); color: var(--muted); border: 1px solid var(--line); }
.chip-lg { padding: .4rem .75rem; border-radius: .6rem; background: var(--surface2); border: 1px solid var(--line); font-weight: 700; }
.chip-btn { padding: .45rem .7rem; border-radius: .6rem; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: all .15s; }
.chip-btn:hover, .chip-btn.on { color: var(--brand); border-color: var(--brand); }

/* ---------- Header: sync pill, menu ---------- */
.sync-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); height: 2.5rem; }
.sync-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #9CA3AF; flex-shrink: 0; }
.sync-pill[data-state="synced"] .sync-dot { background: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
.sync-pill[data-state="dirty"] { color: #B45309; border-color: #F59E0B; } .sync-pill[data-state="dirty"] .sync-dot { background: #F59E0B; animation: pulse 1.4s infinite; }
.sync-pill[data-state="syncing"] .sync-dot { background: #3B82F6; animation: pulse .8s infinite; }
.sync-pill[data-state="error"] { color: #DC2626; border-color: #DC2626; } .sync-pill[data-state="error"] .sync-dot { background: #DC2626; }
.sync-pill[data-state="offline"] { color: #6B7280; } .sync-pill[data-state="offline"] .sync-dot { background: #6B7280; }
@keyframes pulse { 50% { opacity: .35; } }
.banner { padding: .6rem 1.5rem; font-size: 12px; font-weight: 700; background: #FEF3C7; color: #92400E; border-bottom: 1px solid #FCD34D; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
html.dark .banner { background: rgba(245,158,11,.14); color: #FCD34D; border-color: rgba(245,158,11,.3); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; box-shadow: 0 20px 40px -10px rgba(0,0,0,.25); padding: .4rem; z-index: 100; }
.menu-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .65rem .8rem; border-radius: .6rem; font-size: 12px; font-weight: 700; color: var(--text); text-align: left; }
.menu-item:hover { background: var(--surface2); color: var(--brand); }
.menu-item i { width: 1rem; color: var(--muted); }


/* ---------- Sidebar ---------- */
.nav-btn { width: 100%; text-align: left; padding: 1rem 1.25rem; transition: background .15s; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #000; }
.nav-btn-alt { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); }
.nav-btn-alt:hover { background: var(--surface2); }
.nav-btn.is-active { box-shadow: inset 4px 0 0 var(--brand); }
.badge-count { min-width: 1.5rem; text-align: center; padding: .1rem .5rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 900; }
.agent-item { padding: 1rem; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; cursor: pointer; transition: background .12s; }
.agent-item:hover { background: var(--surface2); }
.active-agent { background-color: #FFF1ED !important; border-left: 4px solid #FF2A00 !important; }
html.dark .active-agent { background-color: var(--brand-soft) !important; }
.agent-item.kb-focus { outline: 2px solid var(--brand); outline-offset: -2px; }
.tab-active { border-bottom: 2px solid #FF2A00; color: #FF2A00; font-weight: 700; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }

/* ---------- KPI cards ---------- */
.kpi { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1.1rem 1.1rem 1rem 1.4rem; box-shadow: var(--shadow); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--k, #999); }
.kpi-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .4rem; }
.kpi-value { font-size: 1.35rem; font-weight: 900; letter-spacing: -.01em; line-height: 1.2; word-break: break-word; }
.kpi-sub { margin-top: .3rem; font-size: 11px; font-weight: 600; color: var(--muted); min-height: 1rem; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--chart-text); font-family: 'Outfit', sans-serif; font-size: 10px; font-weight: 600; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .zero { stroke: var(--chart-text); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; }
.chart .big { font-size: 15px; font-weight: 900; fill: var(--text); }
.chart rect.bar { transition: opacity .15s; } .chart rect.bar:hover { opacity: .75; }
.chart-empty { padding: 2.5rem 1rem; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.hbar .track { height: .5rem; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); overflow: hidden; margin-top: .3rem; }
.hbar .fill { height: 100%; border-radius: 999px; transition: width .4s cubic-bezier(.16,1,.3,1); }
.hbar .row { display: flex; justify-content: space-between; gap: .75rem; font-size: 12px; font-weight: 700; }
.hbar .row span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .sub { font-size: 10px; font-weight: 600; color: var(--muted); }

/* ---------- Keep Tailwind's "hidden" working on our custom components ----------
   (.btn / .banner / .menu-item set their own display, which would otherwise win or lose depending on
   whether the Tailwind CDN style or this file loads last.) Two-class selectors beat either order. */
.btn.hidden, .banner.hidden, .menu.hidden, .menu-item.hidden, .overlay.hidden, .drawer.hidden, .toast.hidden { display: none; }

/* ---------- Agent pane layout ---------- */
/* Tall screens: the ledger table fills the space under the toolbars and scrolls inside itself.
   Short screens (laptops): the header, tabs and toolbars leave only a sliver, so instead the WHOLE
   agent pane scrolls (tabs stay pinned) and the table takes its natural height. */
#detailBody { min-height: 560px; }
#ledgerScroll { min-height: 260px; }
@media (max-height: 860px) {
    #detailBody { min-height: 0; flex: 0 0 auto; }
    #view-logs, #view-bookings, #view-insights { flex: 0 0 auto; min-height: 0; overflow: visible; }
    #ledgerScroll { flex: 0 0 auto; min-height: 0; max-height: none; }   /* only scrolls sideways if the table is wider than the pane */
    #bookingsGridContainer { flex: 0 0 auto; overflow: visible; }
}

/* ---------- Ledger ---------- */
.badge { display: inline-block; padding: .1rem .5rem; border-radius: .3rem; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--surface2); color: var(--text); border: 1px solid var(--line); }
.badge-credit { background: rgba(16,185,129,.12); color: #059669; border-color: rgba(16,185,129,.3); }
.badge-debit { background: rgba(255,42,0,.1); color: #DC2626; border-color: rgba(255,42,0,.25); }
.badge-rev { background: rgba(245,158,11,.14); color: #B45309; border-color: rgba(245,158,11,.35); }
html.dark .badge-credit { color: #34D399; } html.dark .badge-debit { color: #FCA5A5; } html.dark .badge-rev { color: #FCD34D; }
tr.row-flag td { background: rgba(245,158,11,.1); }
tr.row-reversed td { opacity: .55; }
tr.row-reversed td:nth-child(4) { text-decoration: line-through; }
.row-act { opacity: 0; transition: opacity .12s; color: var(--muted); padding: .25rem .45rem; border-radius: .4rem; }
tr:hover .row-act, .row-act:focus { opacity: 1; }
.row-act:hover { color: var(--brand); background: var(--brand-soft); }
.integrity { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; border: 1px solid; }
.integrity[data-state="ok"] { color: #059669; border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.08); cursor: default; }
.integrity[data-state="warn"] { color: #B45309; border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.12); cursor: pointer; }
.integrity[data-state="na"] { color: var(--muted); border-color: var(--line); background: var(--surface2); cursor: default; }
html.dark .integrity[data-state="ok"] { color: #34D399; } html.dark .integrity[data-state="warn"] { color: #FCD34D; }

/* ---------- Modals / dialog / palette / drawer / toasts ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.overlay-top { z-index: 100001; }
.overlay.hidden, .drawer.hidden { display: none; }
.modal { background: var(--surface); width: 100%; max-width: 440px; border-radius: 1rem; box-shadow: 0 25px 60px -12px rgba(0,0,0,.45); overflow: hidden; border: 1px solid var(--line); animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
.tx-preview { padding: .8rem 1rem; border-radius: .75rem; background: var(--surface2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); min-height: 2.9rem; }
.tx-preview .warn { color: #B45309; margin-top: .3rem; }
html.dark .tx-preview .warn { color: #FCD34D; }
.palette { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 30px 70px -15px rgba(0,0,0,.5); overflow: hidden; align-self: flex-start; margin-top: 12vh; animation: pop .15s ease-out; }
.palette-input { width: 100%; padding: 1.1rem 1.25rem 1.1rem 3.25rem; background: transparent; outline: none; font-size: 1rem; font-weight: 600; color: var(--text); }
.palette-sec { padding: .5rem 1.25rem .25rem; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.palette-item { display: flex; align-items: center; gap: .85rem; padding: .6rem 1.25rem; cursor: pointer; }
.palette-item .ic { width: 2rem; height: 2rem; border-radius: .55rem; background: var(--surface2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.palette-item .t { font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .s { font-size: 11px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .r { margin-left: auto; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.palette-item.sel { background: var(--brand-soft); }
.palette-item.sel .ic { color: var(--brand); border-color: var(--brand); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -20px 0 50px -20px rgba(0,0,0,.35); z-index: 99998; display: flex; flex-direction: column; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.act-row { padding: .8rem 1.25rem; border-bottom: 1px solid var(--line); font-size: 12px; }
.act-row .a { font-weight: 800; color: var(--text); } .act-row .d { color: var(--muted); font-weight: 600; margin-top: .1rem; word-break: break-word; } .act-row .t { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 10px; margin-top: .2rem; }
.toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 100002; display: flex; flex-direction: column; gap: .5rem; align-items: center; width: min(92vw, 460px); pointer-events: none; }
.toast { pointer-events: auto; width: 100%; display: flex; gap: .75rem; align-items: center; padding: .8rem 1rem; border-radius: .85rem; background: #111827; color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 15px 35px -10px rgba(0,0,0,.5); animation: pop .18s ease-out; border-left: 4px solid #6B7280; }
.toast.success { border-left-color: #10B981; } .toast.error { border-left-color: #FF2A00; } .toast.warn { border-left-color: #F59E0B; }
.toast .msg { flex: 1; min-width: 0; word-break: break-word; }
.toast button { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: #FCA5A5; padding: .2rem .4rem; }
.toast button:hover { color: #fff; }

/* ---------- Print ---------- */
.pl-head { text-align: center; margin-bottom: 20px; font-family: 'Outfit', sans-serif; border-bottom: 2px solid #111; padding-bottom: 14px; }
.pl-head h2 { font-size: 22px; font-weight: 800; color: #111; margin: 0; }
.pl-company { font-size: 16px; font-weight: 700; color: #FF2A00; margin: 5px 0; }
.pl-contact { font-size: 12px; color: #333; margin: 3px 0; font-weight: 600; }
.pl-meta { font-size: 11px; color: #666; margin: 0; }
.pl-sum { display: flex; gap: 0; border: 1px solid #ddd; margin: 0 0 14px; font-family: sans-serif; }
.pl-sum div { flex: 1; padding: 8px 10px; border-right: 1px solid #ddd; font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: .05em; }
.pl-sum div:last-child { border-right: 0; } .pl-sum b { display: block; font-size: 13px; color: #111; margin-top: 3px; letter-spacing: 0; text-transform: none; }
.pl-table { width: 100%; border-collapse: collapse; font-size: 11px; font-family: sans-serif; text-align: left; }
.pl-table th { background: #111; color: #fff; border: 1px solid #ddd; padding: 8px; }
.pl-table td { border: 1px solid #ddd; padding: 7px; color: #333; }
.pl-table tr:nth-child(even) td { background: #f9f9f9; }
.pl-table .r { text-align: right; font-weight: 700; } .pl-table .cr { color: green; } .pl-table .dr { color: red; }
.pl-table thead { display: table-header-group; } .pl-table tr { page-break-inside: avoid; }
.pl-foot { margin-top: 14px; font-size: 10px; color: #777; font-family: sans-serif; text-align: center; }
@media print {
    @page { margin: 12mm; }
    html.dark body, body { background: #fff !important; }
    body * { visibility: hidden; }
    #printableLedger, #printableLedger * { visibility: visible; }
    #printableLedger { position: absolute; left: 0; top: 0; width: 100%; background: #fff; color: #111; z-index: 999999; display: block !important; padding: 0; }
    .toasts, .ambient-glow-1, .ambient-glow-2 { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
    #sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); z-index: 60; transform: translateX(-102%); transition: transform .25s cubic-bezier(.16,1,.3,1); padding-top: env(safe-area-inset-top); }
    #sidebar.drawer-open { transform: none; box-shadow: 20px 0 50px -10px rgba(0,0,0,.35); }
}
@media (max-width: 640px) {
    .btn { padding: .55rem .7rem; }
    .kpi-value { font-size: 1.1rem; }
    .toasts { bottom: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}