/* =====================================================================================================
   portal-theme.css  -  a dark theme (black + gold, frosted glass) for the dashboard previews (tokens, .glass, .glass-in, .btn, .seg, .aoChip, .pill,
   .delta, table.t, .rail, tabbar, .sp-* store page, .sp-tip tooltip, chart text/grid rules).
   EVERYTHING here is scoped under .portal-theme (the hero dashboard and the Look-inside phone).
   The landing page around them keeps its own dark warm palette and system font stack.
   Inter Variable (SIL OFL 1.1) is vendored for these previews ONLY.
   ===================================================================================================== */
@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;
  src:url(../assets/portal/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

.portal-theme{
  /* portal tokens (dark) */
  --ink:#fff;--inv:#0d0a08;--mute:#cbcbd3;--accent:#f59e0b;--accent2:#d97706;--good:#34d399;--bad:#f87171;--warn:#fbbf24;--grid:rgba(255,255,255,.08);
  --glass-bg:linear-gradient(135deg,rgba(255,255,255,.075),rgba(255,255,255,.03));--glass2:rgba(30,26,24,.82);--stroke:rgba(255,255,255,.10);--hi:rgba(255,255,255,.22);
  --shadow:0 10px 40px rgba(0,0,0,.38);--veil:rgba(12,9,8,.45);--rail:rgba(20,17,15,.62);
  /* neutralise the landing page variables inside the preview */
  --sans:'Inter Variable',Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --line:var(--stroke);--line2:var(--grid);--dim:var(--mute);
  --tap:36px;--gr:24px;--pad:1.25rem;
  position:relative;isolation:isolate;overflow:hidden;background:#0d0a08;color:var(--ink);
  font-family:var(--sans);font-size:16px;line-height:1.5;font-weight:400;letter-spacing:0;-webkit-font-smoothing:antialiased;text-align:left}
.portal-theme *{box-sizing:border-box}
.portal-theme .mono{font-family:inherit;font-variant-numeric:tabular-nums;letter-spacing:inherit}
.portal-theme .mute{color:var(--mute)}
.portal-theme button{font-family:inherit;color:inherit}
.portal-theme b{font-weight:600}
.portal-theme p,.portal-theme h3{margin:0}

/* ---- background layers (portal: .bgimg / .bgveil / .grain) ---- */
.portal-theme .pt-bg{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.portal-theme .pt-bg i{position:absolute;inset:0;display:block}
.portal-theme .bgimg{background:url(../assets/portal/bg.jpg) center/cover no-repeat;transform:scale(1.04)}
.portal-theme .bgveil{background:radial-gradient(1200px 700px at 70% 10%,rgba(245,158,11,.10),transparent 60%),radial-gradient(900px 600px at 0% 100%,rgba(0,0,0,.45),transparent 60%),var(--veil)}
.portal-theme .grain{opacity:.09;mix-blend-mode:overlay;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")}

/* ---- glass (portal .glass / .glass-in) ---- */
.portal-theme .ak,.portal-theme .ac,.portal-theme .xp{
  position:relative;background:var(--glass-bg);background-color:rgba(18,14,12,.30);
  -webkit-backdrop-filter:blur(20px) saturate(140%);backdrop-filter:blur(20px) saturate(140%);
  border:1px solid var(--stroke);box-shadow:var(--shadow),inset 1px 1px 0 var(--hi),inset 0 0 0 1px rgba(255,255,255,.03);border-radius:var(--gr)}
.portal-theme .ak::before,.portal-theme .ac::before,.portal-theme .xp::before{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(120deg,rgba(255,255,255,.10),rgba(255,255,255,0) 38%,rgba(255,255,255,0) 70%,rgba(255,255,255,.03))}
.portal-theme .glass-in,.portal-theme .arow,.portal-theme .attn-row{
  position:relative;background-color:rgba(255,255,255,.04);border:1px solid var(--stroke);border-radius:16px;box-shadow:inset 1px 1px 0 var(--hi)}
.portal-theme .ak,.portal-theme .ac{padding:var(--pad);min-width:0}
.portal-theme .ac>*,.portal-theme .ak>*{position:relative}

/* ---- text ---- */
.portal-theme .a-h1{font-size:2rem;line-height:2.5rem;font-weight:700;letter-spacing:-.025em;color:var(--ink)}
.portal-theme .a-sub{font-size:.875rem;line-height:1.25rem;color:var(--mute);margin-top:.125rem}


.portal-theme .lbl{font-size:.75rem;line-height:1rem;letter-spacing:.12em;text-transform:uppercase;color:var(--mute);font-weight:600}
.portal-theme .more-l{margin:.25rem .25rem 0}
.portal-theme .scr{display:grid;gap:1rem;align-content:start;grid-template-columns:minmax(0,1fr)}
.portal-theme .scr>*{min-width:0}

/* ---- KPI card ---- */
.portal-theme .akpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.portal-theme .ak .row1{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem}
.portal-theme .ak .lbl{padding-top:.2rem}
.portal-theme .kt{flex:none;width:34px;height:34px;border-radius:11px;display:grid;place-items:center;border:1px solid var(--stroke)}
.portal-theme .kt .ico{width:17px;height:17px;stroke-width:1.7}
.portal-theme .kvrow{display:flex;align-items:flex-end;justify-content:space-between;gap:.5rem;margin-top:.75rem}
.portal-theme .ak .kv{font-size:1.85rem;line-height:1;font-weight:700;letter-spacing:-.025em;color:var(--ink);font-variant-numeric:tabular-nums;margin:.75rem 0 0;min-width:0}
.portal-theme .kvrow .kv{margin:0}
.portal-theme .ak>div:last-child{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin-top:.75rem;font-size:.75rem;line-height:1rem;color:var(--mute);min-height:22px}
.portal-theme .spk{display:block;width:96px;height:36px;flex:none;margin-left:auto}
.portal-theme .delta{display:inline-flex;align-items:center;gap:.2rem;font-size:.75rem;line-height:1rem;font-weight:700;padding:.1rem .5rem;border-radius:999px;border:1px solid transparent;white-space:nowrap}
.portal-theme .delta.up{background:rgba(16,185,129,.16);color:var(--good);border-color:rgba(16,185,129,.25)}
.portal-theme .delta.dn,.portal-theme .delta.down{background:rgba(239,68,68,.16);color:var(--bad);border-color:rgba(239,68,68,.25)}
.portal-theme .sub{font-size:.75rem;color:var(--mute)}

/* ---- Glass card header ---- */
.portal-theme .ac-h{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;margin-bottom:.75rem}
.portal-theme .ac-h b{font-size:15px;line-height:1.4;font-weight:600;color:var(--ink)}
.portal-theme .ac-h span{font-size:.75rem;line-height:1rem;color:var(--mute);letter-spacing:0;text-transform:none;font-weight:400}

/* ---- controls (portal .btn / .iconbtn / .seg / select / .avatar) ---- */
.portal-theme .iconbtn{width:var(--tap);height:var(--tap);border-radius:50%;display:inline-grid;place-items:center;border:1px solid var(--stroke);background:rgba(255,255,255,.06);color:var(--ink);cursor:pointer;flex:none;
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);box-shadow:inset 1px 1px 0 var(--hi);padding:0}
.portal-theme .iconbtn .ico{width:18px;height:18px;stroke-width:1.7}
.portal-theme .avatar{width:var(--tap);height:var(--tap);border-radius:50%;display:inline-grid;place-items:center;flex:none;background:linear-gradient(135deg,#f59e0b,#ec4899);color:#fff;font-size:.875rem;font-weight:700;line-height:1}
.portal-theme .grow{flex:1}
.portal-theme .tag{font:600 .66rem/1 var(--sans);letter-spacing:.08em;text-transform:uppercase;padding:6px 10px;border:1px dashed rgba(255,255,255,.35);border-radius:999px;color:var(--mute);background:rgba(255,255,255,.04);white-space:nowrap}
.portal-theme .search{display:flex;align-items:center;gap:.5rem;height:var(--tap);padding:0 1rem;border-radius:999px;border:1px solid var(--stroke);background:rgba(255,255,255,.07);color:var(--mute);font-size:.82rem;font-weight:500;min-width:0;flex:0 1 340px;
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:inset 1px 1px 0 var(--hi)}
.portal-theme .search .ico{width:16px;height:16px;flex:none}
.portal-theme .search span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.portal-theme .seg{display:inline-flex;padding:3px;border-radius:999px;border:1px solid var(--stroke);background:rgba(255,255,255,.07)}
.portal-theme .seg button{border:0;background:transparent;border-radius:999px;padding:.32rem .85rem;min-height:calc(var(--tap) - 8px);font-size:.78rem;line-height:1.2;font-weight:600;color:var(--mute);cursor:pointer}
.portal-theme .seg button.on{background:#fff;color:#111;box-shadow:0 2px 8px rgba(0,0,0,.3)}
.portal-theme select{background:rgba(255,255,255,.07);border:1px solid var(--stroke);color:var(--ink);border-radius:999px;padding:.42rem .8rem;min-height:var(--tap);font:500 .82rem/1.2 var(--sans);outline:none;color-scheme:dark;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.portal-theme select option{color:#111;background:#fff}

/* ---- pills ---- */
.portal-theme .tg{flex:none;font-size:.75rem;line-height:1rem;font-weight:600;padding:.15rem .6rem;border-radius:999px;white-space:nowrap;border:1px solid transparent}
.portal-theme .tg.act{background:rgba(239,68,68,.16);color:var(--bad);border-color:rgba(239,68,68,.25)}
.portal-theme .tg.chk{background:rgba(245,158,11,.16);color:var(--warn);border-color:rgba(245,158,11,.28)}
.portal-theme .tg.inf{background:rgba(59,130,246,.16);color:#60a5fa;border-color:rgba(59,130,246,.28)}

.portal-theme .st{font-size:.75rem;font-weight:600;padding:.15rem .6rem;border-radius:999px;border:1px solid transparent}

/* ---- Needs attention rows ---- */
.portal-theme .arow,.portal-theme .attn-row{display:flex;gap:.75rem;align-items:center;padding:.75rem;margin-top:.5rem}
.portal-theme .ac-h+.arow,.portal-theme .ac-h+.attn-row{margin-top:0}
.portal-theme .arow b,.portal-theme .attn-row b{display:block;font-size:.875rem;line-height:1.25rem;font-weight:600;color:var(--ink)}
.portal-theme .arow p,.portal-theme .attn-row p{font-size:.75rem;line-height:1.1rem;color:var(--mute);margin-top:1px}
.portal-theme .arow>div,.portal-theme .attn-row>div{flex:1;min-width:0}
.portal-theme .arow .tg{align-self:flex-start;margin-top:.1rem}


.portal-theme .attn-n{flex:none;min-width:2.6rem;height:2.6rem;border-radius:12px;display:grid;place-items:center;background:var(--grid);font-size:1.05rem;font-weight:700;font-variant-numeric:tabular-nums}
.portal-theme .attn-n.sev{background:rgba(239,68,68,.16);color:var(--bad)}
.portal-theme .attn-row>.ico,.portal-theme .xp>.ico{width:18px;height:18px;color:var(--mute);flex:none;transform:rotate(-90deg)}

/* ---- store cards, expand rows ---- */








.portal-theme .ico.sm{width:14px;height:14px}







.portal-theme .xps{display:grid;gap:.75rem}
.portal-theme .xp{display:flex;align-items:center;gap:.75rem;padding:.9rem 1.25rem;border-radius:20px}
.portal-theme .xp>div{flex:1;min-width:0;position:relative}
.portal-theme .xp b{display:block;font-size:.95rem;font-weight:600}
.portal-theme .xp p{font-size:.75rem;color:var(--mute)}
.portal-theme .xp>.ico{position:relative}

/* ---- store page header (portal .sp-head, .sp-chip, .sp-tab) ---- */




.portal-theme .sth-t{flex:1;min-width:0}
.portal-theme .sth-t .a-h1{font-size:1.4rem;line-height:1.75rem}
.portal-theme .sth-t .a-sub{margin-top:0;font-size:.78rem}










/* ---- targets bar (portal .sp-bar) ---- */



.portal-theme .pb{height:10px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden;margin:.45rem 0 .3rem}
.portal-theme .pb i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#f59e0b,#fbbf24)}





/* ---- tables (portal table.t) ---- */












/* ---- phone shell ---- */
.app.portal-theme{--tap:44px;--gr:20px;--pad:.9rem;display:flex;flex-direction:column;width:100%;height:auto;border:1px solid rgba(255,255,255,.14);border-radius:26px;box-shadow:0 30px 70px rgba(0,0,0,.55),0 0 70px rgba(245,158,11,.16),0 0 0 6px #201D1A,0 0 0 7px rgba(245,158,11,.38)}
.app .app-top{display:flex;align-items:center;gap:.5rem;padding:.9rem .9rem .5rem}
.app .app-scroll{flex:1;overflow:hidden;padding:.25rem .9rem 1.2rem}
.app .a-h1{font-size:1.75rem;line-height:2rem}
.app .ak .kv{font-size:clamp(1.15rem,6.2vw,1.6rem)}
.app .ak .lbl{font-size:.68rem;letter-spacing:.1em}
.app .ak .spk{width:72px}
.app .scr{padding-bottom:.4rem}

/* bottom tab bar (portal .tabbar / .tb) */
.app .app-tabs{display:flex;padding:.4rem .25rem .6rem;background:#15110f;border-top:1px solid var(--stroke);position:relative;z-index:30}
.app .atab{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0;min-height:50px;justify-content:center;color:var(--mute);font-size:.72rem;line-height:1;font-weight:600}
.app .atab>span{position:relative;display:grid;place-items:center;padding:4px 14px;border-radius:999px}
.app .atab .ico{width:21px;height:21px;stroke-width:1.7}
.app .atab.on{color:var(--ink)}
.app .atab.on>span{background:#fff;color:#111}
.app .atab .dot{position:absolute;top:1px;right:8px;width:8px;height:8px;border-radius:50%;background:#f59e0b;border:0;box-shadow:0 0 6px rgba(245,158,11,.7)}








/* ---- hero dashboard (desktop layout of the portal Home) ---- */
.term.portal-theme{--tap:40px;border-radius:26px;border:1px solid rgba(255,255,255,.14);box-shadow:0 30px 70px rgba(0,0,0,.5),0 0 70px rgba(245,158,11,.14)}
.term .pt-stage{display:flex;gap:1rem;padding:1rem}
.term .rail{display:none;flex-direction:column;gap:.5rem;align-self:center;padding:.5rem;border-radius:999px;background:var(--rail);border:1px solid var(--stroke);-webkit-backdrop-filter:blur(22px) saturate(140%);backdrop-filter:blur(22px) saturate(140%);box-shadow:var(--shadow),inset 1px 1px 0 var(--hi);flex:none}
.term .rail .ri{position:relative;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:var(--mute)}
.term .rail .ri .ico{width:19px;height:19px;stroke-width:1.7}
.term .rail .ri.on{background:#fff;color:#111;box-shadow:0 2px 8px rgba(0,0,0,.3)}
.term .rail .dot{position:absolute;top:7px;right:8px;width:8px;height:8px;border-radius:50%;background:#f59e0b;box-shadow:0 0 8px rgba(245,158,11,.8)}
.term .pt-main{flex:1;min-width:0;display:grid;gap:1rem;align-content:start}
.term .pt-main>*{min-width:0}
.term .pt-top{display:flex;align-items:center;gap:.5rem}
.term .hgrid{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}
.term .hgrid>.ac{align-self:start}
.term .a-h1{margin-top:.25rem}
.term .term-note{position:relative;padding:0 1.2rem 1rem;margin:0;font-size:.72rem;color:var(--mute);text-align:center}
.term .hchart{padding-top:2px;min-width:0}
@media(min-width:900px){
  .term .rail{display:flex}
  .term .akpis{grid-template-columns:repeat(4,minmax(0,1fr))}
  .term .pt-stage{padding:1.25rem}
}
@media(min-width:1040px){ .term .hgrid{grid-template-columns:minmax(0,1.85fr) minmax(0,1fr)} }
@media(max-width:899px){
  .term.portal-theme{--tap:44px;--gr:20px;--pad:.9rem}
  .term .ak .kv{font-size:clamp(1.15rem,6.2vw,1.6rem)}
  .term .a-h1{font-size:1.75rem;line-height:2rem}
  .term .ak .spk{width:64px}
  .term .aoChip{min-height:44px;padding:.5rem .9rem}
  .term .pt-top .search{flex:1}
  .term .pt-top .iconbtn:not(.avatar),.term .pt-top .tag{display:none}
}

/* ---- charts (portal: .recharts-text, grid, .sp-tip, chart header pieces) ---- */
.portal-theme .recharts-text{fill:var(--mute)!important;font-size:12px}
.portal-theme .recharts-cartesian-grid line{stroke:var(--grid)}
.portal-theme .recharts-wrapper,.portal-theme .recharts-surface{font-family:inherit}
.portal-theme .recharts-legend-item-text{color:var(--mute)!important}
.portal-theme .cwrap,.portal-theme .hchart{min-width:0}
.portal-theme .ac .recharts-wrapper{overflow:visible}

.portal-theme .ch-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap;margin-bottom:.75rem}
.portal-theme .ch-chips{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
.portal-theme .ch-chips::-webkit-scrollbar{display:none}
.portal-theme .aoChip{display:inline-flex;align-items:center;gap:.4rem;padding:.3rem .75rem;border-radius:999px;font-size:.76rem;line-height:1.3;font-weight:600;white-space:nowrap;flex:none;color:var(--mute);cursor:pointer;background:rgba(255,255,255,.06);border:1px solid var(--stroke)}
.portal-theme .aoChip i{width:8px;height:8px;border-radius:4px;display:inline-block}
.portal-theme .aoChip.on{background:#fff;color:#111;box-shadow:0 2px 8px rgba(0,0,0,.25)}
.portal-theme .ch-stats{display:flex;align-items:flex-end;gap:.5rem 1.5rem;flex-wrap:wrap;margin-bottom:.5rem}
.portal-theme .ch-big{display:flex;align-items:baseline;gap:.5rem}
.portal-theme .ch-n{font-size:1.875rem;line-height:2.25rem;font-weight:700;letter-spacing:-.025em;color:var(--ink);font-variant-numeric:tabular-nums}
.portal-theme .ch-sm{font-size:.75rem;line-height:1rem;color:var(--mute)}
.portal-theme .ch-row{display:flex;align-items:center;gap:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:600;color:var(--ink);flex-wrap:wrap}
.portal-theme .ch-row .accent{color:var(--accent)}
.portal-theme .ch-legend{display:flex;flex-wrap:wrap;gap:.25rem 1rem;margin-top:.5rem;font-size:.75rem;line-height:1rem;color:var(--mute)}
.portal-theme .ch-legend span{display:inline-flex;align-items:center;gap:.4rem}
.portal-theme .ch-legend i{display:inline-block}
.portal-theme .ch-note{margin-top:.5rem;font-size:.75rem;line-height:1rem;color:var(--mute)}
.portal-theme .ch-note .warn{color:var(--warn);font-weight:600}



.portal-theme .ch-ao .mute{color:var(--mute)}

/* mobile KPI: value on top, spark under it (as on the portal's phone layout) */
.app .kvrow{flex-direction:column;align-items:flex-start;gap:.5rem}
.app .ak .spk{width:96px;margin-left:0}
@media(max-width:899px){.term .kvrow{flex-direction:column;align-items:flex-start;gap:.5rem}.term .ak .spk{width:96px;margin-left:0}}

/* ===== hero dashboard: premium glass (hero only) ===== */
.hero .term.portal-theme{position:relative;isolation:isolate;border:1px solid rgba(255,255,255,.10);
  -webkit-backdrop-filter:blur(26px) saturate(150%);backdrop-filter:blur(26px) saturate(150%);
  box-shadow:0 2px 0 rgba(255,255,255,.10) inset,0 40px 80px -24px rgba(0,0,0,.7),0 24px 60px -10px rgba(0,0,0,.45),0 0 70px rgba(245,158,11,.20),0 0 140px rgba(245,158,11,.10)}
.hero .term.portal-theme::after{content:"";position:absolute;inset:-140px -90px;z-index:-2;pointer-events:none;background:radial-gradient(closest-side,rgba(245,158,11,.16),rgba(245,158,11,.06) 55%,transparent)}
.hero .term.portal-theme::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1.5px;pointer-events:none;z-index:5;
  background:linear-gradient(to bottom right,rgba(251,191,36,.95) 0%,rgba(245,158,11,.40) 22%,rgba(245,158,11,0) 48%,rgba(245,158,11,0) 74%,rgba(251,191,36,.38) 100%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);}
.hero .term .pt-bg{opacity:.97}
/* metric cards: label / number / chip, same rhythm on every card */
.hero .term .akpis{gap:.9rem}
.hero .term .ak{padding:1.05rem 1.1rem 1.1rem;display:flex;flex-direction:column}
.hero .term .ak .row1{min-height:2rem;align-items:flex-start}
.hero .term .ak .lbl{color:#d4d4dc;font-size:.7rem;letter-spacing:.11em;padding-top:.15rem}
.hero .term .ak .kvrow{margin-top:.6rem}
.hero .term .ak .kv{font-size:2rem;font-weight:700;letter-spacing:-.03em}
.hero .term .ak>div:last-child{margin-top:.7rem;align-items:center;min-height:24px}
/* panel headers: title + small meta, hairline, same spacing in both panels */
.hero .term .ac{padding:1.1rem 1.15rem 1.15rem}
.hero .term .ac-h{padding-bottom:.7rem;margin-bottom:.9rem;border-bottom:1px solid var(--stroke);align-items:center}
.hero .term .ac-h b{font-size:15px;font-weight:600;letter-spacing:-.01em}
.hero .term .ac-h span{font-size:.72rem;color:var(--mute);white-space:nowrap}
@media(min-width:900px){.hero .term .ak .row1{min-height:1.5rem}.hero .term .ak .lbl{white-space:nowrap}}

/* static mockup: decorative only, nothing is clickable, focusable or hoverable */
.app-static,.app-static *{pointer-events:none;cursor:default;user-select:none;-webkit-user-select:none}
