/* Allurus HR — quiet, Apple-like surfaces: soft grey canvas, white cards, one teal accent, champagne highlight. */
:root {
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --surface-2: #F9F9FB;
  --sidebar: rgba(250, 250, 252, 0.82);
  --line: rgba(22, 24, 29, 0.08);
  --line-strong: rgba(22, 24, 29, 0.14);
  --fg: #16181D;
  --fg-2: #5F636B;
  --fg-3: #8A8F98;
  --brand: #0F766E;
  --brand-hover: #0B5F59;
  --brand-soft: rgba(15, 118, 110, 0.10);
  --on-brand: #FFFFFF;
  --gold: #B8914A;
  --gold-soft: rgba(184, 145, 74, 0.16);
  --ok: #1D8A50;
  --ok-soft: rgba(29, 138, 80, 0.12);
  --warn: #B26B00;
  --warn-soft: rgba(214, 140, 20, 0.15);
  --bad: #C93434;
  --bad-soft: rgba(201, 52, 52, 0.11);
  --info: #2F6AD0;
  --info-soft: rgba(47, 106, 208, 0.11);
  --scrim: rgba(10, 12, 16, 0.32);
  --map-land: #E3E5E8;
  --map-land-hover: #D6D9DD;
  --shadow: 0 1px 2px rgba(16, 18, 24, 0.04), 0 6px 24px rgba(16, 18, 24, 0.05);
  --shadow-lg: 0 24px 64px rgba(16, 18, 24, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  /* Layout and motion tokens. Density and motion preferences override these. */
  --card-pad: 22px; --gap: 20px; --gap-lg: 24px; --cell-y: 12px; --ctl-h: 36px;
  --ease: cubic-bezier(.2, .8, .2, 1); --dur: .18s;
  --brand-ring: rgba(15, 118, 110, 0.28);
  color-scheme: light;
}
:root[data-density="compact"] { --card-pad: 16px; --gap: 14px; --gap-lg: 16px; --cell-y: 8px; --ctl-h: 32px; }
:root[data-text="large"] body { zoom: 1.08; }
:root[data-text="larger"] body { zoom: 1.16; }
:root[data-contrast="more"] { --line: rgba(22, 24, 29, 0.2); --line-strong: rgba(22, 24, 29, 0.36); --fg-2: #3C3F46; --fg-3: #575B63; }
:root[data-contrast="more"][data-theme="dark"] { --line: rgba(255, 255, 255, 0.24); --line-strong: rgba(255, 255, 255, 0.4); --fg-2: #D3D5DA; --fg-3: #B4B7BE; }
@media (prefers-color-scheme: dark) { :root[data-contrast="more"]:not([data-theme="light"]) { --line: rgba(255, 255, 255, 0.24); --line-strong: rgba(255, 255, 255, 0.4); --fg-2: #D3D5DA; --fg-3: #B4B7BE; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0B0D; --surface: #18181B; --surface-2: #1F1F23; --sidebar: rgba(20, 20, 23, 0.82);
    --line: rgba(255, 255, 255, 0.08); --line-strong: rgba(255, 255, 255, 0.16);
    --fg: #F5F5F7; --fg-2: #A3A6AD; --fg-3: #7C8088;
    --brand: #2FB4A4; --brand-hover: #45C7B7; --brand-soft: rgba(47, 180, 164, 0.16); --on-brand: #04201D;
    --gold: #D9B66F; --gold-soft: rgba(217, 182, 111, 0.18);
    --ok: #3DC57E; --ok-soft: rgba(61, 197, 126, 0.15); --warn: #F0A93A; --warn-soft: rgba(240, 169, 58, 0.16);
    --bad: #FF6B6B; --bad-soft: rgba(255, 107, 107, 0.15); --info: #6EA0FF; --info-soft: rgba(110, 160, 255, 0.15);
    --scrim: rgba(0, 0, 0, 0.55); --map-land: #2A2B30; --map-land-hover: #34353B;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0B0D; --surface: #18181B; --surface-2: #1F1F23; --sidebar: rgba(20, 20, 23, 0.82);
  --line: rgba(255, 255, 255, 0.08); --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #F5F5F7; --fg-2: #A3A6AD; --fg-3: #7C8088;
  --brand: #2FB4A4; --brand-hover: #45C7B7; --brand-soft: rgba(47, 180, 164, 0.16); --on-brand: #04201D;
  --gold: #D9B66F; --gold-soft: rgba(217, 182, 111, 0.18);
  --ok: #3DC57E; --ok-soft: rgba(61, 197, 126, 0.15); --warn: #F0A93A; --warn-soft: rgba(240, 169, 58, 0.16);
  --bad: #FF6B6B; --bad-soft: rgba(255, 107, 107, 0.15); --info: #6EA0FF; --info-soft: rgba(110, 160, 255, 0.15);
  --scrim: rgba(0, 0, 0, 0.55); --map-land: #2A2B30; --map-land-hover: #34353B;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font);
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; box-shadow: 0 0 0 1px var(--brand); border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px;
  padding: 22px 14px 16px; background: var(--sidebar); border-right: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.brand svg { width: 30px; height: 30px; }
.brand-word { font-size: 15px; font-weight: 600; letter-spacing: 0.32em; }
.brand-sub { font-size: 11px; color: var(--fg-3); letter-spacing: 0.04em; margin-top: 1px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px;
  color: var(--fg-2); font-weight: 500; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--line); color: var(--fg); }
.nav a.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.nav a.active svg { color: var(--brand); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 600; background: var(--gold-soft); color: var(--gold); padding: 1px 7px; border-radius: 999px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.me-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-role { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.me-actions .select { height: 32px; font-size: 13px; flex: 1 1 100%; min-width: 0; }
.me-actions .btn { flex: 1 1 100%; }
.me-name { font-weight: 600; font-size: 13px; }
.me-role { font-size: 12px; color: var(--fg-3); }

.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 32px; background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 420px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fg-3); }
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid transparent;
  background: var(--line); outline: none; transition: background .15s, border-color .15s;
}
.search input:focus { background: var(--surface); border-color: var(--line-strong); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border-radius: 14px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; max-height: 320px; overflow-y: auto;
}
.search-results button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; background: none; border-radius: 10px; text-align: left; cursor: pointer; }
.search-results button:hover, .search-results button:focus { background: var(--line); }
.top-spacer { flex: 1; }
.today { color: var(--fg-2); font-size: 13px; white-space: nowrap; }
.view { padding: 32px 32px 64px; max-width: 1320px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: var(--gap-lg); outline: none; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eyebrow { font-size: 13px; color: var(--fg-3); font-weight: 500; margin-bottom: 4px; }
.page-head h1 { font-size: 34px; letter-spacing: -0.022em; line-height: 1.12; }
.page-head .sub { color: var(--fg-2); font-size: 15px; margin-top: 6px; max-width: 62ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--ctl-h); padding: 0 16px;
  border-radius: 999px; border: 1px solid transparent; background: var(--line); color: var(--fg);
  font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--line-strong); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-ok:hover { background: var(--ok); color: #fff; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--line); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: var(--ctl-h); padding: 0; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn-sm.btn-icon { width: 30px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--card-pad); min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-flush .card-head { padding: 18px 22px 0; }
.card-head h3 { font-size: 17px; letter-spacing: -0.01em; }
.card-head .hint { font-size: 13px; color: var(--fg-3); }
.grid { display: grid; gap: var(--gap); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 13px; color: var(--fg-2); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi-label .dot { width: 8px; height: 8px; border-radius: 50%; }
.kpi-value { font-size: 32px; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-foot { font-size: 12.5px; color: var(--fg-3); }

/* ---------- Pills, avatars ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--line); color: var(--fg-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 12.5px; flex: none; letter-spacing: 0.02em; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-sub { font-size: 12.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dept { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dept i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; padding: var(--cell-y) 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: var(--cell-y) 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--surface-2); }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
.r { text-align: right; }
td.r, th.r { text-align: right; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Forms & controls ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.input, .select, .textarea {
  height: var(--ctl-h); padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface);
  outline: none; min-width: 0; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.select { padding-right: 30px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%), linear-gradient(135deg, var(--fg-3) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.field .input, .field .select, .field .textarea { width: 100%; }
.field-hint { font-size: 12px; color: var(--fg-3); }

.seg { display: inline-flex; background: var(--line); padding: 3px; border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--fg-2); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg.status button.on[data-v="present"] { color: var(--ok); }
.seg.status button.on[data-v="remote"] { color: var(--info); }
.seg.status button.on[data-v="absent"] { color: var(--bad); }
.seg.status button.on[data-v="leave"] { color: var(--gold); }

.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.stars { color: var(--gold); letter-spacing: 2px; white-space: nowrap; }
.stars .off { color: var(--line-strong); }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.empty { padding: 28px 12px; text-align: center; color: var(--fg-3); }
.empty strong { display: block; color: var(--fg-2); font-weight: 600; margin-bottom: 4px; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--fg-3); font-size: 11px; font-family: var(--font); }
.chart .val { fill: var(--fg); font-size: 11.5px; font-weight: 600; font-family: var(--font); }
.chart .b-present { fill: var(--brand); }
.chart .b-remote { fill: var(--gold); }
.chart .area { fill: var(--brand-soft); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.chart .pt-end { fill: var(--brand); stroke: var(--surface); stroke-width: 3; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--fg-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.hbar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 28px; align-items: center; gap: 12px; padding: 7px 0; font-size: 13px; }
.hbar-track { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: inherit; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; transition: background .15s; }
.kcol.drop { background: var(--brand-soft); }
.kcol-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 4px; font-weight: 600; font-size: 13px; }
.kcol-head .n { color: var(--fg-3); font-weight: 500; }
.kcard { background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; cursor: grab; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .5; }
.kcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 500; font-size: 13px; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip .n { font-size: 11.5px; opacity: .65; }

/* ---------- Department cards ---------- */
.dcard { display: flex; flex-direction: column; gap: 16px; }
.dcard-top { display: flex; align-items: center; justify-content: space-between; }
.dcard-top h3 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.dcard-top h3 i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat-v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.015em; }
.stat-l { font-size: 12px; color: var(--fg-3); }
.faces { display: flex; }
.faces .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.faces .avatar:first-child { margin-left: 0; }

/* ---------- Overlays ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .18s ease; }
.modal { width: 100%; max-width: 620px; max-height: calc(100% - 32px); overflow-y: auto; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
.modal.sm { max-width: 440px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 6px; }
.modal-head h2 { font-size: 20px; letter-spacing: -0.015em; }
.modal-body { padding: 14px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px 22px; }
.drawer-scrim { place-items: stretch end; padding: 0; }
.drawer { width: min(440px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); overflow-y: auto; animation: slide .25s ease; display: flex; flex-direction: column; }
.drawer-hero { padding: 24px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); }
.drawer-section { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.drawer-section h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--fg-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots span { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 10px; font-weight: 600; }
.d-present { background: var(--ok-soft); color: var(--ok); }
.d-remote { background: var(--info-soft); color: var(--info); }
.d-absent { background: var(--bad-soft); color: var(--bad); }
.d-leave { background: var(--gold-soft); color: var(--gold); }
.d-none { background: var(--line); color: var(--fg-3); }
.confirm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--bad-soft); border-radius: 12px; color: var(--bad); font-weight: 500; }
.toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { position: relative; overflow: hidden; pointer-events: auto; background: var(--fg); color: var(--bg); padding: 10px 14px 10px 12px; border-radius: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: pop .22s var(--ease); display: flex; align-items: center; gap: 10px; max-width: 100%; }
.toast.out { animation: toastOut .18s ease forwards; }
.toast-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; flex: none; }
.toast-ic svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
.toast-error .toast-ic { background: var(--bad); }
.toast-info .toast-ic { background: var(--brand); color: var(--on-brand); }
.toast-msg { line-height: 1.35; }
.toast-btn { margin-left: 6px; border: 0; background: color-mix(in srgb, var(--bg) 18%, transparent); color: inherit; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.toast-btn:hover { background: color-mix(in srgb, var(--bg) 30%, transparent); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: color-mix(in srgb, var(--bg) 45%, transparent); transform-origin: left; animation: toastBar linear forwards; }
.toast.paused .toast-bar { animation-play-state: paused; }
@keyframes toastBar { to { transform: scaleX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.view > * { animation: rise .35s ease both; }
@keyframes rise { from { opacity: .4; transform: translateY(6px); } }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* ---------- Settings ---------- */
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.settings-row:last-child { border-bottom: 0; }
.settings-row .label { font-weight: 600; }
.settings-row .desc { font-size: 13px; color: var(--fg-3); margin-top: 2px; }

/* ---------- Selfie check-in ---------- */
.ci-status, .ci-problem { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0 4px; }
.ci-status p, .ci-problem p { margin-top: 4px; }
.ci-problem > svg.i { width: 28px; height: 28px; color: var(--warn); flex: none; margin-top: 2px; }
.ci-problem .hint { display: inline-block; margin-top: 8px; font-size: 13px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); flex: none; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ci-where { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--info-soft); color: var(--info); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.ci-where.ok { background: var(--ok-soft); color: var(--ok); }
.ci-cam { width: 100%; max-width: 320px; aspect-ratio: 1; margin: 0 auto; border-radius: 24px; overflow: hidden; background: var(--line); display: grid; place-items: center; }
.ci-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.ci-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-cam-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--fg-3); padding: 20px; text-align: center; font-size: 13px; }
.ci-cam-empty svg.i { width: 36px; height: 36px; }
.ci-hint { text-align: center; margin: 12px 0 0; font-size: 13px; }
.ci-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-bottom: 6px; }
.selfie-thumb { width: 34px; height: 34px; border-radius: 50%; padding: 0; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); overflow: hidden; cursor: zoom-in; flex: none; background: var(--line); }
.selfie-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.loc-cell { display: flex; align-items: center; gap: 10px; }
.loc-cell > span { min-width: 190px; }
.ci-where.bad { background: var(--bad-soft); color: var(--bad); }
.consent-list { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--fg-2); font-size: 13px; }
.ref-thumb { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line); box-shadow: 0 0 0 1px var(--line-strong); }
.ref-thumb.lg { width: 64px; height: 64px; }
.ref-thumb.empty { display: grid; place-items: center; color: var(--fg-3); }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.compare figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.compare img { width: 100%; aspect-ratio: 1; border-radius: 18px; object-fit: cover; }
.compare figcaption { font-size: 12.5px; color: var(--fg-3); text-align: center; }
.att-controls { display: flex; align-items: center; gap: 6px; }

/* ---------- Finance & Accounting ---------- */
.modal.lg { max-width: 880px; }
.chart .b-in { fill: var(--brand); }
.chart .b-out { fill: var(--gold); }
.amt-in { color: var(--ok); font-weight: 600; }
.amt-out { color: var(--fg); }
tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; background: var(--surface-2); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--line); color: var(--fg-2); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.lock-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--ok-soft); color: var(--ok); font-weight: 500; font-size: 13.5px; }
.lock-banner.info { background: var(--info-soft); color: var(--info); }
.lock-banner.warn { background: var(--warn-soft); color: var(--warn); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.steps > div { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.steps span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.steps p { color: var(--fg-3); font-size: 13px; }
.report { display: flex; flex-direction: column; gap: 16px; }
.report-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.report-grid h4, .trail h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); margin: 14px 0 6px; }
.report-grid section > h4:first-child { margin-top: 0; }
.rep-lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rep-lines .sub-h { font-weight: 600; color: var(--fg-2); border-bottom: 0; padding-top: 10px; }
.rep-lines .tot { font-weight: 600; }
.rep-lines .grand { font-weight: 700; font-size: 15px; border-bottom: 0; border-top: 2px solid var(--fg); margin-top: 4px; padding-top: 8px; }
.trail ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.trail p { margin-top: 2px; font-size: 13px; }
.review-box { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.review-box label { font-weight: 600; font-size: 13px; color: var(--fg-2); }
.doc { display: flex; flex-direction: column; gap: 18px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.doc-title { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.doc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; font-size: 13.5px; }
.doc-totals { margin-left: auto; width: min(320px, 100%); }
.doc-totals > div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.doc-totals .grand { font-weight: 700; font-size: 16px; border-bottom: 0; }
.inv-line { display: grid; grid-template-columns: minmax(0, 1fr) 72px 120px; gap: 8px; margin-bottom: 8px; }
.duties { display: flex; flex-wrap: wrap; gap: 6px; }
.dept-note { display: flex; gap: 8px; font-size: 12.5px; color: var(--fg-2); background: var(--gold-soft); padding: 10px 12px; border-radius: 12px; }
.dept-note svg.i { color: var(--gold); width: 16px; height: 16px; margin-top: 1px; }
.tax-suggest { padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.tax-suggest strong { color: var(--brand); }
.tax-suggest.warn { background: var(--warn-soft); }
.tax-suggest.warn strong { color: var(--warn); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.disclaimer { display: flex; gap: 8px; font-size: 12.5px; color: var(--fg-3); }
.disclaimer svg.i { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.relief { display: flex; flex-direction: column; gap: 8px; }
details.rules summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; }
details.rules summary::-webkit-details-marker { display: none; }
details.rules[open] summary { margin-bottom: 14px; }
details.rules summary h3 { font-size: 17px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Receipt scanner ---------- */
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.rc-start { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.rc-cam { position: relative; width: 100%; max-width: 420px; aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; background: var(--line); display: grid; place-items: center; }
.rc-cam video { width: 100%; height: 100%; object-fit: cover; }
.rc-frame { position: absolute; inset: 7% 10%; border: 2px dashed rgba(255, 255, 255, .8); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .18); pointer-events: none; }
.rc-reading { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; align-items: center; }
.rc-reading img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
.rc-review { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 20px; align-items: start; }
.rc-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; }
.rc-photo { width: 100%; max-height: 520px; object-fit: contain; border-radius: 14px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
.rc-side summary { cursor: pointer; font-size: 12.5px; color: var(--fg-2); }
.rc-side pre { margin: 6px 0 0; max-height: 220px; overflow: auto; font-size: 11px; line-height: 1.4; background: var(--surface-2); padding: 10px; border-radius: 10px; white-space: pre-wrap; }
.rc-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rc-items { display: flex; flex-direction: column; gap: 8px; }
.rc-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) 104px minmax(0, 190px); gap: 8px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.rc-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.rc-item .input, .rc-item .select { height: 34px; width: 100%; }
.rc-item.off { opacity: .55; }
.rc-why { grid-column: 2 / -1; margin: 0; font-size: 12px; color: var(--fg-3); }
.rc-totals { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); font-size: 13.5px; }
.rc-totals > div { display: flex; justify-content: space-between; gap: 12px; }
.rc-warn { margin: 4px 0 0; color: var(--warn); font-weight: 600; font-size: 13px; }
.rc-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); margin: 16px 0 6px; }
@media (max-width: 760px) {
  .rc-review { grid-template-columns: minmax(0, 1fr); }
  .rc-side { position: static; }
  .rc-photo { max-height: 260px; }
  .rc-item { grid-template-columns: 20px minmax(0, 1fr) 90px; }
  .rc-item .select { grid-column: 2 / -1; }
  .rc-reading { grid-template-columns: 90px minmax(0, 1fr); }
}

/* ---------- Sign-in ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 48px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.login-inner { width: 100%; max-width: 1040px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.login-brand svg { display: block; filter: drop-shadow(0 10px 24px rgba(15, 118, 110, .28)); }
.login h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.03em; line-height: 1.05; }
.login .sub { color: var(--fg-2); font-size: 17px; max-width: 46ch; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; width: 100%; margin-top: 12px; }
.role-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 24px; border-radius: 22px; border: 1px solid transparent; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.role-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-soft); }
.role-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.role-icon svg.i { width: 22px; height: 22px; }
.role-title { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.role-desc { color: var(--fg-2); font-size: 13.5px; }
.role-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--fg-2); margin-top: 4px; }
.role-list span { display: flex; align-items: center; gap: 8px; }
.role-list svg.i { width: 15px; height: 15px; color: var(--ok); }
.role-go { margin-top: auto; padding-top: 8px; color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 16px; text-align: left; margin-top: 8px; }
.login-card .input { height: 44px; font-size: 15px; }
.login-submit { height: 44px; font-size: 15px; width: 100%; }
.login-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: 13.5px; font-weight: 500; }
.pw-wrap { position: relative; }
.pw-wrap .input { width: 100%; padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 13px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.login-inner .register-cta { max-width: 640px; }
.register-cta { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 22px; border-radius: 18px; background: var(--gold-soft); text-align: left; }

/* ---------- Map ---------- */
.map-box { height: 380px; width: 100%; position: relative; }
.map-box svg { overflow: hidden; }
.jvm-tooltip { position: absolute; display: none; z-index: 5; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 10px; font: 12.5px/1.4 var(--font); box-shadow: var(--shadow-lg); white-space: nowrap; pointer-events: none; }
.jvm-tooltip.active { display: block; }
.jvm-zoom-btn { position: absolute; left: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--surface); color: var(--fg); box-shadow: var(--shadow); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; font-size: 16px; line-height: 1; user-select: none; }
.jvm-zoom-btn.jvm-zoomin { top: 0; }
.jvm-zoom-btn.jvm-zoomout { top: 34px; }
.map-box.jvm-container { position: relative; overflow: hidden; touch-action: none; }
@media (max-width: 640px) { .map-box { height: 240px; } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); background: var(--surface); }
  .sidebar.open { transform: none; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .today { display: none; }
  .view { padding: 24px 16px 56px; }
  .page-head h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .g-4, .g-3, .g-2 { grid-template-columns: minmax(0, 1fr); }
  .g-4.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-value { font-size: 26px; }
  .card { padding: 18px; }
  .toolbar { padding: 14px 16px; }
  th:first-child, td:first-child { padding-left: 16px; }
  th:last-child, td:last-child { padding-right: 16px; }
  .hide-sm { display: none; }
  .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
}

/* Medical claims */
.receipt-pick .rp-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.receipt-pick img { width: 84px; height: 112px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.rp-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
table.policy .input { min-width: 0; }
table.policy td:first-child .input { min-width: 180px; }
table.policy td.r .input { width: 96px; text-align: right; }
table.policy tr.off td:first-child { opacity: .55; }

/* Financial planner */
.plan-bar { display: flex; height: 30px; border-radius: 10px; overflow: hidden; background: var(--line); gap: 2px; }
.plan-bar i { display: block; height: 100%; min-width: 3px; }
.plan-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin-top: 14px; }
.plan-legend > div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.plan-legend strong { margin-left: auto; }
.plan-legend + .lock-banner { margin-top: 14px; }
.plan-group { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.plan-group:first-of-type { border-top: 0; padding-top: 0; }
.plan-group > .btn { align-self: flex-start; }
.plan-group-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plan-group-head h4 { font-size: 15px; margin: 0 0 2px; }
.plan-group-head .faint { font-size: 12.5px; }
.plan-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 120px 72px 32px; gap: 8px; align-items: center; }
.plan-row .input.num { text-align: right; }
.plan-paid { display: grid; place-items: center; }
.plan-paid input, .plan-debt input { accent-color: var(--brand); width: 16px; height: 16px; }
.plan-debt { align-items: center; font-size: 12.5px; color: var(--fg-2); }
.plan-rule { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 82px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.plan-rule-track { position: relative; height: 8px; border-radius: 999px; background: var(--line); }
.plan-rule-track i { display: block; height: 100%; border-radius: inherit; }
.plan-rule-track b { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--fg-2); border-radius: 1px; }
@media (max-width: 640px) {
  .plan-row { grid-template-columns: 22px minmax(0, 1fr) 96px 32px; }
  .plan-row .plan-debt, .plan-row > span.hide-sm { display: none; }
  .plan-rule { grid-template-columns: 1fr 70px; }
  .plan-rule-track { grid-column: 1 / -1; grid-row: 2; }
}
.cell-btn { all: unset; cursor: pointer; display: block; border-radius: 10px; }
.cell-btn:hover .person-name { color: var(--brand); }
.cell-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* =====================================================================
   Experience layer: navigation, command palette, dashboards, guidance
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 16px; border-radius: 999px; border: 0; background: var(--brand); color: var(--on-brand); font-weight: 600; transform: translateY(-160%); transition: transform var(--dur) var(--ease); cursor: pointer; }
.skip-link:focus-visible { transform: none; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg-2); font: 600 11px/1 var(--font); box-shadow: 0 1px 0 var(--line-strong); }

/* Top bar */
.cmdk-trigger { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 420px; height: var(--ctl-h); padding: 0 8px 0 12px; border-radius: 10px; border: 1px solid transparent; background: var(--line); color: var(--fg-3); cursor: pointer; text-align: left; transition: background var(--dur), border-color var(--dur); }
.cmdk-trigger:hover { background: var(--line-strong); color: var(--fg-2); }
.cmdk-trigger span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--fg-2); white-space: nowrap; }
.live-pill i, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok-soft); animation: livePulse 2.4s ease-out infinite; display: inline-block; }
.live-pill.pulse i { animation: livePulse .9s ease-out 3; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* Sidebar items with pins */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item a { flex: 1; min-width: 0; padding-right: 34px; }
.nav-item a span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { margin-right: 4px; }
.nav-pin { position: absolute; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-3); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity var(--dur), background var(--dur); }
.nav-pin svg.i { width: 15px; height: 15px; }
.nav-pin:hover { background: var(--line); color: var(--fg); }
.nav-pin.on { color: var(--gold); opacity: 1; }
.nav-item:hover .nav-pin, .nav-pin:focus-visible { opacity: 1; }
.nav-item a:has(.count) + .nav-pin:not(.on) { right: 4px; }
.nav-item:has(.count) .nav-pin:not(.on) { display: none; }
.nav-item:has(.count):hover .nav-pin { display: grid; }
.nav-item:has(.count):hover .count { visibility: hidden; }
@media (hover: none) { .nav-pin { opacity: .55; } }

/* Customizable dashboard */
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); grid-auto-flow: row dense; align-items: stretch; }
.widget { grid-column: span 12; min-width: 0; display: flex; flex-direction: column; gap: 8px; border-radius: calc(var(--radius) + 6px); transition: transform var(--dur) var(--ease), box-shadow var(--dur), opacity var(--dur); }
.widget > .card, .widget > .grid { height: 100%; }
.s-4 { grid-column: span 4; } .s-6 { grid-column: span 6; } .s-8 { grid-column: span 8; } .s-12 { grid-column: span 12; }
.board.editing .widget:not(:has(.hero)):not(:has(.setup)) { padding: 8px; background: color-mix(in srgb, var(--brand) 5%, transparent); outline: 1.5px dashed color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: -1px; }
.board.editing .widget[draggable="true"] { cursor: grab; }
.widget.dragging { opacity: .45; transform: scale(.98); }
.widget.drop-before { box-shadow: -4px 0 0 0 var(--brand); }
.widget.drop-after { box-shadow: 4px 0 0 0 var(--brand); }
.widget.s-12.drop-before { box-shadow: 0 -4px 0 0 var(--brand); }
.widget.s-12.drop-after { box-shadow: 0 4px 0 0 var(--brand); }
.widget-tools { display: flex; align-items: center; gap: 6px; padding: 2px 2px 2px 6px; flex-wrap: wrap; }
.widget-tools .grip { color: var(--fg-3); display: grid; cursor: grab; }
.widget-name { font-weight: 600; font-size: 13px; flex: 1; min-width: 80px; }
.seg.seg-xs button { height: 26px; padding: 0 9px; font-size: 12px; }
.board-bar { position: sticky; top: 70px; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.board-bar > div:first-child { display: flex; align-items: center; gap: 10px; color: var(--fg-2); }
.board-bar > div:first-child svg { color: var(--brand); }
.board-tray { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }

/* Welcome card */
.hero { position: relative; overflow: hidden; padding: calc(var(--card-pad) + 6px); background: radial-gradient(120% 140% at 0% 0%, var(--brand-soft), transparent 55%), var(--surface); display: flex; flex-direction: column; gap: 20px; }
.hero-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.hero-text { flex: 1 1 380px; min-width: 0; }
.hero h1 { font-size: 34px; letter-spacing: -0.024em; line-height: 1.1; }
.hero .sub { color: var(--fg-2); font-size: 15px; margin-top: 8px; max-width: 64ch; }
.hero-actions { margin-top: 18px; }
.clock-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; text-align: right; padding: 16px 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); min-width: min(100%, 300px); }
.clock-box .kpi-label svg { width: 15px; height: 15px; }
.clock-time { font-size: 46px; letter-spacing: -0.03em; }
.clock-state { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.focus { border-top: 1px solid var(--line); padding-top: 16px; }
.focus.calm { display: flex; align-items: center; gap: 10px; color: var(--ok); font-weight: 500; }
.focus-label { display: flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); font-weight: 600; margin-bottom: 10px; }
.focus-label svg { width: 15px; height: 15px; color: var(--gold); }
.focus-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.focus-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-align: left; cursor: pointer; font: inherit; transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur); }
.focus-item:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.focus-item strong { display: block; font-size: 14px; }
.focus-item small { display: block; color: var(--fg-3); font-size: 12.5px; margin-top: 2px; }
.focus-go { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.focus-go svg { width: 14px; height: 14px; }
.focus-ic, .insight-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--line); color: var(--fg-2); }
.focus-ic svg, .insight-ic svg { width: 17px; height: 17px; }
.tone-warn .focus-ic, .tone-warn .insight-ic { background: var(--warn-soft); color: var(--warn); }
.tone-bad .focus-ic, .tone-bad .insight-ic { background: var(--bad-soft); color: var(--bad); }
.tone-good .focus-ic, .tone-good .insight-ic { background: var(--ok-soft); color: var(--ok); }
.tone-info .focus-ic, .tone-info .insight-ic { background: var(--brand-soft); color: var(--brand); }

/* Insights */
.insights { display: flex; flex-direction: column; }
.insight { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.insight:last-child { border-bottom: 0; }
.insight-t { font-weight: 600; font-size: 13.5px; }
.insight-d { font-size: 12.5px; color: var(--fg-3); margin-top: 1px; }
.card-head .hint svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; color: var(--gold); }
.card-link { display: inline-flex; align-items: center; gap: 2px; margin-top: 12px; font-weight: 500; }
.card-link svg { width: 14px; height: 14px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; padding: 1px 6px; border-radius: 6px; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }
.kv-wide { grid-template-columns: 130px minmax(0, 1fr); }

/* Guided setup */
.setup { display: flex; flex-direction: column; gap: 16px; }
.setup-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.setup-head h3 { font-size: 18px; }
.ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line) 0); }
.ring span { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.setup-list a, .setup-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--dur), background var(--dur); }
.setup-list a:hover, .setup-list button:hover { border-color: var(--brand); }
.setup-list li.done a, .setup-list li.done button { color: var(--fg-3); }
.setup-list li.done span:nth-child(2) { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.tick.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); animation: pop .3s var(--ease); }
.tick svg { width: 12px; height: 12px; stroke-width: 2.6; }

/* Command palette */
.cmdk-scrim { z-index: 80; place-items: start center; padding-top: min(14vh, 120px); }
.cmdk { width: min(640px, 100%); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; animation: pop .18s var(--ease); display: flex; flex-direction: column; max-height: min(560px, 76vh); }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cmdk-input svg { color: var(--fg-3); }
.cmdk-input input { flex: 1; height: 56px; border: 0; outline: 0; background: transparent; font-size: 17px; min-width: 0; }
.cmdk-list { overflow-y: auto; padding: 6px; }
.cmdk-group { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); padding: 10px 10px 6px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.cmdk-item.on { background: var(--brand-soft); }
.cmdk-item.on .cmdk-ic { color: var(--brand); }
.cmdk-ic { width: 26px; height: 26px; display: grid; place-items: center; color: var(--fg-2); flex: none; }
.cmdk-label { font-weight: 500; }
.cmdk-sub { color: var(--fg-3); font-size: 12.5px; margin-left: 8px; }
.cmdk-empty { padding: 28px 16px; text-align: center; color: var(--fg-3); }
.cmdk-empty strong { display: block; color: var(--fg-2); margin-bottom: 4px; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: 12px; }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* Help and tour */
.help-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.help-list li { display: flex; gap: 10px; align-items: flex-start; }
.help-list svg { color: var(--gold); width: 16px; height: 16px; margin-top: 2px; }
.shortcuts { grid-template-columns: 120px minmax(0, 1fr); align-items: center; }
.shortcuts dt { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
#tour-root .tour-spot { position: fixed; z-index: 85; border-radius: 14px; box-shadow: 0 0 0 9999px var(--scrim), 0 0 0 3px var(--brand); pointer-events: none; transition: all .25s var(--ease); }
.tour-pop { position: fixed; z-index: 86; width: 340px; max-width: calc(100vw - 32px); background: var(--surface); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 8px; animation: pop .22s var(--ease); }
.tour-step { font-size: 12px; font-weight: 600; color: var(--brand); }
.tour-pop h3 { font-size: 17px; }
.tour-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

/* Feedback */
.confetti { position: fixed; left: 50%; top: 42%; z-index: 95; pointer-events: none; }
.confetti i { position: absolute; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: confetti var(--d) cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 340px)) rotate(var(--r)); } }
.field-error { display: inline-flex; align-items: center; gap: 4px; color: var(--bad); font-size: 12.5px; font-weight: 500; }
.field-error svg { width: 13px; height: 13px; }
[aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-soft) !important; }
.shake { animation: shake .36s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.btn:focus-visible { outline-offset: 3px; }

/* Appearance */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform var(--dur) var(--ease); }
.swatch:hover { transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }

/* Mobile tab bar */
.tabbar { display: none; }
@media (max-width: 1180px) {
  .s-4 { grid-column: span 6; } .s-8 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none; border-radius: 12px; color: var(--fg-3); font: 500 11px/1.1 var(--font); cursor: pointer; min-height: 48px; justify-content: center; }
  .tabbar a span, .tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a.on { color: var(--brand); }
  .tabbar svg.i { width: 22px; height: 22px; }
  .view { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toast-root { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .live-pill span, .cmdk-trigger kbd { display: none; }
  .board-bar { top: 62px; }
  .hero h1 { font-size: 28px; }
  .clock-box { align-items: stretch; text-align: left; width: 100%; }
  .clock-state { align-items: flex-start; }
}
@media (max-width: 640px) {
  .s-4, .s-6, .s-8 { grid-column: span 12; }
  .hero { padding: 20px; }
  .hero h1 { font-size: 26px; }
  .clock-time { font-size: 40px; }
  .focus-list { grid-template-columns: minmax(0, 1fr); }
  .scrim:not(.drawer-scrim):not(.cmdk-scrim) { place-items: end stretch; padding: 0; }
  .scrim:not(.drawer-scrim):not(.cmdk-scrim) > .modal { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; animation: sheet .28s var(--ease); padding-bottom: env(safe-area-inset-bottom); }
  .cmdk-scrim { padding: 10px; }
  .cmdk { max-height: 82vh; }
  .cmdk-foot { display: none; }
  .widget-name { flex-basis: 100%; }
  .setup-list { grid-template-columns: minmax(0, 1fr); }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }

/* Check-in location: map picker and preview (Leaflet) */
.zone-field { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; min-width: 0; }
.zone-field .actions { flex-wrap: nowrap; }
.zone-field .input { width: min(260px, 100%); }
.zone-field .field-hint { text-align: right; }
.zone-field .field-hint.field-error { display: block; max-width: 420px; }
.map-pick { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 14px; border-bottom: 1px solid var(--line); position: relative; }
.map-search { display: flex; gap: 8px; }
.map-search .input { flex: 1; min-width: 0; }
.map-results { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.map-results button { display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 13px; line-height: 1.35; color: var(--fg); }
.map-results button:hover, .map-results button:focus-visible { background: var(--brand-soft); }
.map-results svg.i { width: 15px; height: 15px; margin-top: 1px; color: var(--brand); }
.map-canvas { position: relative; height: 320px; width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); z-index: 0; }
.map-canvas.map-sm { height: 200px; margin: 10px 0 8px; }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--fg-3); font-size: 13px; }
.map-results .map-loading { position: static; padding: 10px; }
.map-canvas .leaflet-container, .map-canvas.leaflet-container { font: inherit; background: var(--surface-2); }
.map-canvas .leaflet-control-zoom a { color: var(--fg); background: var(--surface); border-color: var(--line); }
.map-canvas .leaflet-control-attribution { font-size: 10.5px; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--fg-2); }
.map-canvas .leaflet-control-attribution a { color: var(--fg-2); }
.map-pin span { position: absolute; left: 3px; top: 0; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.map-pin span::after { content: ""; position: absolute; left: 6px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.map-pin.approx span { background: var(--warn); }
.map-dot span { display: block; width: 18px; height: 18px; border-radius: 50%; background: #2F6AD0; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(47, 106, 208, .35), 0 2px 6px rgba(0, 0, 0, .3); }
.zone-debug { margin: 4px 0 8px; font-size: 12.5px; grid-template-columns: 110px minmax(0, 1fr); }
/* OpenStreetMap tiles are light; dim and invert them in dark mode so the map doesn't glare. */
:root[data-theme="dark"] .map-canvas .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map-canvas .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); } }
@media (max-width: 640px) {
  .zone-coords { flex-direction: column; align-items: stretch; }
  .zone-field { align-items: stretch; }
  .zone-field .actions { flex-wrap: wrap; }
  .zone-field .input { width: 100%; }
  .zone-field .field-hint { text-align: left; }
  .map-canvas { height: 280px; }
  .map-search .btn span { display: none; }
}

/* e-Leave */
.lv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: 0; flex: none; }
.lv-type { display: inline-flex; align-items: center; white-space: nowrap; font-weight: 500; }
.lv-next { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.chain-dots { display: inline-flex; gap: 3px; flex: none; }
.chain-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.chain-dots .cd-approved { background: var(--ok); }
.chain-dots .cd-next { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.chain-dots .cd-rejected { background: var(--bad); }
.chain-dots .cd-cancelled { background: var(--line); }
.lv-tabs { align-self: flex-start; }
.lv-top { align-items: start; }
.lv-side { display: flex; flex-direction: column; gap: var(--gap); }
.lv-tomorrow { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-2); }
.lv-tomorrow svg.i { width: 16px; height: 16px; color: var(--brand); flex: none; margin-top: 1px; }
.lv-hdate { width: 42px; text-align: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); padding: 4px 0; flex: none; line-height: 1.1; }
.lv-hdate b { display: block; font-size: 16px; }
.lv-hdate span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.lv-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); margin: 18px 0 8px; }
.chain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chain li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.chain .ch-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--fg-3); flex: none; }
.chain .ch-ic svg.i { width: 14px; height: 14px; stroke-width: 2.2; }
.chain .ch-approved .ch-ic { background: var(--ok-soft); color: var(--ok); }
.chain .ch-rejected .ch-ic { background: var(--bad-soft); color: var(--bad); }
.chain .ch-next .ch-ic { background: var(--warn-soft); color: var(--warn); }
.chain .ch-skipped, .chain .ch-cancelled { opacity: .65; }
.lv-overlap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lv-overlap li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.lv-overlap li span:not(.pill):not(.avatar) { flex: 1; min-width: 0; }
.lv-att { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lv-att img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.lv-att figcaption { font-size: 12px; color: var(--fg-3); overflow-wrap: anywhere; }
.lv-summary { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.lv-summary .field-error { display: flex; }
.lv-half { border: 0; padding: 0; margin: 0; min-width: 0; }
.lv-half legend { font-size: 12.5px; font-weight: 600; color: var(--fg-2); padding: 0; margin-bottom: 6px; }
.seg-radio { position: relative; }
.seg-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-radio span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 8px; font-weight: 500; font-size: 13px; color: var(--fg-2); white-space: nowrap; }
.seg-radio input:checked + span { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg-radio input:focus-visible + span { outline: 3px solid var(--brand-ring); }
/* Calendar */
.lc-toolbar { flex-wrap: wrap; }
.lc-toolbar h3 { min-width: 140px; text-align: center; }
.lc-grid { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lc-row, .lc-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.lc-head { padding: 8px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.lc-head.rest { color: var(--fg-3); opacity: .7; }
.lc-cell { min-height: 92px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lc-days .lc-cell:nth-child(7n) { border-right: 0; }
.lc-cell.rest { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px), var(--surface-2); }
.lc-cell.hol { background: var(--gold-soft); }
.lc-cell.blank { background: var(--surface-2); }
.lc-cell.today .lc-date { background: var(--brand); color: var(--on-brand); }
.lc-date { font-size: 12px; font-weight: 600; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.lc-hol { font-size: 10.5px; color: var(--gold); font-weight: 600; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lc-chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-chip { all: unset; box-sizing: border-box; display: block; font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--fg); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.lc-chip:hover { background: color-mix(in srgb, var(--c) 30%, transparent); }
.lc-chip.pending { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, transparent) 0 5px, transparent 5px 9px); border-left-style: dashed; }
.lc-ini { display: none; }
.lc-more { font-size: 11px; color: var(--fg-3); padding-left: 4px; }
.lc-legend { margin-top: 12px; flex-wrap: wrap; }
.lc-legend .lv-dot { margin-right: 6px; }
.lc-key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; border: 1px solid var(--line-strong); }
.lc-key.pending { background: repeating-linear-gradient(135deg, var(--line-strong) 0 3px, transparent 3px 6px); }
.lc-key.rest { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--line-strong) 3px 4px), var(--surface-2); }
.lc-key.hol { background: var(--gold-soft); border-color: var(--gold); }
/* Settings */
.lt-table td { vertical-align: top; }
.lt-table td:first-child .input { min-width: 150px; }
.lt-tiers { display: flex; gap: 6px; }
.lt-tiers label { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: var(--fg-3); }
.lt-tiers .input { width: 56px; text-align: right; padding: 0 8px; }
.lt-carry { display: flex; flex-direction: column; gap: 6px; }
.lt-carry .select { min-width: 150px; }
.lt-small { font-size: 12px; margin-top: 6px; }
.hol-table tr.off td { opacity: .5; text-decoration: line-through; }
.lv-hol-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.lv-hol-add .input[name=name] { flex: 1; min-width: 180px; }
@media (max-width: 1180px) { .lv-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .lc-cell { min-height: 64px; padding: 3px; }
  .lc-full { display: none; }
  .lc-ini { display: inline; }
  .lc-chip { padding: 1px 4px; text-align: center; border-left-width: 2px; }
  .lc-hol { display: none; }
  .lc-head { padding: 6px 2px; text-align: center; font-size: 10px; }
  .lc-toolbar h3 { min-width: 0; font-size: 15px; }
  .lv-tabs { align-self: stretch; overflow-x: auto; }
}
.lv-next span { min-width: 150px; }
.sm-only { display: none; }
@media (max-width: 640px) {
  .sm-only { display: inline; }
  .lv-req thead { display: none; }
  .lv-req tbody { display: block; }
  .lv-req tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .lv-req tr:last-child { border-bottom: 0; }
  .lv-req td { display: block; border: 0; padding: 0 !important; text-align: left; }
  .lv-req td.hide-sm { display: none; }
  .lv-req td:last-child { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .lv-req td:nth-child(n+2):not(:last-child) { font-size: 13px; color: var(--fg-2); }
}

/* ---------- Time attendance and rostering ---------- */
.tag.info { background: var(--info-soft); color: var(--info); }
.tm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.shift-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--fg); white-space: nowrap; }
.shift-chip::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--brand)); flex: none; }
.clock-shift { margin-top: 6px; color: var(--fg-2); }
.att-time { display: inline-flex; align-items: center; gap: 2px; }
.att-time .btn { position: relative; width: 28px; height: 28px; }
.tm-reason { font-size: 12.5px; color: var(--fg-2); margin-top: 3px; max-width: 360px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.att-edited { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.ro-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; }
.ro-bar .field { min-width: 160px; }
.ro-legend { flex: 1; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--fg-2); align-self: center; }
.ro-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ro-key { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--c, var(--brand)) 30%, var(--surface)); border-left: 3px solid var(--c, var(--brand)); flex: none; }
.ro-key.off { background: var(--surface-2); border-left-color: var(--line-strong); }
.ro-key.leave { background: var(--gold-soft); border-left-color: var(--gold); }
.ro-wrap { overflow-x: auto; }
.ro-table { min-width: 860px; border-collapse: separate; border-spacing: 0; }
.ro-table th, .ro-table td { padding: 6px; vertical-align: middle; }
.ro-table thead th { text-align: center; font-size: 12px; white-space: nowrap; }
.ro-table thead th.rest { color: var(--fg-3); }
.ro-table thead th.today div:first-child { color: var(--brand); }
.ro-table tbody th, .ro-table tfoot th { text-align: left; font-weight: 500; text-transform: none; letter-spacing: normal; color: var(--fg); font-size: 14px; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 190px; padding-left: 16px; }
.ro-table tfoot td { text-align: center; font-weight: 600; }
.ro-table tfoot td.ro-low { color: var(--bad); background: var(--bad-soft); border-radius: 8px; }
.ro-hol { font-size: 10.5px; font-weight: 600; color: var(--gold); max-width: 110px; margin: 2px auto 0; overflow: hidden; text-overflow: ellipsis; }
.ro-cell { width: 100%; min-height: 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1px; padding: 6px 9px; border-radius: 10px; border: 1px solid transparent; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ro-cell:hover { box-shadow: var(--shadow); }
.ro-cell:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
.ro-cell.default { background: color-mix(in srgb, var(--c) 6%, var(--surface)); border-style: dashed; border-left-style: solid; border-color: var(--line); border-left-color: color-mix(in srgb, var(--c) 55%, var(--surface)); }
.ro-cell.off { background: var(--surface-2); border-left-color: var(--line-strong); color: var(--fg-3); }
.ro-cell.leave { background: var(--gold-soft); border-left-color: var(--gold); }
.ro-cell.clash { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.ro-name { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.ro-time { font-size: 11.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.ro-opts { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ro-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.ro-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ro-opt input { accent-color: var(--brand); }

.shift-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.shift-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.shift-list li:last-child { border-bottom: 0; }
.shift-list li.today .sl-day strong { color: var(--brand); }
.sl-day { width: 58px; flex: none; font-variant-numeric: tabular-nums; color: var(--fg-2); }
.sl-what { min-width: 0; }

.audit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.audit-list li { padding-left: 12px; border-left: 2px solid var(--line-strong); }

.tp-times { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.tp-times .input { width: 110px; }
.tp-hours { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.tp-days { display: flex; gap: 3px; }
.tp-days label { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--fg-2); cursor: pointer; }
.tp-days label.rest span { color: var(--fg-3); }
.tp-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; }
.tp-depts .field span { font-size: 12.5px; color: var(--fg-2); }
.lt-small input[type="color"] { width: 34px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; margin-top: 4px; }
.ot-rates { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 8px 18px; }
.ot-rates label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--fg-2); }
.ot-pair { display: flex; gap: 6px; }
.ot-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-2); }
.al-flags { white-space: nowrap; }
.al-flags .check { margin-right: 6px; }
.tpl { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.tpl-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.tpl-head .input { max-width: 260px; }
.tpl-table select { min-width: 96px; }
@media (max-width: 640px) {
  .ro-bar .field { min-width: 0; flex: 1 1 140px; }
  .ro-table tbody th, .ro-table tfoot th { min-width: 140px; }
  .ro-table tbody th .person-sub { display: none; }
  .ot-rates { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Payroll documents: statutory files, bank file, year-end, printable payslips and forms ---------- */
.pd-tabs { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.pd-due { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; border-left: 4px solid var(--line-strong); }
.pd-due strong { font-size: 20px; }
.pd-due.ok { border-left-color: var(--ok); } .pd-due.warn { border-left-color: var(--warn); } .pd-due.bad { border-left-color: var(--bad); }
.pd-total { text-align: right; }
.pd-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.pd-file { display: flex; flex-direction: column; gap: 10px; }
.pd-sum { display: flex; flex-direction: column; gap: 2px; }
.pd-sum strong { font-size: 24px; letter-spacing: -.01em; }
.pd-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.pd-check.ok { color: var(--ok); } .pd-check.bad { color: var(--bad); }
.pd-check svg { width: 15px; height: 15px; }
.pd-issues { list-style: none; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pd-issues li { display: flex; align-items: center; gap: 8px; }
.pd-issues li span { flex: 1; }
.pd-issues svg { width: 15px; height: 15px; color: var(--warn); flex: none; }
.pd-preview summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand); padding: 4px 0; }
.pd-preview .table-wrap { max-height: 320px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; }
.pd-preview table { font-size: 12px; }
.pd-year { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pd-year .select { width: 110px; }
.form-sep { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .pd-files { grid-template-columns: minmax(0, 1fr); } .pd-total { text-align: left; } }

/* Documents: the same paper look on screen (preview) and in print, in light and dark mode. */
.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; font-size: 12.5px; }
.doc-preview { background: #e9e9ec; border-radius: 14px; padding: 14px; max-height: 64vh; overflow: auto; }
.doc { --ink: #16181d; --ink-2: #4d525c; --rule: #d9dbe0; background: #fff; color: var(--ink); font-family: var(--font); font-size: 12.5px; line-height: 1.45; padding: 28px 30px; border-radius: 6px; max-width: 760px; margin: 0 auto; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.doc + .doc { margin-top: 16px; }
.doc h4 { margin: 18px 0 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.doc-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 14px; }
.doc-co { font-weight: 700; letter-spacing: .2em; font-size: 14px; }
.doc-sub { color: var(--ink-2); font-size: 11px; max-width: 360px; }
.doc-title { text-align: right; display: flex; flex-direction: column; }
.doc-title strong { font-size: 18px; }
.doc-title span { color: var(--ink-2); font-size: 11.5px; }
.doc-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 150px) minmax(0, 1fr)); gap: 4px 12px; margin: 0; }
.doc-kv dt { color: var(--ink-2); }
.doc-kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.doc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table td { padding: 5px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc-table td.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 10px; }
.doc-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 1.5px solid var(--ink); }
.doc-note { color: var(--ink-2); font-size: 10.5px; }
.doc-net { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 4px; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 6px; font-size: 14px; }
.doc-net strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.doc-draft { margin: 0 0 10px; padding: 7px 10px; background: #fff6e0; border: 1px solid #ecd9a8; border-radius: 6px; font-size: 11px; color: #6b5310; }
.doc-foot { margin-top: 16px; color: var(--ink-2); font-size: 11px; }
.doc-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 36px; padding-top: 8px; border-top: 1px dashed var(--rule); }
.doc-sign > div:first-child { min-width: 220px; padding-top: 24px; border-top: 1px solid var(--ink); }
#print-root { display: none; }
@media (max-width: 640px) {
  .doc { padding: 18px 16px; }
  .doc-kv { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); }
  .doc-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .doc-head { flex-direction: column; } .doc-title { text-align: left; }
}
@media print {
  html.printing body > *:not(#print-root) { display: none !important; }
  html.printing body { background: #fff !important; }
  html.printing #print-root { display: block; }
  #print-root .doc { box-shadow: none; border-radius: 0; max-width: none; padding: 0; margin: 0; }
  #print-root .doc + .doc { margin-top: 0; break-before: page; page-break-before: always; }
  #print-root .doc-kv { grid-template-columns: repeat(2, minmax(0, 150px) minmax(0, 1fr)); }
  #print-root .doc-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @page { size: A4; margin: 14mm; }
}

/* ---------- Claims ---------- */
.cl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; }
.cl-limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 18px; }
.cl-limits .progress { margin-top: 6px; }
.cl-lim-name { font-size: 12.5px; color: var(--fg-2); margin-bottom: 2px; }
.cl-med { margin-top: 14px; }
.cl-med summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 10px; }
.cl-lines { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.cl-line { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 16px; margin: 0; min-width: 0; }
.cl-line legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.cl-line-del { position: absolute; top: 8px; right: 8px; }
.cl-thumb { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.cl-hint.warn { color: var(--warn); }
.label-like { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.cl-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.cl-total strong { font-size: 18px; }
.cr-review { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cr-receipts { display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow: auto; position: sticky; top: 0; }
.cr-receipts figure { margin: 0; }
.cr-zoom { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; border-radius: 12px; }
.cr-zoom img { width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
.cr-zoom:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
.cr-receipts figcaption { font-size: 12px; color: var(--fg-2); margin-top: 4px; }
.cr-lines td { vertical-align: top; }
.cr-lines td:first-child { min-width: 220px; }
.cr-lines .person-sub { font-size: 12px; }
.cr-fix { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; }
.cr-fix svg { width: 13px; height: 13px; }
.cl-capped { color: var(--warn); font-weight: 600; }
.cr-left { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.cr-left .kpi-label { width: 100%; }
.cc-fields { display: flex; flex-wrap: wrap; gap: 2px 10px; max-width: 360px; }
.cl-rep-bar { flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) {
  .cr-review { grid-template-columns: minmax(0, 1fr); }
  .cr-receipts { position: static; flex-direction: row; overflow-x: auto; max-height: none; }
  .cr-receipts figure { flex: 0 0 70%; }
}

/* ---------- Check-in: offline, review flags, kiosk ---------- */
.offline-bar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-lg); text-align: center; }
.offline-bar[hidden] { display: none; }
.sync-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--fg); font-size: 13px; }
.sync-note svg { width: 15px; height: 15px; color: var(--warn); flex: none; }
.flag-list { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--fg-2); }
.ci-project { margin: 4px 0 12px; }
.kiosk { position: fixed; inset: 0; z-index: 45; background: var(--bg); overflow: auto; }
.kiosk[hidden] { display: none; }
.kiosk-wrap { min-height: 100%; display: flex; flex-direction: column; gap: 20px; padding: 20px max(20px, env(safe-area-inset-left)) 16px; max-width: 1100px; margin: 0 auto; }
.kiosk-head { display: flex; align-items: center; gap: 16px; }
.kiosk-brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.kiosk-brand svg { width: 40px; height: 40px; }
.kiosk-brand strong { display: block; font-size: 18px; letter-spacing: .12em; text-transform: uppercase; }
.kiosk-brand span { color: var(--fg-2); font-size: 13px; }
.kiosk-clock { font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kiosk-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.kiosk-cam { aspect-ratio: 1; border-radius: 28px; overflow: hidden; background: #0d0f12; box-shadow: var(--shadow-lg); }
.kiosk-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.kiosk-panel { display: flex; flex-direction: column; gap: 16px; align-items: stretch; font-size: 16px; }
.kiosk-go { height: 88px; font-size: 22px; border-radius: 24px; justify-content: center; }
.kiosk-go svg { width: 26px; height: 26px; }
.kiosk-hi { display: flex; align-items: center; gap: 16px; }
.kiosk-hi img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--brand-soft); }
.kiosk-hi strong { display: block; font-size: 28px; line-height: 1.15; }
.kiosk-count { align-self: center; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; font-weight: 700; color: var(--brand); box-shadow: inset 0 0 0 5px var(--brand-soft); }
.kiosk-done { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 24px; border-radius: 24px; background: var(--ok-soft); }
.kiosk-done svg { width: 48px; height: 48px; color: var(--ok); }
.kiosk-done strong { font-size: 24px; }
.kiosk-foot { color: var(--fg-3); font-size: 12.5px; text-align: center; }
@media (max-width: 760px) {
  .kiosk-main { grid-template-columns: minmax(0, 1fr); }
  .kiosk-cam { max-width: 420px; width: 100%; margin: 0 auto; }
  .kiosk-clock { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .kiosk-count { transition: none; } }

/* ---------- Notification centre and announcements ---------- */
.bell { position: relative; }
.bell-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.bell-count[hidden] { display: none; }
.nt-panel { position: fixed; top: 64px; right: 16px; z-index: 60; width: min(400px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 84px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .18s var(--ease); }
.nt-panel[hidden] { display: none; }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 8px 18px; }
.nt-head h3 { font-size: 16px; }
.nt-filter { margin: 0 14px 8px; align-self: flex-start; }
.nt-list { overflow: auto; padding: 4px 8px; flex: 1; }
.nt-item { position: relative; display: flex; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: none; color: var(--fg); text-align: left; font: inherit; cursor: pointer; }
.nt-item:hover, .nt-item:focus-visible { background: var(--surface-2); outline: none; }
.nt-item:focus-visible { box-shadow: 0 0 0 3px var(--brand-ring); }
.nt-item.unread { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.nt-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.nt-ic svg { width: 17px; height: 17px; }
.nt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.nt-text strong { font-size: 13.5px; }
.nt-text span { color: var(--fg-2); overflow-wrap: anywhere; }
.nt-text time { color: var(--fg-3); font-size: 12px; }
.nt-dot { position: absolute; top: 14px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.nt-foot { padding: 10px 18px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.mail-body { white-space: pre-wrap; font: 13px/1.5 var(--font); background: var(--surface-2); padding: 14px; border-radius: 12px; margin-top: 12px; }
.an-card h3 { margin-top: 6px; }
.an-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; }
.an-excerpt { margin: 4px 0 10px; }
.an-file { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand); margin-top: 6px; }
.an-file svg { width: 15px; height: 15px; }
.an-acks { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.an-ack-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.an-ack-bar .progress { flex: 1 1 160px; margin: 0; }
.an-acks summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand); margin-top: 10px; }
.an-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 10px; font-size: 13px; }
.an-body { margin: 14px 0; line-height: 1.6; }
.an-body ul, .an-body ol { padding-left: 22px; }
.an-body p { margin: 0 0 10px; }
.an-body a { color: var(--brand); }
.an-item .an-meta { margin-bottom: 4px; }
.an-kind { display: flex; flex-wrap: wrap; gap: 8px 18px; border: 0; padding: 0; margin: 0; }
.an-depts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.rte-bar { display: flex; gap: 4px; margin-bottom: 6px; }
.rte-bar .btn { min-width: 34px; font-weight: 700; }
.rte { min-height: 140px; height: auto; padding: 10px 12px; line-height: 1.55; overflow: auto; }
.rte:focus { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
.rte ul, .rte ol { padding-left: 22px; }
@media (max-width: 640px) {
  .nt-panel { top: auto; bottom: 0; right: 0; left: 0; width: 100%; max-height: 80vh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .an-who { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .nt-panel { animation: none; } }

/* ---------- Appraisals ---------- */
.ap-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 6px; overflow-x: auto; }
.ap-steps li { flex: 1 1 0; min-width: 104px; display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.ap-steps li > span { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--line); color: var(--fg-2); }
.ap-steps li > span .i { width: 14px; height: 14px; }
.ap-steps li div { min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; }
.ap-steps li small { color: var(--fg-3); font-size: 11.5px; }
.ap-steps li.done > span { background: var(--ok-soft); color: var(--ok); }
.ap-steps li.now { border-color: var(--brand); background: var(--brand-soft, var(--surface-2)); }
.ap-steps li.now > span { background: var(--brand); color: #fff; }
.ap-sec { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.ap-sec legend { padding: 0 6px; font-weight: 600; }
.ap-q { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; }
.ap-q .ap-c { grid-column: 1 / -1; min-height: 36px; }
.ap-q-text { font-size: 14px; }
.ap-scale { display: flex; gap: 4px; flex-wrap: wrap; }
.ap-rate { position: relative; cursor: pointer; }
.ap-rate input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ap-rate span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-strong); font-weight: 600; font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.ap-rate input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.ap-rate input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.ap-live { position: sticky; bottom: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.ap-who { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.ap-goals-mini { margin-bottom: 12px; font-size: 13.5px; }
.ap-goals-mini ul { margin: 6px 0 0; padding-left: 18px; }
.ap-scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ap-scores .kpi { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.ap-table .ap-sec-row th { background: var(--surface-2); text-align: left; font-weight: 600; }
.ap-table .ap-cmt td { color: var(--fg-2); font-size: 12.5px; padding-top: 0; border-top: 0; }
.ap-peers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; margin-bottom: 6px; }
.ap-peers > div { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ap-goal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ap-goal-list li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 40px; gap: 10px; align-items: center; font-size: 13.5px; }
.ap-goal-bar { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.ap-goal-bar .progress { flex: 1; }
.ap-goal { align-items: flex-start; }
.ap-result { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.ap-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.ap-peer-pick { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.tpl-ed { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tpl-ed legend .input { font-weight: 600; }
.tpl-sec-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--fg-2); }
.tpl-sec-meta label { display: flex; gap: 6px; align-items: center; }
.tpl-sec-meta .select { width: auto; }
.tpl-q { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; }
@media (max-width: 640px) {
  .ap-q { grid-template-columns: minmax(0, 1fr); }
  .ap-scores { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ap-goal-list li { grid-template-columns: minmax(0, 1fr) 60px 36px; }
  .tpl-q { grid-template-columns: minmax(0, 1fr) 64px; }
  .tpl-q .check, .tpl-q .btn-icon { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .ap-rate span { transition: none; } }

/* ---------- HR admin: employee file, checklists, assets, org chart, letters ---------- */
.hr-tabs { margin-top: 4px; max-width: 100%; flex-wrap: wrap; height: auto; }
.hr-tabs button { white-space: nowrap; }
.hr-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.hr-sec-head h4 { margin: 0; }
.hr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hr-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hr-list li:last-child { border-bottom: 0; }
.hr-list li > div:first-child, .hr-list .grow { flex: 1; min-width: 0; }
.hr-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.hr-timeline li { display: flex; gap: 12px; padding: 0 0 14px 0; position: relative; }
.hr-timeline li::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.hr-timeline li:last-child::before { display: none; }
.hr-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: var(--fg-3); box-shadow: 0 0 0 3px var(--surface); position: relative; }
.hr-joined { background: var(--brand); } .hr-promotion { background: var(--gold, #D9B66F); } .hr-transfer { background: var(--info); } .hr-increment, .hr-adjustment { background: var(--ok); }
.hr-tl-head { display: flex; justify-content: space-between; gap: 8px; }
.hr-bar { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.hr-bar .progress { flex: 1; }
.hr-bar .num { font-size: 12.5px; color: var(--fg-2); white-space: nowrap; }
.hr-cl { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.hr-cl-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hr-tasks { list-style: none; margin: 0 0 8px; padding: 0; }
.hr-tasks li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.hr-tasks li.done .check span { text-decoration: line-through; color: var(--fg-3); }
.hr-task-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-left: 28px; font-size: 12.5px; color: var(--fg-2); }
.bad-text { color: var(--bad); font-weight: 600; }
.hr-doc-img { display: block; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); margin-top: 10px; }
.hr-letter-body { font-family: var(--font); line-height: 1.5; min-height: 260px; }
.hr-tpl { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.hr-tpl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hr-tpl-head .btn { margin-left: auto; }
.hr-tpl-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.hr-tpl-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.hr-tpl-list li span:last-child { white-space: nowrap; font-size: 12px; }
.hr-ct { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.hr-ct-head, .hr-ct-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 110px 70px 36px; gap: 6px; align-items: center; }
.hr-ct-head { font-size: 12px; color: var(--fg-2); font-weight: 600; margin: 10px 0 4px; }
.hr-ph { gap: 6px; }
.hr-ph .chip { height: 26px; padding: 0 10px; font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.hr-done summary { cursor: pointer; list-style: none; }
.org ul { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.org > ul { padding-left: 0; }
.org li { position: relative; padding: 6px 0; }
.org ul ul li::before { content: ""; position: absolute; left: -16px; top: 0; bottom: 0; border-left: 2px solid var(--line-strong); }
.org ul ul li:last-child::before { bottom: auto; height: 32px; }
.org ul ul li::after { content: ""; position: absolute; left: -16px; top: 32px; width: 14px; border-top: 2px solid var(--line-strong); }
.org-card { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border: 1px solid var(--line); border-left: 4px solid var(--dc); border-radius: 12px; background: var(--surface); min-width: 220px; max-width: 100%; }
.org-card[role="button"] { cursor: pointer; }
.org-card[role="button"]:hover { border-color: var(--line-strong); border-left-color: var(--dc); }
.org-card[role="button"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.org-card.dim { opacity: .6; }
.org-name { font-weight: 600; font-size: 14px; }
.org-role { font-size: 13px; color: var(--fg-2); }
.org-dept { font-size: 11.5px; color: var(--fg-3); }
.org-print .org-card { min-width: 0; padding: 4px 10px; border-color: #d9dbe0; background: #fff; color: #16181d; break-inside: avoid; }
.org-print .org-role, .org-print .org-dept { color: #4d525c; }
.org-print .org ul ul li::before, .org-print .org ul ul li::after { border-color: #b8bcc4; }
.org-print .org li { padding: 3px 0; }
.letter { font-size: 13.5px; line-height: 1.6; }
.letter p { margin: 0 0 12px; }
.letter-date { text-align: right; }
.letter-sign { margin-top: 28px; }
.letter-ack { margin-top: 28px; padding-top: 14px; border-top: 1px dashed var(--rule); }
@media (max-width: 640px) {
  .hr-ct-head { display: none; }
  .hr-ct-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .hr-ct-row input[data-f="title"] { grid-column: 1 / -1; }
  .org ul { padding-left: 18px; }
  .org-card { min-width: 0; }
}

/* ---------- Reports and project costing ---------- */
.rp-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.rp-lib { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); max-height: calc(100vh - 100px); overflow: auto; }
.rp-lib .nav-label { margin: 10px 8px 4px; }
.rp-lib .nav-label:first-child { margin-top: 2px; }
.rp-item { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 10px; font: inherit; font-size: 13.5px; color: var(--fg); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.rp-item:hover { background: var(--surface-2); }
.rp-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.rp-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.rp-item .i { width: 15px; height: 15px; }
.rp-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rp-main > .card, .rp-main > .grid { margin: 0; }
.rp-jump { display: none; width: auto; }
.rp-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin: 4px 0 10px; }
.rp-filters .field { min-width: 140px; }
.rp-filters .rp-quick .seg { height: 40px; align-items: center; }
.rp-table tfoot td { border-top: 2px solid var(--line-strong); background: var(--surface-2); }
.rp-table .up { color: var(--ok); } .rp-table .down { color: var(--bad); }
.rp-hbars { display: flex; flex-direction: column; gap: 4px; }
.rp-hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-chart-wrap { overflow-x: auto; }
.rp-chart { min-width: 320px; max-height: 240px; }
.legend .lg-b-present { background: var(--brand); } .legend .lg-b-remote { background: var(--gold, #D9B66F); }
.rp-meta { margin: -6px 2px 0; font-size: 12.5px; }
.rp-builder .rp-b-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 12px; }
.rp-sort { display: flex; gap: 6px; }
.rp-sort .select { min-width: 0; }
.rp-cols { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.rp-cols legend, .rp-conds legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
.rp-conds { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rp-cond { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px) minmax(0, 1fr) 36px; gap: 6px; width: 100%; align-items: center; }
.rp-doc .rp-hbars .hbar-track i { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cs-project { overflow: hidden; }
.cs-project.off { opacity: .7; }
.cs-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cs-toggle { display: flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0; min-width: 0; }
.cs-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.cs-sum { display: grid; grid-template-columns: auto minmax(60px, 1fr); gap: 4px 10px; align-items: center; font-size: 12.5px; color: var(--fg-2); }
.cs-bar { min-width: 60px; }
.cs-bar.over > i { background: var(--bad); }
.cs-table .cs-grow td { background: var(--surface-2); }
.cs-table .cs-job { padding-left: 28px; }
.cs-rbar { display: flex; flex-direction: column; gap: 10px; }
.cs-rbar .seg { flex-wrap: wrap; height: auto; align-self: flex-start; }
@media (max-width: 1000px) {
  .rp-layout { grid-template-columns: minmax(0, 1fr); }
  .rp-lib { display: none; }
  .rp-jump { display: inline-flex; }
  .rp-builder .rp-b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .rp-filters .field { min-width: 0; flex: 1 1 140px; }
  .rp-builder .rp-b-grid { grid-template-columns: minmax(0, 1fr); }
  .rp-cond { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .rp-cond input { grid-column: 1 / 3; }
  .cs-head { grid-template-columns: minmax(0, 1fr) auto; }
  .cs-sum { grid-column: 1 / -1; grid-row: 2; }
  .rp-jump { width: 100%; }
}
.cs-table td.num { white-space: nowrap; }
@media (max-width: 640px) { .rp-filters .rp-quick { flex-basis: 100%; } .rp-filters .rp-quick .seg { width: 100%; } .rp-filters .rp-quick .seg button { flex: 1; } }

/* ---------- e-Invoice ---------- */
.einv-panel { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.einv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.einv-head > div { flex: 1; min-width: 0; }
.einv-kv { margin: 0; font-size: 13px; }
.einv-kv dd { word-break: break-all; }
.einv-link { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--fg-2); }
.einv-errors { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.einv-actions { justify-content: flex-start; flex-wrap: wrap; }
.einv-sec { margin: 14px 0 6px; }
.einv-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.einv-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.einv-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.einv-list li .faint { text-align: right; }
.einv-json { margin-top: 14px; }
.einv-json summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.einv-json pre { margin: 8px 0 0; max-height: 320px; overflow: auto; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; line-height: 1.45; white-space: pre; }
.einv-json pre:focus-visible { outline: 2px solid var(--brand); }
@media (max-width: 640px) { .einv-list li { flex-direction: column; gap: 2px; } .einv-list li .faint { text-align: left; } }
.inv-no { white-space: nowrap; }

/* ---------- Talent: recruitment, careers page, training, grievances, meeting rooms ---------- */
.rc-tabs { flex-wrap: wrap; height: auto; max-width: 100%; margin-bottom: var(--gap); }
.rc-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.rc-head > div { min-width: 0; overflow-wrap: anywhere; }
.rc-steps { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.rc-steps li { border-top: 3px solid var(--line-strong); padding-top: 6px; font-size: 12.5px; color: var(--fg-3); display: flex; flex-direction: column; }
.rc-steps li.done { border-color: var(--brand); color: var(--fg-2); }
.rc-steps li.now strong { color: var(--brand); }
.rc-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 16px 0 8px; }
.rc-iv { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; overflow-wrap: anywhere; }
.rc-scores { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12.5px; color: var(--fg-2); }
.rc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; max-height: 220px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.rc-open { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; width: 100%; }
.rc-careers { display: flex; }
.rc-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.rc-link code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; overflow-wrap: anywhere; max-width: 100%; }
.rc-boards { display: flex; flex-direction: column; gap: 8px; }
.rc-board { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.check.field { flex-direction: row; }
.label-like { display: block; font-size: 12.5px; font-weight: 600; color: var(--fg-2); margin-bottom: 6px; }

.login.is-careers { display: block; padding: 0; place-items: normal; }
.careers { min-height: 100vh; background: var(--bg); color: var(--fg); text-align: left; }
.careers-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.careers-head .careers-wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; padding-bottom: 14px; }
.careers-wrap { max-width: 760px; margin: 0 auto; padding: 28px 16px 48px; }
.careers-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; color: var(--fg); text-decoration: none; }
.careers-brand svg { width: 30px; height: 30px; }
.careers h1 { font-size: clamp(26px, 5vw, 36px); letter-spacing: -0.02em; margin: 12px 0 6px; }
.careers-dept { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); margin: 26px 0 8px; }
.careers-list { display: flex; flex-direction: column; gap: 8px; }
.careers-job { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t i" "s i"; align-items: center; gap: 2px 12px; background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow); color: var(--fg); text-decoration: none; transition: transform var(--dur) var(--ease); }
.careers-job strong { grid-area: t; } .careers-job span { grid-area: s; } .careers-job svg { grid-area: i; color: var(--fg-3); }
.careers-job:hover { transform: translateY(-1px); }
.careers-job:focus-visible { outline: 3px solid var(--brand-ring); }
.careers-body { margin: 20px 0 24px; line-height: 1.6; }
.careers-body h3 { font-size: 16px; margin: 20px 0 6px; }
.careers-body ul { padding-left: 20px; margin: 0; }
.careers-form h2, .careers-thanks h2 { font-size: 20px; margin-bottom: 12px; }
.careers-form .btn-lg { margin-top: 14px; width: 100%; height: 46px; }
.careers-thanks { text-align: center; padding: 28px; }
.careers-thanks:focus { outline: none; }
.careers-foot { text-align: center; margin-top: 32px; }
.field-error-list:empty { display: none; }
.field-error-list { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

.lms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.lms-card { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.lms-card.is-off { opacity: .6; }
.lms-card h3 { font-size: 16px; }
.lms-card-top { display: flex; flex-wrap: wrap; gap: 6px; }
.lms-desc { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lms-card-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.lms-progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.lms-progress i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width var(--dur) var(--ease); }
.lms-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.lms-modules { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.lms-modules details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.lms-modules summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.lms-modules summary::-webkit-details-marker { display: none; }
.lms-modules summary strong { flex: 1; min-width: 0; }
.lms-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-size: 12px; font-weight: 600; flex: none; }
.lms-dot svg { width: 14px; height: 14px; }
.lms-modules li.done .lms-dot { background: var(--ok); color: #fff; }
.lms-text { margin: 10px 0; line-height: 1.6; }
.lms-text p + p { margin-top: 8px; }
.lms-modules details .btn { margin-top: 8px; }
.lms-q { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.lms-q legend { font-weight: 600; padding: 0 4px; }
.lms-done-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ok-soft); flex-wrap: wrap; }
.lms-done-box > div { flex: 1; min-width: 160px; }
.lms-mods { display: flex; flex-direction: column; gap: 8px; }
.lms-mod-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; align-items: start; }
.lms-fs { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.lms-fs legend { font-size: 12.5px; font-weight: 600; color: var(--fg-2); padding: 0 4px; }
.lms-matrix th.c, .lms-matrix td.c { text-align: center; }
.lms-th { display: inline-block; max-width: 110px; white-space: normal; font-size: 12px; line-height: 1.25; }
.lms-cell { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 4px; border-radius: 7px; font-size: 11.5px; font-weight: 600; background: var(--line); color: var(--fg-2); vertical-align: middle; }
.lms-cell svg { width: 13px; height: 13px; }
.lms-cell.s-completed { background: var(--ok-soft); color: var(--ok); }
.lms-cell.s-expiring { background: var(--warn-soft); color: var(--warn); }
.lms-cell.s-in-progress { background: var(--info-soft); color: var(--info); }
.lms-cell.s-overdue, .lms-cell.s-expired { background: var(--bad-soft); color: var(--bad); }
.lms-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 18px; font-size: 12.5px; color: var(--fg-2); }
.lms-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lms-legend .lms-cell { min-width: 14px; height: 14px; padding: 0; }
.doc.cert { padding: 0; }
.cert-frame { border: 3px double var(--gold); margin: 8px; padding: 36px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cert-co { letter-spacing: .14em; font-size: 13px; font-weight: 600; color: var(--fg-2); }
.cert-title { font-size: 26px; font-weight: 650; letter-spacing: -0.01em; margin: 6px 0 12px; }
.cert-line { color: var(--fg-2); }
.cert-name { font-size: 28px; font-family: Georgia, "Times New Roman", serif; border-bottom: 1px solid var(--line-strong); padding: 0 24px 6px; }
.cert-course { font-size: 19px; font-weight: 600; }
.cert-meta { color: var(--fg-2); font-size: 13px; }
.cert-foot { display: flex; justify-content: space-between; gap: 20px; width: 100%; margin-top: 28px; font-size: 12.5px; text-align: left; flex-wrap: wrap; }
.cert-foot .r { text-align: right; }
.cert-sign { font-family: Georgia, "Times New Roman", serif; font-size: 16px; border-top: 1px solid var(--line-strong); padding-top: 6px; min-width: 180px; }

.gr-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.gr-details { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0; line-height: 1.55; overflow-wrap: anywhere; }
.gr-outcome { border-left: 3px solid var(--ok); padding: 6px 12px; margin: 12px 0; }
.gr-item { width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.gr-sla .input { width: 72px; height: 32px; }

.rm-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rm-bar .input { width: auto; }
.rm-cal-card { overflow-x: auto; }
.rm-cal { min-width: 720px; padding: 8px 14px 14px; }
.rm-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: stretch; border-top: 1px solid var(--line); }
.rm-row.rm-hours { border-top: 0; height: 26px; }
.rm-name { display: flex; flex-direction: column; justify-content: center; padding: 8px 0; font-size: 13px; min-width: 0; }
.rm-name .faint { font-size: 12px; }
.rm-track { position: relative; min-height: 58px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--hours)) 100%; }
.rm-hours .rm-track { min-height: 26px; background: none; }
.rm-hours span { position: absolute; top: 6px; font-size: 11px; color: var(--fg-3); transform: translateX(-2px); }
.rm-slot { position: absolute; top: 0; bottom: 0; width: calc(100% / var(--hours)); border: 0; background: transparent; cursor: pointer; border-radius: 6px; }
.rm-slot:hover, .rm-slot:focus-visible { background: var(--brand-soft); outline: none; }
.rm-bk { position: absolute; top: 5px; bottom: 5px; border: 0; border-radius: 8px; background: var(--info-soft); color: var(--fg); text-align: left; padding: 4px 8px; font: inherit; font-size: 12px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; justify-content: center; box-shadow: inset 3px 0 0 var(--info); z-index: 1; }
.rm-bk strong, .rm-bk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-bk span { color: var(--fg-2); font-size: 11px; }
.rm-bk.mine { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.rm-bk.iv { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
.rm-bk:focus-visible { outline: 3px solid var(--brand-ring); }
.rm-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.rm-date { display: flex; flex-direction: column; align-items: center; width: 44px; flex: none; line-height: 1.1; }
.rm-date strong { font-size: 18px; }
.rm-date span { font-size: 11px; color: var(--fg-3); text-transform: uppercase; }
.bk-check { margin-top: 10px; font-size: 13px; }
.bk-check svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.bk-ok { color: var(--ok); }
.bk-bad { color: var(--bad); margin-bottom: 4px; }

@media (max-width: 760px) {
  .rc-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); font-size: 11px; }
  .rc-steps li { font-size: 11px; }
  .lms-mod-row { grid-template-columns: minmax(0, 1fr) auto; }
  .lms-mod-row [data-f="title"], .lms-mod-row [data-f="body"] { grid-column: 1 / -1; }
  .lms-mod-row [data-lms-del] { grid-row: 1; grid-column: 2; }
  .rm-row { grid-template-columns: 96px minmax(0, 1fr); }
  .rm-cal { min-width: 620px; }
}
@media (prefers-reduced-motion: reduce) { .careers-job, .lms-progress i { transition: none; } }
@media print { .cert-frame { border-color: #B8914A; } }

/* Statutory & Claim Guide: on small screens the notes move under the item name instead of a clipped column. */
.guide-note-sm { display: none; margin-top: 6px; font-size: 12.5px; white-space: normal; }
@media (max-width: 720px) { .guide-note-sm { display: block; } }

/* ---------- Operations (js/ops.js) ---------- */
tr.ops-low td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ops-lines { display: grid; gap: 6px; }
.ops-line { display: grid; grid-template-columns: minmax(0, 1fr) 90px 100px auto; gap: 6px; align-items: center; }
.ops-stop { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ops-stop:first-of-type { border-top: 0; }
.ops-stop.done { opacity: .72; }
.ops-seq { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; }
.ops-stop-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ops-stop-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.ops-home .btn { flex: 1 1 auto; }
@media (max-width: 560px) {
  .ops-line { grid-template-columns: minmax(0, 1fr) 70px 80px auto; }
  .ops-grid { grid-template-columns: 1fr; }
  .ops-stop-foot .btn { flex: 1 1 auto; min-height: 44px; }
}
.ops-today { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.ops-card.warn { box-shadow: inset 0 3px 0 var(--gold); }
.ops-card.bad { box-shadow: inset 0 3px 0 var(--bad); }
.ops-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ops-big .kpi-value { font-size: 30px; }
.ops-aging { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--line); margin: 8px 0 10px; }
@media (max-width: 560px) { .ops-today { grid-template-columns: 1fr; } }
.ops-card .hr-list li > span:first-child { flex: 1; min-width: 0; }
/* A choice of three or more long labels wraps on a phone instead of widening the page. */
@media (max-width: 560px) { .field .seg, .card .seg:not(.rc-tabs) { flex-wrap: wrap; max-width: 100%; } }
.ops-card .chips .tag { white-space: normal; max-width: 100%; height: auto; line-height: 1.4; padding-top: 3px; padding-bottom: 3px; }

/* Location gate (js/app.js): an employee's phone must share its location before using the app. */
.loc-gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(10, 14, 20, 0.72); backdrop-filter: blur(6px); }
.loc-gate-card { width: min(420px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); color: var(--fg); border-radius: 20px; padding: 26px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); text-align: center; }
.loc-gate-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.loc-gate-icon svg { width: 28px; height: 28px; }
.loc-gate h2 { font-size: 21px; margin: 0 0 8px; }
.loc-gate p { color: var(--fg-2); font-size: 14.5px; line-height: 1.55; text-align: left; margin: 0 0 18px; }
.loc-gate-actions { display: grid; gap: 8px; }

/* Sign out, always in the top bar. On a narrow phone only the icon shows. */
.top-signout { margin-left: 4px; white-space: nowrap; }
@media (max-width: 379px) { .top-signout span { display: none; } .top-signout { padding: 0 8px; } }
@media (max-width: 560px) {
  .topbar .cmdk-trigger { min-width: 0; flex: none; width: 40px; justify-content: center; padding: 0; }
  .topbar .cmdk-trigger span { display: none; }
  .topbar { gap: 4px; padding-left: 10px; padding-right: 10px; }
  .topbar > .btn { flex: none; }
  .topbar > .btn-icon { width: 36px; }
}
