:root {
  --bg: #0a0e18;
  --bg-2: #0e1422;
  --panel: #121a2b;
  --panel-2: #16203360;
  --panel-solid: #141d30;
  --line: #243250;
  --line-soft: #1b2540;
  --text: #e9eef8;
  --text-dim: #93a0bd;
  --text-faint: #5f6c8a;
  --brand: #6ea8fe;
  --brand-2: #8b7dff;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --teal: #2dd4bf;
  --pink: #f472b6;
  --amber: #f59e0b;
  --ns: #2ea3f2;            /* NetSuite blue */
  --shadow: 0 10px 30px rgba(0,0,0,.4);
  --radius: 14px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1100px 600px at 100% -10%, #14203c 0%, transparent 55%),
    radial-gradient(900px 500px at -5% 0%, #161a36 0%, transparent 50%),
    var(--bg) fixed;
  color: var(--text);
  display: flex; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 256px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--bg-2), #090d17);
  border-right: 1px solid var(--line-soft);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-thumb { background: #1e2840; border-radius: 9px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 20px;
  color: #0b0f1a; box-shadow: 0 6px 18px rgba(110,168,254,.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 10.5px; color: var(--text-dim); letter-spacing: 1.3px; text-transform: uppercase; }

/* NetSuite badge */
.ns-badge {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, rgba(46,163,242,.14), rgba(46,163,242,.04));
  border: 1px solid rgba(46,163,242,.32); border-radius: 11px; padding: 9px 11px;
  cursor: default;
}
.ns-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.5)} 70%{box-shadow:0 0 0 7px rgba(52,211,153,0)} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0)} }
.ns-badge-text { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.ns-badge-title { font-size: 12px; font-weight: 600; color: #bfe1ff; }
.ns-badge-sub { font-size: 10.5px; color: var(--text-dim); font-family: var(--mono); }
.ns-refresh { font-size: 15px; color: var(--ns); cursor: pointer; transition: transform .4s; }
.ns-refresh:hover { transform: rotate(180deg); }
.ns-refresh.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-faint); padding: 12px 12px 5px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  background: transparent; border: 0; color: var(--text-dim);
  font-size: 13.5px; font-weight: 500; font-family: inherit;
  padding: 9px 12px; border-radius: 9px; cursor: pointer; text-align: left;
  transition: all .14s ease; width: 100%; position: relative;
}
.nav-item .nav-ico { font-size: 13px; opacity: .85; width: 17px; text-align: center; }
.nav-item .nav-count { margin-left: auto; font-size: 10px; font-family: var(--mono); color: var(--text-faint); background: var(--bg); padding: 1px 6px; border-radius: 8px; border: 1px solid var(--line-soft); }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, rgba(110,168,254,.18), rgba(139,125,255,.05)); color: #fff; box-shadow: inset 0 0 0 1px rgba(110,168,254,.28); }
.nav-item.active .nav-ico { color: var(--brand); opacity: 1; }
.nav-item.active .nav-count { color: var(--brand); border-color: rgba(110,168,254,.4); }

.sidebar-foot { margin-top: auto; padding-top: 8px; }
.health { display: flex; align-items: center; gap: 13px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 13px; padding: 12px; }
.health-ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-family: 'Space Grotesk'; font-weight: 700; font-size: 19px;
  background: radial-gradient(closest-side, var(--panel) 78%, transparent 80%), conic-gradient(var(--good) 91%, #26324d 0); }
.health-meta { display: flex; flex-direction: column; gap: 3px; }
.health-label { font-size: 11.5px; color: var(--text-dim); }
.health-trend { font-size: 11.5px; font-weight: 600; }
.health-trend.up { color: var(--good); }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  padding: 18px 26px 14px; border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 30;
  background: rgba(10,14,24,.86); backdrop-filter: blur(13px); flex-wrap: wrap;
}
.crumb { font-size: 11.5px; color: var(--text-dim); font-family: var(--mono); margin-bottom: 5px; }
.crumb b { color: var(--brand); font-weight: 600; }
.topbar-left h1 { font-family: 'Space Grotesk'; font-size: 23px; font-weight: 700; }
.page-sub { color: var(--text-dim); font-size: 13px; margin-top: 3px; max-width: 620px; }
.topbar-right { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.fld { display: flex; flex-direction: column; gap: 3px; }
.fld span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-faint); padding-left: 2px; }
.fld select {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  font-family: inherit; font-size: 12.5px; font-weight: 500; padding: 7px 9px; border-radius: 9px; cursor: pointer; min-width: 116px;
}
.fld select:hover { border-color: var(--brand); }
.seg { display: flex; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 9px; padding: 3px; align-self: flex-end; }
.seg-btn { border: 0; background: transparent; color: var(--text-dim); font-family: inherit; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 7px; cursor: pointer; transition: all .14s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--brand); color: #08101f; }
.export-btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 8px 13px; border-radius: 9px; cursor: pointer; align-self: flex-end; transition: all .14s; }
.export-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Ticker */
.ticker { background: var(--bg-2); border-bottom: 1px solid var(--line-soft); overflow: hidden; height: 34px; display: flex; align-items: center; position: sticky; top: 0; z-index: 10; }
.ticker-track { display: flex; gap: 34px; white-space: nowrap; animation: marquee 60s linear infinite; padding-left: 26px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk { font-size: 12px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); }
.tk b { color: var(--text); font-weight: 600; }
.tk .up { color: var(--good); } .tk .down { color: var(--bad); }
.tk .tag { font-size: 9px; background: rgba(46,163,242,.16); color: #7fd0ff; padding: 1px 5px; border-radius: 5px; letter-spacing: .5px; }

.content { padding: 20px 26px 8px; }
.foot { margin-top: auto; padding: 16px 26px; display: flex; justify-content: space-between; color: var(--text-faint); font-size: 11.5px; border-top: 1px solid var(--line-soft); gap: 12px; flex-wrap: wrap; }

/* ---------- Fold structure ---------- */
.fold { margin-bottom: 26px; }
.fold-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.fold-num { font-family: var(--mono); font-size: 11px; color: var(--bg); background: linear-gradient(135deg,var(--brand),var(--brand-2)); padding: 3px 8px; border-radius: 7px; font-weight: 700; }
.fold-title { font-family: 'Space Grotesk'; font-size: 16px; font-weight: 600; }
.fold-desc { font-size: 12px; color: var(--text-dim); }
.fold-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.fold-src { font-size: 10.5px; font-family: var(--mono); color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px; }
.fold-src::before { content: '◆'; color: var(--ns); font-size: 8px; }

/* ---------- Grid + Cards ---------- */
.grid { display: grid; gap: 14px; }
.kpi-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
.kpi-grid.wide { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px){ .span-2 { grid-column: span 1; } }
.g-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.g-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
@media (max-width: 980px){ .g-2-1, .g-1-2 { grid-template-columns: 1fr; } }

.card { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); position: relative; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; gap: 10px; }
.card.flush .card-head { padding: 14px 16px 0; }
.card-title { font-size: 13.5px; font-weight: 600; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.card-title .ico { color: var(--brand); }
.card-tag { font-size: 10.5px; color: var(--text-dim); background: var(--bg-2); border: 1px solid var(--line-soft); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.card-src { font-size: 10px; font-family: var(--mono); color: var(--text-faint); padding: 9px 16px 12px; border-top: 1px solid var(--line-soft); margin-top: 12px; display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.card-src .ns-chip { color: #7fd0ff; display: inline-flex; align-items: center; gap: 5px; }
.card-src .ns-chip::before { content: 'NS'; font-size: 8px; font-weight: 700; background: rgba(46,163,242,.2); color: #7fd0ff; padding: 1px 4px; border-radius: 4px; }

/* KPI */
.kpi { overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset: 0 0 auto auto; width: 110px; height: 110px; background: radial-gradient(circle at top right, rgba(110,168,254,.10), transparent 70%); pointer-events: none; }
.kpi-label { font-size: 11.5px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.kpi-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.kpi-value { font-family: 'Space Grotesk'; font-size: 25px; font-weight: 700; margin: 7px 0 5px; letter-spacing: .3px; }
.kpi-value.sm { font-size: 21px; }
.kpi-sub { font-size: 10.5px; color: var(--text-faint); font-family: var(--mono); margin-bottom: 6px; }
.kpi-delta { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kpi-delta.up { color: var(--good); } .kpi-delta.down { color: var(--bad); } .kpi-delta.flat { color: var(--text-dim); }
.kpi-spark { margin-top: 10px; height: 34px; }
.kpi-bar { margin-top: 9px; }

.chart-wrap { position: relative; height: 270px; }
.chart-wrap.tall { height: 340px; }
.chart-wrap.xtall { height: 400px; }
.chart-wrap.short { height: 190px; }
.chart-wrap.mini { height: 130px; }

/* Tables */
.tbl-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; color: var(--text-dim); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel-solid); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover td { background: rgba(110,168,254,.06); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.tbl .id { font-family: var(--mono); color: var(--ns); font-size: 11.5px; }
.tbl .strong { font-weight: 600; color: #fff; }
.tbl .muted { color: var(--text-faint); }
.tbl.dense td, .tbl.dense th { padding: 6px 9px; font-size: 11.5px; }
.tbl-foot td { font-weight: 700; color: #fff; border-top: 2px solid var(--line); background: var(--bg-2); }

.pill { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 99px; display: inline-block; }
.pill.good { background: rgba(52,211,153,.15); color: var(--good); }
.pill.warn { background: rgba(251,191,36,.15); color: var(--warn); }
.pill.bad { background: rgba(251,113,133,.15); color: var(--bad); }
.pill.info { background: rgba(110,168,254,.15); color: var(--brand); }
.pill.neutral { background: var(--bg-2); color: var(--text-dim); border: 1px solid var(--line-soft); }

.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; min-width: 54px; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bar.good > span { background: linear-gradient(90deg, #10b981, var(--good)); }
.bar.warn > span { background: linear-gradient(90deg, #d97706, var(--warn)); }
.bar.bad > span { background: linear-gradient(90deg, #e11d48, var(--bad)); }

/* RAG status dot */
.rag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.rag::before { content: ''; width: 9px; height: 9px; border-radius: 50%; }
.rag.r::before { background: var(--bad); } .rag.a::before { background: var(--amber); } .rag.g::before { background: var(--good); }

/* Brief / signal lines */
.brief { display: flex; flex-direction: column; gap: 10px; }
.brief-line { display: flex; gap: 11px; align-items: flex-start; padding: 11px 13px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 11px; border-left: 3px solid var(--brand); }
.brief-line.warn { border-left-color: var(--warn); } .brief-line.bad { border-left-color: var(--bad); } .brief-line.good { border-left-color: var(--good); }
.brief-ico { font-size: 15px; line-height: 1.4; }
.brief-body h4 { font-size: 13px; margin-bottom: 3px; }
.brief-body p { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.brief-body .meta { font-family: var(--mono); font-size: 10px; color: var(--text-faint); margin-top: 4px; }

/* Queue / leaderboard rows */
.lrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.lrow:last-child { border-bottom: 0; }
.lrank { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); font-family: 'Space Grotesk'; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.lrank.top { background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #08101f; border: 0; }
.lava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #08101f; flex-shrink: 0; }
.lbody { flex: 1; min-width: 0; }
.lbody h4 { font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.lbody h4 span { color: var(--text-dim); font-weight: 500; font-family: var(--mono); font-size: 11px; }
.lbody p { font-size: 11px; color: var(--text-dim); }
.lval { font-family: 'Space Grotesk'; font-weight: 700; font-size: 14px; white-space: nowrap; }
.lval.good { color: var(--good); }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-step { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 11px; padding: 12px 14px; position: relative; overflow: hidden; }
.funnel-fill { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(110,168,254,.20), rgba(139,125,255,.04)); border-right: 2px solid var(--brand); }
.funnel-content { position: relative; display: flex; justify-content: space-between; align-items: center; }
.funnel-content .label { font-size: 13px; font-weight: 600; }
.funnel-content .count { font-family: 'Space Grotesk'; font-weight: 700; font-size: 15px; }
.funnel-content .rate { font-size: 11px; color: var(--text-dim); }

/* Statement (P&L) layout */
.stmt { width: 100%; border-collapse: collapse; font-size: 13px; }
.stmt td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.stmt .lbl { color: var(--text-dim); }
.stmt .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stmt .lvl1 .lbl { padding-left: 22px; font-size: 12px; }
.stmt .total td { font-weight: 700; color: #fff; border-top: 1px solid var(--line); border-bottom: 2px solid var(--line); }
.stmt .grand td { font-weight: 800; color: #fff; background: var(--bg-2); font-size: 14px; }
.stmt .pos { color: var(--good); } .stmt .neg { color: var(--bad); }

/* Heatmap grid */
.heat { display: grid; gap: 3px; }
.heat-cell { aspect-ratio: 1.7; border-radius: 5px; display: grid; place-items: center; font-size: 10.5px; font-family: var(--mono); color: #06121f; font-weight: 600; }
.heat-cell.empty { background: var(--bg-2) !important; color: transparent; }
.heat-lbl { font-size: 10.5px; color: var(--text-dim); display: grid; place-items: center; font-family: var(--mono); }

/* Gauges */
.gauges { display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-around; }
.gauge { text-align: center; }
.gauge-ring { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 8px; position: relative; }
.gauge-val { font-family: 'Space Grotesk'; font-weight: 700; font-size: 19px; }
.gauge-lbl { font-size: 11.5px; color: var(--text-dim); }

/* Kanban pipeline */
.kan { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 11px; overflow-x: auto; padding-bottom: 6px; }
.kan-col { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 11px; padding: 11px; }
.kan-col h5 { font-size: 11.5px; color: var(--text-dim); display: flex; justify-content: space-between; margin-bottom: 9px; text-transform: uppercase; letter-spacing: .5px; }
.kan-col h5 b { color: var(--text); font-family: var(--mono); }
.kan-card { background: var(--panel); border: 1px solid var(--line-soft); border-left: 3px solid var(--brand); border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; }
.kan-card:last-child { margin-bottom: 0; }
.kan-card .co { font-size: 12px; font-weight: 600; }
.kan-card .amt { font-family: 'Space Grotesk'; font-weight: 700; font-size: 13px; color: var(--good); }
.kan-card .meta { font-size: 10px; color: var(--text-faint); font-family: var(--mono); display: flex; justify-content: space-between; margin-top: 4px; }

/* Stat strip (mini inline metrics) */
.strip { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.strip-item { flex: 1; min-width: 130px; padding: 13px 15px; border-right: 1px solid var(--line-soft); }
.strip-item:last-child { border-right: 0; }
.strip-item .l { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.strip-item .v { font-family: 'Space Grotesk'; font-weight: 700; font-size: 18px; margin-top: 4px; }
.strip-item .d { font-size: 10.5px; font-family: var(--mono); margin-top: 2px; }

/* OKR / progress list */
.okr { display: flex; flex-direction: column; gap: 13px; }
.okr-item h4 { font-size: 13px; display: flex; justify-content: space-between; margin-bottom: 6px; }
.okr-item h4 span { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }
.okr-track { height: 9px; border-radius: 99px; background: var(--line); overflow: hidden; }
.okr-track > span { display: block; height: 100%; border-radius: 99px; }
.okr-item .meta { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

/* Timeline */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: -19px; top: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg); }
.tl-item.done::before { background: var(--good); } .tl-item.risk::before { background: var(--bad); } .tl-item.now::before { background: var(--warn); box-shadow: 0 0 0 4px rgba(251,191,36,.15); }
.tl-item h4 { font-size: 13px; }
.tl-item .when { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); }
.tl-item p { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(4,7,14,.6); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90; }
.drawer-scrim.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 92vw; background: var(--panel-solid); border-left: 1px solid var(--line); box-shadow: -20px 0 50px rgba(0,0,0,.5); transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); z-index: 95; overflow-y: auto; }
.drawer.show { transform: translateX(0); }
.drawer-body { padding: 22px; }
.drawer-body h3 { font-family: 'Space Grotesk'; font-size: 18px; margin-bottom: 4px; }
.drawer-close { position: absolute; top: 16px; right: 18px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 15px; }

.panel { display: none; animation: fade .25s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--panel-solid); border: 1px solid var(--brand); color: var(--text); padding: 11px 19px; border-radius: 11px; font-size: 12.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .3s; box-shadow: var(--shadow); z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group { width: 100%; }
  .content { padding: 16px; }
  .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
