/* Accurator portal — design system */
@font-face { font-family: "Poppins"; src: url("../../fonts/poppins_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../../fonts/poppins_medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../../fonts/poppins_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../../fonts/poppins_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --chalk: #F2F3F5; --paper: #FFFFFF; --ink: #1B1D24; --ink-2: #444856; --muted: #6E7282; --faint: #9A9EAC;
  --line: #E3E5EA; --line-2: #EEF0F3; --hover: #F6F7F9;
  --rail: #22242C; --rail-2: #2C2F39; --rail-ink: #AEB2BF;
  --brand: #F2711C; --brand-2: #FF9447; --brand-ink: #B4500D; --brand-soft: #FFF0E6;
  --sky: #3D8BF2; --sky-soft: #EAF2FE; --leaf: #1F9D6B; --leaf-soft: #E5F6EE;
  --rose: #E0484E; --rose-soft: #FDECEC; --amber: #E39410; --amber-soft: #FDF3E1; --violet: #7A5AF0; --violet-soft: #F0ECFE;
  --off: #8B8FA0; --off-soft: #EEEFF3;
  --r-lg: 20px; --r-md: 12px; --r-sm: 8px;
  --display: "Poppins", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-pop: 0 18px 50px -18px rgba(27, 29, 36, .35), 0 2px 8px rgba(27, 29, 36, .06);
  --orb-ring: rgba(110, 114, 130, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --chalk: #15171C; --paper: #1C1F26; --ink: #ECEDF1; --ink-2: #C5C8D2; --muted: #969AA8; --faint: #6F7384;
  --line: #2C3039; --line-2: #252830; --hover: #23262E;
  --rail: #0F1115; --rail-2: #1D2027; --rail-ink: #8D91A0;
  --brand-soft: #3A2414; --brand-ink: #FFB27A; --sky-soft: #172739; --leaf-soft: #13302A; --rose-soft: #3A1C1F;
  --amber-soft: #33270F; --violet-soft: #241D3D; --off-soft: #262930;
  --shadow-pop: 0 18px 50px -18px rgba(0, 0, 0, .7);
  --orb-ring: rgba(180, 184, 200, .12);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--chalk); color: var(--ink); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.ic { flex: none; }
[hidden] { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(242, 113, 28, .8), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { background: #E2640F; }
.btn.ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--hover); }
.btn.quiet { background: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--hover); }
.btn.danger { background: var(--rose); color: #fff; }
.btn.ok { background: var(--leaf); color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.ghost.busy::after { border-color: var(--line); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn.ok { color: var(--leaf); border: 1px solid var(--line); background: var(--paper); }
.icon-btn.bad { color: var(--rose); border: 1px solid var(--line); background: var(--paper); }
.icon-btn.ok:hover { background: var(--leaf-soft); } .icon-btn.bad:hover { background: var(--rose-soft); }
.link { background: none; border: 0; padding: 0; color: var(--sky); font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ----------------------------------------------------------------- inputs */
.fld { display: grid; align-content: start; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.fld.full { grid-column: 1 / -1; }
.fld small { color: var(--faint); font-weight: 400; }
.fld .req { color: var(--rose); font-style: normal; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { padding-left: 38px !important; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(16px); }

/* ------------------------------------------------------------ pills/avatars */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--off-soft); color: var(--off); }
.pill.ok { background: var(--leaf-soft); color: var(--leaf); } .pill.bad { background: var(--rose-soft); color: var(--rose); }
.pill.warn { background: var(--amber-soft); color: var(--amber); } .pill.sky { background: var(--sky-soft); color: var(--sky); }
.pill.brand { background: var(--brand-soft); color: var(--brand-ink); } .pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.none { background: transparent; padding: 0; color: var(--faint); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.av { --s: 36px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: hsl(var(--h) 70% 92%); color: hsl(var(--h) 55% 32%); font: 600 calc(var(--s) * .36)/1 var(--display); letter-spacing: .02em; }
[data-theme="dark"] .av { background: hsl(var(--h) 35% 24%); color: hsl(var(--h) 70% 80%); }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person b { display: block; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.person:hover { text-decoration: none; } a.person:hover b { color: var(--brand); }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 88px 232px minmax(0, 1fr); min-height: 100vh; }
.shell.no-sub { grid-template-columns: 88px minmax(0, 1fr); }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 18px 0 14px; gap: 4px; position: sticky; top: 0; height: 100vh; z-index: 20; }
.rail .logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; background: linear-gradient(145deg, var(--brand-2), var(--brand)); color: #fff;
  font: 700 18px/1 var(--display); box-shadow: 0 10px 24px -10px rgba(242, 113, 28, .9), inset 0 1px 0 rgba(255,255,255,.3); overflow: hidden; }
.rail .logo img { width: 100%; height: 100%; object-fit: cover; }
.rail a { width: 72px; padding: 10px 0 8px; border-radius: 14px; display: grid; justify-items: center; gap: 5px; color: var(--rail-ink); font-size: 11.5px; font-weight: 500; text-decoration: none; position: relative; transition: color .15s, background .15s; }
.rail a:hover { color: #fff; background: var(--rail-2); }
.rail a.on { color: #fff; }
.rail a.on::before { content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.rail a.on .ic { color: var(--brand-2); }
.rail a .count { position: absolute; top: 4px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.rail .spacer { flex: 1; }
.subnav { border-right: 1px solid var(--line); background: var(--paper); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.subnav h2 { font-size: 17px; padding: 0 10px 14px; }
.subnav .grp { font-size: 12px; color: var(--faint); font-weight: 600; padding: 16px 10px 6px; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
.subnav a:hover { background: var(--hover); color: var(--ink); }
.subnav a.on { background: var(--brand-soft); color: var(--brand-ink); }
.subnav a.on .ic { color: var(--brand); }
.subnav a .n { margin-left: auto; font-size: 12px; color: var(--faint); font-weight: 600; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 15;
  background: color-mix(in srgb, var(--chalk) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .gsearch { margin-left: auto; width: min(340px, 34vw); }
.top .gsearch input { height: 38px; border-radius: 99px; background: var(--paper); }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.me-chip span { font-weight: 600; font-size: 13px; padding-right: 6px; }
.page { padding: 8px 28px 48px; flex: 1; }
.page-in { animation: pageIn .35s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
.pagebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }
.pagebar .grow { flex: 1; }
.menu-btn { display: none; }

/* --------------------------------------------------------------- dropdown */
.pop { position: absolute; z-index: 50; min-width: 220px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 6px; animation: pop .16s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop button, .pop a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink); text-decoration: none; }
.pop button:hover, .pop a:hover { background: var(--hover); }
.pop .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.pop .head { padding: 10px; }
.search-pop { width: min(420px, 90vw); max-height: 60vh; overflow: auto; }

/* ------------------------------------------------------------------ panels */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.panel-h h3 { font-size: 15px; }
.panel-h .act { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel-b { padding: 16px 20px 20px; }
.panel.flush .panel-b { padding: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }

/* stats strip (one panel, divided — not a row of identical cards) */
.stats { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stat { padding: 18px 20px; display: grid; gap: 2px; position: relative; text-decoration: none; color: inherit; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.stat b { font: 600 28px/1.15 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.stat small { font-size: 12px; font-weight: 600; }
a.stat:hover { background: var(--hover); text-decoration: none; }
a.stat:first-child:hover { border-radius: var(--r-lg) 0 0 var(--r-lg); } a.stat:last-child:hover { border-radius: 0 var(--r-lg) var(--r-lg) 0; }

/* --------------------------------------------------------------- tabs etc */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 14px 12px; border: 0; background: none; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; position: relative; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .on { color: var(--ink); }
.tabs .on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--line-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 12.5px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.stepper button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; border-radius: 9px; }
.stepper button:hover { background: var(--hover); }
.stepper span { min-width: 140px; text-align: center; font-weight: 600; font-family: var(--display); }

/* ------------------------------------------------------------------ tables */
.tbl-wrap { overflow: auto; border-radius: var(--r-lg); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 12px 16px; background: var(--line-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.tbl th:first-child { border-top-left-radius: var(--r-lg); } .tbl th:last-child { border-top-right-radius: var(--r-lg); }
.tbl th[data-sort] { cursor: pointer; user-select: none; }
.tbl th[aria-sort=ascending]::after { content: " ↑"; color: var(--brand); } .tbl th[aria-sort=descending]::after { content: " ↓"; color: var(--brand); }
.tbl td { padding: 12px 16px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--hover); }
.tbl tr.click { cursor: pointer; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .acts { text-align: right; white-space: nowrap; }
.tbl .sub { display: block; color: var(--muted); font-size: 12.5px; }
.tbl .late { color: var(--rose); font-size: 12px; font-weight: 600; display: block; }
.rowcount { font-size: 12.5px; color: var(--muted); padding: 10px 16px; border-top: 1px solid var(--line-2); }

/* ----------------------------------------------------------------- lists */
.list { display: grid; }
.list .it { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); min-width: 0; }
.list .it:first-child { border-top: 0; }
.list .it .r { margin-left: auto; text-align: right; color: var(--muted); font-size: 12.5px; flex: none; }
.datebox { width: 44px; height: 46px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-content: center; text-align: center; flex: none; }
.datebox b { font: 600 16px/1 var(--display); } .datebox small { font-size: 10.5px; font-weight: 600; }
.datebox.sky { background: var(--sky-soft); color: var(--sky); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 8px; align-items: center;
  background: var(--rail); color: #fff; border-radius: 24px; padding: 26px 30px; min-height: 280px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 113, 28, .35), transparent 70%); z-index: -1; }
.hero h2 { font-size: 32px; line-height: 1.12; letter-spacing: -.02em; max-width: 22ch; }
.hero .lead { color: #C9CCD6; margin-top: 8px; max-width: 46ch; }
.hero .legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; }
.hero .legend span { display: inline-flex; align-items: center; gap: 8px; color: #E6E7EC; font-size: 13px; }
.hero .legend b { font: 600 20px/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.hero .orb-wrap { position: relative; height: 300px; }
.hero canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; --orb-ring: rgba(255,255,255,.09); }
.hero canvas:active { cursor: grabbing; }
.hero .orb-cap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.hero .orb-cap b { display: block; font: 600 40px/1 var(--display); letter-spacing: -.03em; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.hero .orb-cap small { color: #C9CCD6; font-size: 12.5px; }
.hero .hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero .btn.ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
.hero .btn.ghost:hover { background: rgba(255,255,255,.14); }

/* ------------------------------------------------------------------ charts */
.gauge { margin: 0; width: var(--size); display: grid; justify-items: center; }
.gauge svg { width: 100%; overflow: visible; }
.gauge .g-track { fill: none; stroke: var(--line-2); stroke-width: 14; stroke-linecap: round; }
.gauge .g-val { fill: none; stroke-width: 14; stroke-linecap: round; stroke-dashoffset: var(--off); animation: gIn 1.1s var(--ease) both; }
@keyframes gIn { from { stroke-dashoffset: var(--full); } }
.gauge figcaption { margin-top: -34px; text-align: center; display: grid; justify-items: center; }
.gauge figcaption b { font: 600 24px/1 var(--display); font-variant-numeric: tabular-nums; display: inline; }
.gauge figcaption small { font-size: 12px; color: var(--muted); display: inline; margin-left: 2px; }
.gauge figcaption span { margin-top: 10px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.gauges { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 18px; padding: 6px 0; }
.donut { position: relative; width: var(--size); height: var(--size); flex: none; }
.donut svg { width: 100%; height: 100%; }
.donut .d-track { stroke: var(--line-2); }
.donut circle { transition: stroke-dasharray .8s var(--ease); }
.donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-c b { font: 600 24px/1 var(--display); } .donut-c small { color: var(--muted); font-size: 12px; }
.legend-list { display: grid; gap: 10px; }
.legend-list div { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.legend-list b { margin-left: auto; font: 600 15px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.bar-split { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line-2); gap: 2px; }
.bar-split i { display: block; height: 100%; }
.meter { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ----------------------------------------------------- attendance grid */
.mgrid-wrap { overflow: auto; max-height: calc(100vh - 260px); border-radius: var(--r-lg); }
table.mgrid { border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.mgrid th, .mgrid td { padding: 0; height: 46px; text-align: center; border-top: 1px solid var(--line-2); }
.mgrid thead th { position: sticky; top: 0; background: var(--line-2); z-index: 2; height: 52px; font-weight: 600; color: var(--muted); border-top: 0; }
.mgrid thead th small { display: block; font-weight: 500; font-size: 11px; color: var(--faint); }
.mgrid .sticky { position: sticky; left: 0; z-index: 1; background: var(--paper); text-align: left; padding: 0 14px; min-width: 230px; border-right: 1px solid var(--line); }
.mgrid thead .sticky { z-index: 3; background: var(--line-2); }
.mgrid .tot { min-width: 54px; font: 600 13px var(--display); color: var(--ink-2); background: var(--paper); }
.mgrid td.c { min-width: 42px; width: 42px; font-weight: 700; font-size: 11.5px; }
.mgrid td.c.ok { background: color-mix(in srgb, var(--leaf-soft) 70%, var(--paper)); color: var(--leaf); }
.mgrid td.c.bad { background: color-mix(in srgb, var(--rose-soft) 70%, var(--paper)); color: var(--rose); }
.mgrid td.c.warn { background: color-mix(in srgb, var(--amber-soft) 70%, var(--paper)); color: var(--amber); }
.mgrid td.c.sky { background: color-mix(in srgb, var(--sky-soft) 70%, var(--paper)); color: var(--sky); }
.mgrid td.c.violet { background: color-mix(in srgb, var(--violet-soft) 70%, var(--paper)); color: var(--violet); }
.mgrid td.c.off { background: var(--off-soft); color: var(--off); }
.mgrid td.c.brand { background: var(--brand-soft); color: var(--brand-ink); }
.mgrid td.c { box-shadow: inset 1px 0 0 var(--paper); }
.mgrid th.today { color: var(--brand); }
.key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 22px; height: 18px; border-radius: 5px; display: grid; place-items: center; font: 700 10px var(--body); font-style: normal; }

/* month calendar (employee) */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 12px; color: var(--faint); font-weight: 600; text-align: center; padding-bottom: 4px; }
.cal .day { min-height: 74px; border-radius: 12px; border: 1px solid var(--line-2); padding: 8px; display: grid; align-content: space-between; background: var(--paper); }
.cal .day .d { font: 600 13px var(--display); color: var(--ink-2); }
.cal .day .t { font-size: 11px; color: var(--muted); }
.cal .day.ok { background: var(--leaf-soft); border-color: transparent; } .cal .day.bad { background: var(--rose-soft); border-color: transparent; }
.cal .day.warn { background: var(--amber-soft); border-color: transparent; } .cal .day.sky { background: var(--sky-soft); border-color: transparent; }
.cal .day.off { background: var(--off-soft); border-color: transparent; } .cal .day.violet { background: var(--violet-soft); border-color: transparent; }
.cal .day.brand { border-color: var(--brand); }
.cal .day.blank { visibility: hidden; }

/* ------------------------------------------------------------ profile */
.prof-head { position: relative; border-radius: 24px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); margin-bottom: 18px; }
.prof-head .band { height: 110px; background:
  radial-gradient(400px 160px at 85% 0%, rgba(242,113,28,.55), transparent 70%),
  radial-gradient(500px 200px at 10% 120%, rgba(61,139,242,.35), transparent 70%), var(--rail); }
.prof-head .who { display: flex; align-items: flex-end; gap: 18px; padding: 0 24px 20px; margin-top: -48px; flex-wrap: wrap; }
.prof-head .who > div:nth-child(2) { padding-top: 56px; }
.prof-head .photo { width: 96px; height: 96px; border-radius: 26px; border: 4px solid var(--paper); background: var(--paper); overflow: hidden; display: grid; place-items: center; flex: none; }
.prof-head .photo .av { --s: 88px; border-radius: 22px; }
.prof-head .photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; } .prof-head .photo img.ready { opacity: 1; }
.prof-head h2 { font-size: 24px; }
.prof-head .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.prof-head .meta span { display: inline-flex; align-items: center; gap: 6px; }
.prof-head .acts { margin-left: auto; display: flex; gap: 8px; padding-bottom: 4px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.kv div span { display: block; font-size: 12.5px; color: var(--muted); }
.kv div b { font-weight: 500; color: var(--ink); }
.side-card { display: grid; gap: 14px; }
.face-tile { display: flex; gap: 14px; align-items: center; }
.face-tile .ph { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); flex: none; }
.face-tile .ph img { width: 100%; height: 100%; object-fit: cover; }

/* ----------------------------------------------------------- layers */
.layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.layer .scrim { position: absolute; inset: 0; background: rgba(15, 17, 21, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.layer .sheet { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--paper); border-radius: 22px;
  box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .2s, transform .25s var(--ease); outline: none; }
.layer.wide .sheet { width: min(860px, 100%); }
.layer.open .scrim { opacity: 1; } .layer.open .sheet { opacity: 1; transform: none; }
.layer.drawer { place-items: stretch end; padding: 0; }
.layer.drawer .sheet { height: 100vh; max-height: none; width: min(520px, 100%); border-radius: 22px 0 0 22px; transform: translateX(30px); }
.layer.drawer.wide .sheet { width: min(760px, 100%); }
.layer.drawer.open .sheet { transform: none; }
.sheet-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px 24px; border-bottom: 1px solid var(--line-2); }
.sheet-h h2 { font-size: 17px; flex: 1; }
.sheet-b { padding: 20px 24px; overflow: auto; flex: 1; }
.sheet-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line-2); }

/* -------------------------------------------------------------- toasts */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--rail); color: #fff; box-shadow: var(--shadow-pop); max-width: 420px;
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .25s var(--ease); font-weight: 500; }
.toast.in { opacity: 1; transform: none; }
.toast.ok .ic { color: #5FD3A1; } .toast.error .ic { color: #FF8A8E; }

/* ----------------------------------------------------- empty/skeleton */
.empty { text-align: center; padding: 48px 20px; display: grid; justify-items: center; gap: 6px; }
.empty h3 { font-size: 16px; } .empty p { color: var(--muted); max-width: 46ch; }
.empty .btn { margin-top: 10px; }
.empty-art { position: relative; width: 92px; height: 70px; margin-bottom: 10px; }
.empty-art span { position: absolute; width: 56px; height: 66px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.empty-art span:nth-child(1) { left: 4px; transform: rotate(-10deg); background: var(--line-2); }
.empty-art span:nth-child(2) { left: 30px; transform: rotate(6deg); }
.empty-art span:nth-child(3) { left: 40px; top: 18px; width: 30px; height: 6px; border: 0; border-radius: 3px; background: var(--brand); box-shadow: 0 12px 0 var(--line), 0 24px 0 var(--line); transform: rotate(6deg); }
.skel { display: grid; gap: 10px; padding: 16px; }
.skel i { height: 44px; border-radius: 12px; background: linear-gradient(90deg, var(--line-2), var(--hover), var(--line-2)); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.err-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--rose-soft); color: var(--rose); font-weight: 500; }
.err-box .btn { margin-left: auto; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--sky-soft); color: var(--ink-2); font-size: 13px; }
.note .ic { color: var(--sky); margin-top: 1px; }
.note.warn { background: var(--amber-soft); } .note.warn .ic { color: var(--amber); }

/* ------------------------------------------------------------- reports */
.rep-group h3 { font-size: 15px; margin: 22px 0 12px; }
.rep-card { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s var(--ease); }
.rep-card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.rep-card .ri { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.rep-card b { font-weight: 600; display: block; margin-bottom: 2px; color: var(--ink); }
.rep-card p { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); background: var(--rail); }
.login .stage { position: relative; overflow: hidden; color: #fff; padding: 40px 48px; display: flex; flex-direction: column; isolation: isolate; }
.login .stage::before { content: ""; position: absolute; inset: auto auto -30% -20%; width: 900px; height: 900px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242,113,28,.28), transparent 70%); z-index: -1; }
.login .brand { display: flex; align-items: center; gap: 12px; font: 600 20px var(--display); }
.login .brand .logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, var(--brand-2), var(--brand)); font-size: 17px; box-shadow: 0 10px 24px -10px rgba(242,113,28,.9); }
.login .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; --orb-ring: rgba(255,255,255,.07); }
.login .tagline { margin-top: auto; max-width: 620px; }
.login .tagline h1 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -.03em; max-width: 15ch; }
.login .tagline p { color: #BFC3CF; margin-top: 14px; font-size: 15px; max-width: 42ch; }
.login .facts { display: flex; gap: 28px; margin-top: 28px; color: #BFC3CF; font-size: 13px; }
.login .facts b { display: block; color: #fff; font: 600 15px var(--display); }
.login .card-side { background: var(--chalk); border-radius: 28px 0 0 28px; display: grid; place-items: center; padding: 40px; }
.login form, .login .flow { width: min(380px, 100%); display: grid; gap: 16px; }
.login h2 { font-size: 26px; letter-spacing: -.02em; }
.login .sub { color: var(--muted); margin-top: -8px; }
.login .btn.primary { height: 46px; justify-content: center; font-size: 15px; border-radius: 12px; }
.login .alt { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.login .err { color: var(--rose); font-size: 13px; min-height: 18px; font-weight: 500; }
.pw-wrap { position: relative; } .pw-wrap .icon-btn { position: absolute; right: 4px; top: 2px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input { height: 54px !important; text-align: center; font: 600 22px var(--display) !important; padding: 0 !important; border-radius: 12px !important; }
.login .foot { font-size: 12px; color: var(--faint); text-align: center; margin-top: 8px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell { grid-template-columns: 88px 200px minmax(0, 1fr); }
}
@media (max-width: 920px) {
  .shell, .shell.no-sub { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: 66px; flex-direction: row; justify-content: space-around; padding: 6px 8px; }
  .rail .logo, .rail .spacer, .rail .rail-extra { display: none; }
  .rail a { width: auto; flex: 1; padding: 8px 0 6px; font-size: 10.5px; }
  .rail a.on::before { left: 30%; right: 30%; top: -6px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .subnav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 4px; overflow-x: auto; padding: 10px 14px; }
  .subnav h2, .subnav .grp { display: none; }
  .subnav a { white-space: nowrap; }
  .main { padding-bottom: 70px; }
  .top { padding: 0 16px; } .page { padding: 8px 16px 40px; }
  .top .gsearch { display: none; }
  .me-chip span { display: none; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .orb-wrap { height: 220px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3)::before { display: none; }
  .form-grid, .form-grid.three, .kv { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login .stage { min-height: 260px; }
  .login .tagline h1 { font-size: 28px; } .login .facts { display: none; }
  .login .card-side { border-radius: 28px 28px 0 0; padding: 28px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- settings ---------- */
.pill.off { background: var(--line-2); color: var(--muted); }
.set-wrap { display: grid; gap: 18px; max-width: 980px; }
.set-tg { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.panel-b > .set-tg:first-child, .fld > .set-tg { border-top: 0; }
.set-tg b { display: block; font-weight: 600; font-size: 14px; color: var(--ink); }
.set-tg small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.set-save { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--paper) 96%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: 0 18px 40px -24px rgba(20, 24, 40, .35); }
.set-save #dirty { font-size: 13px; color: var(--amber); }
.set-logo { display: flex; gap: 20px; align-items: center; }
.logo-box { width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; overflow: hidden; flex: none; background: linear-gradient(145deg, var(--brand-2), var(--brand)); color: #fff; font: 600 34px var(--display); box-shadow: 0 14px 30px -16px rgba(242, 113, 28, .9); }
.logo-box img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.day-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.day-pick label { cursor: pointer; }
.day-pick input { position: absolute; opacity: 0; pointer-events: none; }
.day-pick span { display: grid; place-items: center; width: 58px; height: 44px; border-radius: 12px; border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--ink-2); transition: all .15s; }
.day-pick input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.day-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.shift-card.def { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.shift-time { display: flex; align-items: center; gap: 12px; margin: 16px 0 18px; font: 600 26px var(--display); letter-spacing: -.01em; }
.shift-time i { flex: 1; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); opacity: .85; }
.date-chip { width: 46px; height: 50px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; align-content: center; font-size: 11px; font-weight: 600; flex: none; line-height: 1.1; }
.date-chip b { font: 600 18px var(--display); }
.list .it.past { opacity: .55; }
@media (max-width: 920px) { .set-save { bottom: 78px; } .set-logo { flex-direction: column; align-items: flex-start; } .shift-time { font-size: 21px; } }
/* days before the employee's Accurator account existed: not tracked, never absent */
.mgrid td.c.na { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line-2) 5px 6px); }
.pill.na { background: var(--line-2); color: var(--muted); }
