:root{
  --bg:#08101b;
  --line:rgba(73,94,129,.35);
  --text:#f6f8fc;
  --muted:#9aa9bf;
  --muted2:#7f8ea5;
  --violet:#6b5cff;
  --blue:#2ca7ff;
  --cyan:#29d8ff;
  --green:#2be290;
  --red:#ff627b;
  --orange:#ffad2d;
  --shadow:0 20px 70px rgba(0,0,0,.38);
  --side:256px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}
body{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;overflow-x:hidden;
  background:radial-gradient(circle at 60% 0%,rgba(72,76,255,.14),transparent 24%),radial-gradient(circle at 100% 100%,rgba(26,91,255,.08),transparent 22%),var(--bg);
  background-attachment:fixed;
}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer}
svg{display:block}
[hidden]{display:none !important}
html,body{scrollbar-width:none}
html::-webkit-scrollbar,body::-webkit-scrollbar{width:0;height:0;display:none}
.cscroll{scrollbar-width:none}
.cscroll::-webkit-scrollbar{width:0;height:0;display:none}
html.modal-open body{position:fixed;left:0;right:0;overflow:hidden}

/* ---------- custom scroll rails ---------- */
.page-rail{position:fixed;top:10px;right:4px;bottom:10px;width:4px;z-index:65;border-radius:999px;background:rgba(94,115,153,.08);opacity:0;transition:opacity .18s;pointer-events:none}
.page-rail.on{opacity:1;pointer-events:auto}
.c-rail{position:absolute;z-index:4;width:4px;border-radius:999px;background:rgba(94,115,153,.1);opacity:0;transition:opacity .15s;pointer-events:none}
.c-rail.x{height:4px;width:auto}
.c-rail.on{opacity:1;pointer-events:auto}
.c-thumb{position:absolute;left:0;top:0;width:100%;height:100%;min-height:24px;border-radius:999px;background:linear-gradient(180deg,rgba(133,143,176,.72),rgba(76,92,125,.72));cursor:grab;touch-action:none}
.c-rail.x .c-thumb{min-height:0;min-width:24px}
.page-rail .c-thumb{min-height:42px}

/* ---------- layout ---------- */
.app{display:grid;grid-template-columns:var(--side) minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:22px 16px 16px;background:radial-gradient(circle at 20% 15%,rgba(72,76,255,.13),transparent 22%),linear-gradient(180deg,#0b1423 0%,#09111e 100%);border-right:1px solid rgba(80,103,149,.35);overflow:hidden}
.side-scroll{flex:1;min-height:0;overflow-y:auto;margin:0 -6px;padding:0 6px}
.brand{display:flex;align-items:center;gap:12px;padding:2px 6px 20px}
.brand-mark{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#5b49ff 0%,#7457ff 48%,#8d79ff 100%);box-shadow:0 0 30px rgba(98,72,255,.38)}
.brand-mark svg{width:24px;height:24px}
.brand-copy strong{display:block;font-size:15px;letter-spacing:-.01em}
.brand-copy span{display:block;color:#8ea1bf;font-size:9.5px;text-transform:uppercase;letter-spacing:.12em;margin-top:3px}
.nav-title{padding:12px 12px 7px;color:#7084a5;font-size:9.5px;font-weight:800;letter-spacing:.18em;text-transform:uppercase}
.nav{display:grid;gap:2px}
.nav button{width:100%;display:flex;align-items:center;gap:12px;padding:9px 13px;border:1px solid transparent;border-radius:12px;background:transparent;color:#d7deea;font-size:12.5px;text-align:left;transition:.16s}
.nav button:hover{background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.035)}
.nav button.active{color:#fff;border-color:rgba(96,116,255,.65);background:linear-gradient(90deg,rgba(80,55,255,.55),rgba(65,77,181,.25));box-shadow:0 0 0 1px rgba(121,132,255,.08) inset,0 0 26px rgba(81,74,255,.26)}
.nav svg{width:18px;height:18px;flex:0 0 auto}
.nav .badge{margin-left:auto;min-width:20px;padding:2px 6px;border-radius:999px;background:#ff4f6d;color:#fff;font-size:9.5px;font-weight:800;text-align:center}
.engine-card{margin-top:12px;border:1px solid rgba(88,113,169,.48);border-radius:15px;padding:13px;background:linear-gradient(180deg,#1b2a48,#111d33)}
.engine-head{display:flex;align-items:center;justify-content:space-between}
.engine-head strong{font-size:12.5px}
.online-dot{width:9px;height:9px;border-radius:50%;background:#28e58d;box-shadow:0 0 14px rgba(40,229,141,.8)}
.online-dot.off{background:#ffad2d;box-shadow:0 0 14px rgba(255,173,45,.6)}
.engine-card p{margin:7px 0 0;color:#8fa0ba;font-size:10px;line-height:1.5}
.main{min-width:0;padding:26px 28px 36px}

/* ---------- topbar ---------- */
.topbar{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:16px}
.top-left{min-width:0}
.breadcrumb{display:flex;gap:8px;color:#8293ad;font-size:11px;margin-bottom:6px}
.breadcrumb span:last-child{color:#cdd7e8}
h1{margin:0;font-size:28px;letter-spacing:-.035em;line-height:1.1}
.subtitle{margin:6px 0 0;color:#9aa9be;font-size:12px}
.top-actions{flex:0 0 auto;display:flex;align-items:center;gap:9px}
.control-btn{min-height:40px;display:inline-flex;align-items:center;gap:8px;padding:0 13px;border:1px solid rgba(86,111,165,.42);border-radius:11px;background:linear-gradient(180deg,#16243d,#0d182b);color:#eef2f8;font-size:12px;font-weight:650;white-space:nowrap}
.control-btn:hover{border-color:rgba(108,124,196,.62)}
.control-btn.primary{border-color:rgba(120,111,255,.74);background:linear-gradient(135deg,#5a47ff 0%,#6853ff 58%,#7a6dff 100%);box-shadow:0 0 22px rgba(101,81,255,.34)}
.control-btn svg{width:15px;height:15px}
.icon-btn{position:relative;width:40px;height:40px;flex:0 0 auto;display:grid;place-items:center;border:1px solid rgba(86,111,165,.42);border-radius:11px;background:linear-gradient(180deg,#16243d,#0d182b);color:#dfe6ef}
.icon-btn svg{width:18px;height:18px}
.bell-badge{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;display:grid;place-items:center;padding:0 5px;border:2px solid #08101b;border-radius:999px;background:#ff4f6d;color:#fff;font-size:9.5px;font-weight:800}
.user-box{border:0;border-left:1px solid rgba(95,116,158,.27);background:transparent;text-align:left;display:flex;align-items:center;gap:10px;padding:0 0 0 11px}
.avatar{width:36px;height:36px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;background:linear-gradient(135deg,#1e2f52,#223960);border:1px solid rgba(99,121,168,.43);font-size:11px;font-weight:900;color:#fff}
.avatar.sm{width:26px;height:26px;font-size:9px}
.avatar.lg{width:46px;height:46px;font-size:14px}
.user-copy strong{display:block;font-size:11px;text-transform:uppercase}
.user-copy span{display:block;color:#8290a8;font-size:9px;margin-top:2px;text-transform:uppercase}
.month-step{min-height:40px;display:inline-flex;align-items:center;gap:4px;padding:0 4px;border:1px solid rgba(86,111,165,.42);border-radius:11px;background:#0b1526}
.month-step .ps-label{width:auto;min-width:150px;height:32px;display:flex;align-items:center;justify-content:center;gap:7px;padding:0 8px;border:0;border-radius:8px;background:transparent;color:#fff;font-size:12px;font-weight:700;white-space:nowrap}
.month-step .ps-label:hover{background:rgba(255,255,255,.06)}
.month-step .ps-label svg{width:14px;height:14px;color:#a596ff;flex:0 0 auto}
.month-step .ps-label .chev{color:#8fa0b8;width:13px;height:13px}
.pp-months{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.pp-months .chip-tg{justify-content:center}
.month-step button{width:30px;height:30px;border:0;border-radius:8px;background:transparent;color:#cfd8e6;font-size:18px;line-height:1}
.month-step button:hover:not(:disabled){background:rgba(255,255,255,.06)}
.month-step button:disabled{opacity:.3;cursor:default}

/* ---------- generic blocks ---------- */
.page{display:none}
.page.active{display:block}
.card{border:1px solid rgba(71,101,157,.54);border-radius:16px;background:linear-gradient(180deg,#101c31,#0c1729);box-shadow:0 14px 34px rgba(0,0,0,.2);min-width:0}
.card-pad{padding:16px 18px}
.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.card-title{margin:0;font-size:16px;letter-spacing:-.02em}
.card-sub{margin-top:3px;color:#8fa0b8;font-size:10.5px}
.card-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.grid-main{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);gap:14px}
.stack{display:grid;gap:14px}
.eq{align-items:stretch}
.eq > .card{display:flex;flex-direction:column}
.fill-scroll{position:relative;flex:1;min-height:0}
.fill-scroll > .scroller{position:absolute;inset:0;overflow:auto}
.mt{margin-top:14px}
.muted{color:#8fa0b8}
.small{font-size:10.5px}
.r{text-align:right !important}
.c{text-align:center !important}
.nowrap{white-space:nowrap}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.pos{color:#2ce391}
.neg{color:#ff667e}
.warn-t{color:#ffc56a}

.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:14px}
.kpi{position:relative;overflow:hidden;min-height:118px;padding:16px 17px;border-radius:15px;border:1px solid rgba(72,104,162,.55);background:linear-gradient(145deg,#14203a,#101d33);box-shadow:0 12px 30px rgba(0,0,0,.18)}
.kpi-top{display:flex;align-items:flex-start;gap:12px}
.kpi-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;flex:0 0 auto}
.kpi-icon svg{width:19px;height:19px}
.kpi-icon.violet{background:linear-gradient(145deg,#573dff,#4c2fc7);box-shadow:0 0 20px rgba(96,63,255,.28)}
.kpi-icon.green{background:linear-gradient(145deg,#16a97c,#116551)}
.kpi-icon.blue{background:linear-gradient(145deg,#1f7fd1,#155a96)}
.kpi-icon.red{background:linear-gradient(145deg,#c44874,#742e4f)}
.kpi-icon.orange{background:linear-gradient(145deg,#d48a1e,#8a5a12)}
.kpi-label{color:#a8b4c6;font-size:11px;margin-bottom:4px}
.kpi-value{font-size:23px;font-weight:800;letter-spacing:-.04em;white-space:nowrap}
.kpi-value small{font-size:12px;font-weight:600;color:#8fa0b8;letter-spacing:0}
.kpi-foot{display:flex;align-items:center;gap:7px;margin-top:9px;font-size:10px;color:#8c9bb2;min-width:0}
.kpi-foot .up{color:#2be290;font-weight:700}
.kpi-foot .down{color:#ff6d83;font-weight:700}
.kpi .spark{position:absolute;right:12px;bottom:12px;width:76px;height:34px}

table{width:100%;border-collapse:collapse;table-layout:fixed}
th,td{padding:10px 10px;border-top:1px solid var(--line);text-align:left;font-size:11px}
th{color:#8fa0b8;text-transform:uppercase;letter-spacing:.08em;font-size:8.5px;font-weight:800;white-space:nowrap}
thead th{border-top:0}
td{color:#d9e0e9;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scroller thead th{position:sticky;top:0;z-index:1;background:#0f1b2f}
tbody tr.click{cursor:pointer}
tbody tr.click:hover td{background:rgba(255,255,255,.025)}
td b{color:#fff}
.empty{padding:26px 10px;color:#8fa0b8;font-size:11.5px;text-align:center}
.tbl-total td{font-weight:800;color:#fff;border-top:1px solid rgba(120,111,255,.4)}

.tag{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap;letter-spacing:.02em}
.tag.ok{color:#57e5a2;background:rgba(36,181,115,.12);border:1px solid rgba(36,181,115,.28)}
.tag.wait{color:#ffc56a;background:rgba(255,173,45,.12);border:1px solid rgba(255,173,45,.3)}
.tag.bad{color:#ff8194;background:rgba(202,73,94,.12);border:1px solid rgba(202,73,94,.3)}
.tag.info{color:#9fd0ff;background:rgba(44,167,255,.12);border:1px solid rgba(44,167,255,.32)}
.tag.vio{color:#c9bfff;background:rgba(107,92,255,.16);border:1px solid rgba(140,130,255,.4)}
.tag.off{color:#b0bbcc;background:rgba(120,130,150,.12);border:1px solid rgba(120,130,150,.3)}
.who{display:inline-flex;align-items:center;gap:7px;min-width:0;max-width:100%}
.who i{width:22px;height:22px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:8.5px;font-weight:800;color:#fff}
.who span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hosts-inline{display:inline-flex;align-items:center;min-width:0}
.hosts-inline i{width:24px;height:24px;flex:0 0 auto;display:grid;place-items:center;margin-left:-6px;border:2px solid #0e192c;border-radius:50%;font-style:normal;font-size:8.5px;font-weight:800;color:#fff}
.hosts-inline i:first-child{margin-left:0}
.hosts-inline span{margin-left:6px}

.btn{min-height:36px;padding:0 14px;border-radius:10px;border:1px solid rgba(75,98,143,.45);background:#111d31;color:#edf2f7;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
.btn:hover{border-color:rgba(108,124,196,.62)}
.btn.primary{border-color:rgba(115,104,255,.72);background:linear-gradient(135deg,#5f4fff,#6f63f4);box-shadow:0 0 22px rgba(92,76,255,.24);color:#fff}
.btn.good{border-color:rgba(36,181,115,.6);background:linear-gradient(135deg,#119e63,#13b874);color:#fff}
.btn.danger{border-color:rgba(202,73,94,.55);background:rgba(202,73,94,.14);color:#ff9aab}
.btn.ghost{background:transparent}
.btn.sm{min-height:30px;padding:0 10px;font-size:10.5px}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn svg{width:14px;height:14px}
.link-btn{border:0;background:transparent;color:#a596ff;font-size:11px;font-weight:700;padding:2px 0}
.link-btn:hover{color:#c3b9ff}

.seg{display:inline-flex;gap:2px;padding:3px;border:1px solid rgba(86,111,165,.42);border-radius:10px;background:#0b1526}
.seg button{min-height:28px;padding:4px 11px;border:0;border-radius:7px;background:transparent;color:#9aa9bf;font-size:10.5px;font-weight:700;white-space:nowrap}
.seg button.active{background:linear-gradient(135deg,#5f4fff,#6f63f4);color:#fff}
.seg button .n{margin-left:5px;padding:1px 6px;border-radius:999px;background:rgba(255,255,255,.12);font-size:9px}

.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.search-box{flex:1 1 220px;min-width:180px;display:flex;align-items:center;gap:8px;min-height:38px;padding:0 12px;border:1px solid rgba(66,91,137,.52);border-radius:10px;background:#0e1a2d}
.search-box:focus-within{border-color:#6b5cff}
.search-box svg{width:15px;height:15px;color:#7f8ea5;flex:0 0 auto}
.search-box input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:12px}
.search-box input::placeholder{color:#6f7f97}
.dd-btn{min-height:38px;display:inline-flex;align-items:center;gap:7px;padding:0 11px;border:1px solid rgba(86,111,165,.42);border-radius:10px;background:linear-gradient(180deg,#16243d,#0d182b);color:#eef2f8;font-size:11px;font-weight:700;white-space:nowrap;max-width:100%}
.dd-btn .k{color:#8fa0b8;font-weight:600}
.dd-btn svg{width:13px;height:13px;color:#9aabc2;flex:0 0 auto}
.dd-btn.set{border-color:rgba(140,130,255,.65)}
.phone-only{display:none !important}

.stat-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid rgba(71,101,157,.54);border-radius:14px;background:linear-gradient(180deg,#101c31,#0c1729);margin-bottom:14px;overflow:hidden}
.stat-strip > div{padding:12px 15px;border-left:1px solid var(--line);min-width:0}
.stat-strip > div:first-child{border-left:0}
.stat-strip span{display:flex;align-items:center;gap:6px;color:#a8b4c6;font-size:10.5px}
.stat-strip span i{width:7px;height:7px;border-radius:50%}
.stat-strip b{display:block;margin-top:4px;font-size:18px;letter-spacing:-.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat-strip small{color:#8fa0b8;font-size:10px}

.progress{height:7px;border-radius:999px;background:#1a2740;overflow:hidden;position:relative}
.progress i{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:linear-gradient(90deg,#5f4fff,#8d7dff)}
.progress.ok i{background:linear-gradient(90deg,#13b874,#2be290)}
.progress.warn i{background:linear-gradient(90deg,#d48a1e,#ffad2d)}
.progress .pace{position:absolute;top:-2px;bottom:-2px;width:2px;background:#fff;opacity:.75;border-radius:2px}
.prog-row{display:flex;align-items:center;gap:8px}
.prog-row .progress{flex:1}
.prog-row b{font-size:10.5px;min-width:34px;text-align:right}

.banner{display:flex;align-items:center;gap:10px;padding:10px 13px;margin-bottom:14px;border:1px solid rgba(255,173,45,.4);border-radius:12px;background:#231e14;color:#ffd9a0;font-size:11.5px}
.banner.info{border-color:rgba(44,167,255,.4);background:#0f2236;color:#bfe3ff}
.banner.ok{border-color:rgba(36,181,115,.45);background:#0f2a22;color:#a8f0cd}
.banner svg{width:16px;height:16px;flex:0 0 auto}
.banner .grow{flex:1;min-width:0}
.banner .btn{min-height:30px}

/* ---------- dashboard ---------- */
.chart-box{position:relative;height:250px}
.chart-box svg{width:100%;height:100%;overflow:visible}
.chart-tip{position:absolute;z-index:5;pointer-events:none;padding:8px 10px;border:1px solid rgba(120,111,255,.6);border-radius:10px;background:#0d1727;font-size:10.5px;white-space:nowrap;box-shadow:var(--shadow);display:none}
.chart-tip b{display:block;margin-bottom:3px;color:#fff}
.legend{display:flex;gap:12px;color:#a8b4c4;font-size:10px}
.legend span{display:flex;align-items:center;gap:6px}
.legend i{width:8px;height:8px;border-radius:2px;display:block}
.todo{display:grid;gap:8px}
.todo-item{display:flex;align-items:center;gap:11px;width:100%;padding:11px 12px;border:1px solid rgba(71,92,132,.42);border-radius:12px;background:#0b1527;text-align:left}
.todo-item:hover{border-color:rgba(140,130,255,.6)}
.todo-item i{width:32px;height:32px;flex:0 0 auto;display:grid;place-items:center;border-radius:9px;font-style:normal;font-weight:800;font-size:13px}
.todo-item.warn i{background:rgba(255,173,45,.15);color:#ffc56a}
.todo-item.bad i{background:rgba(202,73,94,.16);color:#ff8194}
.todo-item.info i{background:rgba(44,167,255,.14);color:#7cc6ff}
.todo-item.ok i{background:rgba(36,181,115,.14);color:#57e5a2}
.todo-item b{display:block;font-size:12px;color:#eef2f8}
.todo-item small{display:block;margin-top:2px;color:#8fa0b8;font-size:10.5px}
.todo-item .go{margin-left:auto;color:#7f8ea5;font-size:16px}
.cost-box{display:grid;gap:9px}
.cost-row{display:flex;justify-content:space-between;gap:10px;font-size:11.5px;color:#c8d1e0}
.cost-row b{color:#fff}
.cost-row.total{padding-top:9px;border-top:1px solid var(--line);font-size:13px}
.ratio-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:4px}
.ratio-grid div{padding:9px 10px;border:1px solid rgba(71,92,132,.38);border-radius:10px;background:#0b1527}
.ratio-grid span{display:block;color:#8fa0b8;font-size:9.5px}
.ratio-grid b{display:block;margin-top:3px;font-size:13px}
.target-hero{display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px;align-items:center}
.ring{width:118px;height:118px;position:relative}
.ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.ring div{position:absolute;inset:0;display:grid;place-content:center;text-align:center}
.ring b{font-size:22px}
.ring span{color:#8fa0b8;font-size:10px}
.target-lines{display:grid;gap:10px}
.tgt-line{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10.5px;color:#a8b4c6}
.tgt-line span{display:flex;align-items:center;gap:6px;min-width:0}
.tgt-line svg{width:13px;height:13px;color:#a596ff;flex:0 0 auto}
.chip-tg.day{min-width:44px;justify-content:center}
.wk{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.wk-d{display:grid;justify-items:center;gap:2px;padding:7px 2px;border-radius:10px;border:1px solid rgba(71,92,132,.38);background:#0b1527;min-width:0}
.wk-d span{color:#8fa0b8;font-size:9.5px;font-weight:700}
.wk-d b{font-size:12.5px}
.wk-d small{color:#7f8ea5;font-size:9px}
.wk-d.hit{border-color:rgba(36,181,115,.55);background:#0f2a22}.wk-d.hit b{color:#57e5a2}
.wk-d.miss{border-color:rgba(255,173,45,.45);background:#231e14}.wk-d.miss b{color:#ffc56a}
.wk-d.now{border-color:rgba(140,130,255,.65);background:#17173a}
.wk-d.off{opacity:.45}.wk-d.fut{opacity:.3}
.target-lines .tl{display:flex;justify-content:space-between;gap:10px;font-size:11.5px;color:#c8d1e0}
.target-lines .tl b{color:#fff}

/* ---------- sessions ---------- */
.ses-table:not(.sel) th:nth-child(1){width:13%}
.ses-table:not(.sel) th:nth-child(2){width:13%}
.ses-table:not(.sel) th:nth-child(3){width:18%}
.ses-table:not(.sel) th:nth-child(4){width:9%}
.ses-table:not(.sel) th:nth-child(5){width:10%}
.ses-table:not(.sel) th:nth-child(6){width:8%}
.ses-table:not(.sel) th:nth-child(7){width:8%}
.ses-table:not(.sel) th:nth-child(8){width:7%}
.ses-table:not(.sel) th:nth-child(9){width:14%}
.ses-table.sel th:nth-child(1){width:36px}
.ses-table.sel th:nth-child(2){width:12%}
.ses-table.sel th:nth-child(3){width:13%}
.ses-table.sel th:nth-child(4){width:17%}
.ses-table.sel th:nth-child(5){width:8%}
.ses-table.sel th:nth-child(6){width:9%}
.ses-table.sel th:nth-child(7){width:8%}
.ses-table.sel th:nth-child(8){width:8%}
.ses-table.sel th:nth-child(9){width:7%}
.ses-table.sel th:nth-child(10){width:13%}
.ses-date b{display:block;color:#eef2f8;font-size:11px}
.ses-date small{color:#8fa0b8;font-size:10px}
.chk{width:16px;height:16px;accent-color:#6b5cff;margin:0;vertical-align:middle}
.pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line);color:#8fa0b8;font-size:10.5px}
.pager .btns{display:flex;gap:6px}
.ses-list{display:none}
.group-h{display:flex;justify-content:space-between;padding:12px 2px 6px;color:#8fa0b8;font-size:10.5px;font-weight:700}
.ses-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;width:100%;padding:11px 2px;border:0;border-top:1px solid var(--line);background:transparent;text-align:left}
.ses-item .t1{font-weight:700;color:#eef2f8;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ses-item .t2{color:#8fa0b8;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ses-item .m{justify-self:end;text-align:right;font-size:12px;font-weight:700;color:#fff;white-space:nowrap}
.ses-item .m small{display:block;color:#8fa0b8;font-weight:500;font-size:10px}
.ses-item .chips{grid-column:1/-1;display:flex;gap:10px;color:#a8b4c6;font-size:10.5px;flex-wrap:wrap}
.ses-item .chips span b{color:#eef2f8}

/* ---------- side panel / modal ---------- */
.overlay{position:fixed;inset:0;z-index:80;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(4,9,16,.66);overscroll-behavior:contain}
.overlay.open{display:flex}
.overlay.side{justify-content:flex-end;padding:0}
.modal{position:relative;width:min(640px,100%);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);display:flex;flex-direction:column;border:1px solid rgba(105,117,255,.72);border-radius:20px;background:linear-gradient(180deg,#0f182a,#0a121f);box-shadow:0 30px 90px rgba(0,0,0,.58),0 0 40px rgba(65,64,255,.16)}
.modal.wide{width:min(860px,100%)}
.modal.narrow{width:min(440px,100%)}
.overlay.side .modal{width:min(480px,100%);height:100vh;height:100dvh;max-height:none;border-radius:0;border-width:0 0 0 1px}
.m-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px 12px}
.m-head h2{margin:0;font-size:18px;letter-spacing:-.025em}
.m-sub{margin-top:3px;color:#92a0b5;font-size:10.5px}
.close-btn{flex:0 0 auto;width:32px;height:32px;display:grid;place-items:center;border:1px solid rgba(76,100,147,.43);border-radius:10px;background:#1c2742;color:#fff;font-size:18px;line-height:1}
.m-body{position:relative;flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.m-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;padding:4px 20px 16px;overscroll-behavior:contain}
.m-foot{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:12px 20px 16px;border-top:1px solid rgba(68,91,132,.34)}
.m-foot .spacer{flex:1}
.m-foot:empty{display:none}

.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px 13px}
.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.field{display:grid;gap:5px;min-width:0;align-content:start}
.field.full{grid-column:1/-1}
.field > label,.field .lbl{color:#e3e8ef;font-size:11px;font-weight:750;display:flex;justify-content:space-between;gap:8px}
.field .opt{color:#7f8ea5;font-weight:600}
.help{color:#8291a8;font-size:10px;line-height:1.45}
.help.warn{color:#ffc56a}
.help.err{color:#ff8194}
.input{width:100%;min-height:40px;padding:0 12px;border:1px solid rgba(66,91,137,.52);border-radius:11px;background:#0f1b2e;color:#f4f6fb;font-size:12.5px;outline:0}
textarea.input{padding:10px 12px;min-height:64px;resize:vertical;line-height:1.45}
.input:focus{border-color:#6b5cff;box-shadow:0 0 0 3px rgba(107,92,255,.11)}
.input.bad{border-color:rgba(255,98,123,.7)}
.input::placeholder{color:#66768f}
.input[type=date],.input[type=time]{color-scheme:dark;min-width:0}
.affix{display:flex;align-items:center;border:1px solid rgba(66,91,137,.52);border-radius:11px;background:#0f1b2e}
.affix:focus-within{border-color:#6b5cff;box-shadow:0 0 0 3px rgba(107,92,255,.11)}
.affix span{padding:0 0 0 12px;color:#8fa0b8;font-size:12px;font-weight:700}
.affix span.suf{padding:0 12px 0 0}
.affix .input{border:0;background:transparent;box-shadow:none !important}
.choice{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:6px}
.choice button{min-height:38px;padding:6px 10px;border:1px solid rgba(66,91,137,.52);border-radius:10px;background:#0f1b2e;color:#c8d1e0;font-size:11px;font-weight:700;text-align:center}
.choice button.active{border-color:#7d70ff;background:rgba(98,88,255,.2);color:#fff}
.choice button small{display:block;color:#8fa0b8;font-weight:500;font-size:9.5px;margin-top:2px}
.chips-in{display:flex;flex-wrap:wrap;gap:6px}
.chip-tg{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 10px;border:1px solid rgba(66,91,137,.52);border-radius:999px;background:#0f1b2e;color:#c8d1e0;font-size:11px;font-weight:700}
.chip-tg.active{border-color:#7d70ff;background:rgba(98,88,255,.2);color:#fff}
.chip-tg i{width:18px;height:18px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:8px;color:#fff}
.sw{position:relative;width:38px;height:22px;flex:0 0 auto;border:0;border-radius:999px;background:#2a3650;padding:0}
.sw::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#c8d1e0;transition:.15s}
.sw.on{background:#5f4fff}
.sw.on::after{left:19px;background:#fff}
.sw-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 0;border-top:1px solid rgba(73,94,129,.28)}
.sw-row:first-child{border-top:0}
.sw-row .lab{display:grid;gap:2px;color:#dfe6ef;font-size:11.5px;min-width:0}
.sw-row .lab small{color:#8fa0b8;font-size:10px;line-height:1.4}
.sw-row.dim .lab{color:#5f6e86}
.calc{display:grid;gap:7px;margin-top:12px;padding:12px 14px;border:1px solid rgba(120,111,255,.4);border-radius:12px;background:#121a36}
.calc .row{display:flex;justify-content:space-between;gap:10px;font-size:11.5px;color:#c8d1e0}
.calc .row b{color:#fff}
.calc .row.total{padding-top:7px;border-top:1px solid rgba(120,111,255,.3);font-size:13px}
.calc .row.total b{color:#c9bfff}
.warn-list{display:grid;gap:6px;margin-top:10px}
.warn-list div{display:flex;gap:8px;padding:8px 10px;border-radius:9px;background:#231e14;border:1px solid rgba(255,173,45,.35);color:#ffd9a0;font-size:10.5px;line-height:1.4}
.warn-list div.ok{background:#0f2a22;border-color:rgba(36,181,115,.45);color:#a8f0cd}
.warn-list div.err{background:#2a1219;border-color:rgba(255,98,123,.4);color:#ffb3c0}
.upload{display:flex;align-items:center;gap:12px;padding:10px;border:1px dashed rgba(86,111,165,.6);border-radius:12px;background:#0d1828}
.upload.bad{border-color:rgba(255,98,123,.7)}
.upload .thumb{width:54px;height:72px;flex:0 0 auto;border-radius:8px;border:1px solid rgba(86,111,165,.5);background:#0b1220 center/cover no-repeat;cursor:zoom-in}
.upload .thumb.empty{display:grid;place-items:center;color:#5f6e86;cursor:default;font-size:20px}
.upload .txt{flex:1;min-width:0;font-size:11px;color:#c8d1e0}
.upload .txt small{display:block;color:#8fa0b8;font-size:10px;margin-top:2px}

.dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.dl > div{padding:9px 11px;border:1px solid rgba(71,92,132,.38);border-radius:10px;background:#0b1527;min-width:0}
.dl > div > span{display:block;color:#8fa0b8;font-size:9.5px}
.dl > div > b{display:block;margin-top:3px;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dl > div.full{grid-column:1/-1}
.sec-t{margin:16px 0 8px;color:#8fa0b8;font-size:9.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.sec-t:first-child{margin-top:4px}
.proof{display:flex;gap:12px;align-items:flex-start}
.proof img{width:96px;height:170px;object-fit:cover;border-radius:10px;border:1px solid rgba(86,111,165,.5);cursor:zoom-in;background:#0b1220}
.hist{display:grid;gap:0}
.hist div{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;padding:8px 0;border-top:1px solid rgba(73,94,129,.25);font-size:11px;color:#c8d1e0}
.hist div:first-child{border-top:0}
.hist small{color:#8fa0b8;font-size:10px;white-space:nowrap}
.reason{margin-top:8px;padding:9px 11px;border-radius:10px;background:#2a1219;border:1px solid rgba(255,98,123,.4);color:#ffb3c0;font-size:11px}

.zoom{position:fixed;inset:0;z-index:120;display:none;flex-direction:column;background:rgba(3,6,12,.92)}
.zoom.open{display:flex}
.zoom-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;color:#c8d1e0;font-size:12px}
.zoom-bar .grp{display:flex;gap:6px}
.zoom-stage{flex:1;min-height:0;overflow:hidden;display:grid;place-items:center;touch-action:none;cursor:grab}
.zoom-stage img{max-width:92vw;max-height:calc(100dvh - 90px);transform-origin:center center;user-select:none;-webkit-user-drag:none;border-radius:8px}

.toast{pointer-events:none;position:fixed;right:22px;bottom:22px;z-index:200;display:none;padding:11px 14px;border:1px solid rgba(78,101,146,.48);border-radius:11px;background:#122037;color:#eef3f8;font-size:11.5px;box-shadow:var(--shadow);max-width:min(420px,calc(100vw - 32px))}
.toast.show{display:block}
.float-menu{position:fixed;z-index:130;display:none;min-width:200px;max-width:calc(100vw - 16px);max-height:min(360px,70vh);overflow-y:auto;padding:6px;border:1px solid rgba(92,115,164,.46);border-radius:13px;background:#0d1727;box-shadow:var(--shadow)}
.float-menu.open{display:block}
.fm-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:9px;background:transparent;color:#dfe6ef;font-size:11.5px;text-align:left}
.fm-item:hover{background:rgba(98,88,255,.12)}
.fm-item.active{background:rgba(98,88,255,.18);color:#fff}
.fm-item.danger{color:#ff9aab}
.fm-item small{display:block;color:#8fa0b8;font-size:9.5px;margin-top:2px}
.fm-item svg{width:14px;height:14px;color:#a596ff;flex:0 0 auto}
.fm-sep{height:1px;margin:5px 4px;background:var(--line)}
.fm-head{padding:8px 10px 6px;color:#8fa0b8;font-size:9.5px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
.fm-search{margin:2px 2px 6px;min-height:36px}

/* combobox */
.combo{position:relative}
.combo .input{padding-right:34px}
.combo .chev{position:absolute;right:11px;top:50%;width:14px;height:14px;transform:translateY(-50%);color:#9aabc2;pointer-events:none}

/* ---------- hosts / accounts ---------- */
.cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.h-card{display:flex;flex-direction:column;gap:12px;padding:15px 16px;text-align:left;width:100%;color:inherit}
[role=button]{cursor:pointer;-webkit-tap-highlight-color:transparent}
[role=button]:focus-visible{outline:2px solid #8d7dff;outline-offset:2px}
.h-card[role=button]:hover{border-color:rgba(140,130,255,.65)}
.h-card.clickable:focus-visible{outline:2px solid #8d7dff;outline-offset:2px}
.add-card{align-items:center;justify-content:center;text-align:center;gap:6px;min-height:160px;border-style:dashed;background:#0b1527;color:#c8d1e0}
.add-card svg{width:24px;height:24px;color:#a596ff}
.add-card b{font-size:13px}
.add-card small{color:#8fa0b8;font-size:10.5px;max-width:230px}
.h-top{display:flex;align-items:center;gap:11px;min-width:0}
.h-top .nm{min-width:0;flex:1}
.h-top b{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.h-top small{display:block;margin-top:2px;color:#8fa0b8;font-size:10.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.h-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.h-stats div{padding:7px 8px;border-radius:9px;background:#0b1527;border:1px solid rgba(71,92,132,.32);min-width:0}
.h-stats span{display:block;color:#8fa0b8;font-size:9px}
.h-stats b{display:block;margin-top:2px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.h-pay{display:flex;justify-content:space-between;gap:8px;align-items:center;padding-top:10px;border-top:1px solid var(--line);font-size:10.5px;color:#a8b4c6}
.h-pay b{color:#fff}
.acc-mark{width:40px;height:40px;flex:0 0 auto;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,#ff2d6f,#2bd9f0);color:#fff;font-weight:900;font-size:13px}
.acc-mark.off{filter:grayscale(1);opacity:.6}

/* ---------- payroll ---------- */
.pay-table th:nth-child(1){width:17%}
.pay-table th:nth-child(2){width:14%}
.pay-table th:nth-child(3){width:7%}
.pay-table th:nth-child(4){width:8%}
.pay-table th:nth-child(5){width:12%}
.pay-table th:nth-child(6){width:11%}
.pay-table th:nth-child(7){width:11%}
.pay-table th:nth-child(8){width:12%}
.pay-table th:nth-child(9){width:10%}
.how-line{display:flex;gap:9px;align-items:flex-start;margin:0 0 10px;padding:9px 12px;border:1px solid rgba(44,167,255,.3);border-radius:10px;background:#0f2236;color:#bfe3ff;font-size:11px;line-height:1.5}
.how-line svg{width:15px;height:15px;flex:0 0 auto;margin-top:1px}
.pay-hero{padding:18px 18px 16px;background:radial-gradient(circle at 100% 0%,rgba(107,92,255,.22),transparent 45%),linear-gradient(180deg,#121e38,#0c1729)}
.ph-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.ph-label{color:#a8b4c6;font-size:12px;font-weight:600}
.ph-amt{margin-top:4px;font-size:32px;font-weight:800;letter-spacing:-.04em;line-height:1.05}
.ph-sub{margin-top:5px;color:#8fa0b8;font-size:11px}
.ph-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:16px 0 6px;border:1px solid rgba(71,92,132,.45);border-radius:12px;background:#0b1527}
.ph-stats > div{padding:10px 12px;border-left:1px solid rgba(71,92,132,.45);min-width:0}
.ph-stats > div:first-child{border-left:0}
.ph-stats span{display:block;color:#8fa0b8;font-size:10px}
.ph-stats b{display:block;margin-top:3px;font-size:16px}
.ph-rows{margin-top:6px}
.ph-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:9px 0;border-bottom:1px dashed rgba(73,94,129,.4);font-size:12px;color:#c8d1e0}
.ph-row span{min-width:0}
.ph-row b{white-space:nowrap;color:#fff}
.ph-row.total{border-bottom:0;padding-top:11px;font-size:13.5px}
.ph-row.total b{color:#c9bfff;font-size:15px}
.ph-note{display:flex;gap:8px;align-items:center;margin-top:8px;padding:9px 11px;border-radius:10px;background:#231e14;border:1px solid rgba(255,173,45,.35);color:#ffd9a0;font-size:11px}
.ph-note svg{width:15px;height:15px;flex:0 0 auto}
.ph-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.ph-actions .btn{min-height:40px}
.hist-list{display:grid;gap:2px}
.hrow{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 10px;border-radius:11px;border:1px solid transparent}
.hrow:hover{background:rgba(255,255,255,.03)}
.hrow.active{background:rgba(98,88,255,.12);border-color:rgba(140,130,255,.45)}
.hrow b{display:block;font-size:12.5px}
.hrow small{display:block;margin-top:2px;color:#8fa0b8;font-size:10.5px}
.hr-r{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:0 0 auto}
.adj-list{display:grid;gap:6px}
.adj{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border:1px solid rgba(71,92,132,.38);border-radius:10px;background:#0b1527;font-size:11px}
.adj small{display:block;color:#8fa0b8;font-size:10px}
.adj .x{border:0;background:transparent;color:#ff9aab;font-size:15px;padding:0 4px}
.pay-list,.cost-list,.user-list{display:none}
.li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;width:100%;padding:11px 2px;border:0;border-top:1px solid var(--line);background:transparent;text-align:left}
.li:first-child{border-top:0}
.li .t1{font-weight:700;color:#eef2f8;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.li .t2{color:#8fa0b8;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.li .m{justify-self:end;text-align:right;font-size:12.5px;font-weight:800;white-space:nowrap}
.li .s{justify-self:end}

/* ---------- costs ---------- */
.cost-table th:nth-child(1){width:12%}
.cost-table th:nth-child(2){width:18%}
.cost-table th:nth-child(3){width:14%}
.cost-table th:nth-child(4){width:28%}
.cost-table th:nth-child(5){width:14%}
.cost-table th:nth-child(6){width:14%}
.bars{display:grid;gap:10px}
.bar-row{display:grid;gap:5px}
.bar-row .top{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#c8d1e0}
.bar-row .top b{color:#fff}

/* ---------- reports ---------- */
.rep-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:14px}
.rep-controls .grow{flex:1}
.rep-range{display:inline-flex;align-items:center;gap:4px;min-height:38px;padding:0 4px;border:1px solid rgba(86,111,165,.42);border-radius:10px;background:#0b1526}
.rep-range b{min-width:150px;text-align:center;font-size:11.5px}
.rep-range button{width:28px;height:28px;border:0;border-radius:7px;background:transparent;color:#cfd8e6;font-size:17px}
.rep-range button:disabled{opacity:.3}
.rank{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:6px;background:#1a2740;color:#c8d1e0;font-size:9.5px;font-weight:800;margin-right:6px}
.rank.r1{background:linear-gradient(135deg,#d4a017,#ffcf4a);color:#2a1d00}
.tg-bubble{max-width:100%;padding:10px 12px;border-radius:4px 14px 14px 14px;background:#182533;color:#e9eef5}
.tg-bubble-from{margin-bottom:6px;color:#64b5ef;font-size:11px;font-weight:700}
.tg-bubble pre{margin:0;font-family:inherit;font-size:11.5px;line-height:1.5;white-space:pre-wrap}
.tg-bubble pre code{display:block;margin:4px 0;padding:6px 8px;border-radius:6px;background:#0f1a24;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;white-space:pre;overflow-x:auto}

/* ---------- users / audit / settings ---------- */
.user-table th:nth-child(1){width:26%}
.user-table th:nth-child(2){width:16%}
.user-table th:nth-child(3){width:16%}
.user-table th:nth-child(4){width:12%}
.user-table th:nth-child(5){width:18%}
.user-table th:nth-child(6){width:12%}
.role-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.role-card{padding:14px 15px;text-align:left;color:inherit;width:100%}
[role=button].role-card:hover{border-color:rgba(140,130,255,.65)}
.role-card p{margin:6px 0 0;color:#a8b4c6;font-size:10.5px;line-height:1.5}
.perm-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 18px}
.aud-table th:nth-child(1){width:14%}
.aud-table th:nth-child(2){width:14%}
.aud-table th:nth-child(3){width:16%}
.aud-table th:nth-child(4){width:14%}
.aud-table th:nth-child(5){width:42%}
.aud-list{display:none}
.set-tabs{margin-bottom:14px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.set-panel{display:none}
.set-panel.active{display:grid;gap:14px}
.status-box{display:grid;gap:3px;padding:11px 13px;border:1px solid rgba(120,130,150,.35);border-radius:11px;background:#0b1527}
.status-box.ok{border-color:rgba(36,181,115,.45);background:#0f2a22}
.status-box.bad{border-color:rgba(202,73,94,.5);background:#2a1219}
.status-box b{color:#fff;font-size:12px}
.status-box span{color:#a8b4c6;font-size:10.5px}
.rcp{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.rcp:first-child{border-top:0;padding-top:0}
.rcp .nm{display:flex;align-items:center;flex-wrap:wrap;gap:6px;color:#eef2f8;font-size:12px;font-weight:700}
.rcp .sub{margin-top:3px;color:#8fa0b8;font-size:10.5px;line-height:1.45}
.rcp.paused{opacity:.6}
.steps{margin:0;padding-left:18px;color:#a8b4c6;font-size:11px;line-height:1.7}
.code-line{display:flex;align-items:center;gap:8px}
.code-line code{flex:1;min-width:0;overflow:hidden;padding:9px 11px;border:1px dashed rgba(86,111,165,.5);border-radius:10px;color:#c9bfff;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.imp-table th:nth-child(1){width:6%}
.imp-table th:nth-child(2){width:13%}
.imp-table th:nth-child(3){width:14%}
.imp-table th:nth-child(4){width:16%}
.imp-table th:nth-child(5){width:9%}
.imp-table th:nth-child(6){width:10%}
.imp-table th:nth-child(7){width:8%}
.imp-table th:nth-child(8){width:8%}
.imp-table th:nth-child(9){width:16%}
.map-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.map-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;border:1px solid rgba(71,92,132,.38);border-radius:10px;background:#0b1527;font-size:11px}
.map-row b{color:#fff}

/* ---------- login ---------- */
.login-screen{position:fixed;inset:0;z-index:300;display:flex;align-items:flex-start;justify-content:center;overflow-y:auto;padding:40px 16px;background:radial-gradient(circle at 20% 0%,rgba(91,72,255,.25),transparent 45%),radial-gradient(circle at 90% 100%,rgba(44,167,255,.12),transparent 40%),#08101b}
.login-card{width:min(400px,100%);margin:auto;padding:26px 24px 22px;border:1px solid rgba(72,104,162,.55);border-radius:18px;background:linear-gradient(145deg,#14203a,#0d182b);box-shadow:0 24px 60px rgba(0,0,0,.45)}
.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}
.login-brand .brand-mark{width:42px;height:42px}
.login-brand strong{display:block;font-size:15px}
.login-brand span{color:#8fa0b8;font-size:10px;letter-spacing:.08em;text-transform:uppercase}
.login-card h1{font-size:22px}
.login-sub{margin:4px 0 18px;color:#a8b4c6;font-size:12px}
.login-card .field{margin-bottom:11px}
.login-btn{width:100%;min-height:44px;margin-top:6px;font-size:13px}
.login-err{margin:8px 0 0;color:#ff8194;font-size:11px;min-height:14px}
.login-demo-title{margin:20px 0 8px;color:#8fa0b8;font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
.login-demo{display:grid;gap:6px}
.login-demo button{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;border:1px solid rgba(71,92,132,.42);border-radius:10px;background:#0b1527;text-align:left}
.login-demo button:hover{border-color:rgba(140,130,255,.6)}
.login-demo b{display:block;font-size:11.5px}
.login-demo small{color:#8fa0b8;font-size:10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}

.bottom-nav{display:none}
.more-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.more-grid button{display:flex;flex-direction:column;align-items:center;gap:7px;padding:14px 6px;border:1px solid rgba(71,92,132,.42);border-radius:13px;background:#0b1527;font-size:11px;font-weight:700;color:#dfe6ef}
.more-grid button.active{border-color:#7d70ff;background:rgba(98,88,255,.18)}
.more-grid svg{width:20px;height:20px;color:#a596ff}

/* ---------- print ---------- */
.print-doc{display:none}
@media print{
  body{background:#fff !important;color:#111}
  .app,.bottom-nav,.page-rail,.toast,.overlay,.zoom,.login-screen{display:none !important}
  .print-doc{display:block;color:#111;font-size:11px}
  .print-doc h2{margin:0 0 4px;font-size:18px}
  .print-doc h3{margin:16px 0 6px;font-size:13px}
  .print-doc table{border:1px solid #ccc}
  .print-doc th,.print-doc td{color:#111;border-top:1px solid #ddd;font-size:10px;white-space:normal}
  .print-doc th{background:#f0f0f5}
}

/* ---------- responsive ---------- */
@media(max-width:1280px){
  :root{--side:232px}
  .main{padding:22px 22px 32px}
  .kpi-value{font-size:20px}
  .kpi .spark{display:none}
  .grid-main{grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr)}
}
@media(max-width:1100px){
  .grid-main,.grid2{grid-template-columns:minmax(0,1fr)}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .eq .fill-scroll{flex:none}
  .eq .fill-scroll > .scroller{position:static;max-height:420px}
  .user-copy{display:none}
}
@media(max-width:900px){
  .app{grid-template-columns:minmax(0,1fr)}
  .sidebar{display:none}
  .main{padding:16px 16px calc(96px + env(safe-area-inset-bottom))}
  .topbar{flex-wrap:wrap;gap:10px;margin-bottom:12px}
  .top-left{flex:1 1 auto}
  .breadcrumb,.subtitle{display:none}
  h1{font-size:23px;line-height:40px}
  .top-actions{flex-wrap:wrap}
  .user-box{border:0;padding:0}
  .phone-only{display:inline-flex !important}
  .desk-only{display:none !important}
  .bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:70;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:#09101d;border-top:1px solid rgba(80,103,149,.35)}
  .bn-item{min-height:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;border-radius:12px;background:transparent;color:#8193b0;font-size:10px;font-weight:650;position:relative}
  .bn-item svg{width:21px;height:21px}
  .bn-item.active{color:#fff}
  .bn-item.active svg{color:#a596ff}
  .bn-item .badge{position:absolute;top:4px;left:calc(50% + 6px);min-width:16px;padding:1px 5px;border-radius:999px;background:#ff4f6d;color:#fff;font-size:9px;font-weight:800}
  .bn-add{justify-self:center;align-self:center;width:52px;height:52px;margin-top:-22px;display:grid;place-items:center;border:1px solid rgba(140,130,255,.8);border-radius:16px;background:linear-gradient(135deg,#5a47ff,#7a6dff);color:#fff;box-shadow:0 0 0 4px #09101d,0 8px 26px rgba(101,81,255,.5)}
  .bn-add svg{width:24px;height:24px}
  .bn-add.hidden{visibility:hidden}
  .page-rail{bottom:calc(80px + env(safe-area-inset-bottom))}
  .toast{left:16px;right:16px;bottom:calc(84px + env(safe-area-inset-bottom));text-align:center;max-width:none}
  .overlay{padding:0;align-items:flex-end}
  .overlay.side{align-items:flex-end}
  .modal,.modal.wide,.modal.narrow,.overlay.side .modal{width:100%;height:auto;max-height:calc(100dvh - 16px);border-radius:22px 22px 0 0;border-width:1px 0 0}
  .m-head{padding:16px 16px 10px}
  .m-scroll{padding:4px 16px 14px}
  .m-foot{padding:10px 16px calc(12px + env(safe-area-inset-bottom))}
  .m-foot .btn{flex:1;min-height:44px}
  .m-foot .spacer{display:none}
  .input,.search-box input,.affix .input{font-size:16px;min-height:44px}
  .search-box{min-height:38px;padding:0 10px;gap:7px;border-radius:10px}
  .search-box svg{width:14px;height:14px}
  .search-box input{min-height:0;height:36px;font-size:16px}
  .search-box input::placeholder{font-size:13px}
  .toolbar .dd-btn{min-height:38px}
  .stat-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat-strip > div:nth-child(3){border-left:0}
  .stat-strip > div:nth-child(n+3){border-top:1px solid var(--line)}
  .ses-table-wrap,.pay-table-wrap,.cost-table-wrap,.user-table-wrap,.aud-table-wrap,.desk-table{display:none}
  .ses-list,.pay-list,.cost-list,.user-list,.aud-list{display:block}
  .toolbar .seg{order:5;flex-basis:100%;min-width:0;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
  .toolbar .seg button{padding:4px 3px;min-width:0;overflow:hidden;text-overflow:ellipsis}
  .toolbar .seg button .n{display:none}
  .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center;column-gap:8px;row-gap:10px}
  .top-actions{display:contents}
  #topPrimary{order:1;min-height:40px;padding:0 11px}
  #bellBtn{order:2}
  #userBox{order:3}
  #monthStep{order:4;grid-column:1/-1;justify-content:space-between}
  #monthStep .ps-label{flex:1;min-width:0}
  .grp-desk{display:none !important}
  .form-grid.three{grid-template-columns:1fr 1fr}
  .eq .fill-scroll > .scroller{max-height:none;overflow:visible}
  .card-pad{padding:14px 14px}
  .perm-grid{grid-template-columns:1fr}
  .map-grid{grid-template-columns:1fr}
  .rep-range b{min-width:0;flex:1}
  .rep-range{flex:1}
}
@media(max-width:560px){
  .kpis{gap:10px}
  .kpi{min-height:0;padding:13px 13px}
  .kpi-icon{display:none}
  .kpi-value{font-size:19px}
  .kpi-foot{margin-top:6px}
  .kpi-foot .muted-t{display:none}
  .form-grid,.form-grid.three{grid-template-columns:1fr 1fr}
  .form-grid .field.half-m{grid-column:1/-1}
  .h-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hm{display:none}
  .dl{grid-template-columns:1fr 1fr}
  .ratio-grid{grid-template-columns:1fr 1fr 1fr}
  .target-hero{grid-template-columns:1fr;justify-items:center}
  .target-hero .target-lines{width:100%}
  .cards-grid{grid-template-columns:minmax(0,1fr)}
  .chart-box{height:200px}
}


/* ===== Live Master versi server ===== */
.btn.is-busy{opacity:.6;cursor:progress;pointer-events:none}
.login-foot{margin:12px 0 0;color:#7f8ea5;font-size:11px;text-align:center}
.login-sub b{color:#c9bfff}
.tgt-box{display:grid;gap:8px;margin-top:12px}
.tgt-item{display:grid;gap:3px;padding:10px 12px;border:1px solid rgba(120,111,255,.4);border-radius:12px;background:#121a36;color:#c8d1e0;font-size:11.5px;line-height:1.45}
.tgt-item > b{color:#fff;font-size:12px}
.tgt-item span b{color:#c9bfff}
.tgt-item small{color:#8e9bb3;font-size:10.5px}
.tgt-item.ok{border-color:rgba(36,181,115,.45);background:#0f2a22}
.tgt-item.ok span b{color:#a8f0cd}
