/* HRMS — Cloth retail. Neel (HO), mehendi (store), haldi (staff), sindoor (alerts).
   Textile language: saree "paar" border, bandhani dots, block-print chakra. */
@font-face { font-family: "Hind"; font-weight: 400; font-display: swap; src: url("../fonts/hind-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hind"; font-weight: 500; font-display: swap; src: url("../fonts/hind-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hind"; font-weight: 600; font-display: swap; src: url("../fonts/hind-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Hind"; font-weight: 700; font-display: swap; src: url("../fonts/hind-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Rozha One"; font-weight: 400; font-display: swap; src: url("../fonts/rozha-one-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #F3F4F8; --bg-2: #ECEEF5; --surface: #FFFFFF; --surface-2: #F7F8FC;
  --ink: #161A2E; --ink-2: #3A3F57; --muted: #6A6F86; --line: #E3E5EF; --line-strong: #C9CCDB;
  --accent: #3340A8; --accent-2: #4653C4; --accent-soft: #E8EAFB; --accent-ink: #FFFFFF;
  --haldi: #D49511; --haldi-soft: #FCF1D8; --haldi-ink: #875800;
  --mehendi: #4F8A2B; --mehendi-soft: #E4F0D8; --mehendi-ink: #315C16;
  --sindoor: #C2393C; --sindoor-soft: #FBE4E3; --sindoor-ink: #962427;
  --side-bg: #14183A; --side-bg-2: #1D2253; --side-ink: #E6E8FA; --side-muted: #9EA5D6;
  --side-hover: rgba(255,255,255,.07); --side-active: rgba(255,255,255,.13); --side-line: rgba(255,255,255,.08);
  --shadow-sm: 0 1px 2px rgba(20,24,58,.06);
  --shadow-md: 0 10px 30px -12px rgba(20,24,58,.22);
  --shadow-lg: 0 24px 60px -20px rgba(20,24,58,.35);
  --radius: 14px;
  --font-display: "Rozha One", Georgia, serif;
  --font-body: "Hind", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D0F1A; --bg-2: #121527; --surface: #161A2C; --surface-2: #1B2035;
  --ink: #ECEEF8; --ink-2: #C7CBDF; --muted: #9298B2; --line: #262B45; --line-strong: #3A405F;
  --accent: #9AA6FF; --accent-2: #B3BCFF; --accent-soft: #232A5C; --accent-ink: #0D0F1A;
  --haldi: #F0B93D; --haldi-soft: #392B0C; --haldi-ink: #F6CF73;
  --mehendi: #8FC062; --mehendi-soft: #1C2B13; --mehendi-ink: #B7DB91;
  --sindoor: #EE7F82; --sindoor-soft: #3A1B1D; --sindoor-ink: #F7AAAC;
  --side-bg: #090B16; --side-bg-2: #111430; --side-ink: #E8EAF8; --side-muted: #8C92B6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 10px 30px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.75);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0F1A; --bg-2: #121527; --surface: #161A2C; --surface-2: #1B2035;
    --ink: #ECEEF8; --ink-2: #C7CBDF; --muted: #9298B2; --line: #262B45; --line-strong: #3A405F;
    --accent: #9AA6FF; --accent-2: #B3BCFF; --accent-soft: #232A5C; --accent-ink: #0D0F1A;
    --haldi: #F0B93D; --haldi-soft: #392B0C; --haldi-ink: #F6CF73;
    --mehendi: #8FC062; --mehendi-soft: #1C2B13; --mehendi-ink: #B7DB91;
    --sindoor: #EE7F82; --sindoor-soft: #3A1B1D; --sindoor-ink: #F7AAAC;
    --side-bg: #090B16; --side-bg-2: #111430; --side-ink: #E8EAF8; --side-muted: #8C92B6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 10px 30px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.75);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15.5px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.005em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15.5px; font-weight: 700; }
p { margin: 0; }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { flex: none; display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.paar { height: 9px; background:
  linear-gradient(135deg, var(--sindoor) 33%, transparent 33%) 0 0/9px 9px,
  linear-gradient(225deg, var(--sindoor) 33%, transparent 33%) 0 0/9px 9px, var(--haldi);
  box-shadow: inset 0 -2px 0 var(--accent); }
.bandhani { background-image: radial-gradient(circle, rgba(240,185,61,.55) 1.1px, transparent 1.6px), radial-gradient(circle, rgba(238,127,130,.4) 1.1px, transparent 1.6px);
  background-size: 22px 22px, 22px 22px; background-position: 0 0, 11px 11px; }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14.5px; line-height: 1;
  padding: 11px 16px; border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease; justify-self: start; }
.btn:hover { background: var(--accent-2); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--accent-soft); box-shadow: none; }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { background: var(--accent-soft); filter: brightness(.97); box-shadow: none; }
.btn-sm { font-size: 13px; padding: 7px 11px; border-radius: 8px; }
.btn-block { width: 100%; padding: 13px 16px; font-size: 15.5px; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.dot-badge { position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--sindoor); color: #fff; font: 600 10px/16px var(--font-mono); text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip-ok { background: var(--mehendi-soft); color: var(--mehendi-ink); border-color: transparent; }
.chip-warn { background: var(--haldi-soft); color: var(--haldi-ink); border-color: transparent; }
.chip-bad { background: var(--sindoor-soft); color: var(--sindoor-ink); border-color: transparent; }
.chip-acc { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.kbd { font: 500 11px/1 var(--font-mono); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px 18px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
label.check input { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); box-shadow: none; }
.field { position: relative; display: block; }
.field > .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field input { padding-left: 42px; height: 48px; }
.field .pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.field .pw-toggle:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- flash, generic card ---------- */
.flash { margin: 0; padding: 11px 14px; border-radius: 10px; font-size: 14.5px; display: flex; gap: 9px; align-items: flex-start; }
.flash-ok { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.flash-error { background: var(--sindoor-soft); color: var(--sindoor-ink); overflow-wrap: anywhere; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; box-shadow: var(--shadow-sm); }
.card-narrow { max-width: 440px; }
.eyebrow { margin: 0; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.section { margin-top: 26px; display: grid; gap: 10px; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--haldi), var(--sindoor)); color: #fff; font-family: var(--font-display); font-size: 19px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }

/* ---------- tables (system, installer) ---------- */
.tbl { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 600; }
.checks td:first-child { width: 96px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; }
.pill-ok { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.pill-bad { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.pill-warn { background: var(--haldi-soft); color: var(--haldi-ink); }
.log { margin: 0; padding: 12px 14px 12px 32px; background: var(--mehendi-soft); color: var(--mehendi-ink); border-radius: 10px; font-size: 14px; }
.kv { margin: 0; display: grid; border-top: 1px solid var(--line); }
.kv div { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 14px; } .kv dd { margin: 0; overflow-wrap: anywhere; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 7px; }
.steps span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 12px; font-family: var(--font-mono); }
.steps .done span { background: var(--mehendi); border-color: var(--mehendi); color: #fff; }
.steps .now { color: var(--ink); font-weight: 600; } .steps .now span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* plain layout (installer) */
.plain-main { max-width: 860px; margin: 0 auto; padding: 28px 16px 48px; display: grid; gap: 18px; }
.plain-brand { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; font-size: 18px; }
.plain-brand small { color: var(--muted); font-weight: 400; font-size: 14px; }

/* =========================================================
   LOGIN
   ========================================================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: var(--bg); }
.auth-art { position: relative; overflow: hidden; color: #EEF0FF; background: radial-gradient(120% 90% at 10% 0%, #2B3380 0%, #161A47 48%, #0C0E28 100%); display: flex; flex-direction: column; padding: 30px clamp(24px, 4vw, 56px) 28px; isolation: isolate; }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(circle, rgba(240,185,61,.5) 1.1px, transparent 1.7px), radial-gradient(circle, rgba(238,127,130,.35) 1.1px, transparent 1.7px);
  background-size: 24px 24px; background-position: 0 0, 12px 12px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.15) 70%); }
.auth-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; z-index: 1;
  background: linear-gradient(135deg, #C2393C 33%, transparent 33%) 0 0/12px 12px, linear-gradient(225deg, #C2393C 33%, transparent 33%) 0 0/12px 12px, #D49511; }
.auth-art .chakra { position: absolute; right: -190px; bottom: -230px; width: min(600px, 74vw); height: auto; z-index: -1; opacity: .62; animation: turn 140s linear infinite; }
.chakra .ck-ring { stroke: rgba(240,185,61,.55); }
.chakra .ck-dots { fill: rgba(240,185,61,.55); }
.chakra .ck-petal { fill: rgba(194,57,60,.28); stroke: rgba(240,185,61,.45); stroke-width: .8; }
.chakra .ck-inner { fill: rgba(154,166,255,.22); stroke: rgba(154,166,255,.5); stroke-width: .8; }
.chakra .ck-core { fill: rgba(240,185,61,.35); } .chakra .ck-eye { fill: #F0B93D; }
@keyframes turn { to { transform: rotate(360deg); } }
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.auth-brand small { display: block; font-weight: 400; font-size: 13px; color: #B9BFEF; }
.auth-hero { margin: auto 0; padding: 40px 0 32px; max-width: 560px; display: grid; gap: 18px; }
.auth-hero .eyebrow { color: #F0B93D; }
.auth-hero h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.04; color: #fff; }
.auth-hero h1 em { font-style: normal; color: #F6CF73; }
.auth-hero p { color: #C9CEF5; font-size: 16.5px; max-width: 46ch; }
.auth-feats { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 540px; }
.auth-feats li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); font-size: 14px; color: #E6E8FA; backdrop-filter: blur(6px); }
.auth-feats .ic { color: #F0B93D; }
.auth-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: #A9AFE0; padding-bottom: 14px; }
.auth-foot b { color: #fff; font-weight: 600; }

.auth-side { display: flex; flex-direction: column; padding: 22px clamp(20px, 4vw, 56px); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-clock { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.auth-form-wrap { margin: auto 0; width: 100%; max-width: 420px; align-self: center; display: grid; gap: 22px; padding: 30px 0; }
.auth-greet { display: grid; gap: 6px; }
.auth-greet h2 { font-family: var(--font-display); font-weight: 400; font-size: 34px; }
.auth-greet p { color: var(--muted); }
.auth-card { display: grid; gap: 16px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.auth-row a { text-decoration: none; font-weight: 600; }
.caps { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--haldi-ink); background: var(--haldi-soft); padding: 6px 10px; border-radius: 8px; }
.status-pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--mehendi); box-shadow: 0 0 0 4px var(--mehendi-soft); }
.status-pill.bad i { background: var(--sindoor); box-shadow: 0 0 0 4px var(--sindoor-soft); }
.auth-help { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--line-strong); font-size: 13.5px; color: var(--muted); }
.auth-help b { color: var(--ink-2); }
.auth-legal { font-size: 12.5px; color: var(--muted); text-align: center; }
@media (max-width: 980px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding-bottom: 34px; }
  .auth-hero { padding: 26px 0 8px; }
  .auth-feats { display: none; }
  .auth-art .chakra { width: 360px; right: -140px; bottom: -160px; }
}
@media (max-width: 520px) { .auth-hero h1 { font-size: 32px; } .auth-hero p { font-size: 15px; } .auth-clock { display: none; } .auth-art .chakra { opacity: .4; } }

/* =========================================================
   APP SHELL
   ========================================================= */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.sb { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; color: var(--side-ink);
  background: linear-gradient(180deg, var(--side-bg-2), var(--side-bg) 55%); border-right: 1px solid var(--side-line); z-index: 30; }
.sb::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(circle, rgba(240,185,61,.35) 1px, transparent 1.5px); background-size: 20px 20px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 30%); }
.sb-brand { position: relative; display: flex; align-items: center; gap: 11px; padding: 18px 18px 14px; text-decoration: none; color: inherit; }
.sb-brand b { font-size: 17px; letter-spacing: .02em; display: block; }
.sb-brand small { display: block; font-size: 12px; color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.sb-nav { position: relative; flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sb-group { margin: 16px 10px 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted); white-space: nowrap; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0; border-radius: 10px; color: var(--side-ink); text-decoration: none; font-size: 14px; line-height: 1.25; position: relative; }
.sb-link .ic { color: var(--side-muted); }
.sb-link span.lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-link:hover { background: var(--side-hover); }
.sb-link:hover .ic { color: var(--side-ink); }
.sb-link.is-active { background: var(--side-active); font-weight: 600; }
.sb-link.is-active .ic { color: #F0B93D; }
.sb-link .ph { font: 500 10px/1 var(--font-mono); padding: 3px 5px; border-radius: 5px; color: var(--side-muted); border: 1px solid rgba(255,255,255,.14); }
/* nested group (Masters → one page per table) */
.sb-tree { position: relative; }
.sb-tree > .sb-link { padding-right: 38px; }
.sb-caret { position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--side-muted); cursor: pointer; }
.sb-caret:hover { background: var(--side-hover); color: var(--side-ink); }
.sb-caret .ic { transition: transform .15s ease; }
.sb-tree.is-open .sb-caret .ic { transform: rotate(180deg); }
.sb-tree > .sb-link .ph { display: none; }
.sb-sub { display: none; margin: 2px 0 6px 20px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); }
.sb-tree.is-open .sb-sub { display: block; }
.sb-sublink { display: flex; align-items: center; gap: 9px; padding: 6px 10px; margin: 1px 0; border-radius: 8px; color: var(--side-muted); text-decoration: none; font-size: 13px; line-height: 1.25; white-space: nowrap; }
.sb-sublink span { overflow: hidden; text-overflow: ellipsis; }
.sb-sublink:hover { background: var(--side-hover); color: var(--side-ink); }
.sb-sublink.is-active { background: var(--side-active); color: var(--side-ink); font-weight: 600; }
.sb-sublink.is-active .ic { color: #F0B93D; }
.sb-link .ph.next { color: #F6CF73; border-color: rgba(240,185,61,.45); }
.sb-foot { position: relative; padding: 12px; border-top: 1px solid var(--side-line); display: flex; gap: 10px; align-items: center; }
.sb-collapse { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: var(--side-muted); display: grid; place-items: center; cursor: pointer; }
.sb-collapse:hover { color: var(--side-ink); background: var(--side-hover); }
.sb-progress { flex: 1; min-width: 0; font-size: 12px; color: var(--side-muted); }
.sb-progress .bar { height: 5px; border-radius: 9px; background: rgba(255,255,255,.12); margin-top: 5px; overflow: hidden; }
.sb-progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, #F0B93D, #EE7F82); border-radius: 9px; }

/* collapsed sidebar */
.sb-collapsed .app { grid-template-columns: 76px minmax(0, 1fr); }
.sb-collapsed .sb-brand small, .sb-collapsed .sb-brand b, .sb-collapsed .sb-link .lbl, .sb-collapsed .sb-link .ph,
.sb-collapsed .sb-group, .sb-collapsed .sb-progress, .sb-collapsed .sb-caret, .sb-collapsed .sb-tree .sb-sub { display: none; }
.sb-collapsed .sb-tree > .sb-link { padding-right: 10px; }
.sb-collapsed .sb-brand { justify-content: center; padding-inline: 0; }
.sb-collapsed .sb-link { justify-content: center; padding: 10px; }
.sb-collapsed .sb-nav { padding-inline: 10px; }
.sb-collapsed .sb-foot { justify-content: center; }
.sb-collapsed .sb-collapse { margin: 0; transform: rotate(180deg); }
.sb-collapsed .sb-link[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: var(--ink); color: var(--bg); font-size: 12.5px; padding: 5px 9px; border-radius: 7px; box-shadow: var(--shadow-md); z-index: 50; }

/* topbar */
.main { min-width: 0; display: flex; flex-direction: column; }
.tb { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px clamp(16px, 2.4vw, 28px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.tb-menu { display: none; }
.tb-search { flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.tb-search:hover { border-color: var(--line-strong); }
.tb-search > span:not(.kbd) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-clock { display: grid; text-align: right; font-size: 12.5px; color: var(--muted); line-height: 1.25; padding: 0 6px; }
.tb-clock b { font: 500 14px var(--font-mono); color: var(--ink); }
.avatar { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--sindoor)); flex: none; }
.tb-user { display: flex; align-items: center; gap: 9px; padding: 3px 8px 3px 3px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.tb-user:hover { background: var(--surface-2); }
.tb-user .who { display: grid; text-align: left; line-height: 1.15; }
.tb-user .who b { font-size: 13.5px; } .tb-user .who small { font-size: 11.5px; color: var(--muted); }
.page { padding: clamp(16px, 2.4vw, 28px); padding-bottom: 48px; display: grid; gap: 18px; align-content: start; }
.page-head { display: grid; gap: 4px; }

/* dropdowns */
.dd-wrap { position: relative; }
.dd { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 40; }
.dd-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dd-item { display: flex; gap: 11px; align-items: flex-start; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; }
.dd-item:hover { background: var(--surface-2); }
.dd-item .ic-wrap { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.dd-item small { display: block; color: var(--muted); font-size: 12.5px; }
.dd-item button { all: unset; }
.dd-sep { height: 1px; background: var(--line); margin: 4px 0; }
.dd-btn { width: 100%; display: flex; gap: 11px; align-items: center; padding: 10px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.dd-btn:hover { background: var(--surface-2); }
.dd-btn.danger { color: var(--sindoor-ink); }

/* tones for icon chips */
.t-acc { background: var(--accent-soft); color: var(--accent); }
.t-ok { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.t-warn { background: var(--haldi-soft); color: var(--haldi-ink); }
.t-bad { background: var(--sindoor-soft); color: var(--sindoor-ink); }

/* command palette */
.cmdk-back { position: fixed; inset: 0; background: rgba(10,12,26,.45); backdrop-filter: blur(4px); z-index: 80; display: grid; place-items: start center; padding: 12vh 16px 16px; }
.cmdk { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-in input { border: 0; padding: 0; font-size: 16px; background: transparent; box-shadow: none !important; }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 8px; list-style: none; margin: 0; }
.cmdk-list .grp { font: 500 10.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 6px; }
.cmdk-list a { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.cmdk-list a .ph { margin-left: auto; }
.cmdk-list a[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.cmdk-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* mobile shell */
.sb-scrim { display: none; }
@media (max-width: 960px) {
  .app, .sb-collapsed .app { grid-template-columns: minmax(0, 1fr); }
  .sb { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sb-open .sb { transform: none; }
  .sb-open .sb-scrim { display: block; position: fixed; inset: 0; background: rgba(10,12,26,.45); z-index: 25; }
  .sb-collapsed .sb .lbl, .sb-collapsed .sb .ph, .sb-collapsed .sb-group, .sb-collapsed .sb-brand b, .sb-collapsed .sb-brand small { display: revert; }
  .sb-collapsed .sb-caret { display: grid; }
  .sb-collapsed .sb-tree.is-open .sb-sub { display: block; }
  .sb-collapsed .sb-tree > .sb-link { padding-right: 38px; }
  .sb-tree > .sb-link .ph { display: none; }
  .sb-collapse { display: none; }
  .tb-menu { display: inline-grid; }
  .tb-clock, .tb-user .who { display: none; }
  .tb-search .kbd { display: none; }
  .tb { gap: 8px; }
  .tb-user { padding: 3px; }
  .tb-user > .ic { display: none; }
}
@media (max-width: 420px) { .tb-search > span:not(.kbd) { display: none; } .tb-search { flex: 0 0 40px; padding: 0; justify-content: center; } .tb-right { gap: 6px; } }

/* =========================================================
   DASHBOARD
   ========================================================= */
.hello { position: relative; overflow: hidden; border-radius: 18px; padding: 24px clamp(18px, 3vw, 30px); color: #EEF0FF;
  background: radial-gradient(120% 140% at 0% 0%, #2B3380 0%, #181C4E 55%, #10132F 100%); box-shadow: var(--shadow-md); isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: end; }
.hello::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .45;
  background-image: radial-gradient(circle, rgba(240,185,61,.55) 1.1px, transparent 1.7px), radial-gradient(circle, rgba(238,127,130,.35) 1.1px, transparent 1.7px);
  background-size: 22px 22px; background-position: 0 0, 11px 11px; mask-image: linear-gradient(90deg, transparent 20%, #000 80%); }
.hello::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: linear-gradient(135deg, #C2393C 33%, transparent 33%) 0 0/8px 8px, linear-gradient(225deg, #C2393C 33%, transparent 33%) 0 0/8px 8px, #D49511; }
.hello .chakra { position: absolute; right: -70px; top: -90px; width: 300px; height: auto; z-index: -1; opacity: .75; animation: turn 160s linear infinite; }
.hello .eyebrow { color: #F0B93D; }
.hello h1 { color: #fff; font-size: clamp(28px, 3.4vw, 42px); }
.hello p { color: #C9CEF5; }
.hello-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hello-meta .chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #E6E8FA; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.quick a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: 11px; font-size: 14px; font-weight: 600; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); }
.quick a:hover { background: rgba(255,255,255,.18); }
.quick a.primary { background: #F0B93D; color: #1A1400; border-color: transparent; }
.quick a.primary:hover { background: #F6CF73; }
@media (max-width: 900px) { .hello { grid-template-columns: minmax(0, 1fr); } .quick { justify-content: flex-start; } }

.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.c-3 { grid-column: span 3; } .c-4 { grid-column: span 4; } .c-5 { grid-column: span 5; } .c-6 { grid-column: span 6; }
.c-7 { grid-column: span 7; } .c-8 { grid-column: span 8; } .c-12 { grid-column: span 12; }
@media (max-width: 1180px) { .c-3 { grid-column: span 6; } .c-4, .c-5, .c-7, .c-8 { grid-column: span 12; } .c-6 { grid-column: span 12; } }
@media (max-width: 640px) { .c-3 { grid-column: span 6; } .g12 { gap: 12px; } }

.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; min-width: 0; }
.tile-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.tile-h h2 { font-size: 16px; }
.tile-h .sub { color: var(--muted); font-size: 13px; }
.tile-h .act { margin-left: auto; font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.tile-b { padding: 14px 18px 18px; display: grid; gap: 12px; align-content: start; flex: 1; }

/* KPI */
.kpi { padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; color: inherit; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi .ic-wrap { grid-row: span 2; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; }
.kpi .lbl { font-size: 13.5px; color: var(--muted); }
.kpi .val { font: 500 28px/1.1 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .foot { grid-column: 1 / -1; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* setup ring */
.setup { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.ring { position: relative; width: 132px; height: 132px; }
.ring svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.ring .track { stroke: var(--line); } .ring .val { stroke: url(#ringGrad); transition: stroke-dashoffset 1s ease; }
.ring-txt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring-txt b { font: 500 28px var(--font-mono); } .ring-txt small { display: block; font-size: 12px; color: var(--muted); }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.todo li a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 14px; }
.todo li a:hover { background: var(--surface-2); }
.todo .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid var(--line-strong); color: transparent; }
.todo .done .tick { background: var(--mehendi); border-color: var(--mehendi); color: #fff; }
.todo .done span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.todo .go { margin-left: auto; color: var(--muted); }
@media (max-width: 520px) { .setup { grid-template-columns: minmax(0, 1fr); } }

/* compliance timeline */
.due { list-style: none; margin: 0; padding: 0; display: grid; }
.due li { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.due li:last-child { border-bottom: 0; }
.due .date { display: grid; place-items: center; text-align: center; border-radius: 11px; padding: 6px 0; background: var(--surface-2); border: 1px solid var(--line); line-height: 1; }
.due .date b { font: 500 19px var(--font-mono); } .due .date small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.due .t { font-weight: 600; font-size: 14.5px; } .due .n { font-size: 13px; color: var(--muted); }
.due .soon .date { background: var(--sindoor-soft); border-color: transparent; color: var(--sindoor-ink); }

/* bars */
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bar-row .tr { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar-row .tr i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); min-width: 0; }
.bar-row .ct { text-align: right; font-family: var(--font-mono); color: var(--ink); }

/* org snapshot */
.org { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.org-cell { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 4px; background: var(--surface-2); }
.org-cell .ic-wrap { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 4px; }
.org-cell b { font: 500 22px var(--font-mono); } .org-cell span { font-size: 13px; color: var(--muted); }
.loc-list { list-style: none; margin: 0; padding: 0; display: grid; }
.loc-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.loc-list li:last-child { border-bottom: 0; }
.loc-list .ct { margin-left: auto; font-family: var(--font-mono); }

/* activity */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; font-size: 14px; }
.feed .ic-wrap { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.feed time { font-size: 12px; color: var(--muted); font-family: var(--font-mono); white-space: nowrap; }

/* rules */
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rule { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; display: grid; gap: 2px; background: var(--surface-2); }
.rule span { font-size: 12.5px; color: var(--muted); } .rule b { font: 500 17px var(--font-mono); }
@media (max-width: 520px) { .rules { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .org-cell { padding: 10px; } .org-cell b { font-size: 19px; } }

/* roadmap */
.road { display: grid; gap: 12px; }
.road-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 54px; gap: 12px; align-items: center; }
.road-row .ph-l { font: 500 12px var(--font-mono); color: var(--muted); }
.road-row .tr { height: 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: flex; }
.road-row .tr i { display: block; height: 100%; }
.road-row .ct { text-align: right; font-family: var(--font-mono); font-size: 13px; }
.road-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.road-mods a { text-decoration: none; }

/* empty state */
.empty { display: grid; justify-items: start; gap: 8px; padding: 16px; border-radius: 12px; border: 1px dashed var(--line-strong); background: var(--surface-2); color: var(--muted); font-size: 14px; }
.empty .ic-wrap { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.empty b { color: var(--ink); font-size: 14.5px; }

/* health */
.health { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.health li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.health li .v { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); text-align: right; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.health i.led { width: 9px; height: 9px; border-radius: 50%; background: var(--mehendi); box-shadow: 0 0 0 4px var(--mehendi-soft); flex: none; }
.health i.led.off { background: var(--sindoor); box-shadow: 0 0 0 4px var(--sindoor-soft); }

/* module placeholder */
.mod-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.mod-hero .ic-wrap { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; }

/* motion */
.rise { animation: rise .45s ease both; }
@keyframes rise { from { transform: translateY(8px); opacity: .001; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* theme + password toggles */
[data-theme-toggle] .ic-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .ic-sun { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-toggle] .ic-sun { display: block; }
  :root:not([data-theme="light"]) [data-theme-toggle] .ic-moon { display: none; }
}
.pw-toggle .ic-hide { display: none; }
.pw-toggle[aria-pressed="true"] .ic-hide { display: block; }
.pw-toggle[aria-pressed="true"] .ic-show { display: none; }

/* phone: compact KPI tiles (kept after the base .kpi rules so they win) */
@media (max-width: 640px) {
  .kpi { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 6px; }
  .kpi .ic-wrap { grid-row: auto; width: 38px; height: 38px; border-radius: 11px; }
  .kpi .val { font-size: 26px; }
  .kpi .foot { font-size: 12px; margin-top: 4px; }
  .hello { padding: 20px 18px 26px; }
  .quick a { padding: 9px 11px; font-size: 13.5px; }
}

/* =========================================================
   MASTERS / generic list + drawer form
   ========================================================= */
.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab b { font: 500 11.5px var(--font-mono); padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tab.is-on { background: var(--accent); color: var(--accent-ink); }
.tab.is-on b { background: rgba(255,255,255,.18); color: inherit; border-color: transparent; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.toolbar .btn { margin-left: auto; }
.search-in { position: relative; flex: 1 1 240px; max-width: 360px; }
.search-in .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-in input { padding-left: 36px; height: 40px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 11px; border-radius: 8px; cursor: pointer; }
.seg button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tab-hint { display: flex; gap: 6px; align-items: center; padding: 4px 18px 10px; }
.table-wrap { overflow-x: auto; padding: 0 6px 10px; }
.dt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.dt th { text-align: left; font: 500 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt tbody tr:hover td { background: var(--surface-2); }
.dt tr[data-active="0"] td { opacity: .65; }
.act-cell { white-space: nowrap; text-align: right; }
.act-cell form { display: inline; margin: 0; }
.btn.danger { color: var(--sindoor-ink); }
.btn.danger:hover { background: var(--sindoor-soft); }
@media (max-width: 760px) {
  .dt thead { display: none; }
  .dt, .dt tbody, .dt tr, .dt td { display: block; width: 100%; }
  .dt tr { border: 1px solid var(--line); border-radius: 12px; margin: 10px 6px; padding: 6px 12px; width: auto; background: var(--surface); }
  .dt tr[hidden] { display: none; }
  .dt td { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 8px 0; text-align: right; }
  .dt td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; }
  .dt td:last-child { border-bottom: 0; }
  .act-cell { justify-content: flex-end !important; gap: 8px; }
  .act-cell::before { content: none !important; }
  .toolbar .btn { margin-left: 0; }
  .search-in { max-width: none; }
}

/* drawer */
.drawer-back { position: fixed; inset: 0; background: rgba(10,12,26,.45); backdrop-filter: blur(3px); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 61; box-shadow: var(--shadow-lg); display: flex; animation: slidein .22s ease; }
@keyframes slidein { from { transform: translateX(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer-form { display: flex; flex-direction: column; width: 100%; min-width: 0; }
.drawer-h { display: flex; gap: 12px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-h .ic-wrap { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.drawer-h .icon-btn { margin-left: auto; }
.drawer-b { flex: 1; overflow-y: auto; padding: 18px 20px; display: grid; gap: 14px; align-content: start; }
.drawer-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface-2); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fld { display: grid; gap: 6px; align-content: start; min-width: 0; }
.fld.wide { grid-column: 1 / -1; }
.fld > small { color: var(--muted); font-size: 12.5px; }
.fld .req { color: var(--sindoor); }
.fld.has-err input, .fld.has-err select, .fld.has-err textarea { border-color: var(--sindoor); box-shadow: 0 0 0 4px var(--sindoor-soft); }
.fld .err { display: flex; gap: 5px; align-items: center; color: var(--sindoor-ink); font-size: 12.5px; }
input.upper { text-transform: uppercase; }
textarea { resize: vertical; min-height: 64px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.switch { display: flex !important; align-items: center; gap: 12px; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { width: 40px; height: 23px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; transition: background .15s; }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .sw { background: var(--mehendi); }
.switch input:checked + .sw::after { transform: translateX(17px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch > span:last-child { display: grid; font-weight: 600; color: var(--ink); }
.switch small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
@media (max-width: 560px) { .fgrid { grid-template-columns: minmax(0, 1fr); } .drawer-b, .drawer-h { padding-inline: 16px; } }
body.has-drawer { overflow: hidden; }
.fld > label { display: block; }

/* =========================================================
   Employee Master
   ========================================================= */
.head-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--muted); margin-bottom: 2px; width: fit-content; }
.crumb:hover { color: var(--accent); }
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mk { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; align-items: center; padding: 14px 16px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.mk:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mk.is-on { border-color: var(--sindoor); }
.mk .ic-wrap { grid-row: span 2; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.mk .lbl { font-size: 13px; color: var(--muted); }
.mk .val { font: 500 24px/1.15 var(--font-mono); font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select { width: auto; max-width: 220px; height: 40px; padding: 0 30px 0 10px; font-size: 14px; }
.filters input[type=date], .filters input[type=month] { width: auto; height: 40px; padding: 0 10px; font-size: 14px; }
.avatar.h0 { background: linear-gradient(135deg, #3340A8, #C2393C); }
.avatar.h1 { background: linear-gradient(135deg, #4F8A2B, #2B7A8A); }
.avatar.h2 { background: linear-gradient(135deg, #D49511, #C2393C); }
.avatar.h3 { background: linear-gradient(135deg, #7A3FA8, #3340A8); }
.avatar.h4 { background: linear-gradient(135deg, #2B7A8A, #3340A8); }
.avatar.h5 { background: linear-gradient(135deg, #C2393C, #7A3FA8); }
.avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.avatar.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 21px; }
.emp-cell { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.emp-cell > span:last-child { display: grid; min-width: 0; }
.emp-cell b { white-space: nowrap; }
.emp-cell small { color: var(--muted); font-size: 12.5px; }
.emp-cell:hover b { color: var(--accent); }
.chip.gap { margin-top: 6px; }
.chip.pm { font-size: 11px; padding: 1px 7px; }
.emp-dt td:first-child { min-width: 220px; }

/* form */
.emp-hero { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 16px 18px; position: relative; overflow: hidden; }
.emp-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: repeating-linear-gradient(90deg, var(--accent) 0 18px, var(--haldi) 18px 24px, var(--sindoor) 24px 36px, var(--haldi) 36px 42px); }
.eh-main { flex: 1 1 260px; min-width: 0; display: grid; gap: 4px; }
.eh-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eh-name b { font-size: 19px; }
.eh-main p { margin: 0; }
.eh-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.eh-facts div { display: grid; gap: 2px; }
.eh-facts dt { font: 500 10.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eh-facts dd { margin: 0; font-weight: 600; font-size: 14.5px; }
.emp-form { display: grid; gap: 0; }
.emp-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.sec-nav { position: sticky; top: 84px; display: grid; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sec-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.sec-nav a:hover { background: var(--surface-2); color: var(--ink); }
.sec-nav a.is-on { background: var(--accent-soft); color: var(--accent); }
.sec-nav a.has-err { color: var(--sindoor-ink); }
.sec-nav .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sindoor); margin-left: auto; }
.emp-secs { display: grid; gap: 16px; min-width: 0; }
.sec { padding: 18px; gap: 16px; scroll-margin-top: 84px; }
.sec-h { display: flex; gap: 12px; align-items: center; }
.sec-h .ic-wrap { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.sec-h h2 { font-size: 17px; margin: 0; }
.sec-h p { margin: 0; }
.same-addr { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; width: fit-content; }
.same-addr input { width: 17px; height: 17px; accent-color: var(--accent); }
.affix { position: relative; display: block; }
.affix i { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 14px; pointer-events: none; }
.affix:not(.sfx) i { left: 12px; }
.affix:not(.sfx) input { padding-left: 28px; }
.affix.sfx i { right: 12px; }
.affix.sfx input { padding-right: 30px; }
.pay-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.paycalc { position: sticky; top: 84px; border-radius: 12px; padding: 14px 16px; background: var(--surface-2); border: 1px dashed var(--line-strong); display: grid; gap: 10px; }
.paycalc dl { margin: 0; display: grid; gap: 7px; }
.paycalc dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.paycalc dt { color: var(--muted); }
.paycalc dd { margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.paycalc .tot { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; }
.paycalc .tot dt { color: var(--ink); }
.paycalc .tot dd { font-size: 17px; color: var(--mehendi-ink); }
.paycalc .er { font-size: 13px; }
.paycalc p { margin: 0; }
.pc-hint { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--haldi-ink); background: var(--haldi-soft); padding: 8px 10px; border-radius: 8px; }
.pc-hint[hidden] { display: none; }
[data-pm][hidden], [data-exit][hidden] { display: none; }

/* applicability cards */
.app-from { max-width: 320px; }
.app-note { display: flex; gap: 6px; align-items: center; margin: 0; }
.app-kind { margin: 4px 0 -6px; font: 500 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.app-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; gap: 8px; padding: 0; transition: border-color .15s, background .15s; }
.app-card.is-on { border-color: color-mix(in srgb, var(--mehendi) 55%, transparent); background: color-mix(in srgb, var(--mehendi-soft) 45%, var(--surface)); }
.app-card.has-err { border-color: var(--sindoor); box-shadow: 0 0 0 3px var(--sindoor-soft); }
.app-card.is-changed { box-shadow: 0 0 0 3px var(--haldi-soft); border-color: var(--haldi); }
.app-tick { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; cursor: pointer; }
.app-tick input, .mx-cell input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tk { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: transparent; transition: background .12s, border-color .12s; flex: none; }
.app-tick input:checked + .tk, .mx-cell input:checked + .tk { background: var(--mehendi); border-color: var(--mehendi); color: #fff; }
.app-tick input:focus-visible + .tk, .mx-cell input:focus-visible + .tk { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-txt { display: grid; gap: 1px; }
.app-txt b { font-size: 14.5px; }
.app-txt small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.chip.st { font-size: 10.5px; padding: 1px 7px; width: fit-content; margin-top: 4px; }
.app-reason { padding: 0 12px 12px; }
.app-reason input { font-size: 14px; padding: 8px 10px; }
.app-card .err { margin: 0; padding: 0 12px 10px; display: flex; gap: 5px; align-items: center; color: var(--sindoor-ink); font-size: 12.5px; }

/* timing rules */
.trules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trule { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; align-content: start; background: var(--surface-2); transition: opacity .15s; }
.trule.is-off { opacity: .55; }
.trule-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trule-f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.trule-f .fld > label { font-size: 13px; }
.trule-eq { margin: 0; font-size: 12.5px; color: var(--accent); font-family: var(--font-mono); }
.day-basic { display: flex; gap: 6px; align-items: center; margin: 0; }

/* sticky save bar */
.savebar { position: sticky; bottom: 0; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.savebar .sb-state { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; }
.savebar .sb-state.dirty { color: var(--haldi-ink); font-weight: 600; }
.savebar .sb-state.dirty::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--haldi); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* matrix */
.mx-wrap { overflow: auto; max-height: calc(100vh - 290px); margin: 0 12px 12px; border: 1px solid var(--line); border-radius: 12px; }
.mx { border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 100%; }
.mx th, .mx td { border-bottom: 1px solid var(--line); padding: 8px 10px; background: var(--surface); }
.mx thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: center; vertical-align: bottom; white-space: nowrap; }
.mx thead th.is-stat .mx-h { color: var(--accent); }
.mx-h { display: block; font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.mx-all { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.mx .mx-emp { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 200px; max-width: 260px; border-right: 1px solid var(--line); }
.mx thead .mx-emp { z-index: 3; font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mx tbody .mx-emp { display: table-cell; font-weight: 400; }
.mx tbody .mx-emp a { text-decoration: none; color: var(--ink); }
.mx tbody .mx-emp small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx .over { color: var(--haldi-ink); font-weight: 600; }
.mx td { text-align: center; }
.mx tbody tr:hover td, .mx tbody tr:hover th { background: var(--surface-2); }
.mx-cell { display: inline-grid; place-items: center; cursor: pointer; padding: 3px; border-radius: 8px; position: relative; }
.mx-cell.is-changed { background: var(--haldi-soft); box-shadow: 0 0 0 2px var(--haldi); }
.mx-bar { margin: 0 12px 12px; position: sticky; bottom: 8px; }
.mx-bar .fld.inl { display: flex; align-items: center; gap: 8px; }
.mx-bar .fld.inl label { white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mx-bar .fld.inl input { height: 38px; padding: 6px 10px; font-size: 14px; }
.mx-bar .fld.grow { flex: 1 1 240px; }
.mx-bar .fld[hidden] { display: none; }

@media (max-width: 1180px) {
  .pay-wrap { grid-template-columns: minmax(0, 1fr); }
  .paycalc { position: static; }
}
@media (max-width: 980px) {
  .emp-layout { grid-template-columns: minmax(0, 1fr); }
  .sec-nav { top: 64px; z-index: 12; display: flex; overflow-x: auto; scrollbar-width: none; padding: 6px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); }
  .sec-nav::-webkit-scrollbar { display: none; }
  .sec-nav a { white-space: nowrap; flex: none; padding: 8px 10px; font-size: 13.5px; }
  .sec { scroll-margin-top: 130px; }
  .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .filters { width: 100%; }
  .filters select { flex: 1 1 140px; max-width: none; }
  .head-acts { width: 100%; }
  .head-acts .btn { flex: 1; }
  .hide-sm { display: none; }
  .emp-dt td:first-child { min-width: 0; display: block; text-align: left; }
  .emp-dt td:first-child::before { content: none; }
  .emp-cell b { white-space: normal; }
  .eh-facts { width: 100%; justify-content: space-between; }
  .mx-wrap { max-height: none; margin-inline: 8px; }
  .mx-bar { margin-inline: 8px; }
}
@media (max-width: 560px) {
  .sec { padding: 14px; }
  .mk { padding: 12px; gap: 0 10px; }
  .mk .ic-wrap { width: 36px; height: 36px; }
  .mk .val { font-size: 21px; }
  .trule-f { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .savebar { gap: 8px; padding-inline: 10px; }
  .savebar .sb-state { width: 100%; }
  .savebar .sb-state:not(.dirty) { display: none; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .app-tick { padding: 10px; gap: 8px; }
  .savebar .btn { flex: 1 1 auto; padding-inline: 10px; }
  .savebar .btn-ghost { flex: 0 1 auto; }
  .mx .mx-emp { min-width: 150px; max-width: 170px; }
}

.fld.ro input { background: var(--surface-2); color: var(--accent); font-family: var(--font-mono); font-weight: 500; cursor: default; }
.fld.ro input::placeholder { color: var(--accent); opacity: .8; }
.fld.need input { border-color: var(--haldi); box-shadow: 0 0 0 4px var(--haldi-soft); }

/* =========================================================
   Users & Roles
   ========================================================= */
.role-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rs { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; }
.rs .ic-wrap { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.rs-t { display: grid; min-width: 0; flex: 1; }
.rs-t b { font-size: 14.5px; }
.rs-t small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.rs-n { font-size: 22px; font-weight: 500; }
.todo { border-color: color-mix(in srgb, var(--haldi) 45%, var(--line)); }
.todo-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.todo-row .ic-wrap { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.todo-row > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.todo-row small { color: var(--muted); font-size: 12.5px; }
.acc-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.acc { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.acc-full { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.acc-own { background: var(--accent-soft); color: var(--accent); }
.acc-view { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.acc-req { background: var(--haldi-soft); color: var(--haldi-ink); }
.acc-none { color: var(--line-strong); }
.acc-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.acc-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.acc-tbl th, .acc-tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.acc-tbl thead th { background: var(--surface-2); font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.acc-tbl tbody th { text-align: left; font-weight: 600; position: sticky; left: 0; background: var(--surface); }
.acc-tbl tr:last-child th, .acc-tbl tr:last-child td { border-bottom: 0; }
.role-hint { display: flex; gap: 6px; align-items: center; margin: 0; padding: 9px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.role-hint:empty, .role-hint[hidden] { display: none; }
[data-u-for][hidden] { display: none; }
.pw-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; }
.pw-box legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.pw-box p { margin: 0; }
.pw-in { position: relative; display: block; }
.pw-in input { padding-right: 46px; }
.pw-in .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; }
.pw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pw-meter { display: inline-flex; gap: 3px; }
.pw-meter i { width: 26px; height: 5px; border-radius: 3px; background: var(--line); }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--sindoor); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--haldi); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: var(--mehendi); }
.pw-meter[data-s="4"] i { background: var(--mehendi); }
@media (max-width: 1100px) { .role-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .role-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rs { padding: 10px; gap: 8px; }
  .rs .ic-wrap { width: 30px; height: 30px; border-radius: 9px; }
  .rs-t b { font-size: 13px; line-height: 1.2; }
  .rs-t small { display: none; }
  .rs-n { font-size: 18px; }
  .todo-list { grid-template-columns: minmax(0, 1fr); }
}

/* roles */
a.rs { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
a.rs:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.role-card { padding: 16px; gap: 10px; }
.role-card.is-off { opacity: .6; }
.rc-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rc-h h2 { font-size: 17px; margin: 0 0 6px; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rc-n { font: 500 24px/1 var(--font-mono); text-align: right; display: grid; }
.rc-n small { font: 400 11px var(--font-body); color: var(--muted); }
.rc-d { margin: 0; }
.rc-perms { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; flex: 1; align-content: start; }
.rc-perms li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; padding-bottom: 5px; border-bottom: 1px dashed var(--line); }
.rc-perms li:last-child { border-bottom: 0; }
.rc-f { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.rc-f form { margin: 0; }
.drawer-wide { width: min(680px, 100vw); }
.perm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.perm-head h3 { margin: 0; font-size: 15px; }
.perm-quick { display: flex; gap: 6px; }
.perm-legend { margin: 0; line-height: 2; }
.perm-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.perm-list.has-err { border-color: var(--sindoor); box-shadow: 0 0 0 3px var(--sindoor-soft); }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.perm-row:last-child { border-bottom: 0; }
.perm-row:nth-child(even) { background: var(--surface-2); }
.perm-m { font-weight: 600; font-size: 14px; }
.perm-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.ps { position: relative; cursor: pointer; }
.ps input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ps span { display: block; font-size: 12.5px; font-weight: 600; padding: 5px 9px; border-radius: 7px; color: var(--muted); }
.ps input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.ps.acc-full input:checked + span { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.ps.acc-own input:checked + span { background: var(--accent-soft); color: var(--accent); }
.ps.acc-req input:checked + span { background: var(--haldi-soft); color: var(--haldi-ink); }
.ps input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.ps.acc-full, .ps.acc-own, .ps.acc-view, .ps.acc-req, .ps.none { background: none; border: 0; padding: 0; }
@media (max-width: 560px) {
  .role-grid { grid-template-columns: minmax(0, 1fr); }
  .perm-row { padding: 8px 10px; }
  .perm-seg { width: 100%; }
  .ps { flex: 1; text-align: center; }
  .ps span { padding: 6px 4px; font-size: 12px; }
}

/* =========================================================
   Attendance + machines
   ========================================================= */
.att-bar { align-items: center; }
.day-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-nav .flip svg { transform: rotate(180deg); }
.day-pick input { height: 38px; padding: 6px 10px; width: auto; }
.day-lbl { font-size: 15px; }
.att-bar form:last-child { margin-left: auto; }
.att-sum { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; padding: 6px 18px 12px; }
.as { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; background: var(--surface-2); }
.as b { font: 500 20px/1.1 var(--font-mono); }
.as span { font-size: 12.5px; color: var(--muted); }
.as-ok b { color: var(--mehendi-ink); } .as-warn b { color: var(--haldi-ink); } .as-bad b { color: var(--sindoor-ink); } .as-acc b { color: var(--accent); }
.att-warn { margin: 0 18px 8px; }
.t-in.is-late { color: var(--sindoor-ink); font-weight: 600; }
.t-in.is-early { color: var(--mehendi-ink); font-weight: 600; }
.late-m { display: block; font-size: 11.5px; color: var(--sindoor-ink); }
.warn-t { color: var(--haldi-ink); font-weight: 600; }
.money-cell .chip { margin: 1px 0; }
.pchips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pchip { font: 500 11.5px var(--font-mono); padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.pchip.man { background: var(--haldi-soft); border-color: transparent; color: var(--haldi-ink); }
.punch-dlg { border: 0; border-radius: 16px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); }
.punch-dlg::backdrop { background: rgba(10,12,26,.45); backdrop-filter: blur(3px); }
.punch-dlg form { padding: 20px; display: grid; gap: 12px; }
.punch-dlg h2 { margin: 0; font-size: 18px; }
.punch-dlg p { margin: 0; }
/* muster */
.mus th, .mus td { padding: 4px 3px; }
.mus thead th { font: 500 11px var(--font-mono); color: var(--muted); }
.mus thead th small { display: block; font-size: 9.5px; opacity: .8; }
.mus thead th.sun { color: var(--sindoor-ink); }
.mus .tot { padding: 4px 8px; font: 500 12.5px var(--font-mono); white-space: nowrap; background: var(--surface-2); }
.mus .tot.ok { color: var(--mehendi-ink); } .mus .tot.bad { color: var(--sindoor-ink); }
.mc { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font: 600 11.5px var(--font-mono); text-decoration: none; position: relative; }
.mc.s-P { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.mc.s-HD { background: var(--haldi-soft); color: var(--haldi-ink); }
.mc.s-MIS { background: var(--accent-soft); color: var(--accent); }
.mc.s-A { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.mc.late::after, .mc.early::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; }
.mc.late::after { background: var(--sindoor); } .mc.early::after { background: var(--mehendi); }
.mx-legend { flex-wrap: wrap; gap: 6px; }
.mx-legend .mc { width: 20px; height: 20px; font-size: 10.5px; }
.mus-wrap { max-height: calc(100vh - 300px); }
/* machines */
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dev { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; background: var(--surface-2); }
.dev.is-off { opacity: .55; }
.dev header { display: flex; align-items: center; gap: 8px; }
.dev header b { flex: 1; min-width: 0; }
.dev dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.dev dt { font: 500 10.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dev dd { margin: 0; font-size: 13.5px; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.on { background: var(--mehendi); box-shadow: 0 0 0 4px var(--mehendi-soft); }
.dot.off { background: var(--sindoor); box-shadow: 0 0 0 4px var(--sindoor-soft); }
.dot.file { background: var(--line-strong); }
.drop { grid-column: 1 / -1; display: grid !important; justify-items: center; gap: 6px; text-align: center; padding: 22px; border: 2px dashed var(--line-strong); border-radius: 14px; cursor: pointer; background: var(--surface-2); color: var(--muted); transition: border-color .15s, background .15s; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop b { color: var(--ink); }
.paste summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); }
.paste textarea { margin-top: 8px; font-family: var(--font-mono); font-size: 13px; }
.map-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.map-form select { width: auto; min-width: 180px; height: 36px; padding: 4px 8px; font-size: 13.5px; }
.ok-line { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--mehendi-ink); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.punch-feed li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.punch-feed li > span:last-child { display: grid; min-width: 0; }
.punch-feed small { color: var(--muted); font-size: 12.5px; }
.punch-feed .pt { font-size: 12.5px; color: var(--muted); white-space: nowrap; min-width: 92px; }
.push-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.push-steps p { margin: 0; }
.push-steps .chip { width: fit-content; }
[data-dev-push][hidden] { display: none; }
@media (max-width: 1100px) { .att-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } .two-col { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .att-bar form:last-child { margin-left: 0; }
  .att-dt td:first-child { display: block; text-align: left; }
  .att-dt td:first-child::before { content: none; }
}
@media (max-width: 560px) {
  .att-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 12px; }
  .as b { font-size: 17px; }
  .dev-grid { grid-template-columns: minmax(0, 1fr); }
}

.src-msg { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 12.5px; padding: 7px 9px; border-radius: 8px; }
.src-msg.ok { background: var(--mehendi-soft); color: var(--mehendi-ink); } .src-msg.bad { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.dev footer { display: flex; gap: 6px; flex-wrap: wrap; } .dev footer form { margin: 0; }
.test-res { border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.test-res.ok { background: var(--mehendi-soft); color: var(--mehendi-ink); } .test-res.bad { background: var(--sindoor-soft); color: var(--sindoor-ink); overflow-wrap: anywhere; }
.test-res p { display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.mini { border-collapse: collapse; font-size: 13px; background: var(--surface); color: var(--ink); border-radius: 8px; overflow: hidden; }
.mini th, .mini td { padding: 5px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.preset-hint { margin: 0; }
.preset-hint:empty { display: none; }
[data-src-sql][hidden] { display: none; }

[data-dev-pull][hidden] { display: none; }

/* =========================================================
   Timing Rules
   ========================================================= */
.ok-t { color: var(--mehendi-ink); } .bad-t { color: var(--sindoor-ink); }
.tm-co { padding: 14px 18px; display: grid; gap: 12px; }
.tm-co-h { display: flex; align-items: center; gap: 12px; }
.tm-co-h .ic-wrap { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.tm-co-h > div { display: grid; flex: 1; min-width: 0; }
.tm-co-h small { font-size: 12.5px; }
.tm-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tm-rules li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; border-left-width: 4px; }
.tm-rules li > b { font-size: 15px; font-weight: 500; }
.tm-rules li.ok { border-left-color: var(--mehendi); } .tm-rules li.ok > b { color: var(--mehendi-ink); }
.tm-rules li.warn { border-left-color: var(--haldi); } .tm-rules li.warn > b { color: var(--haldi-ink); }
.tm-rules li.bad { border-left-color: var(--sindoor); } .tm-rules li.bad > b { color: var(--sindoor-ink); }
.tm-co-f { display: flex; gap: 6px; align-items: center; margin: 0; }

/* employee-wise grid */
.tg-wrap { max-height: calc(100vh - 250px); }
.tg thead tr.tg-g th { padding: 7px 8px 5px; font: 600 12.5px var(--font-body); letter-spacing: 0; text-transform: none; border-bottom: 0; }
.tg thead tr.tg-g th.t-ok { color: var(--mehendi-ink); box-shadow: inset 0 3px 0 var(--mehendi); }
.tg thead tr.tg-g th.t-bad { color: var(--sindoor-ink); box-shadow: inset 0 3px 0 var(--sindoor); }
.tg thead tr:nth-child(2) th { top: 31px; }
.tg th.tg-tk, .tg td.tg-tk { border-left: 1px solid var(--line); }
.tg td { padding: 6px 5px; vertical-align: top; }
.tg td.tg-tk { padding-top: 10px; }
.tg .tg-db { margin-top: 2px; }
.tg-in { position: relative; display: block; width: 84px; margin: 0 auto; }
.tg-in.money, .tg-in.percent { width: 78px; }
.tg-in i { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 12.5px; pointer-events: none; }
.tg-in.money i { left: 8px; } .tg-in.percent i { right: 8px; }
.tg-in input { height: 36px; padding: 5px 8px; font: 500 14px var(--font-mono); text-align: center; border-radius: 8px; font-variant-numeric: tabular-nums; }
.tg-in.money input { padding-left: 20px; } .tg-in.percent input { padding-right: 20px; }
.tg-in input::placeholder { color: var(--muted); opacity: .6; font-weight: 400; font-style: italic; }
.tg-in input:placeholder-shown { border-style: dashed; background: transparent; }
.tg-in input:not(:placeholder-shown) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tg-in input[readonly] { background: var(--surface-2); }
.tg-c.is-changed .tg-in input { background: var(--haldi-soft); border-color: var(--haldi); box-shadow: 0 0 0 2px var(--haldi-soft); }
.tg-c.is-bad .tg-in input { border-color: var(--sindoor); box-shadow: 0 0 0 3px var(--sindoor-soft); }
.tg-c.is-off .tg-in { opacity: .35; }
.tg-eq { display: block; font: 500 11px var(--font-mono); color: var(--sindoor-ink); margin-top: 3px; white-space: nowrap; }
.tg-eq:empty { display: none; }

/* company rules */
.tm-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.tm-main { display: grid; gap: 16px; min-width: 0; }
.tm-grid .trule.wide { grid-column: 1 / -1; }
.tm-grid .trule-h b { display: inline-flex; align-items: center; gap: 7px; }
.trule-f.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tm-test { position: sticky; top: 84px; }
.tm-test .ic-wrap { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.tm-test .tile-b > p { margin: 0; }
.tt-res { margin: 0; display: grid; border-top: 1px solid var(--line); }
.tt-res div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.tt-res dt { color: var(--muted); } .tt-res dd { margin: 0; font-weight: 500; }
.tt-res .ok dd { color: var(--mehendi-ink); } .tt-res .bad dd { color: var(--sindoor-ink); }
.tt-res .tot { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 2px; } .tt-res .tot dt { color: var(--ink); font-weight: 600; } .tt-res .tot dd { font-weight: 700; font-size: 16px; }
.tl { display: grid; gap: 10px; padding-top: 2px; }
.tl-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
.tl-lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); padding-top: 3px; }
.tl-track { display: grid; gap: 4px; min-width: 0; padding: 0 14px; }
.tl-bar { position: relative; height: 24px; border-radius: 7px; overflow: hidden; background: var(--line); }
.tl-z { position: absolute; top: 0; bottom: 0; transition: left .2s ease, width .2s ease; display: grid; place-items: center; font: 600 11px var(--font-mono); color: #fff; white-space: nowrap; overflow: hidden; }
.tl-z.mid { color: var(--ink-2); }
.tl-z.ok { background: var(--mehendi); } .tl-z.mid { background: var(--line-strong); } .tl-z.warn { background: var(--haldi); } .tl-z.bad { background: var(--sindoor); }
.tl-ticks { position: relative; height: 16px; font: 500 10.5px var(--font-mono); color: var(--muted); }
.tl-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-ticks span.k { color: var(--ink); font-weight: 600; }
.tl-key { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 6px 16px; font-size: 13.5px; }
.tl-key li { display: flex; align-items: center; gap: 8px; }
.tl-key i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.tl-key i.ok { background: var(--mehendi); } .tl-key i.mid { background: var(--line-strong); } .tl-key i.warn { background: var(--haldi); } .tl-key i.bad { background: var(--sindoor); }
.tl-key b { font-family: var(--font-mono); font-weight: 500; }

/* month summary */
.tm-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tm-acts { margin-left: auto; align-items: center; }
.tm-acts form { margin: 0; }
.tm-dt th.n, .tm-dt td.n { text-align: right; }
.tm-dt .money-cell { display: grid; justify-items: end; gap: 1px; }
.tm-dt .money-cell small { color: var(--muted); font-size: 12px; }
.tm-dt .money-cell.ok b { color: var(--mehendi-ink); } .tm-dt .money-cell.bad b { color: var(--sindoor-ink); }
.tm-dt tfoot th, .tm-dt tfoot td { padding: 11px 12px; border-top: 2px solid var(--ink); font-weight: 600; }

@media (max-width: 1180px) { .tm-cols { grid-template-columns: minmax(0, 1fr); } .tm-test { position: static; } }
@media (max-width: 900px) { .tm-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .tm-dt td:first-child { display: block; text-align: left; }
  .tm-dt td:first-child::before { content: none; }
  .tl-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tg-wrap { max-height: none; }
  .tm-acts { margin-left: 0; width: 100%; }
  .tm-dt td.n { text-align: right; }
  .tm-dt tfoot { display: none; }
  .tm-dt .money-cell { justify-items: end; }
}
@media (max-width: 560px) {
  .tm-rules { grid-template-columns: minmax(0, 1fr); }
  .tm-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trule-f.three { grid-template-columns: minmax(0, 1fr); }
  .tm-co { padding: 12px; }
}
/* leave */
.btn-danger { background: var(--sindoor); color: #fff; border-color: transparent; }
.btn-danger:hover { filter: brightness(1.06); }
.bad-t { color: var(--sindoor-ink); font-weight: 600; }
.lv-sum { grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 16px; }
.lv-black { display: flex; gap: 8px; align-items: flex-start; margin: 0 18px 4px; padding: 10px 12px; border-radius: 12px; background: var(--sindoor-soft); color: var(--sindoor-ink); font-size: 13.5px; }
.lv-black > span { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lv-black .chip { background: var(--surface); }
.seg-a { font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 8px; text-decoration: none; }
.seg-a.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.lt { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 5px; border-radius: 6px; font: 600 11px var(--font-mono); letter-spacing: .02em; flex: none; }
.lt.h0 { background: var(--accent-soft); color: var(--accent); }
.lt.h1 { background: #E3EEFB; color: #24538F; }
.lt.h2 { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.lt.h3 { background: var(--haldi-soft); color: var(--haldi-ink); }
.lt.h4 { background: #EFE4F8; color: #6A2F96; }
.lt.h5 { background: var(--sindoor-soft); color: var(--sindoor-ink); }
:root[data-theme="dark"] .lt.h1 { background: #182A45; color: #9CC3F5; }
:root[data-theme="dark"] .lt.h4 { background: #2C1C3D; color: #D3AEF2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lt.h1 { background: #182A45; color: #9CC3F5; } :root:not([data-theme="light"]) .lt.h4 { background: #2C1C3D; color: #D3AEF2; } }
.lt.pend { background: repeating-linear-gradient(135deg, var(--surface) 0 4px, var(--surface-2) 4px 8px); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.lt.half { border-radius: 6px 6px 6px 14px; }
.lv-when { display: flex; align-items: center; gap: 10px; }
.lv-when > span:last-child { display: grid; }
.lv-when b { white-space: nowrap; }
.lv-when small, .lv-who { color: var(--muted); font-size: 12.5px; }
.lv-who { display: block; margin-top: 4px; }
.lv-reason { max-width: 280px; color: var(--ink-2); }
.lv-doc { display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; font-size: 12.5px; font-weight: 600; }
.lv-note { display: block; color: var(--muted); font-style: italic; margin-top: 3px; }
.lv-dt tr.lv-mine td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.lv-acts { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.lv-cancel { color: var(--muted); border-color: transparent; }
.lv-dlg { width: min(560px, calc(100vw - 32px)); }
.lbl-t { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.lv-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lv-type { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); position: relative; }
.lv-type input { position: absolute; opacity: 0; pointer-events: none; }
.lv-type > span:last-child { display: grid; min-width: 0; }
.lv-type b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-type small { font-size: 12px; color: var(--muted); }
.lv-type:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lv-type:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.lv-type.is-short small { color: var(--sindoor-ink); font-weight: 600; }
.seg-r { position: relative; }
.seg-r input { position: absolute; opacity: 0; }
.seg-r span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 11px; border-radius: 8px; cursor: pointer; }
.seg-r input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-r input:focus-visible + span { outline: 2px solid var(--accent); }
.lv-preview { display: grid; gap: 6px; font-size: 13.5px; }
.lv-preview:empty { display: none; }
.lv-preview p { margin: 0; display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.lv-preview p.ok { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.lv-preview p.warn { background: var(--haldi-soft); color: var(--haldi-ink); }
.lv-preview p.bad { background: var(--sindoor-soft); color: var(--sindoor-ink); }
/* leave balance */
.lb-dt th.num, .lb-dt td.num { text-align: center; }
.lb-dt th .lt { min-width: 26px; height: 20px; margin-right: 4px; }
.lb-cell { display: inline-grid; justify-items: center; gap: 3px; min-width: 76px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; background: none; font: inherit; color: inherit; }
button.lb-cell { cursor: pointer; }
button.lb-cell:hover { border-color: var(--line-strong); background: var(--surface); }
.lb-cell b { font: 500 17px/1 var(--font-mono); }
.lb-cell b + small { font: 500 11px var(--font-mono); color: var(--muted); }
.lb-cell.neg b { color: var(--sindoor-ink); }
.lb-bar { width: 56px; height: 4px; border-radius: 4px; background: var(--mehendi-soft); overflow: hidden; }
.lb-bar i { display: block; height: 100%; background: var(--haldi); border-radius: 4px; }
.lb-cell small.warn-t { font-size: 11px; }
/* leave calendar */
.lc thead th.blk, .lc td.blk { background: var(--sindoor-soft); }
.lc thead th.blk { color: var(--sindoor-ink); }
.lc thead th.tdy { box-shadow: inset 0 -3px 0 var(--accent); color: var(--accent); }
.lc td { padding: 4px 2px; }
.lc .lt { min-width: 24px; height: 22px; font-size: 10px; padding: 0 3px; }
.lc tfoot th, .lc tfoot td { position: sticky; bottom: 0; background: var(--surface-2); font: 500 12px var(--font-mono); color: var(--muted); border-top: 1px solid var(--line); }
.lc tfoot .mx-emp { z-index: 3; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.lc-cnt.hi { color: var(--sindoor-ink); font-weight: 700; }
.lc-black-key { display: inline-block; width: 16px; height: 16px; border-radius: 4px; background: var(--sindoor-soft); border: 1px solid var(--sindoor); vertical-align: middle; }
.mx-legend .lt { min-width: 26px; height: 20px; font-size: 10px; }
/* leave policy */
.lp-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.lp-side { display: grid; gap: 16px; }
.lp-dt input[type=text] { height: 36px; padding: 6px 10px; font-size: 14px; min-width: 130px; }
.lp-dt input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
.lp-dt td { text-align: center; }
.lp-dt td:first-child, .lp-dt th:first-child { text-align: left; }
.lp-name { display: flex; align-items: center; gap: 8px; }
.lp-code { width: 72px; min-width: 0 !important; text-transform: uppercase; font-family: var(--font-mono); }
.num-in { width: 76px; height: 36px; padding: 6px 8px; font: 500 14px var(--font-mono); text-align: center; }
.num-in.sm { width: 54px; height: 30px; padding: 2px 4px; margin: 0 4px; }
.lp-new td { background: var(--surface-2); }
.lp-act { padding: 12px 18px 4px; }
.lp-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lp-ladder li { display: flex; gap: 12px; align-items: center; padding: 8px 0; position: relative; }
.lp-ladder li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 38px; bottom: -10px; width: 2px; background: var(--line); }
.lp-ladder li > span:last-child { display: grid; gap: 2px; }
.lp-ladder small { color: var(--muted); font-size: 13px; }
.lp-step { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; font: 600 13px var(--font-mono); }
.lp-step.s1 { background: var(--haldi-soft); color: var(--haldi-ink); }
.lp-step.s2 { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.lp-step.s3 { background: var(--accent-soft); color: var(--accent); }
.lp-step.s4 { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.lp-inl { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.lp-black { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lp-black li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.lp-bd { display: grid; place-items: center; min-width: 58px; padding: 4px; border-radius: 9px; background: var(--sindoor-soft); color: var(--sindoor-ink); }
.lp-bd b { font: 600 13px var(--font-mono); }
.lp-bd small { font-size: 10.5px; }
.lp-bn { display: grid; flex: 1; min-width: 0; }
.lp-bn small { color: var(--muted); font-size: 12.5px; }
.lp-black form { margin: 0; }
.lp-add { display: grid; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
@media (max-width: 1100px) { .lv-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lp-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .lv-dt td:first-child, .lb-dt td:first-child, .lp-dt td:first-child { display: block; text-align: left; }
  .lv-dt td:first-child::before, .lb-dt td:first-child::before, .lp-dt td:first-child::before { content: none; }
  .lv-reason { max-width: none; }
}
@media (max-width: 560px) { .lv-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* leave — advanced */
.ok-t { color: var(--mehendi-ink); font-weight: 600; }
.lv-sum { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ye-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lv-ck { width: 34px; }
.lv-ck input { width: 17px; height: 17px; accent-color: var(--accent); }
.lv-dt a.emp-cell { cursor: pointer; }
.chip.lv-half { font-size: 11px; padding: 1px 8px; background: var(--mehendi-soft); color: var(--mehendi-ink); border-color: transparent; }
.chip.lv-half.unpaid { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.lv-bulk { position: sticky; bottom: 10px; z-index: 5; margin: 6px 18px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-lg); }
.lv-bulk[hidden] { display: none; }
.lt.off { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-size: 9.5px; }
.lc a.lt { text-decoration: none; }
.lt.lg { min-width: 44px; height: 40px; font-size: 14px; border-radius: 10px; }
.ld-sum { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.ld-sum > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ld-sum small { color: var(--muted); font-size: 13px; }
.ld-reason { margin: 0; color: var(--ink-2); font-style: italic; }
.ld-h { margin: 6px 0 0; font: 500 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ld-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.ld-day { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--mehendi-soft); }
.ld-day b { font: 600 17px/1 var(--font-mono); }
.ld-day small { font-size: 11px; color: var(--muted); }
.ld-day span { font-size: 12px; font-weight: 600; color: var(--mehendi-ink); }
.ld-day em { font-style: normal; font-size: 11.5px; color: var(--ink-2); }
.ld-day.off { background: var(--surface-2); }
.ld-day.off span { color: var(--muted); }
.ld-day.lop { background: var(--sindoor-soft); }
.ld-day.lop span { color: var(--sindoor-ink); }
.ld-checks, .ld-cover, .ld-hist, .ld-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ld-checks li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ld-checks small { color: var(--muted); font-size: 12.5px; }
.ld-cover li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.ld-cover li > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.ld-cover small { color: var(--muted); font-size: 12.5px; }
.ld-bal { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ld-bal > div { display: grid; gap: 2px; justify-items: start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
.ld-bal b { font: 500 20px/1.1 var(--font-mono); }
.ld-bal small { font-size: 11.5px; color: var(--muted); }
.ld-tl { border-left: 2px solid var(--line); padding-left: 14px; margin-left: 6px; }
.ld-tl li { position: relative; font-size: 14px; }
.ld-tl li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.ld-tl li.ok::before { background: var(--mehendi); } .ld-tl li.bad::before { background: var(--sindoor); } .ld-tl li.wait::before { background: var(--haldi); }
.ld-tl small { display: block; color: var(--muted); font-size: 12.5px; }
.ld-hist a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: inherit; font-size: 13.5px; }
.ld-hist a:hover { background: var(--surface-2); }
.ld-hist a > span:nth-child(2) { flex: 1; }
.drawer-f form { display: inline; margin: 0; }
.lp-chk { display: flex; gap: 10px; align-items: flex-start; }
.lp-chk input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--accent); }
.lp-chk > span { display: grid; gap: 2px; }
.lp-chk small { color: var(--muted); font-size: 12.5px; }
.ye-close { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 18px 8px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); background: var(--surface-2); }
@media (max-width: 1100px) { .lv-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lv-sum, .ye-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lv-bulk { margin-inline: 8px; } }

/* roster */
.rs-sum { grid-template-columns: repeat(7, minmax(0, 1fr)); padding-top: 14px; }
.rs-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 18px 10px; }
.rs-acts form { margin: 0; }
.rs-inline { display: inline-flex; align-items: center; gap: 8px; }
.rs-ow { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; color: var(--muted); }
.rc { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 7px; font: 600 11.5px var(--font-mono); }
.rc.s0, .rc-sel[data-v="0"] { background: var(--accent-soft); color: var(--accent); }
.rc.s1, .rc-sel[data-v="1"] { background: #E3EEFB; color: #24538F; }
.rc.s2, .rc-sel[data-v="2"] { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.rc.s3, .rc-sel[data-v="3"] { background: #EFE4F8; color: #6A2F96; }
.rc.sF, .rc-sel[data-v="F"] { background: var(--haldi-soft); color: var(--haldi-ink); }
.rc.off, .rc-sel[data-v="OFF"] { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--bg-2) 5px 10px); color: var(--muted); }
:root[data-theme="dark"] .rc.s1, :root[data-theme="dark"] .rc-sel[data-v="1"] { background: #182A45; color: #9CC3F5; }
:root[data-theme="dark"] .rc.s3, :root[data-theme="dark"] .rc-sel[data-v="3"] { background: #2C1C3D; color: #D3AEF2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rc.s1, :root:not([data-theme="light"]) .rc-sel[data-v="1"] { background: #182A45; color: #9CC3F5; }
  :root:not([data-theme="light"]) .rc.s3, :root:not([data-theme="light"]) .rc-sel[data-v="3"] { background: #2C1C3D; color: #D3AEF2; }
}
.rs-wrap { max-height: calc(100vh - 260px); }
.rs thead th { padding: 8px 6px; }
.rs thead th b { display: block; font: 600 12px var(--font-mono); color: var(--ink-2); }
.rs thead th small { display: block; font: 500 11px var(--font-mono); color: var(--muted); }
.rs thead th.tdy { box-shadow: inset 0 -3px 0 var(--accent); }
.rs thead th.tdy b { color: var(--accent); }
.rs thead th.fest { background: var(--haldi-soft); }
.rs-fest { display: block; font: normal 600 10px var(--font-body, inherit); color: var(--haldi-ink); margin-top: 2px; }
.rs td { padding: 4px; min-width: 76px; }
.rs-cell { position: relative; }
.rc-sel { width: 100%; min-width: 64px; height: 32px; padding: 0 20px 0 8px; border-radius: 8px; border: 1px solid transparent; font: 600 12px var(--font-mono); background-color: var(--surface-2); background-position: right 4px center; cursor: pointer; }
.rc-sel[data-v=""] { border-color: var(--haldi); background-color: var(--surface); color: var(--muted); }
.rc-sel.is-changed { box-shadow: 0 0 0 2px var(--accent); }
.rs-lv { position: absolute; top: 1px; right: 1px; min-width: 0; height: 15px; padding: 0 3px; font-size: 8.5px; border-radius: 4px; pointer-events: auto; }
.has-lv .rc-sel, .has-lv .rc { opacity: .55; }
.rs-sec th, .rs-sec td { background: var(--surface-2) !important; font: 600 11.5px var(--font-mono); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding-top: 6px; padding-bottom: 6px; }
.rs-cnt { font: 600 13px var(--font-mono); color: var(--mehendi-ink); text-transform: none; }
.rs-cnt small { font-size: 10.5px; color: var(--muted); }
.rs-sec td.short { background: var(--sindoor-soft) !important; }
.rs-sec td.short .rs-cnt { color: var(--sindoor-ink); }
.rs-me th, .rs-me td { background: var(--accent-soft) !important; }
.rs-save { margin: 0 12px 12px; }
.rs-save[hidden] { display: none; }
.sw-day { display: flex; gap: 6px; align-items: center; font-size: 13px; margin: 2px 0; }
.sw-day b { min-width: 84px; font-weight: 600; }
.rs-mins { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rs-mins li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.rs-mins li > span { display: grid; } .rs-mins small { color: var(--muted); font-size: 12px; }
.rs-shifts { display: grid; gap: 8px; }
.rs-shift { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.rs-shift.new { border-style: dashed; background: var(--surface-2); }
.rs-shift input[type=text] { height: 34px; padding: 4px 8px; font-size: 13.5px; width: 130px; }
.rs-shift input.lp-code { width: 58px; }
.rs-shift input[type=time] { height: 34px; padding: 4px 6px; width: 110px; font-size: 13px; }
.rs-shift label { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-2); }
.rs-days { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); width: fit-content; }
@media (max-width: 1100px) { .rs-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rs-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* transfer & deputation */
.tr-sum { grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 16px; }
.tr-needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; padding: 10px 18px 4px; }
.tr-need { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--haldi); background: var(--haldi-soft); text-decoration: none; color: var(--ink); }
.tr-need:hover { box-shadow: var(--shadow-sm); }
.tr-need > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.tr-need small { color: var(--ink-2); font-size: 12.5px; }
.tr-need-n { display: grid; place-items: center; min-width: 44px; padding: 4px; border-radius: 10px; background: var(--surface); }
.tr-need-n b { font: 600 20px/1 var(--font-mono); color: var(--haldi-ink); }
.tr-need-n small { font-size: 10.5px; color: var(--muted); }
.tr-move { display: inline-flex; align-items: center; gap: 6px; }
.tr-cost { display: grid; gap: 1px; }
.tr-cost b { font: 500 14px var(--font-mono); }
.tr-cost small { color: var(--muted); font-size: 12px; }
.tr-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 12px 18px 18px; }
.tr-st { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.tr-st > small:first-of-type { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-st small { font-size: 12px; }
.tr-num { font: 500 26px/1.1 var(--font-mono); }
.tr-cands { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tr-cands li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
.tr-cands li.tight { background: var(--surface-2); opacity: .8; }
.tr-c { display: grid; flex: 1; min-width: 0; gap: 1px; }
.tr-c small { color: var(--muted); font-size: 12.5px; }
.tr-send { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.rc.dep { background: var(--accent-soft); color: var(--accent); font-size: 10.5px; }
.rs-dep { font-size: 10px; padding: 0 6px; }
@media (max-width: 1100px) { .tr-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tr-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tr-cands li { flex-wrap: wrap; } }

/* payroll */
.pr-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 18px 10px; padding: 0; counter-reset: s; }
.pr-steps li { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.pr-steps li > span { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--font-mono); background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted); }
.pr-steps b { font-size: 13.5px; } .pr-steps small { font-size: 11.5px; color: var(--muted); min-height: 1em; }
.pr-steps li.done { background: var(--mehendi-soft); border-color: transparent; } .pr-steps li.done > span { background: var(--mehendi); border-color: transparent; color: #fff; }
.pr-steps li.now { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); } .pr-steps li.now > span { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.pr-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 18px 8px; }
.pr-acts form { margin: 0; }
.pr-files { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.pr-sum { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pr-modes { display: flex; flex-wrap: wrap; gap: 16px; padding: 0 18px 8px; margin: 0; }
.pr-tabs { margin: 4px 18px 0; }
.pr-wrap { max-height: calc(100vh - 220px); }
.pr th, .pr td { padding: 7px 9px; white-space: nowrap; }
.pr thead th { font: 500 10.5px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pr thead th { white-space: nowrap; vertical-align: middle; }
.pr thead th small { display: inline; margin-left: 4px; text-transform: none; letter-spacing: 0; font-size: 10px; opacity: .8; }
.pr thead th .st-fbtn { margin-left: 4px; }
.pr thead th.pos { color: var(--mehendi-ink); } .pr thead th.neg { color: var(--sindoor-ink); } .pr thead th.key { color: var(--ink); }
.pr td.num { text-align: right; font: 500 13px var(--font-mono); }
.pr td.mono { text-align: center; } .pr td.mono small { color: var(--muted); }
.pr td.key { background: var(--surface-2); }
.pr tbody .mx-emp { position: sticky; left: 0; }
.pr-flag { display: inline-flex; gap: 3px; align-items: center; margin-top: 3px; padding: 1px 6px; border-radius: 99px; background: var(--haldi-soft); color: var(--haldi-ink); font: 600 10.5px var(--font-mono); cursor: help; width: fit-content; }
.pr tfoot th, .pr tfoot td { position: sticky; bottom: 0; background: var(--surface-2); border-top: 2px solid var(--ink); font-weight: 600; }
.pr tfoot .mx-emp { z-index: 3; }
.pr-act { display: flex; gap: 4px; }
.pr-act .icon-btn { width: 30px; height: 30px; }
.pr-act .icon-btn.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pr-st td.num { text-align: right; }
.pr-bar { display: block; height: 4px; margin-top: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.pr-bar i { display: block; height: 100%; background: var(--accent); }
.pr-ins { display: grid; gap: 8px; }
.pr-in { display: grid; grid-template-columns: minmax(0, 1.4fr) 110px minmax(0, 1fr); gap: 8px; align-items: center; }
.pr-in label { font-size: 13.5px; display: flex; gap: 6px; align-items: center; }
.pr-in input[type=text] { height: 36px; font-size: 13.5px; padding: 6px 10px; }
.pr-in .num-in { width: 100%; }
@media (max-width: 1100px) { .pr-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } .pr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pr-files { margin-left: 0; } }
@media (max-width: 560px) { .pr-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pr-in { grid-template-columns: 1fr 100px; } .pr-in input[type=text] { grid-column: 1 / -1; } }
/* payslip (print) */
.slip-body { background: var(--bg); color: var(--ink); padding: 16px; }
.slip-bar { max-width: 760px; margin: 0 auto 12px; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.slip { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 16px; }
.slip-h { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.slip-h > div { display: grid; gap: 2px; } .slip-h small { color: var(--muted); font-size: 12.5px; }
.slip-h b { font-size: 16px; } .slip-t { text-align: right; } .slip-t b { font-family: var(--font-display, inherit); font-size: 22px; }
.slip-emp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.slip-emp dt { font: 500 10.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.slip-emp dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; }
.slip-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.slip-days > div { display: grid; justify-items: center; padding: 8px 4px; border-radius: 10px; background: var(--surface-2); text-align: center; }
.slip-days b { font: 600 18px var(--font-mono); } .slip-days small { font-size: 11px; color: var(--muted); }
.slip-days .key { background: var(--accent-soft); color: var(--accent); } .slip-days .bad { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.slip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.slip-cols table { width: 100%; border-collapse: collapse; font-size: 14px; }
.slip-cols th, .slip-cols td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.slip-cols .num { text-align: right; font-family: var(--font-mono); }
.slip-cols thead th { font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.slip-cols tfoot th { border-top: 2px solid var(--ink); border-bottom: 0; }
.slip-net { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--mehendi-soft); color: var(--mehendi-ink); }
.slip-net > div { display: grid; gap: 2px; } .slip-net b { font: 600 26px var(--font-mono); } .slip-net small { font-size: 12px; opacity: .85; }
.slip-er, .slip-foot { margin: 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .slip-emp { grid-template-columns: 1fr 1fr; } .slip-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } .slip-cols, .slip-net { grid-template-columns: 1fr; } }
@media print {
  .no-print { display: none !important; }
  .slip-body { background: #fff; padding: 0; color: #000; }
  .slip { border: 0; padding: 0; max-width: none; }
  .slip-net, .slip-days > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* table alignment: text left, money right, counts centred — header follows its column */
.dt th.num, .dt td.num { text-align: right; }
.pr thead th { text-align: right; vertical-align: bottom; }
.pr thead th.mx-emp { text-align: left; }
.pr thead th:nth-child(2), .pr thead th:nth-child(3), .pr td.mono, .pr tfoot td.mono { text-align: center; }
.pr tbody .mx-emp, .pr tfoot .mx-emp { text-align: left; }
.pr td.num, .pr tfoot td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pr thead th:last-child { text-align: center; }
.pr-st td:first-child, .pr-st th:first-child { text-align: left; }
.pr-st td.num b { display: block; }
.pr-st .pr-bar { margin-left: auto; width: 100%; max-width: 120px; }
.tr-dt td, .lv-dt td { vertical-align: top; }
@media (max-width: 760px) { .pr-st td.num { text-align: right; } }
.lb-dt th.num, .lb-dt td.num { text-align: center; }

/* pf + esic */
.ps-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 6px 18px 18px; }
.ps-card { display: grid; gap: 4px; justify-items: start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; color: var(--ink); }
.ps-card:hover { border-color: var(--line-strong); }
.ps-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.ps-k { font: 500 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ps-card b { font: 500 24px/1.15 var(--font-mono); }
.ps-card small { color: var(--muted); font-size: 12.5px; }
.ps-dl { display: inline-flex; gap: 6px; }
.ps-split { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 12px 18px; }
.ps-split > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.ps-split span { font: 500 10.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ps-split b { font: 500 18px var(--font-mono); text-align: right; }
.ps-split small { font-size: 11.5px; color: var(--muted); }
.ps-split .tot { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.ps-split .tot span, .ps-split .tot small { color: inherit; }
.ps-alerts { list-style: none; margin: 0 18px 8px; padding: 10px 12px; border-radius: 12px; background: var(--haldi-soft); color: var(--haldi-ink); display: grid; gap: 4px; font-size: 13px; }
.ps-alerts li { display: flex; gap: 6px; align-items: center; }
.ps-dt tr.ps-warn td:first-child { box-shadow: inset 3px 0 0 var(--haldi); }
.ps-f { display: block; color: var(--haldi-ink); font-size: 12px; }
.ps-dt td.mono { white-space: nowrap; }
.ps-dt tfoot th, .ps-dt tfoot td { border-top: 2px solid var(--ink); font-weight: 600; padding: 10px 12px; text-align: left; }
.ps-dt tfoot td.num { text-align: right; font-family: var(--font-mono); }
.ps-pay { display: grid; gap: 10px; margin: 12px 18px 6px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); background: var(--surface-2); }
.ps-paid { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; }
.ps-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; font-size: 13.5px; }
.ps-form label { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); }
.ps-form input[type=date], .ps-form input[type=text] { height: 36px; padding: 4px 8px; font-size: 13.5px; width: auto; }
.ps-form .num-in { width: 120px; }
.ps-reg tr.ps-cur td { background: var(--accent-soft); }
@media (max-width: 1100px) { .ps-split { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ps-cards { grid-template-columns: 1fr; } .ps-split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* pf + esic — advanced */
.ps-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ps-name { color: inherit; text-decoration: none; } .ps-name:hover b { color: var(--accent); text-decoration: underline; }
.ps-i { display: block; font-size: 12.5px; color: var(--muted); }
.ps-i.bad { color: var(--sindoor-ink); font-weight: 600; } .ps-i.warn { color: var(--haldi-ink); }
.ps-fix { display: inline-flex; gap: 3px; align-items: center; margin-top: 3px; font-size: 12.5px; font-weight: 600; }
.ps-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; padding: 12px 18px; }
.ps-task { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
.ps-task.late { border-color: var(--sindoor); box-shadow: 0 0 0 3px var(--sindoor-soft); }
.ps-task.done { opacity: .7; background: var(--surface-2); }
.ps-task header { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.ps-task ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ps-task li form { display: flex; gap: 10px; align-items: center; margin: 0; flex-wrap: wrap; }
.ps-task li form > span { display: grid; flex: 1; min-width: 140px; }
.ps-task li b { font-size: 13.5px; font-weight: 600; } .ps-task li small { font-size: 12px; color: var(--muted); }
.ps-task li.ok b { color: var(--mehendi-ink); }
.ps-tick { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.ps-tick:hover { border-color: var(--accent); }
.ps-tick.on { background: var(--mehendi); border-color: var(--mehendi); color: #fff; }
.ps-ref { height: 32px; width: 150px; padding: 4px 8px; font-size: 13px; }
.ps-card-t td, .ps-card-t th { white-space: nowrap; }

/* pf + esic — cards, challan split, alerts (redesign) */
.ps-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 8px 18px 18px; }
.ps-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "ic k chip" "v v v" "sub sub sub"; align-items: center; gap: 10px 10px;
  padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; position: relative; min-height: 128px; }
.ps-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.ps-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ps-card.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.ps-ic { grid-area: ic; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.ps-ic.t-ok { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.ps-ic.t-warn { background: var(--haldi-soft); color: var(--haldi-ink); }
.ps-ic.t-bad { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.ps-card .ps-k { grid-area: k; font: 600 13.5px var(--font-body, inherit); letter-spacing: 0; text-transform: none; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-card .chip { grid-area: chip; font-size: 11.5px; }
.ps-v { grid-area: v; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.ps-v b { font: 500 26px/1.05 var(--font-mono); letter-spacing: -.02em; white-space: nowrap; }
.ps-v em { font-style: normal; font-size: 13px; color: var(--muted); }
.ps-card small { grid-area: sub; color: var(--muted); font-size: 12.5px; line-height: 1.35; align-self: start; }
.ps-codes { font-size: 13px; color: var(--muted); }
.ps-codes a { font-weight: 600; }
/* challan split: label, amount, note — all left, total in accent */
.ps-split { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.15fr); gap: 10px; padding: 14px 18px; }
.ps-split > div { gap: 4px; padding: 12px 14px; align-content: start; background: var(--surface-2); border-color: transparent; }
.ps-split span { font: 600 11px var(--font-mono); }
.ps-split b { font: 500 20px/1.15 var(--font-mono); text-align: left; color: var(--ink); }
.ps-split small { font-size: 12px; line-height: 1.35; }
.ps-split .tot { background: var(--accent); color: var(--accent-ink); }
.ps-split .tot b { color: inherit; font-size: 24px; }
.ps-split .tot span, .ps-split .tot small { color: inherit; opacity: .85; }
/* alerts: one line, open for the list */
details.ps-alerts { display: block; margin: 0 18px 12px; padding: 0; border-radius: 12px; background: var(--haldi-soft); color: var(--haldi-ink); }
details.ps-alerts summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; font-size: 13.5px; }
details.ps-alerts summary::-webkit-details-marker { display: none; }
details.ps-alerts summary span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
details.ps-alerts summary i { font-style: normal; font-weight: 600; font-size: 12.5px; text-decoration: underline; }
details.ps-alerts[open] summary i { font-size: 0; } details.ps-alerts[open] summary i::after { content: "Hide"; font-size: 12.5px; }
details.ps-alerts ul { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 6px; }
details.ps-alerts li { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: start; padding-top: 6px; border-top: 1px dashed rgba(135,88,0,.25); font-size: 13px; }
details.ps-alerts li span { display: flex; flex-wrap: wrap; gap: 4px; }
details.ps-alerts li em { font-style: normal; padding: 1px 8px; border-radius: 99px; background: var(--surface); }
@media (max-width: 1280px) { .ps-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .ps-split { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ps-split .tot { grid-column: 1 / -1; } }
@media (max-width: 640px) { .ps-cards { grid-template-columns: 1fr 1fr; } .ps-card { min-height: 0; } .ps-v b { font-size: 21px; } details.ps-alerts li { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .ps-cards { grid-template-columns: 1fr; } }

/* smart tables */
.st-fbtn { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 3px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--muted); opacity: .35; cursor: pointer; vertical-align: middle; }
th:hover .st-fbtn, .st-fbtn:focus-visible { opacity: 1; }
th.st-filtered .st-fbtn { opacity: 1; background: var(--accent); color: var(--accent-ink); }
th.st-filtered { color: var(--accent); }
.st-hid { display: none !important; }
.st-fl { display: inline-flex; gap: 6px; align-items: center; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.st-fl[hidden] { display: none; }
.st-clear { border: 0; background: var(--surface); color: var(--accent); border-radius: 99px; padding: 2px 9px; font-weight: 600; font-size: 12px; cursor: pointer; }
.st-pop { position: absolute; z-index: 80; width: 260px; padding: 12px; display: grid; gap: 8px; border-radius: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 13px; }
.st-pop > b { font-size: 13.5px; }
.st-pop input[type=search], .st-pop input[type=number] { height: 34px; padding: 4px 9px; font-size: 13px; width: 100%; }
.st-rng { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-rng label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.st-chk { display: flex; gap: 6px; align-items: center; font-size: 12.5px; }
.st-all { display: flex; gap: 10px; }
.st-all button { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.st-vals { max-height: 240px; overflow: auto; display: grid; gap: 1px; margin: 0 -4px; }
.st-vals label { display: flex; gap: 8px; align-items: center; padding: 4px; border-radius: 6px; cursor: pointer; }
.st-vals label[hidden] { display: none; }
.st-vals label:hover { background: var(--surface-2); }
.st-vals span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-vals em { font-style: normal; font: 500 11px var(--font-mono); color: var(--muted); }
.st-pop input[type=checkbox] { accent-color: var(--accent); }
.st-pf { display: flex; justify-content: flex-end; gap: 6px; }
.st-ok { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 18px 8px; font-size: 12.5px; }
.st-count { color: var(--muted); font: 500 12px var(--font-mono); }
.st-sp { flex: 1; }
.st-btn { font: 600 12.5px var(--font-body, inherit); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.st-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.st-btn[aria-pressed=true], .st-btn[aria-expanded=true] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.st-dd { position: relative; }
.st-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; max-height: 320px; overflow: auto; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 2px; }
.st-menu[hidden] { display: none; }
.st-menu label { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.st-menu label:hover { background: var(--surface-2); }
.st-menu input { accent-color: var(--accent); }
.st-reset { margin-top: 4px; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 12.5px; text-align: left; padding: 5px 8px; cursor: pointer; }
.st-off { display: none !important; }
th.st-sort { cursor: pointer; user-select: none; position: relative; }
th.st-sort:hover { color: var(--ink); }
th.st-sort::after { content: "↕"; margin-left: 4px; opacity: 0; font-size: 10px; }
th.st-sort:hover::after { opacity: .5; }
th.st-sort[aria-sort=ascending]::after { content: "▲"; opacity: 1; color: var(--accent); }
th.st-sort[aria-sort=descending]::after { content: "▼"; opacity: 1; color: var(--accent); }
th.st-sort[aria-sort] { color: var(--accent); }
th.st-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.table-wrap.st-scroll { max-height: min(70vh, 760px); overflow: auto; }
.table-wrap.st-scroll thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
.table-wrap.st-scroll tfoot th, .table-wrap.st-scroll tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); }
table.st-dense td, table.st-dense th { padding-top: 5px !important; padding-bottom: 5px !important; }
table.st-dense small { font-size: 11.5px; }
.dt tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.dt tbody tr:hover td { background: var(--surface-2); }
@media (max-width: 760px) { .st-bar { padding-inline: 8px; } .st-bar [data-st=dense] { display: none; } .table-wrap.st-scroll { max-height: none; } }
/* pf + esic cards: status sits under the line, label never cut */
.ps-card { grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "ic k" "v v" "sub sub" "chip chip"; gap: 8px 10px; }
.ps-card .chip { justify-self: start; align-self: end; }
.ps-card small { min-height: 2.7em; }
/* first column of report tables: name on one line */
.ps-dt td:first-child, .ps-dt th:first-child { min-width: 230px; }
.ps-dt td:first-child b { white-space: nowrap; }
.ps-dt td:first-child small.muted { white-space: nowrap; }
.ps-dt th, .ps-dt td { padding-left: 8px; padding-right: 8px; }
.ps-dt th { letter-spacing: .03em; }
.ps-dt td:first-child, .ps-dt th:first-child { min-width: 205px; padding-left: 12px; }
.ps-dt td.num { font-size: 13px; }
@media (max-width: 640px) {
  .ps-cards { grid-template-columns: 1fr 1fr; gap: 8px; padding-inline: 12px; }
  .ps-cards .ps-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ps-card { padding: 12px; gap: 6px 8px; grid-template-columns: 30px minmax(0, 1fr); }
  .ps-ic { width: 30px; height: 30px; }
  .ps-card small { min-height: 0; }
  .tile-h { flex-wrap: wrap; }
  .tile-h .ps-dl { margin-left: 0; width: 100%; }
  .ps-dt td:first-child { display: block; text-align: left; min-width: 0; }
  .ps-dt td:first-child::before { content: none; }
  .ps-dt td:first-child .ps-f { text-align: left; }
}
@media (max-width: 420px) { .ps-cards { grid-template-columns: 1fr 1fr; } }
.rs-ow { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; width: auto; }
.rs-ow input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); }

/* column filter popup — condition + values */
.st-pop { width: 300px; gap: 10px; max-height: min(78vh, 620px); overflow: auto; }
.st-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.st-ph span { font-size: 11.5px; color: var(--muted); }
.st-sec { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.st-lbl { display: flex; justify-content: space-between; font: 600 10.5px var(--font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.st-lbl em { font-style: normal; letter-spacing: 0; text-transform: none; }
.st-cond { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-cond[hidden] { display: none; }
.st-cond select { grid-column: 1 / -1; height: 34px; padding: 0 28px 0 8px; font-size: 13px; }
.st-cond input { height: 34px; padding: 4px 8px; font-size: 13px; width: 100%; }
.st-cond input { grid-column: 1 / -1; }
.st-cond.bt input { grid-column: auto; }
.st-cond input[hidden] { display: none; }
.st-join { display: flex; gap: 14px; font-size: 12.5px; font-weight: 600; }
.st-join[hidden] { display: none; }
.st-join label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.st-join input { accent-color: var(--accent); }
.st-allck { display: flex; gap: 8px; align-items: center; padding: 4px; border-bottom: 1px dashed var(--line); cursor: pointer; font-size: 13px; }
.st-allck input { accent-color: var(--accent); }
.st-vals { max-height: 220px; }
/* filter box: checkbox + value on the left, count on the right */
.st-pop label { text-align: left; }
.st-pop input[type=checkbox], .st-pop input[type=radio] { width: 16px; height: 16px; min-width: 16px; margin: 0; padding: 0; flex: none; box-shadow: none; }
.st-vals label, .st-allck { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: center; justify-items: start; }
.st-vals label span { justify-self: stretch; text-align: left; color: var(--ink); font-size: 13px; }
.st-vals label em { justify-self: end; }
.st-allck b { justify-self: start; }
.st-join label { justify-content: flex-start; }
/* Columns menu: checkbox fixed size, names left-aligned (global input width:100% was centring them) */
.st-menu label { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; justify-items: start; text-align: left; font-weight: 500; }
.st-menu input[type=checkbox] { width: 16px; height: 16px; min-width: 16px; margin: 0; padding: 0; flex: none; box-shadow: none; }
.st-menu .st-reset { justify-self: start; }

/* salary advance */
.ad-sum { grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 16px; }
.ad-prog { display: block; width: 100%; max-width: 180px; height: 6px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; margin-bottom: 4px; }
.ad-prog i { display: block; height: 100%; background: var(--mehendi); border-radius: 6px; }
.ad-prog.lg { max-width: none; height: 8px; }
.ad-dt td[data-label=Recovery] small { display: block; font-size: 12px; color: var(--muted); }
.ad-dt td.num b { font-family: var(--font-mono); }
.ad-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding: 14px 18px; }
.ad-month { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ad-month.now { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-month header { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--surface-2); }
.ad-mt { margin-left: auto; font: 600 15px var(--font-mono); }
.ad-month ul { list-style: none; margin: 0; padding: 4px 0; }
.ad-month li a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 12px; text-decoration: none; color: inherit; font-size: 13.5px; }
.ad-month li a:hover { background: var(--surface-2); }
.ad-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ad-big > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.ad-big small { font: 500 10.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ad-big b { font: 500 20px var(--font-mono); }
.ad-led td, .ad-led th { padding: 7px 8px; font-size: 13px; }
.ad-led tr.planned td { color: var(--muted); }
.ad-led tr.skipped td { color: var(--haldi-ink); }
.ad-acts { display: grid; gap: 8px; }
.ad-acts form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.ad-acts input[type=text] { flex: 1 1 160px; height: 34px; padding: 4px 8px; font-size: 13px; }
.ad-pay { display: grid; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent-soft); }
.ad-dec { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; margin: 0; }
.ad-dec input[type=text] { flex: 1 1 200px; height: 36px; padding: 4px 10px; font-size: 13.5px; }
@media (max-width: 1100px) { .ad-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ad-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ad-big { grid-template-columns: 1fr; } }
/* drawer body: children keep their full height (tables were squeezed and cut) */
.drawer-b { grid-auto-rows: max-content; }
.drawer-b > .table-wrap { overflow-y: visible; }
@media (max-width: 760px) {
  .ad-dt td:first-child { display: block; text-align: left; }
  .ad-dt td:first-child::before { content: none; }
  .ad-dt td { flex-wrap: wrap; align-items: center; }
  .ad-dt td > .chip + small, .ad-dt td > b + small { flex-basis: 100%; text-align: right; }
  .dt td .pchips { justify-content: flex-end; min-width: 0; }
  .dt td .pchips .chip { white-space: normal; text-align: left; }
}

/* pay mode */
.pm-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 18px; }
.pm-to b { display: block; font-size: 13.5px; } .pm-to small { color: var(--muted); font-size: 12px; }
.pm-ver { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.pm-ver small { font-size: 12px; color: var(--muted); }
.pm-split { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.15fr); }
.pm-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; padding: 4px 18px 12px; }
.pm-g { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.pm-g .ld-h { margin: 0; }
.pm-g ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pm-g li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; }
.pm-g li .ad-prog { grid-column: 1 / -1; max-width: none; margin: 0; }
.pm-g li > span:nth-child(2) { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }
.pm-bar { position: sticky; bottom: 10px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 18px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-lg); }
.pm-bar[hidden] { display: none; }
.pm-bar select, .pm-bar input { height: 34px; padding: 2px 8px; font-size: 13px; width: auto; }
.pm-bar input[type=text] { flex: 1 1 140px; }
@media (max-width: 1100px) { .pm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pm-split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pm-dt td:first-child { display: block; text-align: left; } .pm-dt td:first-child::before { content: none; } }
.pm-g li > .chip { justify-self: start; }
.pm-g li > .btn, .pm-g li > small { justify-self: end; }

/* ---------- targets ---------- */
.tg-stores { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.tg-store { display: grid; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; color: var(--ink-2); line-height: 1.2; }
.tg-store b { font: 600 13px var(--font-mono); } .tg-store span { font-size: 12px; color: var(--muted); }
.tg-store.is-on { border-color: var(--mehendi); background: var(--mehendi-soft); color: var(--mehendi-ink); box-shadow: inset 0 0 0 1px var(--mehendi); }
.tg-sum { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tg-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 18px 16px; }
.tg-flow-l { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tg-flow-l .muted { display: inline-flex; gap: 5px; align-items: center; }
.tg-flow-r { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tg-flow-r input { width: 220px; height: 36px; padding: 6px 10px; font-size: 13.5px; }
.tg-form { display: grid; gap: 14px; margin-top: 14px; }
.tg-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.tg-card { padding: 16px 18px; display: grid; gap: 10px; align-content: start; }
.tg-k { font: 500 11.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tg-card .fld.wide, .tg-sales .fld.wide { grid-column: 1 / -1; }
.tg-slab th, .tg-slab td { padding: 6px 8px; }
.tg-slab .tg-w td { border-bottom: 0; }
.tg-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.tg-row .fld { flex: 1 1 260px; }
.tg-check { font-size: 13.5px; padding: 6px 10px; border-radius: 8px; width: fit-content; }
.tg-check:empty { display: none; }
.tg-check.ok { color: var(--mehendi-ink); background: var(--mehendi-soft); }
.tg-check.bad { color: var(--sindoor-ink); background: var(--sindoor-soft); }
.tg-dept { padding: 16px 18px; display: grid; gap: 8px; scroll-margin-top: 80px; }
.tg-dh { display: grid; grid-template-columns: 1fr 170px 170px auto; gap: 10px; align-items: end; }
.tg-dh h2 { font: 400 24px var(--font-display); align-self: center; }
.tg-dh .fld > label { font-size: 12.5px; color: var(--muted); }
.tg-dh select, .tg-dh input { height: 40px; padding: 6px 10px; }
.tg-sms { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin-top: 4px; }
.tg-sm { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; background: var(--surface); border-left: 4px solid var(--sindoor-soft); }
.tg-sm.is-ok { border-left-color: var(--mehendi); }
.tg-sm > header { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.tg-sm > header small { display: block; font-size: 12px; color: var(--muted); }
.tg-inc { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tg-inc.ok { color: var(--mehendi-ink); } .tg-inc.no { color: var(--sindoor-ink); }
.tg-in3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tg-in3 label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.tg-in3 input { height: 38px; padding: 6px 8px; font-size: 14px; }
.tg-in3 input.is-man { border-color: var(--haldi); background: var(--haldi-soft); }
.tg-in3 input:disabled { background: var(--surface-2); color: var(--ink-2); }
.tg-line { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.tg-line span { margin-left: 6px; }
.tg-save { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.tg-save .dirty { color: var(--haldi-ink); font-weight: 600; }
.tg-bar { display: inline-block; width: 90px; height: 7px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; vertical-align: middle; margin-right: 8px; }
.tg-bar i { display: block; height: 100%; background: var(--haldi); }
.tg-bar.ok i { background: var(--mehendi); }
.tg-h2 { padding: 16px 18px 4px; }
.tg-board td small { display: block; font-size: 12px; color: var(--muted); }
.tg-sales { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 14px; padding: 14px 18px 18px; align-items: start; }
.tg-sales-f { display: grid; gap: 14px; }
.tg-sales .tile { box-shadow: none; }
.tg-pre { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font: 12px var(--font-mono); overflow-x: auto; }
.tg-now td { background: var(--accent-soft); }
.tg-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.tg-recent li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.tg-rules { gap: 16px; }
.tg-rset { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.tg-chk { display: flex; gap: 8px; align-items: center; font-size: 14px; padding-bottom: 10px; }
.tg-chk input { width: auto; }
.tg-slabs input { height: 38px; padding: 6px 8px; min-width: 80px; }
.tg-ra { justify-content: space-between; }
.tg-ex { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 1100px) { .tg-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tg-rset { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .tg-top, .tg-sales { grid-template-columns: minmax(0, 1fr); }
  .tg-dh { grid-template-columns: 1fr 1fr; } .tg-dh h2 { grid-column: 1 / -1; } .tg-dh .btn { grid-column: 1 / -1; }
  .tg-stores { margin-left: 0; }
}
@media (max-width: 560px) {
  .tg-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-sms { grid-template-columns: minmax(0, 1fr); }
  .tg-flow-r input { width: 100%; }
  .tg-save { flex-direction: column; align-items: stretch; }
  .tg-rset { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- sales + target incentive ---------- */
.in-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.in-dt th small { display: block; font-size: 10px; color: var(--muted); }
.in-dt td small.lv-who { display: block; }
.in-dt .emp-cell .chip { margin-top: 3px; font-size: 11px; }
.in-dt tfoot th, .in-dt tfoot td { padding: 11px 12px; border-top: 2px solid var(--ink); font-weight: 600; text-align: right; }
.in-dt tfoot th { text-align: left; }
.in-calc { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; background: var(--surface-2); }
.in-calc ul { list-style: none; margin: 0; padding: 0; }
.in-calc li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.in-calc li small { display: block; color: var(--muted); font-size: 12.5px; }
.in-calc li > b { font-size: 16px; }
.in-calc li.neg > b { color: var(--sindoor-ink); }
.in-calc li.tot { border-top: 2px solid var(--ink); }
.in-calc li.tot > b { font-size: 19px; color: var(--mehendi-ink); }
.in-adj { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.in-adj li { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.in-adj .icon-btn { width: 30px; height: 30px; }
.in-adjf { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; }
.in-adjf input { height: 38px; padding: 6px 10px; font-size: 14px; }
.in-rset { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tg-rules select, .tg-rules td input { height: 38px; padding: 6px 10px; font-size: 14px; max-width: 200px; }
@media (max-width: 1100px) { .in-rset { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .in-steps, .in-rset { grid-template-columns: minmax(0, 1fr); } .in-adjf { grid-template-columns: 1fr; } }

/* ---------- bonus ---------- */
.bn-due { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.bn-pay { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 18px 16px; }
.bn-pay input { width: auto; height: 36px; padding: 6px 10px; font-size: 13.5px; }
.bn-rate { display: flex; gap: 14px; align-items: center; }
.bn-rate input[type=range] { flex: 1; padding: 0; border: 0; box-shadow: none; accent-color: var(--accent); }
.bn-rate label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.bn-rate input[type=number] { width: 96px; font-size: 18px; }
.bn-law { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink-2); }
.bn-adv { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 6px; border-top: 1px dashed var(--line); }
.bn-adv label { display: inline-flex; gap: 6px; align-items: center; }
.bn-adv input { width: 70px; height: 34px; padding: 4px 8px; }
.bn-dt td small.lv-who { display: block; }
.bn-dt .emp-cell .chip { margin: 3px 4px 0 0; font-size: 11px; }
.bn-in { width: 100px; height: 36px; padding: 4px 8px; font-size: 14px; text-align: right; }
.bn-dq input { width: 18px; height: 18px; }
.bn-reason { margin-top: 4px; height: 32px; padding: 4px 8px; font-size: 12.5px; min-width: 150px; }
.bn-dt tfoot th, .bn-dt tfoot td { padding: 11px 12px; border-top: 2px solid var(--ink); font-weight: 600; text-align: right; }
.bn-dt tfoot th { text-align: left; }

/* ---------- compliance calendar ---------- */
.cc-wrap { gap: 10px; }
.cc-h { display: flex; gap: 8px; align-items: center; font-size: 15px; margin-top: 8px; }
.cc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cc-item { display: grid; grid-template-columns: 54px 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); border-left: 4px solid var(--line-strong); }
.cc-item.st-overdue { border-left-color: var(--sindoor); background: var(--sindoor-soft); }
.cc-item.st-soon { border-left-color: var(--haldi); }
.cc-item.st-done { border-left-color: var(--mehendi); }
.cc-item.st-late { border-left-color: var(--haldi); }
.cc-item.st-info { border-left-color: var(--accent); }
.cc-done .cc-item { opacity: .85; }
.cc-date { display: grid; justify-items: center; line-height: 1.05; padding: 4px 0; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.cc-date b { font: 500 20px var(--font-mono); } .cc-date span { font-size: 12px; font-weight: 600; text-transform: uppercase; } .cc-date small { font-size: 10.5px; color: var(--muted); }
.cc-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.cc-body { display: grid; gap: 2px; min-width: 0; }
.cc-body small { font-size: 12.5px; color: var(--muted); } .cc-body small.ok-t { color: var(--mehendi-ink); } .cc-body small.bad-t { color: var(--sindoor-ink); display: inline-flex; gap: 4px; align-items: center; }
.cc-cat { font-size: 10.5px; padding: 1px 7px; vertical-align: 2px; }
.cc-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.cc-act .icon-btn { width: 30px; height: 30px; }
.cc-legend { display: inline-flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; margin-left: auto; color: var(--muted); }
.cc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -6px; }
.cc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 6px 18px 12px; }
.cc-wd { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 6px; }
.cc-day { min-height: 104px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 3px; background: var(--surface); min-width: 0; }
.cc-day.out { background: var(--surface-2); opacity: .6; }
.cc-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cc-dn { font: 500 12.5px var(--font-mono); color: var(--muted); }
.cc-day.today .cc-dn { color: var(--accent); font-weight: 700; }
.cc-ev { display: block; width: 100%; text-align: left; font: 600 11.5px/1.25 var(--font-body); padding: 3px 6px; border-radius: 6px; border: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
button.cc-ev { cursor: pointer; }
.cc-ev.st-overdue, .cc-legend .st-overdue { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.cc-legend .st-overdue { background: var(--sindoor); }
.cc-ev.st-soon { background: var(--haldi-soft); color: var(--haldi-ink); } .cc-legend .st-soon { background: var(--haldi); }
.cc-ev.st-upcoming { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); } .cc-legend .st-upcoming { background: var(--line-strong); }
.cc-ev.st-done, .cc-ev.st-late { background: var(--mehendi-soft); color: var(--mehendi-ink); } .cc-legend .st-done { background: var(--mehendi); }
.cc-ev.st-info { background: var(--accent-soft); color: var(--accent); } .cc-legend .st-info { background: var(--accent); }
.cc-rules input[type=text], .cc-rules input[type=number] { height: 36px; padding: 4px 8px; font-size: 13.5px; }
.cc-rules input[type=number] { width: 70px; } .cc-rules input[type=checkbox] { width: 18px; height: 18px; }
.cc-rules small.lv-who { display: block; }
.cc-off td { opacity: .55; }
.cc-new { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 10px; }
.cc-newg { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .cc-newg { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cc-day { min-height: 70px; } .cc-ev { font-size: 10.5px; padding: 2px 4px; } }
@media (max-width: 560px) {
  .cc-item { grid-template-columns: 50px 1fr; } .cc-ic { display: none; } .cc-act { grid-column: 1 / -1; justify-content: flex-start; }
  .cc-cal { padding-inline: 8px; gap: 2px; } .cc-wd { font-size: 9px; padding: 2px; } .cc-day { padding: 3px; }
  .cc-newg { grid-template-columns: minmax(0, 1fr); }
}
.cc-start { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .cc-start input { width: auto; height: 36px; padding: 4px 8px; }

/* ---------- recruitment ---------- */
.rc-sum { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.rc-sum a.as { text-decoration: none; color: inherit; }
.rc-sum a.as:hover { border-color: var(--accent); }
.rc-sum2 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rc-ov { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding: 8px 18px 18px; align-items: start; }
.rc-col { display: grid; gap: 10px; min-width: 0; align-content: start; }
.rc-agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rc-agenda a, .rc-agenda .rc-li { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: var(--surface); }
.rc-agenda a:hover { border-color: var(--accent); }
.rc-agenda time { display: grid; justify-items: center; line-height: 1.1; padding: 4px; border-radius: 9px; background: var(--surface-2); }
.rc-agenda time b { font: 500 15px var(--font-mono); }
.rc-agenda time small { font-size: 10.5px; color: var(--muted); }
.rc-agenda span small { display: block; font-size: 12.5px; color: var(--muted); }
.rc-mini, .rc-funnel { display: grid; gap: 6px; }
.rc-mini a, .rc-funnel div { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; text-decoration: none; color: inherit; font-size: 13.5px; }
.rc-funnel div { grid-template-columns: 110px 1fr 40px 40px; }
.rc-mini i, .rc-funnel i { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); min-width: 2px; }
.rc-mini b, .rc-funnel b { font: 500 14px var(--font-mono); text-align: right; }
.rc-funnel small { color: var(--muted); font: 12px var(--font-mono); }
.rc-sel { width: auto; height: 40px; padding: 0 30px 0 10px; font-size: 14px; max-width: 260px; }
.rc-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 10px; overflow-x: auto; padding: 4px 18px 18px; }
.rc-lane { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 240px; transition: background .15s, border-color .15s; }
.rc-lane > header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px; font-size: 13.5px; }
.rc-lane[data-drop="0"] > header b::after { content: " · lock"; font-size: 11px; color: var(--muted); font-weight: 400; }
.rc-lane.is-over { border-color: var(--accent); background: var(--accent-soft); }
.rc-card { display: grid; gap: 3px; padding: 9px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); cursor: grab; }
.rc-card:hover { border-color: var(--accent); }
.rc-card.is-drag { opacity: .5; }
.rc-card small { font-size: 12px; color: var(--muted); }
.rc-cn { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.rc-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.rc-when { display: inline-flex; gap: 4px; align-items: center; color: var(--accent) !important; font-weight: 600; }
.rc-score { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 7px; font: 600 12px var(--font-mono); background: var(--surface-2); border: 1px solid var(--line); }
.rc-score.ok { background: var(--mehendi-soft); color: var(--mehendi-ink); border-color: transparent; }
.rc-score.mid { background: var(--haldi-soft); color: var(--haldi-ink); border-color: transparent; }
.rc-score.low { background: var(--sindoor-soft); color: var(--sindoor-ink); border-color: transparent; }
.rc-filters .search-in { flex: 1 1 260px; }
.rc-bulkbar { position: sticky; top: 64px; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 18px 8px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent); }
.rc-bulkbar select, .rc-bulkbar input { width: auto; height: 36px; padding: 4px 8px; font-size: 13.5px; }
.rc-dt td small.lv-who { display: block; }
.rc-dt .emp-cell .chip { display: inline-block; margin-top: 3px; font-size: 11px; }
.rc-dt input[type=checkbox] { width: 18px; height: 18px; }
.rc-wa { color: #1f9d55; }
.rc-hc input { width: 64px; height: 34px; padding: 4px 6px; text-align: right; }
.rc-hcc small { display: block; font: 11.5px var(--font-mono); color: var(--muted); }
.rc-hcc.gap { background: var(--haldi-soft); }
.rc-hcc.over { background: var(--sindoor-soft); }
.rc-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.rc-key.gap { background: var(--haldi); }
.rc-key.over { background: var(--sindoor); }
.rc-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.rc-dl div.wide { grid-column: 1 / -1; }
.rc-dl dt { font-size: 12px; color: var(--muted); }
.rc-dl dd { margin: 0; font-size: 14px; }
.rc-inl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rc-inl input, .rc-inl select { width: auto; flex: 1 1 140px; height: 36px; padding: 4px 8px; font-size: 13.5px; }
.rc-inl input[type=file] { padding: 5px; }
.rc-drawer .drawer-b { gap: 12px; }
.rc-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 8px; align-items: stretch; }
.rc-gauge { display: grid; justify-items: center; align-content: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); line-height: 1.1; }
.rc-gauge b { font: 500 20px var(--font-mono); }
.rc-gauge small { font-size: 11px; color: var(--muted); }
.rc-gauge.ok { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.rc-gauge.mid { background: var(--haldi-soft); color: var(--haldi-ink); }
.rc-gauge.low { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.rc-wa-dd { position: relative; align-self: center; }
.rc-wa-dd summary { list-style: none; cursor: pointer; }
.rc-wa-dd summary::-webkit-details-marker { display: none; }
.rc-wa-dd > div { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; display: grid; min-width: 190px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.rc-wa-dd a { padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 13.5px; }
.rc-wa-dd a:hover { background: var(--surface-2); }
.rc-warn { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--haldi-soft); color: var(--haldi-ink); font-size: 13.5px; }
.rc-warn p { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rc-move { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.rc-move input { width: auto; flex: 1 1 150px; height: 34px; padding: 4px 8px; font-size: 13px; }
.rc-sec { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--surface); }
.rc-sec[open] { padding-bottom: 14px; }
.rc-sec > summary { cursor: pointer; padding: 12px 0; font-weight: 700; display: flex; gap: 8px; align-items: center; list-style: none; }
.rc-sec > summary::before { content: "\25B8"; color: var(--muted); transition: transform .15s; }
.rc-sec[open] > summary::before { transform: rotate(90deg); }
.rc-sec > summary::-webkit-details-marker { display: none; }
.rc-sec form { display: grid; gap: 10px; }
.rc-sec form.rc-inl { display: flex; }
.rc-sub { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 8px; }
.rc-sub > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.rc-fg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.rc-fg .fld > label { font-size: 12.5px; }
.rc-fg input, .rc-fg select, .rc-fg textarea { font-size: 14px; padding: 8px 10px; }
.rc-fa { flex-wrap: wrap; justify-content: flex-end; }
.rc-scores { display: grid; gap: 6px; }
.rc-sr { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.rc-stars { display: inline-flex; gap: 4px; }
.rc-stars label { position: relative; }
.rc-stars input { position: absolute; opacity: 0; inset: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; }
.rc-stars span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-strong); font: 600 13px var(--font-mono); color: var(--muted); }
.rc-stars input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rc-stars input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rc-pay { font-weight: 600; }
.rc-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rc-links a { display: inline-flex; gap: 4px; align-items: center; }
.rc-check { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 13.5px; }
.rc-check li { color: var(--muted); }
.rc-check li.ok { color: var(--mehendi-ink); }
.rc-check li.need { color: var(--sindoor-ink); font-weight: 600; }
.rc-ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.rc-ticks .tg-chk { padding-bottom: 2px; font-size: 13.5px; }
.rc-convert { display: flex !important; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--mehendi-soft); }
.rc-convert input[name=force_note] { width: auto; flex: 1 1 180px; height: 36px; padding: 4px 8px; }
.rc-docs { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.rc-docs li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.rc-docs a { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.rc-docs small { color: var(--muted); font-size: 12px; }
.rc-docs form { display: flex !important; gap: 4px; }
.rc-docs .icon-btn { width: 30px; height: 30px; }
.rc-tl li b { font-weight: 500; }
.rc-dlg { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
.rc-dlg-wide { width: min(780px, calc(100vw - 24px)); }
.rc-dlg form { max-height: calc(100vh - 40px); overflow-y: auto; }
/* offer letter + poster (print) */
.ol-body { background: var(--bg-2); }
.ol { max-width: 800px; margin: 16px auto; background: #fff; color: #161A2E; padding: 0 44px 40px; border-radius: 6px; box-shadow: var(--shadow-md); display: grid; gap: 14px; font-size: 15px; }
.ol .paar { margin: 0 -44px 6px; }
.ol-h { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #161A2E; padding-bottom: 12px; }
.ol-h h1 { font-size: 26px; }
.ol-h p { font-size: 12.5px; color: #555; }
.ol-no { display: grid; justify-items: end; text-align: right; font-size: 13px; }
.ol-t { border-collapse: collapse; width: 100%; }
.ol-t th, .ol-t td { border: 1px solid #ccd; padding: 7px 10px; text-align: left; }
.ol-t th { width: 40%; background: #f4f5fa; font-weight: 600; }
.ol-pay th { width: auto; }
.ol-pay .num { text-align: right; font-family: var(--font-mono); }
.ol-pay .tot td { font-weight: 700; border-top: 2px solid #161A2E; }
.ol-small { font-size: 13px; color: #444; }
.ol-h2 { font-size: 16px; margin-top: 6px; }
.ol-terms { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.ol-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 24px; }
.ol-line { margin-top: 40px; border-top: 1px solid #161A2E; padding-top: 4px; font-size: 13px; }
.ol-esign { margin-top: 18px; font: 400 22px "Rozha One", Georgia, serif; color: #315C16; }
.ol-esign small { display: block; font: 12px var(--font-body); color: #555; }
.ol-act { border-top: 2px dashed #ccd; padding-top: 16px; display: grid; gap: 10px; }
.ol-form { display: grid; gap: 10px; padding: 16px; border-radius: 12px; background: #f4f5fa; }
.ol-form .fld span { font-size: 13px; font-weight: 600; }
.ol-decl summary { cursor: pointer; color: #6A6F86; font-size: 14px; }
.ol-decl form { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ol-decl input { flex: 1 1 200px; }
.qp { max-width: 640px; margin: 16px auto; background: #fff; color: #161A2E; text-align: center; padding: 0 40px 36px; border-radius: 6px; display: grid; gap: 10px; justify-items: center; }
.qp .paar { margin: 0 -40px 10px; width: calc(100% + 80px); }
.qp-co { font: 600 16px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: #3340A8; }
.qp h1 { font: 400 54px/1 "Rozha One", Georgia, serif; }
.qp-store { font-size: 20px; font-weight: 600; }
.qp-roles { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.qp-roles li { padding: 6px 14px; border-radius: 99px; background: #FCF1D8; color: #875800; font-weight: 700; font-size: 17px; }
.qp-qr { width: 300px; height: 300px; }
.qp-qr svg { width: 100%; height: 100%; }
.qp-how { font-size: 18px; }
.qp-url { font-size: 12px; color: #6A6F86; word-break: break-all; }
.qp-foot { font-size: 15px; color: #3A3F57; }
@media print { .no-print, .slip-bar { display: none !important; } body { background: #fff !important; } .ol, .qp { box-shadow: none; margin: 0 auto; } }
/* public candidate pages */
.pub { max-width: 560px; margin: 0 auto; display: grid; gap: 12px; }
.pub h1 { font-size: 30px; }
.pub-form { display: grid; gap: 12px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pub-form h2 { font-size: 15px; margin-top: 6px; color: var(--accent); }
.pub-form .fld span { font-size: 13.5px; font-weight: 600; }
.pub-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pub-langs { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pub-langs legend { font-size: 13.5px; font-weight: 600; }
.pub-langs label { display: inline-flex; gap: 5px; align-items: center; }
.pub-langs input { width: auto; }
.pub-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pub-btn { width: 100%; justify-content: center; padding: 14px; font-size: 17px; }
.pub-ok { display: grid; gap: 6px; padding: 18px; border-radius: 14px; background: var(--mehendi-soft); color: var(--mehendi-ink); }
.pub-file input { padding: 8px; }
@media (max-width: 1100px) { .rc-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } .rc-sum2 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .rc-ov { grid-template-columns: minmax(0, 1fr); } .rc-top { grid-template-columns: repeat(4, minmax(0, 1fr)); } .rc-wa-dd { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .rc-sum, .rc-sum2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-fg, .rc-ticks, .rc-check, .rc-dl, .pub-2 { grid-template-columns: minmax(0, 1fr); }
  .rc-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-board { grid-auto-columns: 82%; padding-inline: 8px; }
  .ol { padding: 0 18px 24px; }
  .ol .paar { margin-inline: -18px; }
  .ol-h, .ol-sign { grid-template-columns: 1fr; display: grid; }
  .qp h1 { font-size: 40px; }
  .qp-qr { width: 240px; height: 240px; }
}

/* ---------- performance ---------- */
.pf-sum { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pf-sum a.as { text-decoration: none; color: inherit; }
.pf-sum a.as:hover { border-color: var(--accent); }
.pf-sum2 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pf-kpis { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-k { font-size: 11.5px; padding: 2px 7px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pf-k b { font: 600 11.5px var(--font-mono); }
.pf-k.ok { background: var(--mehendi-soft); border-color: transparent; color: var(--mehendi-ink); }
.pf-k.mid { background: var(--haldi-soft); border-color: transparent; color: var(--haldi-ink); }
.pf-k.low { background: var(--sindoor-soft); border-color: transparent; color: var(--sindoor-ink); }
.pf-dt td small.lv-who { display: block; }
.pf-bar { display: block; width: 110px; height: 7px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin-bottom: 4px; }
.pf-bar.sm { display: inline-block; width: 70px; vertical-align: middle; margin: 0 6px 0 0; }
.pf-bar i { display: block; height: 100%; background: var(--line-strong); }
.pf-bar i.chip-ok { background: var(--mehendi); }
.pf-bar i.chip-acc { background: var(--accent); }
.pf-bar i.chip-warn { background: var(--haldi); }
.pf-bar i.chip-bad { background: var(--sindoor); }
.pf-rank { margin: 0; padding: 0 0 0 22px; display: grid; gap: 4px; }
.pf-rank a { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; background: var(--surface); }
.pf-rank a:hover { border-color: var(--accent); }
.pf-rank small { display: block; font-size: 12px; color: var(--muted); }
.pf-9 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pf-cell { border-radius: 12px; padding: 8px 10px; min-height: 108px; display: grid; align-content: start; gap: 4px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; position: relative; }
.pf-cell > b { font-size: 12px; padding-right: 30px; }
.pf-cell > .chip { position: absolute; right: 8px; top: 8px; font-size: 11px; }
.pf-cell ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 3px 8px; }
.pf-cell li { display: inline-flex; gap: 3px; align-items: baseline; }
.pf-cell li a { text-decoration: none; font-weight: 600; }
.pf-cell li small { font: 10.5px var(--font-mono); color: var(--muted); }
.pf-cell.p3f3, .pf-cell.p3f2, .pf-cell.p2f3 { background: var(--mehendi-soft); }
.pf-cell.p1f1 { background: var(--sindoor-soft); }
.pf-cell.p2f1, .pf-cell.p1f2 { background: var(--haldi-soft); }
.pf-prob { display: grid; gap: 6px; min-width: 260px; }
.pf-prob input, .pf-prob select { height: 34px; padding: 4px 8px; font-size: 13px; width: auto; }
.pf-prob > input { width: 100%; }
.pf-prob-r { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface); margin: 0; }
.pf-box legend { padding: 0 6px; }
.pf-matrix { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-matrix span { padding: 3px 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.pf-acts { display: grid; gap: 4px; justify-items: end; }
.pf-acts .rc-inl input { flex: 0 1 110px; }
.pf-pct { max-width: 70px; }
.pf-pip { border: 1px solid var(--line); border-left: 4px solid var(--haldi); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; background: var(--surface); }
.pf-pip.st-passed { border-left-color: var(--mehendi); }
.pf-pip.st-failed { border-left-color: var(--sindoor); }
.pf-pip.st-cancelled { opacity: .7; border-left-color: var(--line-strong); }
.pf-pip header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-goals { margin: 0; padding-left: 18px; font-size: 13.5px; }
.pf-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pf-feed li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pf-feed li.k-praise { border-left: 4px solid var(--mehendi); }
.pf-feed li.k-coaching { border-left: 4px solid var(--accent); }
.pf-feed li.k-concern { border-left: 4px solid var(--haldi); }
.pf-feed p { margin: 2px 0; font-size: 14px; }
.pf-feed small { color: var(--muted); font-size: 12px; }
.pf-feed.sm li { padding: 8px 10px; }
.pf-tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.pf-tt th, .pf-tt td { padding: 4px 6px; }
.pf-tt input { width: 70px; height: 32px; padding: 3px 6px; font-size: 13px; text-align: right; }
.pf-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 14px; }
.pf-map label { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13.5px; }
.pf-map select { width: auto; height: 34px; padding: 3px 8px; font-size: 13px; }
.pf-drawer .drawer-b { gap: 12px; }
.pf-head { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; }
.pf-big { display: grid; justify-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); line-height: 1.15; }
.pf-big b { font: 500 38px var(--font-mono); }
.pf-big span { font-weight: 700; }
.pf-big small { font-size: 11px; color: var(--muted); text-align: center; }
.pf-big.chip-ok { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.pf-big.chip-acc { background: var(--accent-soft); color: var(--accent); }
.pf-big.chip-warn { background: var(--haldi-soft); color: var(--haldi-ink); }
.pf-big.chip-bad { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.pf-trend { margin: 0; }
.pf-trend svg { width: 100%; height: 90px; display: block; }
.pf-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.pf-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.pf-g75 { stroke: var(--mehendi); stroke-dasharray: 3 4; opacity: .6; }
.pf-g60 { stroke: var(--haldi); stroke-dasharray: 3 4; opacity: .6; }
.pf-trend figcaption { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.pf-trend figcaption span { display: grid; justify-items: center; }
.pf-trend figcaption b { font: 500 12px var(--font-mono); color: var(--ink); }
.pf-rate { display: grid; gap: 10px; }
.pf-kt td small.lv-who { display: block; }
.pf-kt td, .pf-kt th { padding: 7px 8px; }
.pf-quick { display: grid; gap: 6px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.pf-quick a { display: inline-flex; gap: 4px; align-items: center; }
@media (max-width: 1100px) { .pf-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } .pf-sum2 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .pf-sum, .pf-sum2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-head { grid-template-columns: 1fr; }
  .pf-9 { gap: 3px; } .pf-cell { padding: 6px; min-height: 80px; font-size: 11px; }
  .pf-tpl { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- exit + F&F ---------- */
.ex-sum { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ex-sum a.as { text-decoration: none; color: inherit; }
.ex-sum2 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ex-dt td small.lv-who { display: block; }
.ex-prob { padding: 0 18px 10px; }
.ex-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; counter-reset: x; }
.ex-steps li { counter-increment: x; text-align: center; font-size: 11.5px; padding: 6px 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.ex-steps li::before { content: counter(x); display: block; font: 600 12px var(--font-mono); }
.ex-steps li.done { background: var(--mehendi-soft); color: var(--mehendi-ink); border-color: transparent; }
.ex-steps li.done::before { content: "\2713"; }
.ex-steps li.now { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.ex-dates dd b { font-size: 15px; }
.ex-box { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.ex-box label.small { display: inline-flex; gap: 6px; align-items: center; }
.ex-box input[type=date] { width: auto; height: 34px; padding: 3px 8px; }
.ex-clr { display: grid; grid-template-columns: minmax(0, 1.4fr) 100px minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.ex-clr.ok .tg-chk { color: var(--mehendi-ink); }
.ex-clr input[type=number], .ex-clr input[type=text], .ex-clr input:not([type]) { height: 32px; padding: 3px 8px; font-size: 13px; }
.ex-clr .tg-chk { padding: 0; font-size: 13.5px; }
.ex-clr small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); margin-top: -4px; }
.ex-fnf td, .ex-fnf th { padding: 6px 8px; }
.ex-fnf td small.lv-who { display: block; }
.ex-fnf .ex-sub td { font-weight: 600; border-top: 1px solid var(--line-strong); }
.ex-fnf .ex-net td { font-weight: 700; font-size: 16px; border-top: 2px solid var(--ink); background: var(--mehendi-soft); }
.ex-del { display: inline; } .ex-del .icon-btn { width: 24px; height: 24px; margin-left: 4px; vertical-align: middle; }
.ex-flow, .ex-pay { margin-top: 6px; }
.ex-pay { padding: 10px; border-radius: 12px; background: var(--mehendi-soft); }
.ex-pay select, .ex-pay input { flex: 0 1 auto; }
.ex-letters { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-letters .is-off { opacity: .45; pointer-events: none; }
.ex-rm input { flex: 0 1 120px; }
.ex-set { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ex-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ex-set { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .ex-sum, .ex-sum2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ex-clr { grid-template-columns: 1fr 90px; } .ex-clr input:last-of-type { grid-column: 1 / -1; }
  .ex-set { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- reports ---------- */
.rp-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.rp-pad { padding: 4px 18px 0; }
.rp-hero { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 6px 18px 14px; }
.rp-kpi { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.rp-kpi span { font-size: 12.5px; color: var(--muted); }
.rp-kpi b { font: 500 26px/1.1 var(--font-mono); color: var(--ink); }
.rp-kpi small { font-size: 12px; color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.rp-kpi.bad { border-color: var(--sindoor); background: var(--sindoor-soft); }
.rp-kpi.bad small { color: var(--sindoor-ink); }
.rp-kpi.warn { border-color: var(--haldi); background: var(--haldi-soft); }
.rp-alerts { padding: 0 18px 10px; }
.rp-alerts ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
.rp-alerts a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13.5px; background: var(--surface); }
.rp-alerts a:hover { border-color: var(--accent); }
.rp-tone { font: 600 10.5px var(--font-mono); text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; }
.rp-alerts .t-bad .rp-tone, .rp-alerts .t-bad svg { color: var(--sindoor-ink); } .rp-alerts .t-bad .rp-tone { background: var(--sindoor-soft); }
.rp-alerts .t-warn .rp-tone, .rp-alerts .t-warn svg { color: var(--haldi-ink); } .rp-alerts .t-warn .rp-tone { background: var(--haldi-soft); }
.rp-alerts .t-acc .rp-tone, .rp-alerts .t-acc svg { color: var(--accent); } .rp-alerts .t-acc .rp-tone { background: var(--accent-soft); }
.rp-allok { margin: 0 18px 10px; }
.rp-dt td small.lv-who { display: block; }
.rp-dt tfoot th, .rp-dt tfoot td, .rp-lt tfoot td { padding: 10px 12px; border-top: 2px solid var(--ink); font-weight: 600; }
.rp-dt .chip { margin: 1px 0; font-size: 11px; display: inline-flex; gap: 3px; align-items: center; }
.rp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 18px; }
.rp-chart { margin: 0; padding: 12px 14px; display: grid; gap: 6px; box-shadow: none; }
.rp-chart figcaption b { display: block; font-size: 14.5px; }
.rp-chart figcaption small { color: var(--muted); font-size: 12px; }
.rp-svg { width: 100%; height: auto; display: block; overflow: visible; }
.rp-grid { stroke: var(--line); stroke-width: 1; }
.rp-grid.base { stroke: var(--line-strong); }
.rp-ax { fill: var(--muted); font: 11px var(--font-body); }
.rp-bar { fill: var(--accent); }
.rp-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rp-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.rp-hit { fill: transparent; cursor: crosshair; }
.rp-hit:hover { fill: var(--accent-soft); fill-opacity: .45; }
.rp-alert { stroke: var(--sindoor); stroke-width: 1.5; stroke-dasharray: 5 4; }
.rp-alert-t { fill: var(--sindoor-ink); font-weight: 600; }
.rp-tv summary { cursor: pointer; font-size: 12.5px; color: var(--accent); }
.rp-tv table { margin-top: 6px; font-size: 13px; }
.rp-tv td { padding: 4px 8px; }
.rp-tip { position: fixed; z-index: 90; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--surface); font: 600 12.5px var(--font-body); box-shadow: var(--shadow-md); white-space: nowrap; }
.rp-date { width: auto; height: 38px; padding: 4px 8px; margin-left: 6px; }
.rp-dsr { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding: 8px 18px 14px; }
.rp-store { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); border-top: 4px solid var(--mehendi); align-content: start; }
.rp-store.has-p { border-top-color: var(--haldi); }
.rp-store header b { font: 600 15px var(--font-mono); } .rp-store header span { color: var(--muted); font-size: 13px; }
.rp-big { display: flex; align-items: baseline; gap: 6px; }
.rp-big b { font: 500 34px/1 var(--font-mono); } .rp-big b small { font-size: 18px; color: var(--muted); } .rp-big span { color: var(--muted); font-size: 13px; }
.rp-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.rp-pills li { font-size: 12px; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.rp-pills li.bad { background: var(--sindoor-soft); color: var(--sindoor-ink); border-color: transparent; }
.rp-store dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rp-store dt { font-size: 11.5px; color: var(--muted); } .rp-store dd { margin: 0; font: 500 13.5px var(--font-mono); } .rp-store dd small { color: var(--muted); }
.rp-prob { display: flex; gap: 5px; align-items: center; font-size: 12.5px; color: var(--haldi-ink); background: var(--haldi-soft); padding: 4px 8px; border-radius: 8px; }
.rp-wa { padding: 6px 18px 18px; display: grid; gap: 8px; }
.rp-wa textarea { font-size: 13px; }
.rp-wa .rp-acts { margin-left: 0; }
.rp-lib { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; padding: 12px 18px 18px; align-items: start; }
.rp-list { display: grid; gap: 4px; position: sticky; top: 70px; }
.rp-list .tg-k { margin: 8px 0 2px; }
.rp-list a { display: grid; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.rp-list a small { color: var(--muted); font-size: 12px; }
.rp-list a:hover { background: var(--surface-2); }
.rp-list a.is-on { background: var(--accent-soft); border-color: var(--accent); }
.rp-res { display: grid; gap: 8px; min-width: 0; }
.rp-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.rp-filters select, .rp-filters input { width: auto; height: 38px; padding: 4px 8px; font-size: 13.5px; max-width: 220px; }
.rp-print { box-shadow: none; border: 0; }
.rp-list { max-height: calc(100vh - 90px); overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
.rp-find { position: sticky; top: 0; z-index: 2; height: 38px; font-size: 13.5px; margin-bottom: 2px; box-shadow: 0 -6px 0 var(--surface), 0 6px 0 var(--surface); }
.rp-list a[hidden], .rp-list .tg-k[hidden] { display: none; }
.rp-wide { font-size: 12.5px; }
.rp-wide th, .rp-wide td { padding: 5px 6px; white-space: nowrap; }
.rp-wide th:nth-child(2), .rp-wide td:nth-child(2) { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.rp-mk { display: inline-block; min-width: 24px; padding: 1px 3px; border-radius: 5px; text-align: center; font: 600 11.5px var(--font-mono); color: var(--muted); }
.rp-mk-P { background: var(--mehendi-soft); color: var(--mehendi-ink); }
.rp-mk-HD, .rp-mk-MP { background: var(--haldi-soft); color: var(--haldi-ink); }
.rp-mk-A { background: var(--sindoor-soft); color: var(--sindoor-ink); }
.rp-mk-WO { color: var(--muted); background: var(--surface-2); }
.rp-mk-CL, .rp-mk-SL, .rp-mk-EL, .rp-mk-CO, .rp-mk-LOP { background: var(--accent-soft); color: var(--ink); }
@media print { .rp-wide { font-size: 9px; } .rp-wide th, .rp-wide td { padding: 2px 3px; } .rp-mk { min-width: 0; padding: 0; background: none !important; } }
.rp-print-h { font-size: 22px; margin-bottom: 10px; }
@media print { .rp-hit { display: none; } .rp-grid2 { grid-template-columns: 1fr 1fr; } .rp-tv { display: none; } }
@media (max-width: 1100px) { .rp-hero { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .rp-grid2, .rp-lib { grid-template-columns: minmax(0, 1fr); } .rp-list { position: static; max-height: 300px; } }
@media (max-width: 560px) { .rp-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-kpi b { font-size: 21px; } .rp-dsr { padding-inline: 8px; } }

/* ---------- Roadmap Phase A: holidays, regularization, overtime, system jobs ---------- */
.seg a { font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 11px; border-radius: 8px; text-decoration: none; white-space: nowrap; }
.seg a.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg a b { font-family: var(--font-mono); font-size: 11.5px; margin-left: 3px; color: var(--accent); }
.fld-wide { grid-column: 1 / -1; }
.hol-form, .rg-form { border: 1px solid var(--line); border-radius: 12px; margin: 0 18px 12px; background: var(--surface-2); }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0; align-items: start; }
.hol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; padding: 4px 18px 18px; }
.hol-m { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.hol-m h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.hol-m ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hol-m li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.hol-d { display: grid; text-align: center; border-radius: 8px; background: var(--surface-2); padding: 3px 0; }
.hol-d b { font-size: 17px; line-height: 1.1; } .hol-d small { font-size: 11px; color: var(--muted); }
.hol-n { display: grid; min-width: 0; } .hol-n small { color: var(--muted); font-size: 12px; }
.hol-set { margin: 0 18px 18px; }
.ot-in { width: 72px; height: 32px; padding: 2px 6px; text-align: right; }
.rp-mk-H { background: var(--haldi-soft); color: var(--haldi-ink); }
.ef-photo { width: 88px; height: 88px; border-radius: 18px; object-fit: cover; border: 2px solid var(--line); background: var(--surface-2); flex: none; }
.ef-up { margin-top: 6px; } .ef-up label { cursor: pointer; }
.ef-links { margin-top: 8px; flex-wrap: wrap; }
.tab-n { font: 600 11px var(--font-mono); background: var(--surface-2); border-radius: 6px; padding: 1px 5px; margin-left: 4px; }
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; border-left: 2px solid var(--line); }
.tl li { display: grid; grid-template-columns: 96px auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 0 7px 14px; position: relative; font-size: 13.5px; }
.tl li::before { content: ''; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tl-d { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .tl li { grid-template-columns: 1fr; gap: 2px; } }

.acc-qr { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.acc-qr svg { width: 100%; height: 100%; display: block; }

/* ---------- language switch ---------- */
.lang-sw { margin: 0; }
.lang-sw select { height: 38px; width: auto; padding: 0 28px 0 10px; font-size: 13.5px; font-weight: 600; border-radius: 10px; border: 1px solid var(--line-strong); background-color: var(--surface); color: var(--ink); cursor: pointer; }
.lang-sw.on-dark select { background-color: transparent; color: var(--side-ink); border-color: rgba(255,255,255,.18); height: 36px; }
.lang-sw.on-dark select option { color: #161A2E; }
.lang-sw.on-auth { position: fixed; top: 14px; right: 16px; z-index: 30; }
.i18n-pill { position: fixed; top: calc(76px + env(safe-area-inset-top)); right: 16px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px);
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); padding: 6px 8px 6px 12px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow-md); pointer-events: auto; }
.i18n-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--haldi); animation: i18nPulse 1s ease-in-out infinite alternate; flex: none; }
.i18n-pill button { font: inherit; font-size: 12.5px; font-weight: 700; border: 0; border-radius: 999px; padding: 4px 10px; cursor: pointer; background: var(--accent); color: var(--accent-ink); }
.i18n-pill button.x { background: transparent; color: var(--muted); padding: 2px 6px; font-size: 15px; }
@keyframes i18nPulse { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .i18n-pill .dot { animation: none; } }
@media (max-width: 640px) { .tb-right .lang-sw select { max-width: 92px; } }

/* ───────────── Extras pack (Nov 2026): import, org chart, history, salary template ───────────── */
.imp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.imp-grid .tile { margin: 0; }
.imp-grid .tile-b { display: grid; gap: 10px; align-content: start; }
.imp-exp { grid-template-columns: 1fr; }
.imp-exp select { width: 100%; }
.imp-up .drop { position: relative; }
.imp-sum { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 18px 4px; }
.imp-dt td.small { line-height: 1.45; }
.imp-dt tr.imp-error td { background: var(--sindoor-soft); }
.imp-dt tr.imp-rehire td { background: var(--haldi-soft); }
.imp-dt tr.imp-skip td { opacity: .7; }
.imp-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; justify-content: flex-end; }
.imp-act p { margin-right: auto; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 900px) { .imp-grid { grid-template-columns: 1fr; } }

.org-wrap { padding: 8px 18px 20px; overflow-x: auto; }
.org, .org ul { list-style: none; margin: 0; padding: 0; }
.org ul { margin-left: 22px; padding-left: 16px; border-left: 2px solid var(--line); }
.org li { position: relative; padding: 5px 0; }
.org ul > li::before { content: ""; position: absolute; left: -16px; top: 26px; width: 14px; border-top: 2px solid var(--line); }
.org details > summary { list-style: none; cursor: pointer; display: block; }
.org details > summary::-webkit-details-marker { display: none; }
.org details > summary .org-card { border-left: 3px solid var(--accent); }
.org details:not([open]) > summary .org-card { box-shadow: 3px 3px 0 var(--surface-2), 4px 4px 0 var(--line); }
.org-card { display: inline-flex; align-items: center; gap: 10px; min-width: min(100%, 320px); max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
.org-card:hover { border-color: var(--accent); }
.org-card.is-hit { background: var(--haldi-soft); border-color: var(--haldi); }
.org-card .avatar { width: 34px; height: 34px; font-size: 13px; flex: none; }
.org-who { display: grid; min-width: 0; flex: 1; }
.org-who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-who small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-tags { display: inline-flex; gap: 5px; flex: none; }
.org-flat { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.org-flat .org-card { width: 100%; }
.org-loner-h { margin-top: 22px; }
.org-pad { margin: 0 0 8px; }

.hc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 18px 10px; font-size: 12.5px; color: var(--ink-2); }
.hc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hc-bars { display: grid; gap: 6px; padding: 0 18px 10px; }
.hc-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 70px; gap: 10px; align-items: center; }
.hc-lbl { display: grid; text-decoration: none; color: var(--ink); min-width: 0; }
.hc-lbl small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-track { position: relative; display: flex; height: 18px; border-radius: 6px; background: var(--surface-2); overflow: visible; }
.hc-seg { height: 100%; border-right: 2px solid var(--surface); }
.hc-seg:first-child { border-radius: 6px 0 0 6px; }
.hc-seg:last-of-type { border-radius: 0 6px 6px 0; border-right: 0; }
.hc-min { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; }
.hc-n { text-align: right; white-space: nowrap; }
@media (max-width: 640px) { .hc-row { grid-template-columns: 90px minmax(0, 1fr) 54px; } }

.hist { list-style: none; margin: 0; padding: 4px 18px 18px; display: grid; gap: 10px; }
.hist > li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.hist-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hist-h a { color: var(--accent); }
.hist-who { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; }
.hist-dt { width: auto; max-width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.hist-dt th { text-align: left; font-weight: 600; color: var(--ink-2); width: 190px; padding: 3px 8px 3px 0; vertical-align: top; }
.hist-dt td { padding: 3px 6px; vertical-align: top; word-break: break-word; }
.hist-old { color: var(--sindoor-ink); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--sindoor) 50%, transparent); }
.hist-new { color: var(--mehendi-ink); font-weight: 600; }
.hist-arr { color: var(--muted); width: 18px; }
@media (max-width: 640px) { .hist-dt th { width: 110px; } .hist-who { margin-left: 0; width: 100%; } }

.sal-tpl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px dashed var(--accent); }
.sal-tpl label { font-size: 13px; font-weight: 600; color: var(--accent); }
.sal-tpl input { width: 130px; }
.sal-tpl small { flex-basis: 100%; }
.sal-tpl small:empty { display: none; }
.sal-from { margin-bottom: 14px; }
.sal-hist { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sal-hist summary { cursor: pointer; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.org-bar select { width: auto; max-width: 280px; flex: 0 1 auto; }
.hc-dt th { white-space: normal; min-width: 64px; }
.hc-dt td:first-child { white-space: nowrap; }
.hc-dt td:first-child .lv-who { display: block; }
.hist-dt td { max-width: 420px; }
.mail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0; }
.mail-side { border-left: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.mail-side .filters select { min-width: 0; flex: 1; }
@media (max-width: 900px) { .mail-grid { grid-template-columns: 1fr; } .mail-side { border-left: 0; border-top: 1px solid var(--line); } }
.num-in { width: 110px; text-align: right; font-family: var(--font-mono); }
.num-in.sm { width: 84px; }
.spark { display: inline-flex; align-items: flex-end; gap: 3px; height: 28px; }
.spark i { display: block; width: 9px; border-radius: 2px 2px 0 0; background: var(--accent); }
.spark i.none { background: var(--line); }
.cost-dt td { vertical-align: middle; }
.act-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 9px 22px; background: var(--haldi); color: #2b1d00; font-size: 13.5px; }
.act-bar.is-soft { background: var(--haldi-soft); color: var(--haldi-ink); border-bottom: 1px solid var(--line); }
.act-bar span { flex: 1; min-width: 200px; }
.act-pub { padding: 24px 16px; }
.act-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 12px; box-shadow: var(--shadow-md); }
.act-card h1 { font-size: 26px; }
.act-what { font-size: 16px; line-height: 1.5; margin: 0; }
.act-form { display: grid; gap: 8px; }
.act-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.act-btns .btn { justify-content: center; min-height: 48px; font-size: 16px; }
.act-yes { background: var(--mehendi, #2f8f5b); border-color: transparent; }

/* growth: goals, 360, mystery, calibration */
.gl-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 18px 10px; }
.gl-add { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.gl-add select { max-width: 220px; }
.gl-add input[name="title"] { flex: 1; min-width: 200px; }
.gl-add input[name="measure"] { width: 150px; }
.gl-add input[name="target_value"], .gl-add input[name="weight"] { width: 90px; }
.gl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gl-list summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.gl-t { font-weight: 600; }
.gl-upd { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 0 4px; font-size: 13px; }
.gl-upd input[type="number"] { width: 90px; }
.gl-upd input[name="comment"] { flex: 1; min-width: 140px; }
.gbar { display: inline-block; width: 90px; height: 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.gbar i { display: block; height: 100%; background: var(--accent); }
.gbar.ok i { background: #2f8f5b; }
.stars { color: #d49a17; letter-spacing: 1px; }
.stars i { color: var(--line-strong); font-style: normal; }
.f360-form, .mys-form { padding: 16px 18px; display: grid; gap: 10px; align-content: start; margin: 0; }
.f360-q { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.star-in { display: inline-flex; flex-direction: row-reverse; }
.star-in input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-in label { font-size: 22px; color: var(--line-strong); cursor: pointer; padding: 0 2px; line-height: 1; }
.star-in.big label { font-size: 32px; }
.star-in label:hover, .star-in label:hover ~ label, .star-in input:checked ~ label { color: #d49a17; }
.star-in input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.fb-list { list-style: none; margin: 0; padding: 0 18px 14px; display: grid; gap: 8px; }
.fb-list li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.fb-list p { margin: 4px 0; }
tr.is-sel td { background: var(--accent-soft); }
.mys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.mys-grid label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.mys-grid input { width: 70px; }
.cal-top { padding: 4px 18px 10px; }
.cal-curve { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; height: 170px; align-items: end; max-width: 640px; }
.cal-col { display: grid; gap: 4px; justify-items: center; text-align: center; height: 100%; grid-template-rows: 1fr auto auto; }
.cal-bars { position: relative; width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.cal-t, .cal-a { width: 40%; border-radius: 6px 6px 0 0; min-height: 2px; }
.cal-t { background: var(--accent-soft); border: 1px dashed var(--accent); }
.cal-a { background: var(--accent); }
.cal-col small { font-size: 11.5px; color: var(--muted); }
.cal-note { width: 160px; }
.rt-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.rt-person { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; text-align: center; }
.rt-person input { position: absolute; opacity: 0; }
.rt-person:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rt-person small { color: var(--muted); font-size: 11.5px; }
.fb-form { display: grid; gap: 6px; padding: 8px 0; }
.rs-fill { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 6px 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px dashed var(--accent); font-size: 13.5px; }
.rs-fill small { flex-basis: 100%; }
.rs-fill small:empty { display: none; }
.rs-fill.is-busy { opacity: .7; }
input.is-filled, select.is-filled, textarea.is-filled { background: var(--haldi-soft); }
.al-send { display: grid; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.al-send .btn { justify-self: start; }
/* report builder */
.rb-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.rb-side { position: sticky; top: 12px; padding: 14px; display: grid; gap: 10px; margin: 0; max-height: calc(100vh - 24px); overflow: auto; }
.rb-2 { display: grid; grid-template-columns: 1fr; gap: 6px; }
.rb-filt, .rb-cols { border-top: 1px solid var(--line); padding-top: 8px; }
.rb-filt summary, .rb-cols summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.rb-filt .fld { margin-bottom: 6px; }
.rb-col { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13.5px; cursor: pointer; }
.rb-col input { width: auto; }
.rb-col small { margin-left: auto; }
.rb-all { margin: 0 0 4px; font-size: 12.5px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
.rb-main { margin: 0; min-width: 0; }
.rb-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 600; }
.rb-crumbs a { color: var(--accent); text-decoration: none; }
.rb-dt th a { color: inherit; text-decoration: none; }
.rb-drill { font-weight: 600; color: var(--accent); text-decoration: none; }
.rb-save { margin: 12px 18px 16px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 12px; }
.rb-save summary { cursor: pointer; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.rb-save form { margin-top: 10px; }
@media (max-width: 900px) { .rb-layout { grid-template-columns: 1fr; } .rb-side { position: static; max-height: none; } }
/* roster demand heat-map */
.dm-heat { border-collapse: separate; border-spacing: 3px; margin: 0 14px; font-size: 13px; }
.dm-heat th { font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 2px 4px; white-space: nowrap; }
.dm-heat tbody th { text-align: left; color: var(--ink); font-size: 13px; }
.dm-heat td { min-width: 40px; text-align: center; border-radius: 8px; padding: 4px 2px; background: color-mix(in srgb, var(--accent) calc(var(--a) * 70%), var(--surface-2)); color: var(--ink); }
.dm-heat td b { display: block; font-family: var(--font-mono); font-size: 14px; }
.dm-heat td small { display: block; font-size: 10.5px; }
.dm-heat td .dm-short { color: var(--sindoor-ink); font-weight: 700; }
.dm-heat td .dm-ok { color: var(--ink-2); opacity: .75; }
.dm-heat td.dm-plan { background: none; text-align: left; white-space: nowrap; min-width: 170px; }
.dm-acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 6px 18px 18px; }
.dm-set summary { cursor: pointer; font-weight: 600; }
.dm-set label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.dm-set input { width: 70px; }
.act-bar.is-staging { background: #ea580c; color: #fff; font-weight: 600; justify-content: center; }
.plain-main > * { min-width: 0; }
.act-pub { width: 100%; max-width: 560px; margin: 0 auto; padding: 0; }
.act-card textarea, .act-card input:not([type=radio]):not([type=checkbox]) { width: 100%; box-sizing: border-box; }
.act-what { overflow-wrap: anywhere; }
.pub > *, .act-card > *, .act-form > * { min-width: 0; }
.act-card { min-width: 0; padding: 18px 16px; }
.rt-staff { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.star-in.big label { font-size: 28px; }

/* ---------- fetch employees from machine ---------- */
.ef-map { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }
.ef-map summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.ef-map[open] summary { margin-bottom: 6px; }
.ef-map .fgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 8px; }
.ef-map > p { margin: 0 0 12px; }
.src-comp { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.src-comp-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; }
.src-comp-h .muted { flex-basis: 100%; }
.src-comp-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.src-comp-g .fld > span { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.src-comp-g select { width: 100%; }
.src-comp-g .fld, .ef-stores .fld { display: flex; flex-direction: column; justify-content: flex-end; }
@media (max-width: 640px) { .src-comp-g { grid-template-columns: 1fr; } }
.ef-grp { margin: 16px 0 4px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2, inherit); display: flex; gap: 8px; align-items: baseline; }
.ef-grp .small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ef-map summary + .src-comp { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.src-comp-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; }
.src-comp-h .muted { flex-basis: 100%; }
.src-comp-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.src-comp-g .fld > span { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.src-comp-g select { width: 100%; }
.src-comp-g .fld, .ef-stores .fld { display: flex; flex-direction: column; justify-content: flex-end; }
@media (max-width: 640px) { .src-comp-g { grid-template-columns: 1fr; } }
.ef-grp { margin-top: 0; padding-top: 0; border-top: 0; }
.ef-stores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; padding-bottom: 8px; }
.ef-stores .fld > span { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.ef-stores select { width: 100%; }
.ef-create { display: flex; gap: 6px; align-items: flex-start; margin: 4px 18px 0; color: var(--ink-2); line-height: 1.45; }
.ef-create svg { flex: none; margin-top: 2px; }
.imp-dt td.nowrap { white-space: nowrap; }
.ef-warn { display: flex; gap: 5px; align-items: flex-start; margin-top: 3px; color: var(--haldi-ink, #8a5a00); font-size: 12px; line-height: 1.35; }
.ef-warn svg { flex: none; margin-top: 2px; }
@media (max-width: 900px) { .ef-stores, .ef-map .fgrid { grid-template-columns: 1fr; } }
.ef-tick { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; white-space: nowrap; }
.ef-act { flex-wrap: wrap; align-items: center; padding: 12px 18px; }
.ef-type { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; margin-right: auto; }
.ef-note { padding: 0 18px 14px; display: flex; gap: 6px; align-items: flex-start; }
.imp-dt tr.imp-new td:first-child, .imp-dt tr.imp-update td:first-child { width: 36px; }
@media (max-width: 760px) { .ef-map .fgrid { grid-template-columns: minmax(0, 1fr); } .ef-type { margin-right: 0; width: 100%; } }
@media (max-width: 560px) { .ef-map { padding: 0 10px; } form .form-actions { flex-wrap: wrap; } [data-ef] .toolbar { flex-wrap: wrap; } }

/* ---------- leave: monthly credit + ledger ---------- */
.lc-types { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-msg { margin: 0 18px 10px; }
.lc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 18px; border-top: 1px solid var(--line); }
.lc-head > div:first-child { flex: 1; min-width: 200px; }
.lc-sum { padding: 0; }
.lc-rev { display: flex; gap: 8px; flex-wrap: wrap; }
.lc-rev input { min-width: 220px; }
.lc-dt tr.lc-none td { color: var(--muted); }
tr.is-sel td { background: var(--accent-soft, rgba(80, 90, 200, .08)); }
.lg-bal { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 18px; }
.lg-card { display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 150px; }
.lg-card b { font-size: 20px; }
.lg-card small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.ok-t { color: var(--ok, #1d7a46); }
.lp-mc { margin-top: 14px; }
.lp-mc select { min-width: 170px; }
.lp-mc .lp-inl { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- leave planner grid ---------- */
.pl-wrap { display: grid; gap: 8px; margin: 6px 0 4px; }
.pl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; }
.pl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; max-width: 100%; }
.pl-grid { border-collapse: collapse; font-size: 12px; width: max-content; min-width: 100%; }
.pl-grid th, .pl-grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 4px 2px; text-align: center; min-width: 34px; height: 30px; }
.pl-grid thead th { font-weight: 600; background: var(--surface-2, rgba(127,127,160,.06)); line-height: 1.1; }
.pl-grid thead th small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }
.pl-grid .pl-name { text-align: left; padding: 4px 10px; min-width: 150px; position: sticky; left: 0; background: var(--surface, #fff); z-index: 1; font-weight: 600; white-space: nowrap; }
.pl-grid .pl-name small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.pl-grid th.pl-today { box-shadow: inset 0 -3px 0 var(--accent); }
.pl-grid th.pl-sel { background: rgba(80, 90, 200, .14); }
.pl-grid th.pl-bk, .pl-bk-i { background: repeating-linear-gradient(45deg, rgba(200, 60, 60, .16) 0 4px, transparent 4px 8px); }
.pl-grid tr.pl-mine .pl-name { color: var(--accent); }
.pl-p, i.pl-p { background: rgba(40, 150, 90, .14); color: #1d7a46; }
.pl-a, i.pl-a { background: rgba(200, 60, 60, .16); color: #a12c2c; font-weight: 700; }
.pl-l, i.pl-l { background: rgba(80, 90, 200, .22); color: #2f3a9e; font-weight: 700; }
.pl-pl, i.pl-pl { background: repeating-linear-gradient(45deg, rgba(80, 90, 200, .18) 0 4px, transparent 4px 8px); color: #2f3a9e; font-weight: 600; }
.pl-me, i.pl-me { background: #e8a33a; color: #3d2600; font-weight: 700; }
.pl-t, i.pl-t { background: rgba(30, 140, 170, .18); color: #12627a; }
.pl-h, i.pl-h { background: rgba(160, 100, 200, .16); color: #6b3a8e; }
.pl-wo, i.pl-wo { background: rgba(127, 127, 160, .14); color: var(--muted); }
.pl-tot { font-weight: 700; }
.pl-tot small { font-weight: 400; color: var(--muted); }
.pl-tot.pl-ok { background: rgba(40, 150, 90, .12); }
.pl-tot.pl-warn { background: rgba(230, 160, 40, .22); }
.pl-tot.pl-bad { background: rgba(200, 60, 60, .24); color: #a12c2c; }
.pl-duty { color: var(--muted); }
.pl-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); margin: 0; }
.pl-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pl-legend i { display: inline-block; width: 14px; height: 12px; border-radius: 3px; border: 1px solid var(--line); }
.pl-sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; font-size: 13px; }
.pl-sugg button.chip { cursor: pointer; border: 0; }
.lv-planner.is-loading { opacity: .5; }
.lv-planner:empty { display: none; }
.ld-more { display: grid; gap: 6px; padding: 10px 20px; border-top: 1px solid var(--line); }
.ld-more summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
.ld-inl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.ld-inl input[type=text] { flex: 1; min-width: 160px; }
.ld-ok { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ld-ok input { min-width: 220px; }
.pl-rule-g { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .pl-rule-g { grid-template-columns: minmax(0, 1fr); } }
:root[data-theme="dark"] .pl-grid .pl-name { background: var(--surface, #151a2e); }
.drawer-f:has(.ld-ok) { align-items: center; flex-wrap: wrap; }
.ld-ok { flex: 1; justify-content: flex-end; }
.pl-rule .fld .ef-tick { display: flex; width: auto; margin-top: 6px; }
.pl-rule .fld .ef-tick input { width: auto; height: auto; flex: none; }
.ab-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.ab-cols .tile { margin: 0; }
@media (max-width: 980px) { .ab-cols { grid-template-columns: minmax(0, 1fr); } }
.mc sub { font-size: 9px; vertical-align: baseline; margin-left: 1px; }
.cd-absu p { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.cd-absu small { flex-basis: 100%; }
.rg-pol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.rg-pol .tile { margin: 0; }
.rg-ot { cursor: pointer; border: 1px dashed var(--line-strong); margin-top: 4px; }
@media (max-width: 980px) { .rg-pol { grid-template-columns: minmax(0, 1fr); } }
.fld .ef-tick { display: flex; width: auto; margin-top: 6px; }
.fld .ef-tick input { width: auto; height: auto; flex: none; }
.mf-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; }
.mf-grid > .tile-b + .tile-b { border-left: 1px solid var(--line); }
.mf-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.mf-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.mf-list li > span:nth-child(2) { flex: 1; }
.mf-list li.ok .mf-ic { color: #1d7a46; }
.mf-list li.bad .mf-ic { color: #a12c2c; }
.mf-list li.note .mf-ic { color: #b07a10; }
.mf-steps { padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 900px) { .mf-grid { grid-template-columns: minmax(0, 1fr); } .mf-grid > .tile-b + .tile-b { border-left: 0; border-top: 1px solid var(--line); } }
.tr-ci { display: flex; flex-wrap: wrap; gap: 10px; }
.tr-cc { display: grid; gap: 4px; width: 170px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; }
.tr-cc img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; }
.es-new summary { cursor: pointer; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.es-new form { margin-top: 12px; }
.es-el { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.es-el > div { display: grid; gap: 2px; }
.pr-chk { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pr-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } @media (max-width: 760px) { .pr-steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .pr-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } } @media (max-width: 600px) { .pr-steps { grid-template-columns: minmax(0, 1fr); } }
.sp-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sp-now > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.sp-now small { color: var(--muted); font-size: 12px; }

/* Appraisal cycle (performance/cycles) */
.ac-new { margin: 12px 16px; }
.ac-new summary { cursor: pointer; padding: 2px 0; }
.ac-new form { margin-top: 12px; }
.ac-edit { margin: 12px 16px; border-color: var(--accent); }
.ac-edit-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.ac-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ac-kpi td, .ac-kpi th { padding: 7px 10px; }
.ac-kpi .star-in label { font-size: 20px; }
.ac-q { background: var(--surface-2, var(--bg)); border-radius: 10px; padding: 8px 10px; margin: 10px 0; }
.ac-hr { border-left: 1px solid var(--line); padding-left: 20px; }
#ac-dt tr.is-sel td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
@media (max-width: 860px) { .ac-grid { grid-template-columns: 1fr; } .ac-hr { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; } }

/* Device offline banner (machines + dashboard) */
.dh-banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--bad, #c2393c) 40%, var(--line)); background: color-mix(in srgb, var(--bad, #c2393c) 7%, var(--surface)); border-radius: 14px; color: inherit; text-decoration: none; }
.dh-banner > div { flex: 1; min-width: 0; }
.dh-banner ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.dh-banner .dh-go { transform: rotate(180deg); align-self: center; color: var(--muted); }

/* Month-end close checklist */
.me-prog { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.me-bar { width: 160px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; display: block; }
.me-bar i { display: block; height: 100%; background: var(--ok, #2f8f5b); border-radius: 99px; }
.me-list { list-style: none; margin: 0; padding: 4px 16px 8px; display: grid; gap: 8px; }
.me-step { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.me-step.is-next { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, rgba(80, 90, 200, .12)); }
.me-step.is-wait, .me-step.is-na { opacity: .62; }
.me-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--line); color: var(--ink-2); }
.me-step.is-done .me-n { background: var(--ok, #2f8f5b); color: #fff; }
.me-step.is-todo .me-n { background: var(--warn, #d49a17); color: #fff; }
.me-body { display: grid; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }
.me-body:hover b { color: var(--accent); }
.me-t { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.me-t .ic { color: var(--muted); }
.me-d { color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .me-step { grid-template-columns: 30px minmax(0, 1fr); } .me-step > .chip { grid-column: 2; justify-self: start; } .me-prog { margin-left: 0; } }

/* Data console (developer) */
.dc-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.dc-side { padding: 12px; position: sticky; top: 80px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; gap: 10px; }
.dc-tables { list-style: none; margin: 0; padding: 0; overflow: auto; }
.dc-tables a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.dc-tables a:hover { background: var(--accent-soft); }
.dc-tables a.is-on { background: var(--accent); color: var(--accent-ink); }
.dc-tables a small { color: inherit; opacity: .7; }
.dc-main { min-width: 0; }
.dc-table { max-height: 62vh; overflow: auto; }
.dc-table td, .dc-table th { white-space: nowrap; }
.dc-note { padding: 0 16px; display: flex; gap: 6px; align-items: center; }
.dc-acts { padding: 12px 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.dc-acts .btn { margin-left: auto; }
@media (max-width: 860px) { .dc-wrap { grid-template-columns: 1fr; } .dc-side { position: static; max-height: 300px; } }
.dc-kids { display: block; padding: 0 16px 8px; }
.dc-kids summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.dc-kids p { margin: 6px 0 0; line-height: 1.6; }
.dc-casc { display: inline-flex; gap: 8px; align-items: center; }
.dc-acts .dc-casc { flex: 1 1 auto; width: auto; max-width: none; flex-direction: row; font-weight: 500; }
.dc-casc input { width: 18px !important; height: 18px; margin: 0; flex: none; }
.h1-count { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: var(--acc-soft, rgba(60,70,170,.1)); color: var(--acc, inherit); font-size: 15px; font-weight: 600; }

/* ---------- help panel (top bar "Help") ---------- */
.tb-help { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); color: var(--ink-2); font: 600 13.5px/1 inherit; font-family: inherit; cursor: pointer; }
.tb-help:hover { border-color: var(--line-strong); color: var(--ink); }
.tb-help.has-help { color: var(--acc, #3346a8); border-color: color-mix(in srgb, var(--acc, #3346a8) 35%, var(--line)); }
.hp-back { position: fixed; inset: 0; background: rgba(10,12,26,.42); z-index: 60; }
.hp { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); background: var(--bg, #f3f4f9); z-index: 61; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.hp[hidden], .hp-back[hidden] { display: none; }
.hp-on body { overflow: hidden; }
.hp-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--surface, #fff); }
.hp-head > div { flex: 1; min-width: 0; }
.hp-head h2 { margin: 2px 0 0; font-size: 20px; }
.hp-head .eyebrow { margin: 0; }
.hp-body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; display: grid; gap: 16px; align-content: start; }
.hp-sec { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.hp-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 15px; }
.hp-sec > p { margin: 0 0 8px; line-height: 1.55; }
.hp-shot { position: relative; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f3f4f9; }
.hp-shot img { display: block; width: 100%; height: auto; }
.hp-mark { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: #e0482f; color: #fff; font: 700 12.5px/1 var(--font-mono, monospace); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.35); padding: 0; }
.hp-mark:hover, .hp-mark.is-on { background: #1f2a7a; transform: translate(-50%, -50%) scale(1.15); }
.hp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hp-steps li { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; }
.hp-steps li.is-on, .hp-steps li:hover { background: var(--acc-soft, #eef0fb); border-color: color-mix(in srgb, var(--acc, #3346a8) 25%, transparent); }
.hp-steps b { font-size: 14px; }
.hp-steps p { margin: 2px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.hp-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #e0482f; color: #fff; font: 700 12px/24px var(--font-mono, monospace); text-align: center; }
.hp-uses { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hp-uses li { display: grid; grid-template-columns: minmax(170px, 34%) 1fr; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px dashed var(--line); }
.hp-uses li:first-child { border-top: 0; }
.hp-uses a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--acc, #3346a8); }
.hp-uses span { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.hp-tips ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; }
@media (max-width: 960px) { .tb-help span { display: none; } .tb-help { width: 38px; padding: 0; justify-content: center; } }
@media (max-width: 640px) { .hp-uses li { grid-template-columns: 1fr; gap: 2px; } .hp-body { padding: 14px; } .hp-mark { width: 20px; height: 20px; font-size: 11px; } }

/* fetch employees: new rows stand out, inactive rows muted */
.imp-dt tr.imp-new td { background: color-mix(in srgb, #2f9e5b 9%, var(--surface)); }
.imp-dt tr.imp-new td:first-child { box-shadow: inset 4px 0 0 #2f9e5b; }
.imp-dt tr.imp-update td:first-child { box-shadow: inset 4px 0 0 #d49511; }
.imp-dt tr.ef-inact td { color: var(--muted); }
.ef-new { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #2f9e5b; color: #fff; font: 700 10.5px/1.6 var(--font-mono, monospace); letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.ef-chip-in { background: var(--bg-2); color: var(--muted); font-size: 11px; }
.ef-opts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.ef-opts .ef-tick { white-space: normal; }
.ef-pick button { font-size: 12.5px; }
.ef-opts label.ef-tick { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-weight: 600; }
.ef-opts label.ef-tick input { align-self: center; margin: 0; }
.ef-opts label.ef-tick .muted { font-weight: 400; }
.imp-dt tbody tr.imp-new td, .imp-dt tbody tr.imp-new:nth-child(even) td { background: color-mix(in srgb, #2f9e5b 9%, var(--surface)); }
.imp-dt tbody tr.imp-new.ef-inact td, .imp-dt tbody tr.imp-new.ef-inact:nth-child(even) td { background: color-mix(in srgb, #2f9e5b 5%, var(--surface)); }
.ef-opts label.ef-tick { flex-wrap: nowrap; align-items: flex-start; }
.ef-opts label.ef-tick input[type=checkbox] { width: auto; height: auto; flex: none; margin-top: 3px; }
.att-who a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 11px; border-radius: 8px; text-decoration: none; }
.att-who a b { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.att-who a.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* monthly muster filters */
.mus-tools { padding-top: 4px; }
.mus .mus-in th.mx-emp b { color: var(--muted); }
.mus-chip { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--bg-2); color: var(--muted); font-size: 10.5px; font-weight: 600; }

/* Timing Rules — store-wise company rules */
section.tile.tm-scope { display: flex; flex-direction: row; justify-content: flex-start; text-align: left; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 18px; margin-bottom: 16px; }
.tm-scope-f { display: flex; align-items: center; gap: 10px; }
.tm-scope-f label { display: inline; font-size: 13px; white-space: nowrap; }
.tm-scope-f select { min-width: 260px; }
.tm-scope-n { flex: 1; min-width: 240px; margin: 0; text-align: left; }
.fld.is-store input, .fld.is-store select { border-color: var(--accent); }
.fld.is-store > label { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 4px 6px; text-align: left; }
.tm-own { font-size: 10px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }
@media (max-width: 640px) { .tm-scope-f { width: 100%; } .tm-scope-f select { min-width: 0; flex: 1; } }

/* Leave policy: cloth store / Head Office switch */
.lp-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; }
.lp-grp p { margin: 0; }
.lp-cols input:disabled, .lp-cols select:disabled, .lp-mc input:disabled, .lp-mc select:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* Payroll: salary day basis */
.pr-basis { display: inline-flex; align-items: center; gap: 8px; }
.pr-basis label { display: inline; white-space: nowrap; color: var(--muted); font-weight: 600; }
.pr-basis select { height: 32px; padding: 0 28px 0 10px; font-size: 13px; width: auto; }

/* PF + ESIC → Minimum wages */
.mw-date { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.mw-date label { display: inline; color: var(--muted); }
.mw-date input { height: 32px; width: auto; }
.mw-src { display: flex; align-items: center; gap: 6px; padding: 0 18px 8px; margin: 0; }
.mw-dt th.mw-g { text-align: center; border-bottom: 1px solid var(--line); }
.mw-dt .mw-area { vertical-align: top; text-align: left; max-width: 280px; white-space: normal; background: var(--surface-2); }
.mw-dt .mw-area { font: inherit; letter-spacing: 0; text-transform: none; }
.mw-dt .mw-area small { display: block; margin-top: 6px; font: 400 12px var(--font-body, inherit); letter-spacing: 0; text-transform: none; color: var(--muted); line-height: 1.45; }
.mw-dt tr.mw-first td, .mw-dt tr.mw-first th { border-top: 2px solid var(--line-strong); }
.mw-st select { height: 36px; line-height: 1.2; padding: 0 30px 0 10px; font-size: 13.5px; width: auto; min-width: 160px; }

/* Statutory parameters: store-wise in force today */
.sp-store { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.sp-store label { display: inline; color: var(--muted); }
.sp-store select { height: 34px; width: auto; min-width: 240px; padding: 0 30px 0 10px; }
.sp-now > div.sp-own { border-color: var(--accent); background: var(--accent-soft); }
.sp-now > div.sp-own .chip { margin-top: 6px; justify-self: start; white-space: normal; max-width: 100%; }
.sp-now > div.sp-own .btn { margin-top: 8px; justify-self: start; }
.sp-now > div { align-content: start; }
.sp-now > div.sp-same { opacity: .65; }
.sp-hint { display: flex; align-items: center; gap: 6px; padding: 0 18px 14px; margin: 0; }
@media (max-width: 640px) { .sp-store { width: 100%; margin-left: 0; } .sp-store select { min-width: 0; flex: 1; } }

.pr td.num small.pr-on { display: block; font: 500 10.5px var(--font-mono); color: var(--accent); white-space: nowrap; }

/* Targets → Sales SQL (BLC) */
.ss-src { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 14px 18px; }
.ss-src-l { display: flex; gap: 12px; align-items: flex-start; min-width: 0; flex: 1 1 380px; }
.ss-src-l > div { min-width: 0; overflow-wrap: anywhere; }
.ss-last { margin: 4px 0 0; color: var(--ink-2); }
.ss-fetch { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.ss-fetch label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.ss-fetch input { min-width: 0; width: 175px; }
.ss-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ss-csv { margin-left: auto; }
.ss-n { margin-left: 2px; padding: 0 7px; font-size: 11px; }
.ss-sum { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ss-trend { padding-top: 4px; }
.ss-tr th, .ss-tr td { white-space: nowrap; }
.ss-tr th a { color: var(--muted); text-decoration: none; } .ss-tr th a.is-on { color: var(--accent); font-weight: 700; }
.ss-act { justify-content: space-between; flex-wrap: wrap; }
.ss-asg { margin-top: 0; flex-wrap: nowrap; } .ss-asg input { width: 190px; min-width: 0; } .ss-asg .btn { white-space: nowrap; }
@media (max-width: 1100px) { .ss-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ss-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ss-fetch { width: 100%; } .ss-fetch label { flex: 1 1 40%; } .ss-fetch input { width: 100%; } .ss-fetch .btn { flex: 1 1 100%; justify-content: center; } .ss-asg { flex-wrap: wrap; } .ss-asg input { width: 100%; } }

/* Backup & Restore */
.bk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; margin: 14px 0 0; }
.bk-stat { padding: 14px 18px; display: grid; gap: 3px; align-content: start; }
.bk-stat .lbl { font-size: 13.5px; color: var(--muted); }
.bk-stat b { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.bk-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; margin-top: 18px; }
.bk-grid .tile-h h2, .bk-danger .tile-h h2 { display: flex; align-items: center; gap: 8px; margin: 0; } /* .bk-page-h */
.bk-grid .tile-h, .bk-danger .tile-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.bk-grid .rp-acts, .bk-danger .rp-acts { justify-content: flex-start; flex-wrap: wrap; margin-left: 0; width: 100%; }
.bk-form { display: grid; gap: 12px; }
.bk-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.bk-code { display: block; margin-top: 4px; padding: 6px 8px; border-radius: 6px; background: var(--line); overflow-wrap: anywhere; user-select: all; }
.bk-danger { margin-top: 26px; border-color: var(--bad, #b3261e); }
.bk-upload { display: grid; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
.bk-upload input[type=file] { flex: 1 1 220px; min-width: 0; }
