/* Prop26 Super Admin. Look: Stitch "Super Admin - מסך ראשי (Desktop / Mobile)" (Guy approved 2026-12-06), tokens of the app's design.md.
   No inline styles anywhere (the CSP blocks them): sizes that come from data are set from app.js through the CSSOM. */
:root{
  --bg:#F7F9FE; --card:#FFFFFF; --ink:#181C20; --head:#101F3C; --muted:#5B677C; --line:#E6EAF1; --line2:#EEF1F6; --surface2:#F1F4F9;
  --navy-bg:#101F3C; --navy-ink:#FFFFFF; --navy-muted:#9DABC9; --navy-hover:rgba(120,140,190,.2); --navy-on:rgba(120,140,190,.32);
  --green:#0B7A6C; --green-bg:#E2F4F0; --blue:#1763C6; --blue-bg:#E6EFFB; --purple:#6B3FCF; --purple-bg:#F1ECFC;
  --orange:#9A4508; --orange-bg:#FCEEDD; --red:#C8323A; --red-bg:#FDECEC; --ok-dot:#16A37F;
  --shadow:0 1px 2px rgba(16,31,60,.04),0 6px 20px rgba(16,31,60,.05); --r:24px; --r2:14px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root{
  --bg:#0B1528; --card:#14213D; --ink:#EEF2F9; --head:#EEF2F9; --muted:#A3B0C6; --line:#263657; --line2:#22335A; --surface2:#1B2A4B;
  --navy-bg:#060D1C; --navy-muted:#93A2C2;
  --green:#3FD0B6; --green-bg:#0F3A37; --blue:#7FB2F5; --blue-bg:#16305A; --purple:#B79CF5; --purple-bg:#2A2152;
  --orange:#F0B26B; --orange-bg:#40280F; --red:#FF8A8F; --red-bg:#4A1B20; --ok-dot:#3FD0B6;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 6px 20px rgba(0,0,0,.25);
  color-scheme:dark;
}}
*{box-sizing:border-box}
html,body{margin:0;overflow-x:clip}
body{font-family:'Heebo',Arial,sans-serif;font-size:16px;line-height:1.5;background:var(--bg);color:var(--ink);-webkit-text-size-adjust:100%}
h1,h2,h3,p{margin:0}
button,input{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--blue)}
[hidden]{display:none!important}
.num{font-variant-numeric:tabular-nums}
.ltr{direction:ltr;unicode-bidi:isolate;display:inline-block}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
svg.i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* ----- buttons, fields ----- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 20px;border-radius:14px;border:1px solid var(--line);background:var(--card);font-weight:600;transition:transform .12s}
.btn:active{transform:scale(.98)}
.btn.primary{background:var(--navy-bg);color:#fff;border-color:transparent;box-shadow:0 6px 18px rgba(16,31,60,.18)}
.btn.sm{min-height:38px;padding:0 14px;border-radius:12px;font-size:14px}
.btn.red{color:var(--red)}
.btn[disabled]{opacity:.55;cursor:default}
.btn.wide{width:100%}
.linkbtn{background:none;border:0;padding:6px 2px;color:var(--blue);font-weight:600}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:14px;font-weight:600;color:var(--muted)}
.field input{min-height:50px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:var(--card);font-size:16px}
.field input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-bg)}
.err{color:var(--red);font-size:14px;font-weight:600;min-height:21px}
.otp{direction:ltr;text-align:center;letter-spacing:.35em;font-size:24px!important;font-weight:700;font-variant-numeric:tabular-nums}

/* ----- sign-in ----- */
.gate{min-height:100vh;display:grid;place-items:center;padding:24px 16px;background:linear-gradient(160deg,var(--navy-bg),#243B61)}
.gatebox{width:100%;max-width:420px;background:var(--card);border-radius:var(--r);padding:28px 24px;box-shadow:0 20px 50px rgba(0,0,0,.3);display:flex;flex-direction:column;gap:16px}
.brand{display:flex;align-items:center;gap:10px}
.brand .mark{width:38px;height:38px;border-radius:10px;background:var(--navy-bg);color:#fff;display:grid;place-items:center}
.brand b{font-size:20px;font-weight:800;color:var(--head);line-height:1.1;display:block}
.brand small{color:var(--muted);font-size:13px}
.gatebox h1{font-size:22px;font-weight:800;color:var(--head)}
.gatebox p{color:var(--muted);font-size:15px}
.qr{align-self:center;background:#fff;padding:10px;border-radius:14px;border:1px solid var(--line);line-height:0}
.qr svg{width:200px;height:200px}
.keybox{background:var(--surface2);border-radius:12px;padding:10px 12px;font-size:14px;text-align:center;word-break:break-all}
.codes{display:grid;grid-template-columns:1fr 1fr;gap:8px;direction:ltr}
.codes span{background:var(--surface2);border-radius:10px;padding:9px;text-align:center;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:.04em}
.steps{margin:0;padding-inline-start:20px;color:var(--muted);font-size:15px;display:flex;flex-direction:column;gap:4px}

/* ----- shell ----- */
.side{display:none}
.topbar{position:sticky;top:0;z-index:30;background:var(--card);box-shadow:0 1px 0 var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;padding-top:max(12px,env(safe-area-inset-top))}
.topbar h1{font-size:22px;font-weight:800;color:var(--head);line-height:1.2}
.topbar .sub{font-size:13px;color:var(--muted)}
.topbar .mob{display:flex;align-items:center;gap:10px}
.topbar .mark{width:34px;height:34px;border-radius:9px;background:var(--navy-bg);color:#fff;display:grid;place-items:center}
.iconbtn{width:42px;height:42px;border-radius:12px;border:0;background:var(--surface2);color:var(--muted);display:grid;place-items:center}
main{padding:16px 16px calc(110px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:16px;max-width:1200px;width:100%;margin:0 auto}
.seg{display:flex;gap:4px;background:var(--surface2);padding:4px;border-radius:12px;overflow-x:auto;scrollbar-width:none}
.seg button{border:0;background:none;padding:7px 14px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted);white-space:nowrap}
.seg button[aria-pressed="true"]{background:var(--card);color:var(--head);box-shadow:0 1px 3px rgba(16,31,60,.12)}
.bottombar{position:fixed;z-index:40;inset:auto 12px calc(10px + env(safe-area-inset-bottom)) 12px;max-width:520px;margin:0 auto;background:var(--card);border-radius:20px;box-shadow:0 -8px 30px rgba(16,31,60,.1),0 0 0 1px var(--line);display:grid;grid-template-columns:repeat(5,1fr);padding:6px}
.bottombar a,.bottombar button{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 2px;border-radius:14px;font-size:12px;font-weight:600;color:var(--muted);text-decoration:none}
.bottombar [aria-current="page"],.bottombar .on{color:var(--green);background:var(--green-bg)}

/* ----- cards ----- */
.card{background:var(--card);border-radius:var(--r);padding:20px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:14px;min-width:0}
.card h2{font-size:18px;font-weight:700;color:var(--head);display:flex;align-items:center;justify-content:space-between;gap:10px}
.pill{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:13px;font-weight:600;background:var(--surface2);color:var(--muted);white-space:nowrap}
.pill.g{background:var(--green-bg);color:var(--green)} .pill.o{background:var(--orange-bg);color:var(--orange)} .pill.r{background:var(--red-bg);color:var(--red)} .pill.b{background:var(--blue-bg);color:var(--blue)}
.kpis{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.kpi{background:var(--card);border-radius:var(--r);padding:16px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:10px;min-width:0}
.kpi .kt{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;font-weight:500;color:var(--muted)}
.kpi .ki{width:32px;height:32px;border-radius:9px;background:var(--surface2);display:grid;place-items:center;flex:none}
.kpi .ki svg{width:18px;height:18px}
.ki.b{color:var(--blue)} .ki.o{color:var(--orange)} .ki.g{color:var(--green)} .ki.p{color:var(--purple)} .ki.r{color:var(--red);background:var(--red-bg)}
.kpi .kv{font-size:28px;font-weight:800;color:var(--head);line-height:1.15}
.kpi .kv.none{font-size:16px;font-weight:600;color:var(--muted)}
.kpi .ks{font-size:13px;color:var(--muted)}
.grid2,.grid3{display:grid;gap:16px}
.rows{display:flex;flex-direction:column}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--line2)}
.row:first-child{border-top:0}
.row .rl{display:flex;align-items:center;gap:12px;min-width:0}
.row .ri{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--surface2);color:var(--muted);flex:none}
.ri.g{background:var(--green-bg);color:var(--green)} .ri.o{background:var(--orange-bg);color:var(--orange)} .ri.r{background:var(--red-bg);color:var(--red)} .ri.b{background:var(--blue-bg);color:var(--blue)}
.row b{display:block;font-weight:600;font-size:15px;overflow-wrap:anywhere}
.row small{display:block;color:var(--muted);font-size:13px;overflow-wrap:anywhere}
.dot{width:10px;height:10px;border-radius:50%;background:var(--muted);flex:none}
.dot.g{background:var(--ok-dot)}
.empty{text-align:center;color:var(--muted);padding:28px 12px;display:flex;flex-direction:column;align-items:center;gap:8px}
.empty .ei{width:52px;height:52px;border-radius:16px;background:var(--surface2);display:grid;place-items:center}
.empty b{color:var(--head);font-size:17px}
.notice{background:var(--blue-bg);color:var(--blue);border-radius:var(--r2);padding:12px 14px;font-size:15px;font-weight:500;display:flex;gap:10px;align-items:flex-start}
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.day{font-size:13px;font-weight:700;color:var(--muted);padding:14px 0 2px}

/* ----- sheet (phone "עוד", account) ----- */
.overlay{position:fixed;inset:0;z-index:60;background:rgba(6,13,28,.55);display:flex;align-items:flex-end;justify-content:center}
.sheet{width:100%;max-width:520px;max-height:88vh;overflow:auto;background:var(--card);border-radius:26px 26px 0 0;padding:20px 20px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:14px}
.sheet h2{font-size:20px;font-weight:800;color:var(--head);display:flex;justify-content:space-between;align-items:center}
.menu{display:flex;flex-direction:column}
.menu a,.menu button{display:flex;align-items:center;gap:12px;padding:13px 4px;border:0;border-top:1px solid var(--line2);background:none;text-align:start;font-weight:600;color:var(--ink);text-decoration:none;width:100%}
.menu a:first-child,.menu button:first-child{border-top:0}
.toast{position:fixed;z-index:80;inset:auto 16px calc(96px + env(safe-area-inset-bottom)) 16px;max-width:420px;margin:0 auto;background:var(--navy-bg);color:#fff;border-radius:14px;padding:12px 16px;font-weight:600;text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.3)}
.toast.err{background:var(--red);color:#fff}

@media (min-width:700px){
  .kpis{grid-template-columns:repeat(3,1fr)}
  .overlay{align-items:center}.sheet{border-radius:26px}
}
@media (min-width:1100px){
  body.in{padding-inline-start:256px}
  .side{display:flex;position:fixed;inset-block:0;inset-inline-start:0;width:256px;z-index:40;background:var(--navy-bg);color:var(--navy-ink);flex-direction:column;justify-content:space-between;padding:20px;border-start-end-radius:14px;border-end-end-radius:14px}
  .side .brand b{color:#fff}.side .brand small{color:var(--navy-muted)}.side .brand .mark{background:var(--navy-on)}
  .side nav{display:flex;flex-direction:column;gap:4px;margin-top:24px}
  .side a,.side .acct{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;color:var(--navy-muted);text-decoration:none;font-size:15px;font-weight:600;border:0;background:none;width:100%;text-align:start}
  .side a:hover{background:var(--navy-hover);color:#fff}
  .side a[aria-current="page"]{background:var(--navy-on);color:#fff;font-weight:700}
  .side .foot{display:flex;flex-direction:column;gap:10px;padding-top:14px;border-top:1px solid var(--navy-on)}
  .side .acct{background:var(--navy-hover);color:#fff;border-radius:14px}
  .side .av{width:36px;height:36px;border-radius:50%;background:#D8E2FF;color:#0B1B38;display:grid;place-items:center;font-weight:700;flex:none}
  .side .acct small{display:flex;align-items:center;gap:5px;color:#8BF9B2;font-size:13px;font-weight:400}
  .side .acct small i{width:6px;height:6px;border-radius:50%;background:#8BF9B2}
  .bottombar,.topbar .mark{display:none}
  .topbar{padding:16px 32px}
  .topbar h1{font-size:26px}
  main{padding:32px;gap:24px}
  .kpis{grid-template-columns:repeat(6,1fr);gap:16px}
  .grid2{grid-template-columns:7fr 5fr;gap:24px}
  .grid3{grid-template-columns:repeat(3,1fr);gap:24px}
  .toast{inset-block-end:28px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
