/* Attendly — design system
   Type: Archivo (variable width + weight). UI at 100% width; times and figures at 118–125% width.
   Color: ledger green brand, punch-amber "now" signal, CVD-validated status hues. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations'), url(../fonts/archivo-latin-wdth-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations'), url(../fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --canvas: #eef2f0;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --surface-3: #edf1ef;
  --ink: #14201c;
  --ink-2: #3e4b46;
  --muted: #66736e;
  --line: #dde4e1;
  --line-2: #c6d1cc;
  --brand: #0f6e62;
  --brand-hover: #0b5a50;
  --brand-deep: #0c3b34;
  --brand-deeper: #08291f;
  --brand-soft: #e1efeb;
  --brand-ink: #0b4f46;
  --signal: #f3b23a;
  --signal-ink: #3a2700;
  --focus: #2d6cdf;
  --on-brand: #ffffff;
  /* status hues: validated (adjacent CVD ΔE ≥ 8 light; order on-time, late, leave, absent) */
  --s-ontime: #1f8a5b;
  --s-late: #c98509;
  --s-leave: #6e59c9;
  --s-absent: #c8452f;
  --s-ot: #2d6cdf;
  --good: #13724a;
  --good-soft: #e3f3ea;
  --warn: #8d5a00;
  --warn-soft: #fbf0d9;
  --bad: #b03a26;
  --bad-soft: #fbe7e2;
  --leave: #5a45b3;
  --leave-soft: #ece8fa;
  --ot: #1f57bf;
  --ot-soft: #e3ecfb;
  --neutral-soft: #edf0ef;
  --r-xs: 6px;
  --r-s: 9px;
  --r-m: 14px;
  --r-l: 20px;
  --r-xl: 28px;
  --shadow-pop: 0 12px 32px -8px rgb(12 30 25 / .22), 0 2px 6px rgb(12 30 25 / .08);
  --sidebar-w: 252px;
  --gutter: clamp(16px, 3vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0d1513;
    --surface: #141c19;
    --surface-2: #19231f;
    --surface-3: #1f2a26;
    --ink: #e8efec;
    --ink-2: #c0cbc6;
    --muted: #8c9a95;
    --line: #26332e;
    --line-2: #34433d;
    --brand: #2fa58f;
    --brand-hover: #3db8a1;
    --brand-deep: #0a2b25;
    --brand-deeper: #061c17;
    --brand-soft: #143a33;
    --brand-ink: #7fd7c4;
    --on-brand: #04201b;
    --s-ontime: #2a9a68;
    --s-late: #c48620;
    --s-leave: #8a74e0;
    --s-absent: #e0573f;
    --s-ot: #5b8ff0;
    --good: #5fd09b;
    --good-soft: #143326;
    --warn: #f0b960;
    --warn-soft: #3a2b10;
    --bad: #ff8c75;
    --bad-soft: #3e1c16;
    --leave: #b3a5f2;
    --leave-soft: #2a2347;
    --ot: #8fb2f7;
    --ot-soft: #1a2a4a;
    --neutral-soft: #1f2a26;
    --shadow-pop: 0 16px 40px -8px rgb(0 0 0 / .6), 0 2px 6px rgb(0 0 0 / .4);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 0;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(22px, 2.4vw, 28px); font-stretch: 112%; }
h2 { font-size: 18px; }
h3 { font-size: 15.5px; }
p { margin: 0; }
small { font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; }
.wide { font-stretch: 122%; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; flex: none; }
.icon-lg { width: 22px; height: 22px; flex: none; }
.stack > * + * { margin-top: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: var(--gap, 10px); }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 10px); }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-0 { margin-top: 0 !important; }
.mt-s { margin-top: 8px; }
.mt-m { margin-top: 16px; }
.mt-l { margin-top: 28px; }
.hidden, [hidden] { display: none !important; }

/* ---------- app shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  background: var(--brand-deep); color: #d5e5e0; display: flex; flex-direction: column; padding: 18px 14px 14px;
}
.sidebar a { color: inherit; text-decoration: none; }
.org-switch { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; color: #fff; }
.org-switch .logo { width: 36px; height: 36px; border-radius: 10px; background: #fff; object-fit: contain; padding: 3px; }
.org-switch .logo-fallback { width: 36px; height: 36px; border-radius: 10px; background: #1a5a4f; color: #fff; display: grid; place-items: center; font-weight: 700; font-stretch: 120%; font-size: 14px; }
.org-switch strong { display: block; font-size: 14.5px; line-height: 1.25; }
.org-switch span { display: block; font-size: 12px; color: #9fc0b7; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 12px; color: #86ab9f; padding: 16px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-s); font-size: 14.5px; color: #cfe1db; position: relative; }
.nav a:hover { background: rgb(255 255 255 / .06); color: #fff; }
.nav a[aria-current="page"] { background: rgb(255 255 255 / .1); color: #fff; font-weight: 600; }
.nav a[aria-current="page"]::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--signal); }
.nav .count { margin-left: auto; background: var(--signal); color: var(--signal-ink); font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.sidebar-foot { margin-top: auto; padding-top: 14px; display: grid; gap: 8px; }
.install-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-m); background: rgb(255 255 255 / .06); color: #fff; font-size: 13.5px; border: 1px solid rgb(255 255 255 / .1); cursor: pointer; font: inherit; text-align: left; width: 100%; }
.install-chip:hover { background: rgb(255 255 255 / .1); }
.install-chip small { display: block; color: #9fc0b7; font-size: 12px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-m); }
.me-chip .grow strong { display: block; color: #fff; font-size: 13.5px; font-weight: 600; }
.me-chip .grow span { display: block; font-size: 12px; color: #9fc0b7; }
.me-chip button { background: none; border: 0; color: #9fc0b7; padding: 6px; border-radius: 8px; cursor: pointer; }
.me-chip button:hover { color: #fff; background: rgb(255 255 255 / .08); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 12px var(--gutter); background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .menu-btn { display: none; }
.topbar-title { font-size: 14px; color: var(--muted); }
.topbar-title strong { color: var(--ink); font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.live-clock { font-stretch: 125%; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; color: var(--ink); padding: 6px 10px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.live-clock .sep { color: var(--signal); }
.live-clock small { font-stretch: 100%; font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 6px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--s-absent); box-shadow: 0 0 0 2px var(--surface); }
.content { padding: 8px var(--gutter) 56px; width: 100%; max-width: 1280px; }
.content-narrow { max-width: 880px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 10px 0 22px; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 64ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.impersonation { background: var(--signal); color: var(--signal-ink); font-size: 13.5px; padding: 8px var(--gutter); display: flex; gap: 12px; align-items: center; justify-content: center; }
.impersonation a { color: inherit; font-weight: 700; }

/* mobile shell */
.bottom-nav { display: none; }
.scrim { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-104%); transition: transform .22s ease; box-shadow: var(--shadow-pop); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgb(6 20 16 / .45); z-index: 50; }
  .topbar .menu-btn { display: inline-grid; }
  .live-clock small { display: none; }
}
@media (max-width: 720px) {
  body.has-bottom-nav .content { padding-bottom: 104px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); text-decoration: none; padding: 6px 2px; border-radius: 10px; }
  .bottom-nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }
  .bottom-nav a.primary .icon { width: 26px; height: 26px; padding: 4px; border-radius: 9px; background: var(--brand); color: var(--on-brand); }
}

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; }
.panel-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.panel-body { padding: 16px 18px 18px; }
.panel-body.flush { padding: 8px 0 4px; }
.panel-foot { border-top: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.panel.tint { background: var(--surface-2); }
.panel.brand { background: var(--brand-deep); border-color: var(--brand-deep); color: #e6f1ee; }
.panel.brand .muted { color: #9fc0b7; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; }
.grid-side { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .grid-main, .grid-side { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 15px;
  border-radius: var(--r-s); border: 1px solid var(--b-line); background: var(--b-bg); color: var(--b-fg);
  font: inherit; font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { --b-line: var(--muted); color: var(--b-fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: .6; cursor: not-allowed; }
.btn-primary { --b-bg: var(--brand); --b-fg: var(--on-brand); --b-line: var(--brand); }
.btn-primary:hover { --b-bg: var(--brand-hover); --b-line: var(--brand-hover); }
.btn-signal { --b-bg: var(--signal); --b-fg: var(--signal-ink); --b-line: var(--signal); }
.btn-signal:hover { --b-bg: #f6c15c; --b-line: #f6c15c; }
.btn-danger { --b-bg: var(--surface); --b-fg: var(--bad); --b-line: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn-danger:hover { --b-bg: var(--bad-soft); --b-line: var(--bad); }
.btn-ghost { --b-bg: transparent; --b-line: transparent; color: var(--ink-2); }
.btn-ghost:hover { --b-bg: var(--surface-3); --b-line: transparent; }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 12px 22px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-on-dark { --b-bg: transparent; --b-fg: #fff; --b-line: rgb(255 255 255 / .35); }
.btn-on-dark:hover { --b-bg: rgb(255 255 255 / .08); --b-line: #fff; color: #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field + .field { margin-top: 14px; }
.field label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .error { font-size: 13px; color: var(--bad); font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=time], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
[aria-invalid="true"], .has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
input[type=file] { font: inherit; font-size: 14px; color: var(--ink-2); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 10px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.input-group { display: flex; align-items: stretch; }
.input-group > :first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > :last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-affix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); font-size: 14px; border-radius: var(--r-s); white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .field + .field { margin-top: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check small { display: block; color: var(--muted); font-size: 13px; }
.switch { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch:first-child { border-top: 0; padding-top: 0; }
.switch strong { display: block; font-weight: 600; font-size: 14.5px; }
.switch span.d { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.switch input[type=checkbox] { appearance: none; flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; margin-top: 2px; }
.switch input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .15s; }
.switch input[type=checkbox]:checked { background: var(--brand); }
.switch input[type=checkbox]:checked::after { transform: translateX(18px); }
.days-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.days-pick label { position: relative; }
.days-pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.days-pick span { display: inline-grid; place-items: center; min-width: 48px; height: 38px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; color: var(--ink-2); background: var(--surface); }
.days-pick input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.days-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.radio-cards { display: grid; gap: 8px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-s); cursor: pointer; background: var(--surface); }
.radio-card:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); box-shadow: inset 0 0 0 1px var(--brand); }
.radio-card > input[type=radio] { margin-top: 3px; accent-color: var(--brand); width: 17px; height: 17px; flex: none; }
.radio-card > span > strong { display: block; font-size: 14.5px; }
.radio-card > span > span { display: block; font-size: 13px; color: var(--muted); }
.radio-card .reveal { margin-top: 10px; display: none; }
.radio-card:has(input:checked) .reveal { display: block; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-weight: 650; font-size: 15px; margin-bottom: 4px; }

/* ---------- segmented & tabs ---------- */
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 11px; gap: 2px; border: 1px solid var(--line); }
.seg a, .seg button { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 6px 12px; border-radius: 8px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg [aria-current="page"], .seg [aria-pressed="true"], .seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px var(--line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 12px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .count { font-size: 12px; background: var(--surface-3); color: var(--ink-2); padding: 0 7px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.tabs a[aria-current="page"] .count { background: var(--brand-soft); color: var(--brand-ink); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 9px 2px 8px; border-radius: 99px; background: var(--neutral-soft); color: var(--ink-2); white-space: nowrap; line-height: 1.6; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge-present, .badge-done, .badge-active, .badge-approved, .badge-sent, .badge-working { background: var(--good-soft); color: var(--good); }
.badge-late, .badge-pending, .badge-incomplete, .badge-queued, .badge-warning { background: var(--warn-soft); color: var(--warn); }
.badge-absent, .badge-missing, .badge-rejected, .badge-failed, .badge-suspended { background: var(--bad-soft); color: var(--bad); }
.badge-leave { background: var(--leave-soft); color: var(--leave); }
.badge-overtime { background: var(--ot-soft); color: var(--ot); }
.badge-holiday, .badge-off, .badge-not_in, .badge-archived, .badge-cancelled { background: var(--neutral-soft); color: var(--muted); }
.badge-working::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line); }

/* ---------- avatars ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; color: hsl(var(--h, 160) 45% 26%); background: hsl(var(--h, 160) 45% 88%); font-stretch: 110%; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 88px; height: 88px; font-size: 28px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: hsl(var(--h, 160) 50% 85%); background: hsl(var(--h, 160) 30% 24%); } }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.person > span > strong, .person > span > a > strong { display: block; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.person > span > span { display: block; color: var(--muted); font-size: 12.5px; }
.person > strong { font-weight: 600; font-size: 14.5px; color: var(--ink); }
a.person:hover strong { color: var(--brand); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num, .table td.right, .table th.right { text-align: right; font-variant-numeric: tabular-nums; }
.table a.row-link { color: inherit; text-decoration: none; }
.table tfoot td { font-weight: 650; border-top: 1px solid var(--line-2); border-bottom: 0; background: var(--surface-2); }
.table-compact td { padding: 8px 12px; }
.table th a { color: inherit; text-decoration: none; }
.table th a[aria-current="page"] { color: var(--ink); }
.table th a[aria-current="page"]::after { content: ' ↓'; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .meta { margin-left: auto; text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- flash & callouts ---------- */
.flashes { position: fixed; z-index: 90; top: 14px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(560px, calc(100vw - 32px)); }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-pop); font-size: 14.5px; animation: drop .25s ease-out; }
.flash .icon { margin-top: 1px; }
.flash button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; padding: 0 2px; }
.flash-success .icon { color: #6ee0a8; }
.flash-error { background: #8f2a1b; color: #fff; }
.flash-warning { background: #5c3d00; color: #fff; }
@keyframes drop { from { transform: translateY(-8px); opacity: 0; } }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.callout .icon { margin-top: 1px; color: var(--muted); }
.callout strong { color: var(--ink); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--s-late) 35%, transparent); color: var(--ink); }
.callout.warn .icon { color: var(--warn); }
.callout.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--s-absent) 35%, transparent); }
.callout.bad .icon { color: var(--bad); }
.callout.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--s-ontime) 35%, transparent); }
.callout.good .icon { color: var(--good); }
.callout.brand { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.callout.brand .icon { color: var(--brand-ink); }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { width: 30px; height: 30px; margin: 0 auto 10px; color: var(--line-2); }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.empty p { max-width: 42ch; margin: 0 auto; font-size: 14px; }
.empty .btn { margin-top: 14px; }

/* ---------- figures ---------- */
.figure { min-width: 0; }
.figure .label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.figure .value { display: block; font-size: clamp(21px, 2.1vw, 28px); font-weight: 650; font-stretch: 118%; letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.figure .value.sm { font-size: 22px; }
.figure .sub { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.figure .delta { font-size: 12.5px; font-weight: 600; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; }
.figure .value { overflow-wrap: anywhere; }
.figures > .figure { padding: 16px 18px; border-left: 1px solid var(--line); }
.figures > .figure:first-child { border-left: 0; }
@media (max-width: 640px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures > .figure { border-left: 0; border-top: 1px solid var(--line); }
  .figures > .figure:nth-child(-n+2) { border-top: 0; }
  .figures > .figure:nth-child(even) { border-left: 1px solid var(--line); }
}
.meter { display: block; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.meter-good > span { background: var(--s-ontime); }
.meter-warn > span { background: var(--s-late); }
.meter-bad > span { background: var(--s-absent); }
.score { display: inline-grid; place-items: center; min-width: 40px; height: 26px; padding: 0 8px; border-radius: 8px; font-weight: 700; font-stretch: 115%; font-size: 13.5px; font-variant-numeric: tabular-nums; background: var(--neutral-soft); color: var(--ink-2); }
.score-good { background: var(--good-soft); color: var(--good); }
.score-warn { background: var(--warn-soft); color: var(--warn); }
.score-bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- today: attendance bar ---------- */
.attbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--surface-3); }
.attbar span { display: block; min-width: 4px; }
.attbar .a-working { background: var(--s-ontime); }
.attbar .a-done { background: color-mix(in srgb, var(--s-ontime) 55%, var(--surface)); }
.attbar .a-missing { background: var(--s-absent); }
.attbar .a-leave { background: var(--s-leave); }
.attbar .a-not_in { background: var(--line-2); }
.attkey { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }
.attkey div { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; color: var(--muted); }
.attkey b { font-size: 22px; font-weight: 650; font-stretch: 118%; color: var(--ink); font-variant-numeric: tabular-nums; }
.attkey i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; align-self: center; }
.today-hero { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.today-hero .big { font-size: clamp(40px, 6vw, 60px); font-weight: 650; font-stretch: 125%; letter-spacing: -0.03em; line-height: 1; }
.today-hero .big small { font-size: .42em; font-weight: 500; font-stretch: 100%; color: var(--muted); letter-spacing: 0; margin-left: 6px; }

/* ---------- timecard strips (signature) ---------- */
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(220px, 2.2fr) 120px; gap: 16px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); }
.board li:first-child { border-top: 0; }
.board .times { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.board .times b { color: var(--ink); font-weight: 600; font-stretch: 112%; }
@media (max-width: 760px) { .board li { grid-template-columns: 1fr auto; } .board .strip { grid-column: 1 / -1; grid-row: 2; } }
.strip { position: relative; height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), var(--line) calc(12.5% - 1px) 12.5%), var(--surface-2); overflow: hidden; }
.strip > span { position: absolute; top: 0; bottom: 0; }
.strip-shift { background: color-mix(in srgb, var(--brand) 9%, transparent); border-left: 1px dashed color-mix(in srgb, var(--brand) 45%, transparent); border-right: 1px dashed color-mix(in srgb, var(--brand) 45%, transparent); }
.strip-work { top: 5px !important; bottom: 5px !important; border-radius: 4px; background: var(--s-ontime); }
.strip-work.is-live { background: linear-gradient(90deg, var(--s-ontime) 70%, color-mix(in srgb, var(--s-ontime) 40%, transparent)); }
.strip-late { top: 5px !important; bottom: 5px !important; background: repeating-linear-gradient(135deg, var(--s-late) 0 3px, color-mix(in srgb, var(--s-late) 35%, transparent) 3px 6px); border-radius: 4px 0 0 4px; }
.strip-early { top: 5px !important; bottom: 5px !important; background: repeating-linear-gradient(45deg, var(--s-absent) 0 3px, color-mix(in srgb, var(--s-absent) 30%, transparent) 3px 6px); border-radius: 0 4px 4px 0; }
.strip-ot { top: 5px !important; bottom: 5px !important; background: var(--s-ot); border-radius: 0 4px 4px 0; }
.strip-now { width: 2px; background: var(--signal); box-shadow: 0 0 0 1px var(--surface); }
.strip-tick { top: auto !important; bottom: -18px !important; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
.strip-empty { background: var(--surface-2); }
.strip.lg { height: 34px; border-radius: 9px; overflow: visible; margin-bottom: 20px; }
.strip.lg .strip-work, .strip.lg .strip-late, .strip.lg .strip-early, .strip.lg .strip-ot { top: 8px !important; bottom: 8px !important; }

/* ---------- charts ---------- */
.chart { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.s-on_time { background: var(--s-ontime); }
.s-late { background: var(--s-late); }
.s-leave { background: var(--s-leave); }
.s-absent { background: var(--s-absent); }
.s-ot, .s-value { background: var(--s-ot); }
.s-brand { background: var(--brand); }
.chart-plot { position: relative; height: var(--chart-h, 180px); padding-left: 34px; margin-bottom: 30px; }
.chart-grid { position: absolute; inset: 0 0 0 34px; pointer-events: none; }
.chart-grid span { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.chart-grid span b { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-cols { position: relative; list-style: none; margin: 0; padding: 0; height: 100%; display: flex; align-items: flex-end; gap: 2px; }
.chart-col { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; outline-offset: 0; cursor: default; }
.chart-col .stack { width: min(24px, 72%); display: flex; flex-direction: column; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 0; }
.chart-col .cseg { display: block; min-height: 2px; }
.chart-col:hover .stack, .chart-col:focus-visible .stack { filter: brightness(1.08) saturate(1.1); }
.chart-col:hover::before, .chart-col:focus-visible::before { content: ''; position: absolute; inset: 0 1px; background: var(--surface-3); border-radius: 6px; z-index: -1; }
.chart-col.is-muted .stack { opacity: .35; }
.chart-col .col-label { position: absolute; top: calc(100% + 6px); font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-col .col-label small { display: block; font-size: 11px; color: var(--ink-2); font-weight: 600; }
.chart-col.is-current .col-label { color: var(--ink); font-weight: 650; }
.chart-cols.dense { gap: 1px; }
.chart figcaption { font-size: 12.5px; color: var(--muted); }
.spark { color: var(--brand); }
.tooltip { position: fixed; z-index: 100; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12.5px; line-height: 1.4; padding: 7px 10px; border-radius: 8px; max-width: 280px; box-shadow: var(--shadow-pop); opacity: 0; transition: opacity .1s; }
.tooltip.on { opacity: 1; }

/* ---------- calendar ---------- */
.cal { font-variant-numeric: tabular-nums; }
.cal-head, .cal-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-head span { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal-day { aspect-ratio: 1 / 1; border-radius: 9px; display: grid; place-items: center; font-size: 13.5px; background: var(--surface-2); color: var(--ink-2); position: relative; max-height: 64px; }
.cal-day b { font-weight: 600; }
.cal-day.is-pad { background: transparent; }
.cal-day.c-present { background: color-mix(in srgb, var(--s-ontime) 18%, var(--surface)); color: var(--good); }
.cal-day.c-late { background: color-mix(in srgb, var(--s-late) 22%, var(--surface)); color: var(--warn); }
.cal-day.c-incomplete { background: color-mix(in srgb, var(--s-late) 14%, var(--surface)); color: var(--warn); box-shadow: inset 0 0 0 1.5px var(--s-late); }
.cal-day.c-absent { background: var(--s-absent); color: #fff; }
.cal-day.c-leave { background: color-mix(in srgb, var(--s-leave) 20%, var(--surface)); color: var(--leave); }
.cal-day.c-holiday { background: var(--surface-3); color: var(--muted); }
.cal-day.c-off { background: transparent; color: var(--line-2); }
.cal-day.c-future { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--signal); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.cal-legend span { display: flex; gap: 6px; align-items: center; }
.cal-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* ---------- dialogs & menus ---------- */
dialog { border: 0; padding: 0; border-radius: var(--r-l); background: var(--surface); color: var(--ink); width: min(520px, calc(100vw - 24px)); box-shadow: var(--shadow-pop); max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgb(6 20 16 / .5); }
dialog[open] { animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.dialog-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.dialog-body { padding: 16px 22px; }
.dialog-foot { padding: 0 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-3); }
.menu-pop .danger { color: var(--bad); }

/* ---------- filters bar ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters input[type=search], .filters input[type=date], .filters select { width: auto; min-height: 38px; font-size: 14px; }
.filters input[type=search] { min-width: 220px; flex: 1 1 220px; max-width: 360px; }
.period-nav { display: inline-flex; align-items: center; gap: 4px; }
.period-nav .label { font-weight: 650; font-size: 15px; padding: 0 8px; color: var(--ink); white-space: nowrap; }

/* ---------- staff: clock ---------- */
.clockface { text-align: center; padding: 28px 20px 24px; }
.clockface .time { font-size: clamp(64px, 18vw, 104px); font-weight: 600; font-stretch: 125%; letter-spacing: -0.04em; line-height: .95; font-variant-numeric: tabular-nums; }
.clockface .time .sep { color: var(--signal); animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.clockface .date { color: var(--muted); margin-top: 10px; font-size: 15px; }
.clock-btn {
  --c: var(--brand); display: grid; place-items: center; gap: 2px; width: min(260px, 72vw); aspect-ratio: 1 / 1; margin: 22px auto 0; border-radius: 50%;
  border: 0; cursor: pointer; color: #fff; font: inherit; background: var(--c);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 14%, transparent), 0 0 0 22px color-mix(in srgb, var(--c) 7%, transparent), 0 18px 40px -12px color-mix(in srgb, var(--c) 70%, transparent);
  transition: transform .12s, box-shadow .2s;
}
.clock-btn:hover { transform: scale(1.015); }
.clock-btn:active { transform: scale(.985); }
.clock-btn .icon { width: 40px; height: 40px; }
.clock-btn strong { font-size: 22px; font-weight: 650; font-stretch: 115%; }
.clock-btn span { font-size: 13.5px; opacity: .85; }
.clock-btn.out { --c: #9a3b2a; }
.clock-btn.busy { pointer-events: none; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--c) 18%, transparent), 0 0 0 30px color-mix(in srgb, var(--c) 6%, transparent); } }
.clock-btn[disabled] { --c: var(--line-2); color: var(--ink-2); cursor: not-allowed; box-shadow: none; }
.clock-status { margin: 22px auto 0; max-width: 420px; text-align: center; font-size: 14.5px; color: var(--muted); min-height: 22px; }
.result { margin: 20px auto 0; max-width: 460px; border-radius: var(--r-l); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--surface); }
.result .icon { width: 28px; height: 28px; }
.result h3 { font-size: 17px; }
.result p { color: var(--ink-2); font-size: 14px; margin-top: 3px; }
.result.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--s-ontime) 35%, transparent); }
.result.good .icon { color: var(--good); }
.result.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--s-late) 35%, transparent); }
.result.warn .icon { color: var(--warn); }
.result.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--s-absent) 35%, transparent); }
.result.bad .icon { color: var(--bad); }
.shift-line { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.shift-line span { display: inline-flex; gap: 6px; align-items: center; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.reasons button { font: inherit; font-size: 13.5px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: 6px 12px; border-radius: 99px; cursor: pointer; }
.reasons button:hover, .reasons button.on { border-color: var(--brand); background: var(--brand-soft); }

/* staff money summary */
.money-card { display: grid; gap: 4px; }
.money-card .value { font-size: 34px; font-weight: 650; font-stretch: 118%; letter-spacing: -0.02em; line-height: 1.1; }
.money-lines { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 0; font-size: 14px; }
.money-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.money-lines li span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- ID card (screen) ---------- */
.idwrap { max-width: 420px; margin: 0 auto; }
.idcard { border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgb(12 59 52 / .45); }
.idcard-top { background: var(--brand-deep); color: #fff; padding: 18px 20px; display: flex; align-items: center; gap: 12px; position: relative; }
.idcard-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--signal) 0 18px, transparent 18px 24px); opacity: .9; }
.idcard-top img { width: 38px; height: 38px; border-radius: 10px; background: #fff; object-fit: contain; padding: 3px; }
.idcard-top > span > strong { font-size: 15px; display: block; color: #fff; }
.idcard-top > span > span { font-size: 12px; color: #a9c9c0; display: block; }
.idcard-body { padding: 20px; display: grid; justify-items: center; text-align: center; gap: 6px; }
.idcard-body h2 { font-size: 21px; margin-top: 6px; }
.idcard-body .staffno { font-stretch: 125%; font-weight: 650; font-size: 18px; letter-spacing: .02em; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.qrbox { position: relative; width: min(280px, 76vw); aspect-ratio: 1 / 1; margin: 14px auto 4px; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.qrbox svg { width: 100%; height: 100%; }
.qrbox.stale svg { filter: blur(3px); opacity: .4; }
.qr-ring { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); }
.qr-ring svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.qr-ring circle { fill: none; stroke-width: 3; }
.qr-ring .track { stroke: var(--line); }
.qr-ring .bar { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }

/* ---------- onboarding steps ---------- */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 26px; counter-reset: step; }
.steps li { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps li.done { background: var(--brand); }
.steps li.now { background: linear-gradient(90deg, var(--brand) 50%, var(--line) 50%); }

/* ---------- focus / auth layouts ---------- */
.focus-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.focus-top { display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); }
.focus-main { flex: 1; display: flex; justify-content: center; padding: 10px var(--gutter) 60px; }
.focus-card { width: 100%; max-width: 640px; }
.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-side { background: var(--brand-deep); color: #e6f1ee; padding: 40px clamp(24px, 5vw, 64px); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-side .brandmark { color: #fff; }
.auth-side blockquote { margin: auto 0 0; font-size: clamp(22px, 2.6vw, 32px); font-weight: 600; font-stretch: 118%; line-height: 1.2; letter-spacing: -0.015em; color: #fff; max-width: 18ch; }
.auth-side .side-note { margin-top: 18px; color: #9fc0b7; max-width: 40ch; font-size: 15px; }
.auth-side .side-strip { margin-top: 30px; max-width: 420px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px var(--gutter); background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 28px; }
.auth-card .lead { color: var(--muted); margin-top: 8px; margin-bottom: 26px; }
.auth-foot { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-main { align-items: flex-start; padding-top: 28px; } }
.brandmark.auth-mobile-brand { display: none; margin-bottom: 26px; }
@media (max-width: 900px) { .brandmark.auth-mobile-brand { display: inline-flex; } }
.code-input { font-size: 30px !important; letter-spacing: .5em; text-align: center; font-weight: 650; font-stretch: 120%; font-variant-numeric: tabular-nums; padding-left: .5em !important; }
.brandmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-stretch: 120%; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brandmark svg { width: 30px; height: 30px; }
.org-badge { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: 22px; background: var(--surface-2); }
.org-badge img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.org-badge > span > strong { display: block; }
.org-badge > span > span { display: block; font-size: 13px; color: var(--muted); }
.account-pick { display: grid; gap: 8px; }
.account-pick button { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); font: inherit; cursor: pointer; text-align: left; color: var(--ink); }
.account-pick button:hover { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- kiosk ---------- */
.kiosk { min-height: 100dvh; background: var(--brand-deeper); color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.kiosk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; }
.kiosk-top .time { font-stretch: 125%; font-weight: 600; font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kiosk-top .time .sep { color: var(--signal); }
.kiosk-main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; padding: 0 22px 22px; align-items: stretch; }
@media (max-width: 860px) { .kiosk-main { grid-template-columns: 1fr; } }
.camera { position: relative; border-radius: 26px; overflow: hidden; background: #000; min-height: 320px; display: grid; place-items: center; }
.camera video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.camera .frame { position: relative; width: min(64%, 360px); aspect-ratio: 1 / 1; border-radius: 18px; box-shadow: 0 0 0 4000px rgb(0 0 0 / .38);
  --c: rgb(255 255 255 / .92);
  background:
    linear-gradient(var(--c), var(--c)) top left / 44px 4px no-repeat, linear-gradient(var(--c), var(--c)) top left / 4px 44px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 44px 4px no-repeat, linear-gradient(var(--c), var(--c)) top right / 4px 44px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 44px 4px no-repeat, linear-gradient(var(--c), var(--c)) bottom left / 4px 44px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 44px 4px no-repeat, linear-gradient(var(--c), var(--c)) bottom right / 4px 44px no-repeat; }
.camera .scanline { position: absolute; left: 6%; right: 6%; height: 2px; background: var(--signal); box-shadow: 0 0 12px var(--signal); animation: scan 2.4s ease-in-out infinite; top: 10%; }
@keyframes scan { 50% { top: 88%; } }
.camera .cam-msg { position: relative; text-align: center; padding: 20px; color: #cfe1db; max-width: 32ch; }
.kiosk-panel { background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .1); border-radius: 26px; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.kiosk-panel .seg { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .1); }
.kiosk-panel .seg button { color: #cfe1db; font-size: 15px; padding: 8px 16px; }
.kiosk-panel .seg [aria-pressed="true"] { background: #fff; color: var(--brand-deep); box-shadow: none; }
.kiosk-result { flex: 1; display: grid; place-items: center; text-align: center; border-radius: 20px; padding: 24px; background: rgb(255 255 255 / .04); min-height: 260px; }
.kiosk-result .avatar-xl, .kiosk-result img.avatar { width: 112px; height: 112px; font-size: 36px; margin: 0 auto 14px; }
.kiosk-result h2 { font-size: 28px; font-stretch: 115%; }
.kiosk-result p { color: #cfe1db; margin-top: 6px; font-size: 16px; }
.kiosk-result .big-time { font-size: 54px; font-weight: 650; font-stretch: 125%; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kiosk-result.good { background: color-mix(in srgb, var(--s-ontime) 30%, transparent); }
.kiosk-result.warn { background: color-mix(in srgb, var(--s-late) 32%, transparent); }
.kiosk-result.bad { background: color-mix(in srgb, var(--s-absent) 34%, transparent); }
.kiosk-foot { padding: 12px 22px 18px; color: #86ab9f; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kiosk-foot button { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- platform console tint ---------- */
body.console .sidebar { background: #1b2735; }
body.console .nav a[aria-current="page"]::before { background: #7fb0ff; }
body.console .org-switch .logo-fallback { background: #2c3d52; }

/* ---------- utilities for lists of approvals ---------- */
.approval { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.approval:first-child { border-top: 0; }
.approval .why { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.approval .actions { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; align-items: center; }
@media (max-width: 760px) { .approval { grid-template-columns: 1fr; } .approval .actions { justify-content: flex-start; flex-wrap: wrap; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.checklist a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 14.5px; }
.checklist a:hover { background: var(--surface-2); }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; }
.checklist .done .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.checklist .done span.t { color: var(--muted); text-decoration: line-through; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-size: 14px; background: var(--surface-2); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); align-items: center; font-size: 14px; }
.feed li:first-child { border-top: 0; }
.feed .t { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.feed .what { color: var(--ink-2); }
.feed .what strong { color: var(--ink); font-weight: 600; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Staff mobile stability polish — prevent layout jitter without removing functionality. */
@media (max-width: 640px) {
  .clockface .time { font-variant-numeric: tabular-nums; font-size: clamp(56px, 15vw, 78px); line-height: 1.12; min-height: 1.12em; }
  .clockface .time .sep { animation: none; }
  .page-head .page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .page-head .page-actions .btn { min-height: 42px; }
  .clock-btn:hover, .clock-btn:active { transform: none; }
  .poster-scan-dialog { width: min(96vw, 520px); max-height: 90dvh; }
  .content { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .clock-btn, .clockface .sep, .scanline { animation: none !important; transition: none !important; }
}
