/* Humaan Genetics shell. Layout from the clinical design system; colors and logo stay Humaan. */
@font-face{font-family:IRANYekanX;src:url(/static/site/fonts/IRANYekanXFaNum-Regular.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:IRANYekanX;src:url(/static/site/fonts/IRANYekanXFaNum-Medium.woff2) format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:IRANYekanX;src:url(/static/site/fonts/IRANYekanXFaNum-DemiBold.woff2) format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:IRANYekanX;src:url(/static/site/fonts/IRANYekanXFaNum-Bold.woff2) format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:IRANYekanX;src:url(/static/site/fonts/IRANYekanXFaNum-ExtraBold.woff2) format("woff2");font-weight:800;font-display:swap}
@font-face{font-family:Vazirmatn;src:url(/static/site/fonts/Vazirmatn-Regular.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:Vazirmatn;src:url(/static/site/fonts/Vazirmatn-Bold.woff2) format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:Sora;src:url(/static/site/fonts/Sora.woff2) format("woff2");font-weight:400 700;font-display:swap}
:root{
  --bg:#F4F6FB;--surface:#fff;--ink:#0B1F3A;--muted:#5B6B7F;--line:#E6EAF0;
  --cta:#5B4DFF;--cta-h:#5346F0;
  --teal:#0E7C74;--teal-h:#13A89E;--teal-s:#E7F6F4;--navy:#0B1F3A;
  --data-teal:#13A89E;--data-purple:#6C4AB6;--data-coral:#FF6B5B;
  --coral:#B23A2C;--coral-s:#FDECEC;--amber:#8A5A00;--amber-s:#FFF6E5;--ok:#0A5F59;--ok-s:#E5F6F1;
  --shadow:0 8px 24px -16px rgba(11,31,58,.22);--r-card:16px;--r-ctl:10px;
  --side:240px;--font:IRANYekanX,Vazirmatn,Tahoma,sans-serif;--font-en:Sora,IRANYekanX,sans-serif;
}
[data-theme=dark]{
  --bg:#0B1220;--surface:#121A2B;--ink:#EEF3F8;--muted:#A7B6CA;--line:rgba(255,255,255,.1);
  --teal:#13A89E;--teal-h:#6FD3CB;--teal-s:#14352F;--navy:#EEF3F8;
  --coral:#FF8A7E;--coral-s:#3A1E22;--amber:#E0B15A;--amber-s:#3A2E14;--ok:#8FE0D4;--ok-s:#14352F;
  --shadow:0 10px 28px -16px rgba(0,0,0,.55);
}
.en{font-family:var(--font-en);direction:ltr;unicode-bidi:isolate}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:var(--font);background:var(--bg);color:var(--ink);font-size:15px;line-height:1.7}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font-family:inherit;color:inherit}
:focus-visible{outline:3px solid #6C4AB6;outline-offset:2px}
.research{background:#FFF6E5;color:#8A5A00;text-align:center;padding:8px 16px;font-size:13px;font-weight:600;line-height:1.6}
.app{display:grid;grid-template-columns:272px 1fr;grid-template-rows:72px 1fr;min-height:calc(100vh - 38px);direction:rtl}
.side{grid-column:1;grid-row:2;background:transparent;padding:0 12px 16px;display:flex;min-height:0}
.nav-panel{flex:1;background:#fff;border-radius:24px;box-shadow:0 1px 2px rgba(16,24,40,.04),0 12px 32px -16px rgba(16,24,40,.28);padding:14px 10px 12px;display:flex;flex-direction:column;width:100%;min-height:0}
.nav-scroll{overflow:auto;flex:1}
.nav-pin{margin-top:auto;padding-top:10px;border-top:1px solid #EEF1F6}
.brand{grid-column:1;grid-row:1;display:flex;align-items:center;padding:0 20px}
.brand img{height:34px;width:auto;max-width:180px}
.brand .dk{display:none}
[data-theme=dark] .brand .lt{display:none}
[data-theme=dark] .brand .dk{display:block}
[data-theme=dark] .nav-panel{background:#121A2B}
.nav-search{display:flex;align-items:center;gap:6px;background:#F4F6FB;border-radius:12px;padding:0 8px 0 10px;height:40px;margin:0 2px 10px}
.nav-search svg{width:16px;height:16px;color:#8B97A8;flex:none;stroke-width:1.5}
.nav-search input{border:0;background:transparent;width:100%;height:38px;outline:none;font-size:13px}
.kbd{font-family:var(--font-en);font-size:11px;font-weight:700;color:#8B97A8;background:#fff;border-radius:6px;min-width:18px;height:18px;display:grid;place-items:center;padding:0 4px}
.nav-label{margin:12px 10px 6px;font-size:11px;font-weight:700;color:#8B97A8}
.nav-item{display:flex;align-items:center;gap:10px;height:40px;padding:0 10px;border-radius:12px;color:#243044;font-weight:600;font-size:14px}
.nav-item svg,.icon-btn svg,.bnav svg,.chip svg{width:18px;height:18px;flex:none;stroke-width:1.5}
.nav-item .count{margin-inline-start:auto;color:#8B97A8;font-size:12px;font-weight:700}
.nav-item.on{background:#fff;color:#101828;box-shadow:0 1px 2px rgba(16,24,40,.06),0 8px 18px -8px rgba(16,24,40,.28)}
.nav-item:hover:not(.on){background:#F4F6FB}
[data-theme=dark] .nav-item{color:#F5F8FC}
[data-theme=dark] .nav-item.on{background:#fff;color:#0B1F3A}
.side-foot{margin-top:8px}
.linkish{background:none;border:0;cursor:pointer;text-align:inherit;width:100%}
.main{grid-column:2;grid-row:2;min-width:0;display:flex;flex-direction:column}
.topbar{grid-column:2;grid-row:1;display:flex;align-items:center;gap:10px;padding:12px 20px;background:transparent}
.chip{display:inline-flex;align-items:center;gap:6px;background:#fff;border:0;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:700;color:#5B6B7F;box-shadow:0 6px 16px -12px rgba(11,31,58,.4)}
.chip svg{width:14px;height:14px}
.top-spacer{flex:1}
.top-actions{display:flex;align-items:center;gap:8px}
.icon-btn{width:40px;height:40px;border-radius:12px;border:1px solid transparent;background:transparent;display:grid;place-items:center;cursor:pointer;position:relative;color:var(--ink)}
.icon-btn svg{width:18px;height:18px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:var(--r-ctl);border:1px solid transparent;font-weight:700;font-size:14px;cursor:pointer;background:#fff}
.btn svg{width:16px;height:16px}
.btn-primary{background:var(--cta);color:#fff}
.btn-primary:hover{background:var(--cta-h)}
.ai-btn{border:0;color:#fff;border-radius:999px;padding:0 16px;height:40px;font-weight:700;cursor:pointer;background:linear-gradient(90deg,#3E56E0,#6A42F0)}
.btn-secondary{background:#fff;border-color:rgba(196,208,223,.95);color:var(--ink);box-shadow:var(--shadow)}
.btn[disabled],.btn:disabled{opacity:.55;cursor:not-allowed}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px}
.menu-btn{display:none}
.content{padding:6px 22px 36px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:8px 0 18px}
.page-head h1{margin:0;font-size:30px;line-height:1.25;font-weight:800}
.page-head p{margin:4px 0 0;color:var(--muted);font-size:14px}
.page-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.seg{display:inline-flex;align-items:center;background:#E8EDF5;border-radius:999px;padding:4px;gap:2px}
.seg a,.seg button{border:0;background:transparent;border-radius:999px;height:32px;padding:0 14px;font-weight:700;font-size:13px;color:#5B6B7F;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap}
.seg .on{background:#fff;color:#0B1F3A;box-shadow:0 1px 2px rgba(16,24,40,.06),0 4px 10px -6px rgba(16,24,40,.28)}
.btn-quiet{background:transparent;border-color:#E1E6EF;color:#5B6B7F;box-shadow:none}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:16px}
.kpi{background:#fff;border-radius:var(--r-card);box-shadow:var(--shadow);padding:18px 18px 14px}
.kpi-top{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;font-weight:600}
.kpi-ico{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--teal-s);color:var(--teal-d)}
.kpi-ico svg{width:16px;height:16px}
.kpi.navy .kpi-ico{background:#E7EEF6;color:#14305A}
.kpi.coral .kpi-ico{background:var(--coral-s);color:var(--coral)}
.kpi.amber .kpi-ico{background:var(--amber-s);color:var(--amber)}
.kpi-num{font-size:32px;font-weight:800;line-height:1.15;margin-top:10px}
.kpi-delta{font-size:12px;font-weight:700;color:var(--muted);min-height:18px}
.kpi-delta.up{color:var(--teal-d)}
.kpi-delta.down{color:var(--coral)}
.spark{display:flex;align-items:flex-end;gap:6px;height:36px;margin-top:12px}
.spark .col{display:flex;flex-direction:column-reverse;gap:3px}
.spark i{width:7px;height:7px;border-radius:50%;background:#E6EDF2;display:block}
.kpi.purple .spark i.on{background:#6C4AB6}
.kpi.cyan .spark i.on{background:#22C1D6}
.kpi.orange .spark i.on{background:#F5A524}
.kpi.green .spark i.on{background:#22A06B}
.kpi.purple .kpi-ico{background:#EEE8FB;color:#6C4AB6}
.kpi.cyan .kpi-ico{background:#E5F8FB;color:#12899C}
.kpi.orange .kpi-ico{background:#FFF1DE;color:#C47A12}
.kpi.green .kpi-ico{background:#E5F6EE;color:#1C8A58}
.track.c0 i{background:#3B82F6}
.track.c1 i{background:#6C4AB6}
.track.c2 i{background:#F5A524}
.track.c3 i{background:#22A06B}
.badge.type{background:#EEE8FB;color:#4F3391}
.badge.mute{background:#EEF1F6;color:#5C6B7E}
.badge i{width:6px;height:6px;border-radius:50%;background:currentColor;display:inline-block;margin-inline-end:6px}
.delta-pill{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:700;background:#EEF1F6;color:#5C6B7E}
.delta-pill.up{background:#E5F6EE;color:#1C8A58}
.delta-pill.down{background:#FFF1DE;color:#C47A12}
.theme-track{display:inline-flex;gap:2px;background:#fff;border-radius:999px;padding:4px;border:0;box-shadow:0 6px 16px -12px rgba(11,31,58,.4)}
.theme-track span{width:28px;height:28px;display:grid;place-items:center;border-radius:999px;color:#5B6B7F}
[data-theme=light] .theme-track .sun,[data-theme=dark] .theme-track .moon{background:#F4F6FB;color:#0B1F3A}
[data-theme=dark] .theme-track{background:#0B1220}
[data-theme=dark] .chip,[data-theme=dark] .kbd{background:#121A2B;color:#F5F8FC}
.split{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}
.card{background:#fff;border-radius:var(--r-card);box-shadow:var(--shadow);padding:18px 20px}
.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.card-head h2{margin:0;font-size:16px;font-weight:800}
.card-head p{margin:2px 0 0;color:var(--muted);font-size:12px}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:560px}
th{text-align:right;font-size:11px;letter-spacing:.06em;color:var(--muted);font-weight:700;padding:8px 12px}
td{padding:12px;border-top:1px solid var(--line);font-size:14px;vertical-align:middle}
tr.on td{background:#F3FBFA}
.person{display:flex;align-items:center;gap:8px}
.person i{width:28px;height:28px;border-radius:50%;background:var(--teal-s);color:var(--teal-d);display:grid;place-items:center;font-style:normal;font-weight:800;font-size:12px}
.badge{display:inline-flex;align-items:center;border-radius:999px;padding:3px 10px;font-size:12px;font-weight:700;background:#F5F8FA;color:var(--navy)}
.badge.ok{background:#E5F6F1;color:#0A5F59}
.badge.bad{background:var(--coral-s);color:var(--coral)}
.badge.wait{background:var(--amber-s);color:var(--amber)}
.badge.dev{background:#EEE8FB;color:#4F3391}
.rail{display:flex;flex-direction:column;gap:16px}
.donut-wrap{display:flex;gap:16px;align-items:center}
.donut{position:relative;width:148px;height:148px;flex:none}
.donut svg{width:100%;height:100%;transform:rotate(-90deg)}
.donut .ring-track,.donut .ring-arc{fill:none;stroke-width:16;stroke-linecap:round}
.donut .ring-track{stroke:#E6EBF2}
.donut span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800;line-height:1}
.legend{display:flex;flex-direction:column;gap:6px;font-size:13px}
.legend b{font-weight:700}
.dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-inline-end:6px}
.dot.t{background:#1F9D6A}.dot.c{background:#A7B6CA}.dot.a{background:#E0A100}
.progress-row{margin:10px 0}
.progress-row div{display:flex;justify-content:space-between;font-size:13px;font-weight:600}
.track{height:8px;background:#EEF2F5;border-radius:999px;margin-top:6px;overflow:hidden}
.track i{display:block;height:100%;border-radius:999px;background:#0E7C74}
.notice{background:#FFF6E5;border-radius:var(--r-card);padding:14px 16px;color:#8A5A00;display:flex;gap:10px;align-items:flex-start;font-size:13px;font-weight:600}
.notice svg{width:18px;height:18px;flex:none;margin-top:2px}
.review-warnings{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.review-warnings ul{margin:6px 0 0;padding-inline-start:1.2em}
.review-warnings p{margin:6px 0 0;font-weight:500}
.shape-note{margin:8px 0 0}
.empty{padding:28px 8px;text-align:center;color:var(--muted)}
.empty b{display:block;color:var(--ink);margin-bottom:4px}
.filters{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px}
.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700}
.field input,.field select,.field textarea{border:0;background:#F5F8FA;border-radius:var(--r-ctl);padding:10px 12px;font-weight:500;font-size:14px}
.field textarea{min-height:96px;resize:vertical}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-grid .wide{grid-column:1/-1}
.help{color:var(--muted);font-weight:500;font-size:12px}
.err{background:var(--coral-s);color:var(--coral);border-radius:12px;padding:10px 12px;font-size:13px;font-weight:700}
.okmsg{background:#E5F6F1;color:#0A5F59;border-radius:12px;padding:10px 12px;font-size:13px;font-weight:700}
.modes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.mode{text-align:right;background:#fff;border-radius:var(--r-card);box-shadow:var(--shadow);padding:14px;border:2px solid transparent;cursor:pointer}
.mode.on{border-color:#0E7C74;background:#F3FBFA}
.mode b{display:block}
.mode span{color:var(--muted);font-size:12px;font-weight:600}
.drop{border:1.5px dashed rgba(93,117,150,.45);border-radius:16px;padding:28px;text-align:center;background:#F8FBFC;cursor:pointer}
.drop strong{display:block}
.preview{position:relative}
.preview img{width:100%;max-height:320px;object-fit:contain;border-radius:12px;background:#F5F8FA}
.ready{display:inline-flex;align-items:center;gap:6px;background:#E5F6F1;color:#0A5F59;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:800;margin-top:8px}
.stage{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}
.canvas-box{position:relative;background:#0B1F3A;border-radius:14px;overflow:hidden;min-height:220px}
.canvas-box img,.canvas-box canvas.overlay{width:100%;height:auto;display:block}
.canvas-box canvas.overlay{position:absolute;inset:0;width:100%;height:100%}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(116px,1fr));gap:10px}
.tile{border:0;background:#F5F8FA;border-radius:14px;padding:8px;cursor:pointer;text-align:center}
.tile.on{outline:2px solid #0E7C74}
.tile canvas{width:100%;height:78px;border-radius:8px;background:#0B1F3A}
.tile b{display:block;font-size:12px}
.tile span{font-size:11px;color:var(--muted)}
.stars{display:flex;gap:4px}
.stars button{border:0;background:transparent;cursor:pointer;font-size:22px;color:#C4D0DF;padding:0}
.stars button.on{color:#E0A100}
.review-actions{display:flex;gap:6px;flex-wrap:wrap}
.choice{border:0;background:#F5F8FA;border-radius:999px;padding:6px 10px;font-weight:700;cursor:pointer}
.choice.on.ok{background:#E5F6F1;color:#0A5F59}
.choice.on.bad{background:#FDECEC;color:#B23A2C}
.choice.on.wait{background:#FFF6E5;color:#8A5A00}
.top3{display:flex;flex-direction:column;gap:8px}
.top3 button{border:0;background:#F5F8FA;border-radius:12px;padding:8px 10px;text-align:right;cursor:pointer}
.top3 button.on{outline:2px solid #0E7C74}
.bar{height:6px;background:#E6EDF2;border-radius:999px;margin-top:4px}
.bar i{display:block;height:100%;background:#0E7C74;border-radius:999px}
.popover{position:absolute;top:46px;inset-inline-start:0;background:#fff;border-radius:14px;box-shadow:var(--shadow);padding:12px;width:220px;z-index:6}
.hidden{display:none !important}
.toast{position:fixed;bottom:16px;inset-inline-start:16px;background:#0B1F3A;color:#fff;border-radius:12px;padding:10px 14px;font-size:13px;font-weight:700;z-index:20}
/* Login/sign-up: floating half card. Primary stays Humaan teal until the accent hex is confirmed. */
.auth-body{min-height:100vh;background:#F5F8FA}
[data-theme=dark] .auth-body{background:#0B1220}
.auth-stage{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px}
.auth-float{direction:ltr;display:grid;grid-template-columns:1fr 1fr;width:min(1080px,100%);min-height:640px;background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 24px 60px -28px rgba(11,31,58,.35)}
.auth-still{min-height:100%;background:#F5F8FA}
.auth-still img{width:100%;height:100%;object-fit:cover;display:block}
.auth-form{direction:rtl;display:flex;flex-direction:column;justify-content:center;padding:40px 36px;background:#fff;color:#0B1F3A;position:relative}
.auth-mark{width:48px;height:48px;margin-bottom:16px}
.auth-form h1{margin:0;font-size:40px;line-height:1.2;font-weight:800}
.auth-form .lead{margin:8px 0 0;color:#5B6B7F;font-size:15px}
.auth-go{width:100%;height:48px;border-radius:999px;background:#5B4DFF;color:#fff;margin-top:4px}
.auth-go:hover{background:#5346F0}
.auth-form a{color:inherit;font-weight:700;text-decoration:underline}
.auth-form .badge{background:#E8EEF5;color:#0B1F3A}
[data-theme=dark] .auth-theme{background:#0B1220;color:#F5F8FC}
[data-theme=dark] .auth-form .errline{color:#FFD0C8}
.auth-theme{position:absolute;top:16px;inset-inline-end:16px}
.auth-form .field input,.auth-form .field select{border:1px solid #E6EAF0;background:#fff;border-radius:10px;color:#0B1F3A}
[data-theme=dark] .auth-float,[data-theme=dark] .auth-form{background:#121A2B;color:#F5F8FC}
[data-theme=dark] .auth-form .lead,[data-theme=dark] .auth-form .help{color:#C5D0DE}
[data-theme=dark] .auth-form .field input,[data-theme=dark] .auth-form .field select{background:#121A2B;color:#F5F8FC;border-color:#E6EAF0}
[data-theme=dark] .auth-form input::placeholder{color:#C5D0DE}
.meter{height:8px;border-radius:999px;background:#E6EAF0;overflow:hidden;margin-top:6px}
.meter i{display:block;height:100%;width:0;background:#FF6B5B}
.meter.mid i{width:66%;background:#E0A100}
.meter.hi i{width:100%;background:#0E7C74}
.field .errline{color:#B23A2C;font-size:12px;font-weight:700}
.bnav{display:none}
.assistant{position:fixed;inset:0;background:rgba(11,18,32,.45);z-index:40;display:grid;place-items:center;padding:16px}
.assistant .card{width:min(420px,100%)}
.locked{opacity:.55;pointer-events:none}
.gate{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:13px;font-weight:700}
.vtoggle{display:flex;gap:8px;flex-wrap:wrap}
.vtoggle button.on.ok{background:var(--ok-s);color:var(--ok)}
.vtoggle button.on.no{background:var(--coral-s);color:var(--coral)}
@media (max-width:500px){
  .auth-stage{padding:16px}
  .auth-still{display:none}
  .auth-float{grid-template-columns:1fr;min-height:0}
  .auth-form{padding:28px 20px}
}
@media (max-width:800px){
  .bnav{display:flex;position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--line);z-index:6}
  .bnav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 4px;font-size:11px;font-weight:700;color:var(--muted)}
  .bnav a.on{color:#0B1F3A}
  .table-wrap table{min-width:0}
  .table-wrap thead{display:none}
  .table-wrap tr{display:block;padding:8px 0;border-top:1px solid var(--line)}
  .table-wrap td{display:flex;justify-content:space-between;gap:12px;border:0;padding:6px 0}
  .table-wrap td::before{content:attr(data-label);color:var(--muted);font-size:12px;font-weight:700}
}
.stack{display:flex;flex-direction:column;gap:12px;margin-top:20px}
.backdrop{display:none}
.dev-hero{padding:12px 0 4px}
#evaluation[data-locked="1"] .form-grid,#evaluation[data-locked="1"] .stars{pointer-events:none;opacity:.55}
/* Dark tables use the stated card #121A2B (not a lighter surface).
   Body text #F5F8FC on #121A2B is 16.32:1. Header and mobile card labels use the same pair.
   Status pills: default #0B1F3A on #E8EEF5 is 14.14:1; approved #084840 on #D8F3EC is 8.93:1;
   rejected #FFD0C8 on #3A1E22 is 10.88:1; pending #FFE4B5 on #3A2E14 is 10.76:1. */
[data-theme=dark] .card:has(.table-wrap),
[data-theme=dark] .table-wrap,
[data-theme=dark] .table-wrap table,
[data-theme=dark] .table-wrap tr,
[data-theme=dark] .table-wrap th,
[data-theme=dark] .table-wrap td,
[data-theme=dark] .table-wrap tr.on td{
  background:#121A2B;
  color:#F5F8FC;
}
[data-theme=dark] .table-wrap td a,
[data-theme=dark] .table-wrap td::before,
[data-theme=dark] .card:has(.table-wrap) .card-head h2,
[data-theme=dark] .card:has(.table-wrap) .card-head p{
  color:#F5F8FC;
}
[data-theme=dark] .table-wrap .badge{background:#E8EEF5;color:#0B1F3A}
[data-theme=dark] .table-wrap .badge.ok{background:#D8F3EC;color:#084840}
[data-theme=dark] .table-wrap .badge.bad{background:#3A1E22;color:#FFD0C8}
[data-theme=dark] .table-wrap .badge.wait{background:#3A2E14;color:#FFE4B5}
[data-theme=dark] .table-wrap .person i{background:#0B1220;color:#F5F8FC}
[data-theme=dark] .table-wrap .btn-secondary,
[data-theme=dark] .card:has(.table-wrap) input,
[data-theme=dark] .card:has(.table-wrap) select,
[data-theme=dark] .table-wrap input{
  background:#0B1220 !important;
  color:#F5F8FC !important;
  border-color:rgba(255,255,255,.24);
}
[data-theme=dark] .card,[data-theme=dark] .kpi{background:#121A2B;color:#F5F8FC}
[data-theme=dark] .seg{background:#0B1220}
[data-theme=dark] .seg a{color:#C5D0DE}
[data-theme=dark] .seg .on{background:#fff;color:#0B1F3A}
[data-theme=dark] .btn-quiet{border-color:rgba(255,255,255,.16);color:#F5F8FC}
[data-theme=dark] .donut .ring-track{stroke:#243044}
[data-theme=dark] .donut span{color:#F5F8FC}
[data-theme=dark] .nav-item:hover:not(.on){background:#0B1220}
[data-theme=dark] .nav-pin{border-color:rgba(255,255,255,.08)}
[data-theme=dark] .field input,[data-theme=dark] .field select,[data-theme=dark] .field textarea{background:#0B1220;color:#F5F8FC}
@media (max-width:900px){
  .menu-btn{display:grid}
  .app{display:flex;flex-direction:column}
  .brand{order:1;padding:10px 16px 0}
  .topbar{order:2}
  .main{order:3}
  .side{position:fixed;z-index:30;inset-block:0;inset-inline-start:0;width:min(300px,88vw);height:100vh;transform:translateX(110%);transition:transform .2s ease;background:var(--bg);padding:12px}
  .side.is-open{transform:none}
  .backdrop.show{display:block;position:fixed;inset:0;background:rgba(11,31,58,.35);z-index:25}
  .kpis{grid-template-columns:1fr 1fr}
  .split,.stage,.modes{grid-template-columns:1fr}
  .content{padding:6px 14px 28px}
  .page-head h1{font-size:24px}
}
@media (max-width:640px){
  .kpis,.form-grid{grid-template-columns:1fr}
  .page-head{flex-direction:column;align-items:stretch}
  .topbar{padding:10px 12px;flex-wrap:wrap}
  .top-actions{flex-wrap:wrap;margin-inline-start:0}
  table{min-width:520px}
  .auth-card{padding:22px 16px}
}
