/* ===================================================================
   Partner-cabinet look for the admin panel — an OVERRIDE LAYER, like
   partner/theme-allan.css. admin.css still carries the classic design; delete
   the single <link ... theme-allan.css> line in admin/index.html to go back.
   Palette: Tailwind slate (ground/panels) + indigo (accents), glass panels.
   =================================================================== */
:root{
  color-scheme:dark;
  --bg:#0f172a; --band:rgba(30,41,59,.7); --panel:rgba(30,41,59,.7); --panel-2:#1e293b; --panel2:#1e293b;
  --stroke:#1e293b; --stroke-2:#334155; --text:#f8fafc; --muted:#94a3b8;
  --blue:#6366f1; --blue-2:#818cf8; --blue-3:#4f46e5; --accent:#6366f1;
  --green:#34d399; --red:#f87171; --amber:#f59e0b; --radius:12px; --glass-bd:rgba(255,255,255,.1);
}
body{background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size:15.5px;line-height:1.5}
*{scrollbar-width:thin;scrollbar-color:#475569 transparent}
*::-webkit-scrollbar{display:block;width:10px;height:10px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{background:#475569;border-radius:999px;border:2px solid transparent;background-clip:padding-box}

/* ---- Accessibility: a visible keyboard focus everywhere, calmer motion on request ---- */
:where(button,a,input,select,textarea,[tabindex]):focus-visible{outline:2px solid #818cf8;outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{transition-duration:.01ms!important;animation-duration:.01ms!important}}
.sm{font-size:13.5px}
.muted{color:#94a3b8}

/* ---- Buttons ---- */
.btn{border-radius:8px;font-weight:600;font-size:14.5px;padding:10px 18px}
.btn.sm{font-size:13.5px;padding:8px 14px}
.btn.primary{background:#4f46e5;color:#fff;border-color:transparent}
.btn.primary:hover{background:#6366f1}
.btn.ghost{background:#1e293b;border:1px solid #334155;color:#cbd5e1}
.btn.ghost:hover{background:#334155;color:#fff}
.btn.danger{background:transparent;border:1px solid rgba(248,113,113,.4);color:#fca5a5}
.btn.danger:hover{background:rgba(248,113,113,.12)}
.btn-mini,.stat-table .btn-mini,.cardrow-actions .btn-mini,.ad-limit-row .btn-mini,.copy-id,.chart-tools button,.pager button,.wd-retry{background:#1e293b;border:1px solid #334155;color:#cbd5e1;border-radius:8px}
.btn-mini:hover,.stat-table .btn-mini:hover,.cardrow-actions .btn-mini:hover,.copy-id:hover,.chart-tools button:hover,.pager button:hover:not(:disabled){background:#334155;border-color:#475569;color:#fff}
.stat-table .btn-mini.on,.cardrow-actions .btn-mini.ok{background:rgba(52,211,153,.12);border-color:rgba(52,211,153,.35);color:#6ee7b7}
.stat-table .btn-mini.off,.cardrow-actions .btn-mini.off{background:rgba(248,113,113,.12);border-color:rgba(248,113,113,.35);color:#fca5a5}
.pager button.on{background:rgba(79,70,229,.2);border-color:rgba(99,102,241,.5);color:#c7d2fe}
.card-add{background:rgba(79,70,229,.18);border-color:rgba(99,102,241,.45);color:#c7d2fe;border-radius:12px}
.card-add:hover{background:rgba(79,70,229,.28)}

/* ---- Inputs: slate-900 fields, indigo focus ---- */
.filters input,.filters select,.plog-sel,.plog-inp,.setting input[type=text],.setting input[type=number],.setting textarea,
.ad-editor textarea,.ad-editor input,.tpl-editor textarea,.tpl-editor input,.gate-input,.bf-add-row input,.ad-limit-row input[type=number],#code,.cfg-input,.lot-field input,.nav-toggle{
  background-color:#0f172a;border:1px solid #334155;border-radius:8px;color:var(--text);font-size:14.5px}
.filters input:focus,.filters select:focus,.plog-sel:focus,.plog-inp:focus,.setting input:focus,.setting textarea:focus,.ad-editor textarea:focus,.ad-editor input:focus,
.tpl-editor textarea:focus,.tpl-editor input:focus,.gate-input:focus,.bf-add-row input:focus,.ad-limit-row input[type=number]:focus,#code:focus{outline:none;border-color:#6366f1;box-shadow:0 0 0 1px #6366f1}
.filters{background:transparent;border:0;padding:0}

/* ---- Login / 2FA gate ---- */
.login{background:radial-gradient(circle at 30% 0%,rgba(99,102,241,.14),transparent 60%),radial-gradient(circle at 80% 100%,rgba(129,140,248,.08),transparent 60%),var(--bg)}
.login-card{background:var(--panel);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid var(--glass-bd);border-radius:14px}
.discord-btn{background:#5865f2;color:#fff}
.boot-spin{border-top-color:#818cf8}

/* ---- Header: glass, sticky ---- */
.topbar{position:sticky;top:0;z-index:40;background:rgba(30,41,59,.72);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid #1e293b;padding:14px 24px}
.topbar .brand-sm{font-size:21px;font-weight:700;letter-spacing:-.01em}
.lang-switch{background:#1e293b;border:1px solid #334155;border-radius:999px}
.lang-switch button{border-radius:999px;color:#94a3b8;font-size:13px;padding:5px 11px}
.lang-switch button.active{background:#4f46e5;color:#fff}
.cab-av{border-color:#334155}
.cab-av:hover{border-color:#6366f1}
.nav-menu{background:#1e293b;border-color:#334155;border-radius:12px}
.nm-banner{background:linear-gradient(135deg,#4f46e5,#818cf8)}
.nm-sep{background:#334155}
#view-banner{background:rgba(79,70,229,.16);border-bottom:1px solid rgba(99,102,241,.4);color:#c7d2fe}

/* ---- Sidebar: glass column, icon + label items ---- */
.sidebar{background:rgba(30,41,59,.7);border-right:1px solid #1e293b;padding:16px}
.tabs{gap:6px;margin-top:0}
.tab,.folder-head{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:8px;color:#94a3b8;font-size:15px;font-weight:500;background:transparent;text-align:left}
.tab::before,.folder-head::before{content:"";flex:none;width:18px;height:18px;background:currentColor;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat}
.tab{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E")}
.folder-head{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.7-.9l-.8-1.2A2 2 0 0 0 7.9 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z'/%3E%3C/svg%3E")}
.folder-head .folder-caret{order:3;margin-left:auto}
.tab:hover,.folder-head:hover{background:#1e293b;color:#e2e8f0}
.tab.active{background:rgba(79,70,229,.2);color:#818cf8}
.folder-head.has-active{color:#818cf8}
.folder-body{border-left-color:#334155}
.nav-drop-into{outline-color:#818cf8;background:rgba(79,70,229,.12)}
.tab[data-tab="pulse"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-4l-3 9L9 3l-3 9H2'/%3E%3C/svg%3E")}
.tab[data-tab="tagcheck"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4 13.4 20.6a2 2 0 0 1-2.8 0L2 12V2h10l8.6 8.6a2 2 0 0 1 0 2.8z'/%3E%3Ccircle cx='7' cy='7' r='1.5'/%3E%3C/svg%3E")}
.tab[data-tab="stats"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 16v-5M12 16V8M17 16V7'/%3E%3C/svg%3E")}
.tab[data-tab="bi"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.2 15.9A10 10 0 1 1 8 2.8'/%3E%3Cpath d='M22 12A10 10 0 0 0 12 2v10z'/%3E%3C/svg%3E")}
.tab[data-tab="adstats"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E")}
.tab[data-tab="activity"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E")}
.tab[data-tab="shares"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3v9l6.4 6.4'/%3E%3C/svg%3E")}
.tab[data-tab="balances"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E")}
.tab[data-tab="templates"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E")}
.tab[data-tab="toggle"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E")}
.tab[data-tab="feed"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16'/%3E%3Ccircle cx='5' cy='19' r='1'/%3E%3C/svg%3E")}
.tab[data-tab="lots"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m14 13-7.5 7.5a2.1 2.1 0 0 1-3-3L11 10'/%3E%3Cpath d='m16 16 6-6M8 8l6-6M9 7l8 8M21 11l-8-8'/%3E%3C/svg%3E")}
.tab[data-tab="system"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='8' rx='2'/%3E%3Crect x='2' y='13' width='20' height='8' rx='2'/%3E%3Cpath d='M6 7h.01M6 17h.01'/%3E%3C/svg%3E")}
.tab[data-tab="fleet"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='8' width='16' height='12' rx='3'/%3E%3Cpath d='M12 8V5'/%3E%3Ccircle cx='12' cy='4' r='1'/%3E%3Cpath d='M9 13v1.5M15 13v1.5'/%3E%3C/svg%3E")}
.tab[data-tab="tagecon"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E")}
.tab[data-tab="settings"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6'/%3E%3C/svg%3E")}
.tab[data-tab="stays"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E")}
.tab[data-tab="giveaways"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M12 8v13M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7'/%3E%3Cpath d='M7.5 8a2.5 2.5 0 0 1 0-5C11 3 12 8 12 8s1-5 4.5-5a2.5 2.5 0 0 1 0 5'/%3E%3C/svg%3E")}
.tab[data-tab="breeders"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E")}
.tab[data-tab="allan"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E")}
.tab[data-tab="servernet"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2' width='6' height='6' rx='1'/%3E%3Crect x='2' y='16' width='6' height='6' rx='1'/%3E%3Crect x='16' y='16' width='6' height='6' rx='1'/%3E%3Cpath d='M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3M12 12V8'/%3E%3C/svg%3E")}
.tab[data-tab="autocmd"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2 2'/%3E%3Cpath d='M5 3 2 6M22 6l-3-3'/%3E%3C/svg%3E")}
.tab[data-tab="modmail"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.5 5.1 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.5-6.9A2 2 0 0 0 16.8 4H7.2a2 2 0 0 0-1.7 1.1z'/%3E%3C/svg%3E")}
.tab[data-tab="authbot"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpolyline points='10 17 15 12 10 7'/%3E%3Cline x1='15' y1='12' x2='3' y2='12'/%3E%3C/svg%3E")}
.tab[data-tab="durak"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='11' height='15' rx='2' transform='rotate(-12 8.5 12.5)'/%3E%3Crect x='10' y='4' width='11' height='15' rx='2'/%3E%3Cpath d='M15.5 9.5v5M13 12h5'/%3E%3C/svg%3E")}
.tab[data-tab="admins"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E")}
.tab[data-tab="oldvemoni"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='5' rx='1'/%3E%3Cpath d='M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8M10 12h4'/%3E%3C/svg%3E")}

/* ---- Content column: full width like the cabinet ---- */
.content{max-width:none;padding:28px 32px 64px}
.pane h1{font-size:28px;font-weight:700;letter-spacing:-.01em}
.pane h2{font-size:20px;font-weight:700}
.pane>p.muted{font-size:15px;line-height:1.55;max-width:900px}
.row-title{color:#94a3b8}

/* ---- Stat cards: glass + coloured accent, as in the cabinet ---- */
.cards{gap:16px}
.stat-card,.bf-sum-card{background:var(--panel);border:1px solid #6366f1;border-left-width:4px;border-radius:12px;padding:18px 20px}
.cards>.stat-card:nth-child(4n+2),.bf-summary>.bf-sum-card:nth-child(4n+2){border-color:#10b981}
.cards>.stat-card:nth-child(4n+3),.bf-summary>.bf-sum-card:nth-child(4n+3){border-color:#f59e0b}
.cards>.stat-card:nth-child(4n+4),.bf-summary>.bf-sum-card:nth-child(4n+4){border-color:#a855f7}
.stat-card .k,.bf-sum-card .k{color:#94a3b8;font-size:13px;font-weight:600;letter-spacing:.03em}
.stat-card .v,.bf-sum-card .v{font-size:28px;font-weight:700;line-height:1.15}

/* ---- Panels = glass cards ---- */
.toggle-card,.setting,.ad-editor,.tpl-editor,.ad-stat-card,.cardrow,.bf-card,.bf-access-row,.plog-row,.vemoni-card,.ref-card,.te-group{
  background:var(--panel);border:1px solid var(--glass-bd);border-radius:12px}
.ad-editor.card,.tpl-editor.card{background:#1e293b}
.bf-stat{background:#0f172a}
.cardrow.deleted{border-color:rgba(248,113,113,.3);background:rgba(248,113,113,.06)}
.ad-text-preview,.modal .req{background:#0f172a;border-color:#334155}
.warn-banner{border-radius:12px}

/* ---- Tables ---- */
.table-wrap{background:var(--panel);border:1px solid var(--glass-bd);border-radius:12px}
.stat-table th{background:rgba(15,23,42,.55);color:#94a3b8;font-size:12px}
.stat-table th,.stat-table td{border-bottom-color:#1e293b;padding:12px 14px}
.stat-table tr:last-child td{border-bottom:0}
.stat-table tr.clickable:hover td{background:rgba(99,102,241,.08)}
.chip,.stat-table .chip{border-radius:999px}
.stat-table .chip.green,.chip.green{background:rgba(52,211,153,.15);color:#6ee7b7}
.stat-table .chip.red,.chip.red{background:rgba(248,113,113,.15);color:#fca5a5}
.stat-table .chip.blue,.chip.blue{background:rgba(99,102,241,.18);color:#a5b4fc}
.chip.amber{background:rgba(245,158,11,.15);color:#fcd34d}
.stat-pill{background:#1e293b;border-color:#334155}
.stat-pill.total{background:rgba(99,102,241,.15);border-color:rgba(99,102,241,.35);color:#c7d2fe}

/* ---- Switches, segmented controls, charts ---- */
.slider{background:#334155}
.mode-switch{background:#1e293b;border:1px solid #334155;border-radius:10px}
.mode-switch button.active{background:#4f46e5;color:#fff}
.vchart-ranges button{background:#1e293b;border-color:#334155;color:#94a3b8}
.vchart-ranges button.active{background:#4f46e5;border-color:#4f46e5;color:#fff}
.vtile{background:#1e293b;border-color:#334155}
.vchart-wrap{background:rgba(15,23,42,.5);border-color:var(--glass-bd)}

/* ---- Journal ---- */
.plog-sv{color:#818cf8}
.plog-tag{background:rgba(255,255,255,.07)}
.plog-title{font-size:14.5px}
.plog-sub{font-size:13px}

/* ---- Modal, toast ---- */
.modal-overlay{background:rgba(2,6,23,.7);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.modal{background:#1e293b;border:1px solid #334155;border-radius:14px}
.toast{background:#1e293b;border-color:#334155}

/* ---- Desktop: the section list stays in view while a long pane scrolls ---- */
@media (min-width:901px){
  /* its own scroll: a long menu scrolls inside, and the wheel never spills over to the page */
  .sidebar .tabs{position:sticky;top:88px;max-height:calc(100vh - 104px);max-height:calc(100dvh - 104px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable;padding-right:4px;margin-right:-4px}
}
/* ---- Tablet/phone ---- */
@media (max-width:900px){
  .sidebar{border-right:0;border-bottom:1px solid #1e293b}
  .nav-toggle{background:#1e293b;border-color:#334155;color:var(--text)}
  .sidebar .tab,.sidebar .folder-head{background:#1e293b}
  .sidebar .tab.active{background:rgba(79,70,229,.25);color:#c7d2fe}
  .content{padding:18px 14px 60px}
  .topbar{padding:10px 12px}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .stat-card{padding:12px 12px 12px 11px;border-left-width:3px}
  .stat-card .k{font-size:11.5px}
  .stat-card .v{font-size:20px}
  .pane h1{font-size:22px}
}
