:root {
  --brand: #0d7a6a;
  --brand-600: #0a6457;
  --brand-50: #e6f3f0;
  --brand-100: #cfe9e3;
  --mint: #3dd6b5;
  --night: #0f1d1a;
  --night-2: #172a26;
  --night-line: #233833;
  --ink: #16201e;
  --ink-2: #3b4744;
  --muted: #76827f;
  --line: #e7e5df;
  --line-2: #dcd9d1;
  --bg: #f5f4f0;
  --card: #ffffff;
  --soft: #faf9f6;
  --green: #12805c;
  --green-50: #e4f4ec;
  --red: #c8364e;
  --red-50: #fbe9ec;
  --blue: #3559c7;
  --blue-50: #e9eefb;
  --amber: #b86e00;
  --amber-50: #fbf1de;
  --violet: #6646c2;
  --violet-50: #efeafb;
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 256px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }
[hidden] { display: none !important; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- Brand ---------- */
.mark { display: inline-flex; align-items: center; gap: 11px; }
.mark .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, var(--mint), var(--brand)); display: grid; place-items: center; }
.mark .logo svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.mark .word { font-weight: 800; font-size: 15.5px; letter-spacing: -.2px; line-height: 1.1; color: #fff; }
.mark .word small { display: block; font-weight: 600; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mint); }
.mark.dark .word { color: var(--ink); }
.mark.dark .word small { color: var(--brand); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 32px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(61, 214, 181, .16), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(13, 122, 106, .12), transparent 60%),
    var(--bg);
}
.login-card { width: min(1040px, 100%); display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(15, 29, 26, .14); border: 1px solid var(--line); }
.login-side { background: var(--night); color: #dce7e4; padding: 40px; display: flex; flex-direction: column; gap: 28px; position: relative; overflow: hidden; }
.login-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 340px; height: 340px; border-radius: 50%; border: 60px solid rgba(61, 214, 181, .07); }
.login-side h1 { font-size: 30px; line-height: 1.2; margin: 0; color: #fff; font-weight: 800; letter-spacing: -.6px; }
.login-side h1 span { color: var(--mint); }
.login-side p { margin: 10px 0 0; color: #a5b6b1; max-width: 400px; }
.preview { background: var(--night-2); border: 1px solid var(--night-line); border-radius: 16px; padding: 18px; position: relative; z-index: 1; max-width: 400px; }
.preview .row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 0; color: #a5b6b1; border-bottom: 1px dashed var(--night-line); }
.preview .row:last-child { border-bottom: 0; }
.preview .row b { color: #fff; font-weight: 600; }
.preview .net { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.preview .net small { color: #a5b6b1; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.preview .net b { font-size: 24px; color: var(--mint); font-weight: 800; }
.login-side .foot { margin-top: auto; font-size: 12px; color: #6f8580; position: relative; z-index: 1; }
.login-main { padding: 44px 44px 36px; display: flex; flex-direction: column; justify-content: center; }
.login-main h2 { margin: 18px 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.login-main .sub { margin: 0 0 22px; color: var(--muted); }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.role-card { display: flex; gap: 11px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .15s; }
.role-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.role-card:hover { border-color: var(--brand); background: var(--brand-50); transform: translateY(-1px); }
.role-card .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--brand); border: 1px solid var(--line); }
.role-card b { display: block; font-size: 13px; font-weight: 700; }
.role-card small { color: var(--muted); font-size: 11.5px; line-height: 1.3; display: block; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 2px 0 16px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--night); color: #b8c7c2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px 16px; overflow-y: auto; }
.sidebar .mark { padding: 2px 8px 20px; }
.org { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--night-line); margin-bottom: 18px; }
.org .sq { width: 30px; height: 30px; border-radius: 8px; background: #23403a; color: var(--mint); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.org b { display: block; color: #fff; font-size: 13px; font-weight: 700; line-height: 1.2; }
.org small { font-size: 11px; color: #7f948e; }
.nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #5f746f; margin: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #b8c7c2; font-weight: 600; font-size: 13.5px; position: relative; margin-bottom: 1px; }
.nav a svg { color: #7f948e; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a.on { background: rgba(61, 214, 181, .12); color: #fff; }
.nav a.on svg { color: var(--mint); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--mint); }
.nav a .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--mint); color: var(--night); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.me { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--night-line); }
.me .grow { flex: 1; min-width: 0; }
.me b { display: block; color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: #7f948e; font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: #9fb2ad; display: grid; place-items: center; cursor: pointer; }
.me button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-meta { font-size: 11px; color: #5f746f; padding: 12px 6px 0; display: flex; justify-content: space-between; }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; background: var(--brand-100); color: var(--brand-600); flex: none; }
.sidebar .avatar { background: #23403a; color: var(--mint); }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }

/* ---------- Main ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 14px 32px; background: rgba(245, 244, 240, .86); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.crumb b { color: var(--ink); font-weight: 700; }
.cmd { margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(340px, 40vw); height: 40px; padding: 0 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.cmd input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; }
.cmd kbd { font: 600 11px Manrope, sans-serif; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); background: var(--soft); }
.cmd:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; position: relative; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.search-wrap { position: relative; margin-left: auto; width: min(340px, 40vw); }
.search-wrap .cmd { margin-left: 0; width: 100%; }
.bell-wrap { position: relative; }
.pop { position: absolute; top: calc(100% + 8px); right: 0; width: min(380px, 92vw); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(15, 29, 26, .16); z-index: 60; overflow: hidden; }
.search-wrap .pop { left: 0; right: auto; width: 100%; min-width: 300px; }
.pop[hidden] { display: none; }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pop-head b { font-size: 14px; }
.pop-head small { color: var(--muted); font-size: 12px; }
.pop-empty { padding: 16px 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; background: #fff; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.pop-item:hover, .pop-item.on { background: var(--brand-50); }
.pop-item b { display: block; font-size: 13.5px; }
.pop-item small { display: block; color: var(--muted); font-size: 12px; }
.pop-item:last-child { border-bottom: 0; }
.pop-foot { color: var(--brand-600); font-weight: 700; font-size: 13px; }
.menu-toggle { display: none; }
.content { padding: 8px 32px 48px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Layout ---------- */
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.stack { display: grid; gap: 20px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.card-body { padding: 16px 20px 20px; }
.card-body.flush { padding: 12px 0 6px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--soft); border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- KPI ---------- */
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.kpi .top { display: flex; justify-content: space-between; align-items: center; }
.kpi .lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.kpi .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.kpi .ic.blue { background: var(--blue-50); color: var(--blue); }
.kpi .ic.amber { background: var(--amber-50); color: var(--amber); }
.kpi .ic.violet { background: var(--violet-50); color: var(--violet); }
.kpi .val { font-size: 28px; font-weight: 800; letter-spacing: -.8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .cap { font-size: 12.5px; color: var(--muted); }
.kpi.hero { background: var(--night); border-color: var(--night); color: #fff; }
.kpi.hero .lbl, .kpi.hero .cap { color: #94a8a2; }
.kpi.hero .val { color: var(--mint); }
.kpi.hero .ic { background: rgba(61, 214, 181, .14); color: var(--mint); }

/* ---------- Pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.stage { border-radius: 10px; padding: 10px 12px; background: var(--soft); border: 1px solid var(--line); min-width: 0; }
.stage .bar { height: 4px; border-radius: 4px; background: var(--line-2); margin-bottom: 9px; }
.stage b { display: block; font-size: 12.5px; font-weight: 800; }
.stage small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage.done .bar { background: var(--brand); }
.stage.done b { color: var(--brand-600); }
.stage.now { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.stage.now .bar { background: linear-gradient(90deg, var(--brand), var(--mint)); }

/* ---------- Lanes (segregation of duties) ---------- */
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lane { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.lane.mine { border-color: var(--brand-100); background: linear-gradient(180deg, var(--brand-50), #fff 60%); }
.lane .hd { display: flex; align-items: center; gap: 10px; }
.lane .hd .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); border: 1px solid var(--line); color: var(--ink-2); }
.lane.mine .hd .ic { background: var(--brand); border-color: var(--brand); color: #fff; }
.lane .hd b { display: block; font-weight: 800; font-size: 13.5px; }
.lane .hd small { color: var(--muted); font-size: 11.5px; }
.lane .btns { display: grid; gap: 8px; }
.lane .note { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.lane .note.lock { color: var(--red); }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li.click { cursor: pointer; }
.list li.click:hover { background: var(--soft); }
.list .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.list .ic.amber { background: var(--amber-50); color: var(--amber); }
.list .ic.blue { background: var(--blue-50); color: var(--blue); }
.list .ic.violet { background: var(--violet-50); color: var(--violet); }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; font-weight: 700; font-size: 13.5px; }
.list .grow small { color: var(--muted); font-size: 12px; }
.list .chev { color: var(--muted); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 10px; display: grid; place-items: center; background: var(--soft); border: 1px solid var(--line); color: var(--muted); }
.empty b { display: block; color: var(--ink); font-weight: 700; margin-bottom: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 2px 6px rgba(13, 122, 106, .25); }
.btn.primary:hover { background: var(--brand-600); }
.btn.dark { background: var(--night); color: #fff; }
.btn.dark:hover { background: var(--night-2); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.soft { background: var(--brand-50); color: var(--brand-600); }
.btn.soft:hover { background: var(--brand-100); }
.btn.danger { background: #fff; color: var(--red); border-color: #efc4cc; }
.btn.danger:hover { background: var(--red-50); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.left { justify-content: flex-start; }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 700; cursor: pointer; font-size: 12.5px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Status ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-Draft, .s-Closed, .s-Inactive, .s-Separated { background: #efeee9; color: #5d6865; }
.s-Calculated { background: var(--blue-50); color: var(--blue); }
.s-Approved { background: var(--amber-50); color: var(--amber); }
.s-Posted, .s-Open, .s-Active { background: var(--green-50); color: var(--green); }
.s-Paid { background: var(--violet-50); color: var(--violet); }
.s-Pending, .s-OnHold, .s-Offered { background: var(--amber-50); color: var(--amber); }
.s-Rejected { background: var(--red-50); color: var(--red); }
.s-Cancelled, .s-Applied { background: #efeee9; color: #5d6865; }
.s-Shortlisted, .s-Interviewed { background: var(--blue-50); color: var(--blue); }
.s-Hired { background: var(--green-50); color: var(--green); }
.modal.wide { width: min(780px, 100%); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--brand-50); color: var(--brand-600); margin: 0 4px 4px 0; }
.tag.grey { background: #efeee9; color: #5d6865; }
.tag.warn { background: var(--amber-50); color: var(--amber); }
.tag.red { background: var(--red-50); color: var(--red); }

/* ---------- Tables ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar .cmd { margin-left: 0; flex: 1 1 260px; width: auto; }
.toolbar select { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--soft); }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: #fbfbf9; }
table.t tbody tr.click { cursor: pointer; }
table.t .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t tfoot td { padding: 12px 16px; font-weight: 800; border-top: 1px solid var(--line-2); background: var(--soft); }
.person { display: flex; align-items: center; gap: 10px; }
.person b { display: block; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.person small { color: var(--muted); font-size: 12px; }

/* ---------- Forms ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.form-sec { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .9px; margin-top: 8px; }
.form-sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-sec:first-child { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field > span em { color: var(--red); font-style: normal; }
.field input, .field select, .field textarea { height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; outline: 0; width: 100%; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.field small { color: var(--muted); font-size: 11.5px; }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; user-select: none; font-size: 13px; font-weight: 600; background: #fff; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.check.off { opacity: .45; cursor: not-allowed; background: var(--soft); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 2px; }
.opt-group { display: flex; flex-direction: column; gap: 6px; }
.opt-group > small { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.opt-group .check { padding: 7px 10px; font-size: 12.5px; }
.opt-tags { display: flex; flex-wrap: wrap; max-width: 320px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 150px; }
.error-text { color: var(--red); font-size: 12.5px; min-height: 18px; margin-top: 8px; white-space: pre-wrap; }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 14px; border-radius: 8px; font-weight: 700; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--night); color: #fff; }

/* ---------- Drawer and modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 29, 26, .42); z-index: 50; display: flex; justify-content: flex-end; animation: fade .15s ease; }
.scrim.center { justify-content: center; align-items: center; padding: 24px; }
.drawer { width: min(660px, 100%); height: 100%; background: #fff; display: flex; flex-direction: column; animation: slide .22s ease; }
.modal { width: min(900px, 100%); max-height: calc(100vh - 48px); background: #fff; border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; animation: pop .18s ease; }
.modal.small { width: min(460px, 100%); }
.d-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.d-head h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.d-head small { display: block; color: var(--muted); font-size: 12.5px; }
.d-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.d-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: var(--soft); }
.slip-frame { width: 100%; height: 72vh; border: 0; display: block; background: #f3f3f0; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(28px); opacity: .5; } }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: .5; } }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.fact small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.fact b { font-weight: 700; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.strip > div { padding: 14px 16px; border-left: 1px solid var(--line); background: #fff; }
.strip > div:first-child { border-left: 0; }
.strip small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.strip b { font-size: 18px; font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.strip .accent b { color: var(--brand); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13px; background: var(--amber-50); color: #7a4a00; }
.notice.red { background: var(--red-50); color: #8f2234; }
.notice.info { background: var(--blue-50); color: #253f8f; }
.notice.ok { background: var(--green-50); color: #0c5c41; }
.file-prev { background: var(--night); color: #d4e2de; border-radius: 12px; padding: 14px 16px; font: 12px/1.65 Consolas, "Cascadia Mono", monospace; overflow: auto; max-height: 300px; white-space: pre; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 24px; bottom: 24px; display: grid; gap: 10px; z-index: 90; }
.toast { display: flex; gap: 12px; align-items: flex-start; width: 380px; max-width: calc(100vw - 48px); background: var(--night); color: #dce7e4; border-radius: 14px; padding: 14px 16px; box-shadow: 0 18px 40px rgba(15, 29, 26, .28); animation: pop .18s ease; white-space: pre-wrap; }
.toast .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(61, 214, 181, .16); color: var(--mint); flex: none; }
.toast.error .ic { background: rgba(240, 100, 120, .18); color: #ff8fa0; }
.toast.info .ic { background: rgba(130, 160, 255, .18); color: #a9bcff; }
.toast b { display: block; color: #fff; font-weight: 800; font-size: 13px; }
.toast .tx { flex: 1; font-size: 12.5px; }

.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: rot .7s linear infinite; }
.btn.ghost .spin, .btn.soft .spin, .btn.danger .spin { border-color: var(--brand-100); border-top-color: var(--brand); }
@keyframes rot { to { transform: rotate(360deg); } }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #efeee9, #f7f6f2, #efeee9); background-size: 200% 100%; animation: sk 1.2s infinite; margin: 8px 0; }
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 1180px) {
  .g-12 > [class*="span-"] { grid-column: span 12; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lanes { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .shell.menu-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(15, 29, 26, .4); }
  .menu-toggle { display: grid; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .cmd { width: auto; flex: 1; }
  .form, .g-2, .g-3, .g-4, .facts { grid-template-columns: 1fr; }
  .pipeline, .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
