@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --accent: #07FEFF; --on-accent: #06101A; --accent-ink: #07FEFF;
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 12px; --r-sm: 8px;
  --c-half_day: var(--c-half); --c-on_leave: var(--c-leave); --c-not_in: var(--faint);
  color-scheme: dark;
}
:root[data-theme="dark"] {
  --bg: #070C19; --side: #0A1022; --panel: #0E1630; --panel-2: #121C3B; --hover: #16213F;
  --line: #1D2948; --line-strong: #2D3E6B; --text: #E8EDF9; --muted: #98A4C2; --faint: #66729A;
  --c-present: #3DDC97; --c-remote: #7FA2FF; --c-half: #FFC24D; --c-leave: #B58CFF; --c-absent: #FF6B7A;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset;
}
:root[data-theme="light"] {
  --bg: #F3F5FA; --side: #FFFFFF; --panel: #FFFFFF; --panel-2: #F7F9FD; --hover: #EEF2FA;
  --line: #E1E6F0; --line-strong: #C5CEE2; --text: #0B1327; --muted: #53607D; --faint: #8893AC;
  --c-present: #0E9F6E; --c-remote: #3A5BD9; --c-half: #B7791F; --c-leave: #7C4DDB; --c-absent: #D93A4A;
  --shadow: 0 1px 2px rgba(11,19,39,.05);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font: 650 30px/1.1 var(--font-display); letter-spacing: -.02em; }
h2 { font: 650 16px/1.3 var(--font-display); letter-spacing: -.01em; }
h3 { font: 600 14px/1.3 var(--font); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .grow { flex: 1; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.num { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 20px 14px 14px; background: var(--side); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand .logo { height: var(--h, 34px); width: auto; max-width: 100%; aspect-ratio: var(--logo-ratio, auto); object-fit: var(--logo-fit, contain); object-position: var(--pos, center); border-radius: 8px; flex: none; }
.brand-text { min-width: 0; }
.brand-name { display: block; font-family: var(--brand-font, var(--font-display)); font-weight: var(--brand-weight, 650); letter-spacing: var(--brand-tracking, -.01em); font-size: 15px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text > span { display: block; font-size: 12.5px; color: var(--muted); }
.brand-sidebar { --h: var(--logo-h-sidebar, 34px); --pos: var(--logo-pos-sidebar, left center); justify-content: var(--logo-align-sidebar, flex-start); padding: 2px 8px 18px; }
.brand-navbar { --h: var(--logo-h-navbar, 28px); --pos: var(--logo-pos-navbar, left center); justify-content: var(--logo-align-navbar, flex-start); flex: 1; }
.brand-login { --h: var(--logo-h-login, 44px); --pos: var(--logo-pos-login, left center); justify-content: var(--logo-align-login, flex-start); }
.brand-login .brand-name { font-size: 20px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin: 16px 10px 4px; font-size: 12.5px; color: var(--faint); }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: var(--muted); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a[aria-current="page"] { background: var(--hover); color: var(--text); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a[aria-current="page"] .ic { color: var(--accent-ink); }
.nav .badge { margin-left: auto; min-width: 20px; padding: 0 6px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 650; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
/* The menu scrolls on its own when it is taller than the window; the brand stays on top and Sign out stays visible at the bottom. */
.side { overflow: hidden; height: 100vh; height: 100dvh; }
.side > .brand, .side-foot { flex: none; }
.side .nav { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -14px; padding: 0 14px 8px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.side .nav::-webkit-scrollbar { width: 6px; } .side .nav::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
@media (max-height: 820px) { .side { padding-top: 14px; } .brand-sidebar { padding-bottom: 10px; } .nav a { padding-block: 7px; } .nav-group { margin-top: 10px; } .side-foot { gap: 8px; padding-top: 10px; } }
.me { display: flex; align-items: center; gap: 10px; padding: 0 6px; min-width: 0; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 650 13px var(--font-display); background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.me .who { min-width: 0; } .me .who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .me .who span { font-size: 12.5px; color: var(--muted); }
.side-actions { display: flex; gap: 6px; }
.main { padding: 34px 44px 60px; max-width: 1240px; width: 100%; }
.topbar { display: none; }
.foot { margin-top: 48px; font-size: 12.5px; color: var(--faint); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 26px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 7px, transparent 7px 13px) left bottom / 100% 2px no-repeat; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel); font-weight: 600; text-decoration: none; transition: background .12s, border-color .12s; white-space: nowrap; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.danger { color: var(--c-absent); } .btn.danger:hover { background: color-mix(in srgb, var(--c-absent) 12%, transparent); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 36px; padding: 0; } .btn.sm.icon { width: 32px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); } .btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.block { width: 100%; }
.btn.big { height: 52px; padding: 0 28px; font-size: 16px; border-radius: 13px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

label.f { display: block; }
label.f > span { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
label.f > small { display: block; margin-top: 5px; color: var(--muted); font-size: 12.5px; }
input, select, textarea { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); font: inherit; }
textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
input[type="color"] { padding: 3px; width: 52px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-ink); outline-offset: 0; border-color: transparent; }
::placeholder { color: var(--faint); }
.form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-weight: 500; user-select: none; }
.pick:has(input:checked) { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent-ink); color: var(--text); }
.pick input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.pick:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.form-error { color: var(--c-absent); font-size: 13px; min-height: 0; }
.form-error:empty { display: none; }

.seg { justify-self: start; display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; flex-wrap: wrap; }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.seg button:hover { color: var(--text); }

/* ---------- surfaces ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.panel-pad { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.stack { display: grid; gap: 22px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.cols-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.empty { padding: 34px 22px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; font-weight: 600; }
.list > * + * { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 14px; padding: 14px 22px; }
.li .grow b { font-weight: 600; }

.ledger { display: grid; grid-template-columns: repeat(5, 1fr); }
.ledger > div { padding: 20px 22px; border-left: 1px solid var(--line); }
.ledger > div:first-child { border-left: 0; }
.ledger .n { font: 600 40px/1 var(--font-display); letter-spacing: -.03em; }
.ledger .l { margin-top: 8px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--faint)); flex: none; }

.chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; color: var(--cc, var(--muted)); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cc, var(--faint)); }
.s-present { --cc: var(--c-present); } .s-remote { --cc: var(--c-remote); } .s-half_day { --cc: var(--c-half); }
.s-on_leave { --cc: var(--c-leave); } .s-absent { --cc: var(--c-absent); } .s-not_in, .s-off, .s-holiday { --cc: var(--faint); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.tag.late { color: var(--c-half); border-color: color-mix(in srgb, var(--c-half) 40%, transparent); }
.tag.pending { color: var(--c-half); border-color: color-mix(in srgb, var(--c-half) 40%, transparent); }
.tag.approved { color: var(--c-present); border-color: color-mix(in srgb, var(--c-present) 40%, transparent); }
.tag.rejected, .tag.cancelled { color: var(--c-absent); border-color: color-mix(in srgb, var(--c-absent) 40%, transparent); }
.tag.admin { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 11px 14px; font-weight: 500; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); }
td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover td { background: var(--hover); }
td.person { white-space: nowrap; min-width: 200px; }
td.person .avatar { display: inline-grid; vertical-align: middle; margin-right: 12px; }
td.person > div { display: inline-block; vertical-align: middle; }
td.person > div { min-width: 0; } td.person b { display: block; font-weight: 600; white-space: nowrap; } td.person span { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.trunc { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- the workday thread ---------- */
.punch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 28px 30px 8px; }
.clock { font: 600 clamp(48px, 7vw, 76px)/1 var(--font-display); letter-spacing: -.04em; }
.clock small { font-size: .38em; letter-spacing: 0; margin-left: 8px; color: var(--muted); font-weight: 500; }
.punch .state { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.punch-ctl { display: grid; gap: 12px; justify-items: stretch; min-width: 280px; }
.thread { position: relative; margin: 8px 30px 26px; height: 74px; }
.thread .rail { position: absolute; left: 0; right: 0; top: 38px; height: 3px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 15px); }
.thread .worked { position: absolute; top: 37px; height: 5px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 55%, transparent); transition: width .6s ease; }
.thread .knot { position: absolute; top: 33px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.thread .knot.out { border-color: var(--text); }
.thread .tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.thread .tick.edge-l { transform: none; } .thread .tick.edge-r { transform: translateX(-100%); }
.thread .tick b { color: var(--text); font-weight: 600; }
.thread .needle { position: absolute; top: 24px; width: 2px; height: 34px; margin-left: -1px; background: var(--text); border-radius: 2px; }
.thread .needle::after { content: ""; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }
.thread .ends { position: absolute; left: 0; right: 0; top: 52px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--faint); }

.meters { display: grid; gap: 16px; }
.meter .top { display: flex; justify-content: space-between; margin-bottom: 7px; }
.meter .bar { height: 6px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; display: flex; }
.meter .bar i { display: block; height: 100%; background: var(--accent); } .meter .bar i.pend { background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 7px); opacity: .7; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats3 > div { padding: 4px 0; } .stats3 > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.stats3 .n { font: 600 30px/1 var(--font-display); letter-spacing: -.03em; white-space: nowrap; } .stats3 .l { color: var(--muted); margin-top: 6px; }

.trend { display: flex; align-items: flex-end; gap: 6px; height: 84px; }
.trend > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; align-items: stretch; gap: 3px; position: relative; }
.trend i { display: block; border-radius: 4px 4px 2px 2px; min-height: 2px; }
.trend .in { background: var(--accent); } .trend .lv { background: var(--c-leave); opacity: .8; }
.trend .off { height: 2px !important; background: repeating-linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px 6px); }
.trend-labels { display: flex; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--faint); } .trend-labels span { flex: 1; text-align: center; }

/* ---------- calendar & matrix ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { padding: 0 4px 6px; color: var(--muted); font-size: 12.5px; }
.cal .day { min-height: 82px; padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); text-align: left; display: flex; flex-direction: column; gap: 4px; }
.cal button.day:hover { border-color: var(--line-strong); background: var(--hover); }
.cal .day.blank { background: transparent; border-color: transparent; }
.cal .day.today { border-color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent-ink) inset; }
.cal .day .d { font: 600 14px var(--font-display); }
.cal .day .st { font-size: 12px; font-weight: 600; color: var(--cc, var(--faint)); display: flex; align-items: center; gap: 6px; }
.cal .day .st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cc, var(--faint)); flex: none; }
.cal .day .tm { font-size: 11.5px; color: var(--muted); }
.hatch { background-image: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--line-strong) 55%, transparent) 5px 6px) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }

.mx { border-collapse: separate; border-spacing: 0; }
.mx th, .mx td { padding: 0; border: 0; background: none; }
.mx thead th { height: 44px; text-align: center; font-size: 11.5px; font-weight: 500; color: var(--muted); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.mx thead th b { display: block; font-size: 12.5px; color: var(--text); font-weight: 600; }
.mx .nm { position: sticky; left: 0; z-index: 3; background: var(--panel); min-width: 170px; max-width: 190px; padding: 6px 14px 6px 18px; text-align: left; border-right: 1px solid var(--line); }
.mx .nm b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mx .nm span { font-size: 12px; color: var(--muted); }
.mx td.c { padding: 3px; text-align: center; }
.mc { display: block; width: 26px; height: 26px; border-radius: 7px; border: 1px solid transparent; padding: 0; background: var(--panel-2); position: relative; }
button.mc:hover { outline: 2px solid var(--text); outline-offset: 1px; }
.mc.s-present { background: color-mix(in srgb, var(--c-present) 80%, transparent); } .mc.s-remote { background: color-mix(in srgb, var(--c-remote) 80%, transparent); }
.mc.s-half_day { background: color-mix(in srgb, var(--c-half) 80%, transparent); } .mc.s-on_leave { background: color-mix(in srgb, var(--c-leave) 75%, transparent); }
.mc.s-absent { background: color-mix(in srgb, var(--c-absent) 80%, transparent); } .mc.s-not_in { border: 1px dashed var(--line-strong); background: transparent; }
.mc.late::after { content: ""; position: absolute; right: 2px; top: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1px var(--text) inset; }
.mx tfoot td, .mx .sum { padding: 6px 10px; font-size: 13px; text-align: right; white-space: nowrap; border-left: 1px solid var(--line); }
.mx .sumh { position: sticky; top: 0; background: var(--panel); z-index: 2; padding: 0 10px; font-size: 12.5px; color: var(--muted); border-left: 1px solid var(--line); text-align: right; font-weight: 500; }

/* ---------- overlays ---------- */
dialog { width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: auto; }
dialog::backdrop { background: rgba(3,6,14,.62); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.dlg-body { padding: 18px 24px 8px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 22px; }
#toasts { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: 0 12px 40px rgba(0,0,0,.35); max-width: 380px; animation: pop .18s ease-out; }
.toast.err { border-color: color-mix(in srgb, var(--c-absent) 60%, transparent); }
.toast .ic { color: var(--accent-ink); } .toast.err .ic { color: var(--c-absent); }

.skeleton { height: 120px; border-radius: 14px; background: linear-gradient(90deg, var(--panel) 0 40%, var(--panel-2) 50%, var(--panel) 60%) 0 0 / 300% 100%; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -150% 0; } }

/* ---------- settings ---------- */
.set-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.set-nav { display: grid; gap: 2px; position: sticky; top: 24px; }
.set-nav button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.set-nav button:hover { background: var(--hover); color: var(--text); }
.set-nav button[aria-current="true"] { background: var(--hover); color: var(--text); font-weight: 600; }
.logo-edit { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.logo-box { width: 84px; height: 84px; border-radius: 16px; border: 1px dashed var(--line-strong); display: grid; place-items: center; background: var(--panel-2); overflow: hidden; }
.logo-box img { max-width: 76%; max-height: 76%; object-fit: contain; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); padding: 0; background: var(--sw); }
.swatch:hover { transform: scale(1.1); }
.preview { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); display: grid; gap: 14px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--panel-2); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); word-break: break-all; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.audit-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px 22px; align-items: baseline; }
.audit-row time { color: var(--muted); font-size: 12.5px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-art { position: relative; overflow: hidden; padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between; background: var(--side); border-right: 1px solid var(--line); }
.login-art h2 { font: 650 clamp(34px, 4.4vw, 56px)/1.06 var(--font-display); letter-spacing: -.035em; margin-left: -.04em; text-wrap: balance; }
.login-art h2 .hl { display: block; }
.login-art p { margin-top: 16px; color: var(--muted); max-width: 38ch; font-size: 16px; }
.login-art svg.stitches { position: absolute; right: -50px; top: 6%; width: 80%; opacity: .9; pointer-events: none; }
.login-form { display: grid; place-items: center; padding: 40px 28px; }
.login-card { width: min(400px, 100%); display: grid; gap: 22px; }
.login-card h1 { font-size: 28px; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.code-input { height: 56px; text-align: center; font: 600 28px var(--font-display); letter-spacing: .5em; padding-left: .5em; }
.g-btn svg { width: 18px; height: 18px; }
.banner { padding: 12px 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c-absent) 50%, transparent); background: color-mix(in srgb, var(--c-absent) 10%, transparent); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .ledger { grid-template-columns: repeat(3, 1fr); } .ledger > div:nth-child(4) { border-left: 0; } .ledger > div:nth-child(n+4) { border-top: 1px solid var(--line); } .cols { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 60; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; }
  .side.open { transform: none; box-shadow: 0 0 80px rgba(0,0,0,.6); }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(3,6,14,.55); }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; padding: 10px 16px; background: var(--side); border-bottom: 1px solid var(--line); }
  .main { padding: 24px 16px 48px; }
  h1 { font-size: 25px; }
  .punch { grid-template-columns: 1fr; padding: 22px 18px 4px; } .punch-ctl { min-width: 0; }
  .thread { margin: 6px 18px 22px; }
  .cols-even, .row2, .row3 { grid-template-columns: 1fr; }
  .set-grid { grid-template-columns: 1fr; } .set-nav { position: static; display: flex; overflow-x: auto; }
  .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .cal { gap: 4px; } .cal .day { min-height: 62px; padding: 6px; } .cal .day .tm { display: none; }
  .kv { grid-template-columns: 1fr; }
  .audit-row { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 560px) { .ledger { grid-template-columns: repeat(2, 1fr); } .ledger > div { border-left: 0 !important; border-top: 1px solid var(--line); } .ledger > div:nth-child(-n+2) { border-top: 0; } .ledger > div:nth-child(even) { border-left: 1px solid var(--line) !important; } .stats3 .n { font-size: 21px; } .stats3 > div + div { padding-left: 12px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  .side, .topbar, .actions, .no-print, #toasts { display: none !important; }
  .app { display: block; } .main { padding: 0; max-width: none; }
  :root { --bg: #fff; --panel: #fff; --text: #000; --muted: #444; --line: #bbb; }
  body { background: #fff; color: #000; } .panel { box-shadow: none; }
  .mc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.thread .tick.below { top: 56px; color: var(--faint); }
.thread .tick.below b { color: var(--muted); font-weight: 500; }

/* ---------- phase 2: breaks, timesheet, presence, device gate ---------- */
.s-break, .s-on_break { --cc: var(--c-leave); } .s-active, .s-working { --cc: var(--c-present); } .s-idle { --cc: var(--c-half); }
.s-hidden, .s-offline, .s-out, .s-done { --cc: var(--faint); }
.thread .brk { position: absolute; top: 35px; height: 9px; border-radius: 3px; background: var(--c-leave); z-index: 1; box-shadow: 0 0 10px color-mix(in srgb, var(--c-leave) 50%, transparent); }
.tsheet { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.tsheet > div { padding: 16px 30px; } .tsheet > div + div { border-left: 1px solid var(--line); }
.tsheet .n { font: 600 24px/1.1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; } .tsheet .l { color: var(--muted); margin-top: 4px; font-size: 13px; }
.trackline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 30px; border-top: 1px solid var(--line); }
.breakbox { padding: 16px 18px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.breakbox .num { font-size: 40px; line-height: 1.1; }
.breakbox .bar { height: 6px; border-radius: 3px; background: var(--bg); margin-top: 10px; overflow: hidden; } .breakbox .bar i { display: block; height: 100%; width: 0; background: var(--c-leave); }
.btn.big:disabled { opacity: .55; }
.gate { gap: 20px; } .gate h1 { font-size: 26px; }
.gate-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.gate-icon .ic { width: 26px; height: 26px; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.presence { font-size: 13px; }
.sub-line { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.range { display: flex; align-items: center; gap: 12px; } .range input[type=range] { height: auto; padding: 0; accent-color: var(--accent); } .range output { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.logo-preview { display: grid; gap: 14px; }
.logo-preview .stage { padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line-strong); background: var(--panel-2); }
.logo-preview .stage small { display: block; color: var(--faint); margin-bottom: 8px; font-size: 12px; }
.logo-preview .brand { --h: var(--ph, 34px); --pos: var(--pos); justify-content: var(--pa, flex-start); }
@media (max-width: 900px) { .tsheet { grid-template-columns: repeat(2, 1fr); } .tsheet > div:nth-child(3) { border-left: 0; } .tsheet > div:nth-child(n+3) { border-top: 1px solid var(--line); } .tsheet .n { font-size: 20px; } .breakbox .num { font-size: 34px; } }

/* ---------- text rhythm and small additions ---------- */
h1, h2, h3, .page-head .sub { text-wrap: balance; }
p, .note, .empty, .small, .muted { text-wrap: pretty; }
.banner.info { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--text); }
.note.warn { border-color: color-mix(in srgb, var(--c-half) 55%, transparent); background: color-mix(in srgb, var(--c-half) 10%, transparent); color: var(--text); }
.dlg-body p + p, .dlg-body p + .note, .dlg-body .note + p { margin-top: 12px; }
.side-stack { flex-direction: column; }

/* ================= phase 3 ================= */

/* header with the compact theme toggle */
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; height: 52px; padding: 0 36px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); }
.only-mobile { display: none; }
.tb-brand { flex: 1; min-width: 0; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel); color: var(--muted); display: grid; place-items: center; padding: 0; transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn .ic { width: 16px; height: 16px; }
.main { padding: 8px 36px 56px; max-width: 1480px; }

/* search + filter */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.searchbox { position: relative; width: 240px; margin: 0; }
.searchbox .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.searchbox input { height: 36px; padding-left: 34px; }
.filter-wrap { position: relative; }
.filter-wrap > .btn { height: 36px; }
.filter-wrap > .btn.on { border-color: var(--accent-ink); }
.fcount { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.fcount[hidden] { display: none; }
.fpop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 300px; max-width: calc(100vw - 32px); padding: 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: 0 24px 60px rgba(0,0,0,.4); display: grid; gap: 14px; }
.fpop[hidden] { display: none; }
.fpop-foot { display: flex; justify-content: space-between; gap: 8px; }

/* resizable columns */
table.rz { table-layout: fixed; width: 100%; }
.rz th, .rz td { overflow: hidden; text-overflow: ellipsis; }
.rz td.person { white-space: nowrap; min-width: 0; }
.rz .cell-main, .rz .cell-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz th.rz-th { position: relative; }
.rz-handle { position: absolute; right: -4px; top: 0; bottom: 0; width: 9px; cursor: col-resize; touch-action: none; z-index: 2; }
.rz-handle::after { content: ""; position: absolute; left: 4px; top: 22%; bottom: 22%; width: 1px; background: var(--line-strong); transition: background .12s, width .12s, left .12s; }
.rz-handle:hover::after, .rz-handle:focus-visible::after, .rz-handle.active::after { background: var(--accent-ink); width: 2px; left: 3.5px; }
.rz-handle:focus-visible { outline: none; }
body.rz-dragging { cursor: col-resize; user-select: none; }

/* sign-in help */
.support-row { display: flex; align-items: center; gap: 10px; color: var(--muted); flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 13.5px; transition: background .12s, border-color .12s; }
.pill:hover { background: var(--hover); border-color: var(--accent-ink); }
.pill .ic { width: 16px; height: 16px; color: var(--accent-ink); }
.banner.info { display: flex; gap: 12px; align-items: flex-start; }
.banner.info .ic { color: var(--accent-ink); margin-top: 2px; }
.support-card { display: grid; gap: 20px; padding: 30px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line-strong)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 7%, var(--panel)), var(--panel)); box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.support-card h1 { font-size: 26px; }
.login-card:has(.support-card) { width: min(460px, 100%); }
.info-note { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; padding: 16px 0 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.info-note .ic { color: var(--accent-ink); flex: none; margin-top: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* schedules */
.shift-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--faint)); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, transparent) 18%, transparent); }
.sched-row { padding: 11px 22px; gap: 14px; }
.sched-row.today { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.sched-row.rest { color: var(--muted); } .sched-row.rest b { font-weight: 500; }
.sched-date { width: 150px; flex: none; }
.sc-day { border-left: 3px solid var(--c, var(--line-strong)) !important; }
.sc-day .sc-shift { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-day .sc-shift i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.sc-day .tm { display: block !important; white-space: nowrap; }
.wk { display: grid; gap: 8px; }
.wk-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; } .wk-row > span { color: var(--muted); }

/* roster grid + coverage */
.ro .nm { min-width: 210px; max-width: 230px; }
.ro .nm span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro thead th { padding: 0 2px; }
.ro-head { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11.5px; width: 100%; height: 44px; border-radius: 8px; cursor: pointer; }
.ro-head b { display: block; font-size: 12.5px; color: var(--text); }
.ro thead th.sel .ro-head { background: var(--hover); box-shadow: 0 0 0 1px var(--accent-ink) inset; }
.rc { position: relative; display: block; width: 62px; height: 40px; border-radius: 9px; border: 1px solid var(--line); border-left: 3px solid var(--c, var(--line-strong)); background: color-mix(in srgb, var(--c, transparent) 14%, var(--panel-2)); color: var(--text); padding: 3px 6px; text-align: left; font-size: 11.5px; font-weight: 600; line-height: 1.25; overflow: hidden; white-space: nowrap; }
.rc i { display: none; }
.rc em { font-style: normal; font-size: 10.5px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.rc:hover { outline: 2px solid var(--text); outline-offset: 1px; }
.rc.ov::after { content: ""; position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.rc.hatch { background-color: transparent; border-left-color: var(--line-strong); }
.cover { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; height: 150px; }
.cb { display: grid; grid-template-rows: 1fr 18px; min-width: 0; }
.cb .bar { --h: 0%; position: relative; display: flex; align-items: flex-end; border-radius: 4px; }
.cb .bar i { display: block; width: 100%; height: var(--h); background: var(--accent); border-radius: 4px 4px 2px 2px; opacity: .85; }
.cb .cn { position: absolute; left: 0; right: 0; bottom: var(--h); margin-bottom: 2px; text-align: center; font-size: 11px; color: var(--muted); }
.cb .ch { text-align: center; font-size: 11px; color: var(--faint); }
.cb.gap .bar { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--c-absent) 38%, transparent) 5px 6px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-absent) 50%, transparent) inset; }
[role=tablist].seg button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }

@media (max-width: 900px) {
  .only-mobile { display: flex; }
  .topbar { padding: 8px 16px; height: auto; min-height: 52px; background: var(--side); border-bottom: 1px solid var(--line); backdrop-filter: none; }
  .main { padding: 20px 16px 48px; }
  .searchbox, .toolbar { width: 100%; }
  .fpop { right: auto; left: 0; }
  .sched-date { width: 104px; } .sched-row { padding: 10px 16px; }
  .wk-row { grid-template-columns: 96px 1fr; }
}

/* ================= sign-in screen: centred split card ================= */
.lg {
  --lg-bg: #0A1A33; --lg-bg2: #0F2547; --lg-grid: rgba(120,160,220,.055); --lg-art: #2B5E7A;
  --lg-card: rgba(20,40,72,.92); --lg-side: rgba(255,255,255,.025); --lg-line: rgba(140,170,220,.16); --lg-line2: rgba(140,170,220,.26);
  --lg-text: #F4F7FD; --lg-muted: #A6B3CF; --lg-faint: #7684A6; --lg-field: rgba(9,18,38,.55); --lg-tabs: rgba(9,18,38,.5); --lg-tab-on: #13284F;
  --lg-shadow: 0 30px 80px rgba(2,8,24,.55);
  position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(1200px 700px at 50% 45%, var(--lg-bg2), var(--lg-bg) 70%);
  color: var(--lg-text); color-scheme: dark; -webkit-font-smoothing: antialiased;
}
:root[data-theme="light"] .lg {
  --lg-bg: #EEF3FA; --lg-bg2: #F8FBFF; --lg-grid: rgba(30,60,110,.06); --lg-art: #9CC3D6;
  --lg-card: rgba(255,255,255,.94); --lg-side: #F4F8FD; --lg-line: rgba(20,45,90,.12); --lg-line2: rgba(20,45,90,.22);
  --lg-text: #0B1530; --lg-muted: #4F5D7C; --lg-faint: #7D89A4; --lg-field: #FFFFFF; --lg-tabs: #EEF3FA; --lg-tab-on: #FFFFFF;
  --lg-shadow: 0 30px 70px rgba(20,45,90,.14);
  color-scheme: light;
}
.lg::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--lg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--lg-grid) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%); }
.lg ::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.lg-art { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--lg-art); pointer-events: none; }
.lg-art > g { opacity: .55; }
.lg-art .ac { color: var(--accent); stroke: var(--accent); }
.lg-art .fl { animation: lgfloat 9s ease-in-out infinite; }
.lg-art .f2 { animation-duration: 11s; animation-delay: -3s; } .lg-art .f3 { animation-duration: 10s; animation-delay: -6s; }
.lg-art .f4 { animation-duration: 12s; animation-delay: -2s; } .lg-art .f5 { animation-duration: 10.5s; animation-delay: -5s; }
.lg-art .f6 { animation-duration: 11.5s; animation-delay: -8s; } .lg-art .f7, .lg-art .f8 { animation: none; }
@keyframes lgfloat { 50% { transform: translateY(-12px); } }
.lg-art .hand-m { transform-box: view-box; transform-origin: 1322px 218px; animation: lgspin 12s linear infinite; }
.lg-art .hand-h { transform-box: view-box; transform-origin: 1322px 218px; animation: lgspin 144s linear infinite; }
@keyframes lgspin { to { transform: rotate(360deg); } }
.lg-art .cal .c { transition: none; animation: lgcell 7s ease-in-out infinite; }
.lg-art .cal .c1 { animation-delay: -1s; } .lg-art .cal .c2 { animation-delay: -2s; } .lg-art .cal .c3 { animation-delay: -3s; } .lg-art .cal .c4 { animation-delay: -4s; } .lg-art .cal .c5 { animation-delay: -5s; } .lg-art .cal .c6 { animation-delay: -6s; }
@keyframes lgcell { 0%, 70%, 100% { fill: transparent; } 80%, 90% { fill: color-mix(in srgb, var(--accent) 35%, transparent); stroke: var(--accent); } }
.lg-art .tick { stroke-dasharray: 24; animation: lgdraw 4s ease-in-out infinite; }
@keyframes lgdraw { 0% { stroke-dashoffset: 24; } 40%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -24; } }
.lg-art .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: lgbar 5s ease-in-out infinite; }
.lg-art .b1 { animation-delay: -.8s; } .lg-art .b2 { animation-delay: -1.6s; } .lg-art .b3 { animation-delay: -2.4s; } .lg-art .b4 { animation-delay: -3.2s; } .lg-art .b5 { animation-delay: -4s; }
@keyframes lgbar { 50% { transform: scaleY(.55); } }
.lg-art .dash { stroke-dasharray: 6 9; animation: lgflow 2.4s linear infinite; }
@keyframes lgflow { to { stroke-dashoffset: -30; } }
.lg-art .stamp { transform-box: fill-box; transform-origin: center; animation: lgstamp 6s ease-in-out infinite; }
@keyframes lgstamp { 0%, 55%, 100% { transform: scale(1); opacity: .9; } 62% { transform: scale(1.25); opacity: 1; } 70% { transform: scale(1); } }
.lg-art .track { stroke-dasharray: 2 10; }
.lg-art .runner { animation: lgrun 10s ease-in-out infinite; }
@keyframes lgrun { 0%, 8% { transform: translateX(0); } 30%, 38% { transform: translateX(170px); } 55%, 63% { transform: translateX(330px); } 85%, 100% { transform: translateX(500px); } }
.lg-art .ring { transform-box: fill-box; transform-origin: center; animation: lgring 3s ease-out infinite; }
@keyframes lgring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.lg-art .dots { opacity: .5; } .lg-art .d { animation: lgtwinkle 5s ease-in-out infinite; }
.lg-art .d2 { animation-delay: -1s; } .lg-art .d3 { animation-delay: -2s; } .lg-art .d4 { animation-delay: -3s; } .lg-art .d5 { animation-delay: -4s; } .lg-art .d6 { animation-delay: -2.5s; }
@keyframes lgtwinkle { 50% { opacity: .15; transform: translateY(-8px); } }
:root[data-theme="light"] .lg-art > g { opacity: .7; }

.lg-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 28px 0; }
.lg-mark { display: flex; align-items: center; gap: 16px; min-width: 0; }
.lg-logo { height: 56px; width: auto; max-width: 160px; object-fit: contain; flex: none; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 30%, transparent)); }
.lg-words { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font: 700 clamp(15px, 1.7vw, 21px)/1.1 var(--font-display); letter-spacing: .22em; text-transform: uppercase; }
.lg-words b { font-weight: 700; color: var(--lg-text); }
.lg-words i { width: 1px; height: 20px; background: var(--lg-line2); }
.lg-words span { color: var(--accent-ink, var(--accent)); }
.lg-mark p { margin-top: 4px; font-size: 13.5px; color: var(--lg-muted); }
.lg-theme { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--lg-line2); background: color-mix(in srgb, var(--lg-card) 70%, transparent); color: var(--lg-text); font: 700 12px var(--font); letter-spacing: .14em; text-transform: uppercase; backdrop-filter: blur(6px); }
.lg-theme:hover { border-color: var(--accent); }
.lg-theme .ic { width: 16px; height: 16px; } .lg-theme .ic-wrap { display: grid; }

.lg-stage { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; padding: 28px 20px; }
.lg-card { position: relative; width: min(960px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); border-radius: 26px; border: 1px solid var(--lg-line); background: var(--lg-card); box-shadow: var(--lg-shadow); backdrop-filter: blur(10px); overflow: hidden; }
.lg-card::before { content: ""; position: absolute; top: 0; left: 20%; right: 20%; height: 2px; border-radius: 0 0 2px 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .9; }

.lg-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 48px 44px; background: var(--lg-side); border-right: 1px solid var(--lg-line); text-align: center; }
.lg-biglogo { height: 84px; width: auto; max-width: 220px; object-fit: contain; filter: drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 28%, transparent)); }
.lg-name { margin-top: 2px; font: 700 clamp(28px, 3.4vw, 40px)/1 var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--lg-text); padding-left: .2em; }
.lg-badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--lg-line2); font: 700 11.5px var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--lg-text); }
.lg-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.lg-hero { max-width: 34ch; font-size: 14px; line-height: 1.55; color: var(--lg-muted); }
.lg-feats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; text-align: left; }
.lg-feats li { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--lg-text); }
.lg-feats .ic { width: 20px; height: 20px; flex: none; color: var(--accent-ink, var(--accent)); stroke-width: 2.4; }
.lg-safe { display: flex; gap: 10px; align-items: flex-start; max-width: 36ch; margin-top: 10px; text-align: left; font-size: 12.5px; line-height: 1.5; color: var(--lg-muted); }
.lg-safe .ic { width: 18px; height: 18px; flex: none; color: var(--accent-ink, var(--accent)); }

.lg-main { display: flex; align-items: center; padding: 44px 48px; min-width: 0; }
.lg-col { width: 100%; max-width: 400px; margin: 0 auto; }
.lg-view { animation: lgfade .2s ease-out; }
@keyframes lgfade { from { opacity: 0; transform: translateY(4px); } }
.lg-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-bottom: 30px; padding: 5px; border-radius: 16px; border: 1px solid var(--lg-line); background: var(--lg-tabs); }
.lg-tabs button { height: 42px; border: 1px solid transparent; border-radius: 11px; background: none; color: var(--lg-muted); font: 650 14.5px var(--font); }
.lg-tabs button:hover { color: var(--lg-text); }
.lg-tabs button[aria-selected="true"] { background: var(--lg-tab-on); border-color: color-mix(in srgb, var(--accent) 45%, var(--lg-line2)); color: var(--lg-text); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.lg-head { margin-bottom: 24px; }
.lg-head h1 { margin: 0; font: 700 clamp(26px, 2.6vw, 32px)/1.12 var(--font-display); letter-spacing: -.025em; color: var(--lg-text); }
.lg-head p { margin-top: 8px; font-size: 14.5px; color: var(--lg-muted); } .lg-head b { color: var(--lg-text); font-weight: 600; }
.lg-head.sm { margin-bottom: 16px; } .lg-head.sm h1 { font-size: 24px; } .lg-head.sm p { font-size: 13px; margin-top: 4px; }

.lg-form { display: grid; gap: 18px; }
.lg-support { display: grid; gap: 12px; } .lg-support .lg-field { gap: 6px; } .lg-support .lg-field label { font-size: 12.5px; }
.lg-field { display: grid; gap: 8px; min-width: 0; }
.lg-field label, .lg-lab { font-size: 14px; font-weight: 600; color: var(--lg-text); }
.lg-lab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lg-field .opt { color: var(--lg-faint); font-weight: 400; }
.lg-input { position: relative; display: flex; align-items: center; }
.lg-input > .ic { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--lg-faint); pointer-events: none; }
.lg .lg-input input, .lg .lg-input select, .lg .otp input, .lg-support textarea { width: 100%; height: 52px; padding: 0 16px 0 46px; border-radius: 12px; border: 1px solid var(--lg-line2); background: var(--lg-field); color: var(--lg-text); font: 400 15px var(--font); transition: border-color .15s, box-shadow .15s; }
.lg .lg-input select { padding-left: 16px; padding-right: 36px; height: 44px; font-size: 13.5px; appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--lg-muted) 50%), linear-gradient(135deg, var(--lg-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.lg-support .lg-input input { height: 44px; font-size: 14px; }
.lg-support textarea { height: auto; padding: 10px 14px; font-size: 13.5px; line-height: 1.45; resize: vertical; }
.lg .lg-input input#lg-pw { padding-right: 50px; }
.lg input::placeholder, .lg textarea::placeholder { color: var(--lg-faint); }
.lg .lg-input input:hover, .lg .lg-input select:hover, .lg .otp input:hover, .lg-support textarea:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--lg-line2)); }
.lg .lg-input input:focus, .lg .lg-input select:focus, .lg .otp input:focus, .lg-support textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.lg input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--lg-field) inset; -webkit-text-fill-color: var(--lg-text); caret-color: var(--lg-text); }
.lg-eye { position: absolute; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--lg-muted); }
.lg-eye:hover { color: var(--lg-text); background: color-mix(in srgb, var(--lg-text) 7%, transparent); } .lg-eye .ic { width: 20px; height: 20px; }
.lg .otp { display: flex; justify-content: space-between; gap: 8px; }
.lg .otp input { width: 100%; max-width: 54px; height: 56px; padding: 0; text-align: center; font: 700 20px var(--font-display); }
.row2l { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lg-err { display: flex; gap: 8px; font-size: 13px; color: #FF7A8A; } .lg-err:empty { display: none; }
:root[data-theme="light"] .lg-err { color: #C8283A; }

.lg-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font: 700 17px var(--font); text-decoration: none; cursor: pointer; box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 25%, transparent); transition: box-shadow .15s, transform .1s, filter .15s; }
.lg-btn:hover { filter: brightness(1.05); box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 38%, transparent); text-decoration: none; }
.lg-btn:active { transform: scale(.99); }
.lg-btn:disabled { opacity: .65; cursor: progress; }
.lg-btn .arr { width: 20px; height: 20px; stroke-width: 2.4; }
.lg-btn.ghost { height: 50px; background: transparent; color: var(--lg-text); border: 1px solid var(--lg-line2); box-shadow: none; font-size: 15px; font-weight: 600; }
.lg-btn.ghost:hover { background: color-mix(in srgb, var(--lg-text) 5%, transparent); filter: none; }
.lg-btn.ghost svg:not(.ic) { width: 20px; height: 20px; }
.lg .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.lg-or { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; font-size: 12.5px; color: var(--lg-faint); text-transform: uppercase; letter-spacing: .14em; }
.lg-or::before, .lg-or::after { content: ""; flex: 1; border-top: 1px solid var(--lg-line); }
.lg-note { display: flex; gap: 10px; align-items: flex-start; margin: -6px 0 20px; padding: 11px 13px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); font-size: 13px; color: var(--lg-text); }
.lg-note .ic { width: 17px; height: 17px; color: var(--accent-ink, var(--accent)); flex: none; margin-top: 1px; }
.lg-note.err { border-color: rgba(255,107,122,.45); background: rgba(255,107,122,.09); } .lg-note.err .ic { color: #FF7A8A; }
.lg-hint { display: flex; gap: 8px; align-items: flex-start; justify-content: center; text-align: center; font-size: 12.5px; color: var(--lg-faint); } .lg-hint .ic { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.lg .lnk { padding: 0; border: 0; background: none; color: var(--accent-ink, var(--accent)); font-family: inherit; font-size: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lg .lnk.sm { font-size: 13px; } .lg .lnk .ic { width: 15px; height: 15px; }
.lg .lnk:hover { text-decoration: underline; } .lg .lnk:disabled { color: var(--lg-faint); text-decoration: none; cursor: default; }
.lg-help { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 26px; font-size: 14px; color: var(--lg-muted); }
.lg-mail { margin-top: 8px; text-align: center; font-size: 12.5px; color: var(--lg-faint); } .lg-mail a { color: var(--accent-ink, var(--accent)); }
.lg-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; padding: 0; border: 0; background: none; font: 500 13px var(--font); color: var(--lg-muted); cursor: pointer; }
.lg-back:hover { color: var(--lg-text); } .lg-back .ic { width: 15px; height: 15px; }
.lg-resend { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--lg-muted); }
.lg-done { display: grid; justify-items: center; gap: 16px; padding: 12px 0; text-align: center; }
.lg-done .ok { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink, var(--accent)); } .lg-done .ok .ic { width: 24px; height: 24px; }
.lg-done h1 { font: 700 24px var(--font-display); color: var(--lg-text); }
.lg-done p { margin: 6px auto 0; max-width: 300px; font-size: 13.5px; line-height: 1.6; color: var(--lg-muted); } .lg-done p b { color: var(--lg-text); font-weight: 600; }
.lg-done .ref { padding: 5px 12px; border-radius: 6px; border: 1px solid var(--lg-line2); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--lg-muted); }
.lg-foot { position: relative; z-index: 1; padding: 0 20px 22px; text-align: center; font-size: 13.5px; color: var(--lg-faint); }

.lg-toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(460px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: rgba(8,13,26,.96); color: #f4f4f5; font-size: 13px; font-weight: 500; box-shadow: 0 12px 32px rgba(0,0,0,.45); animation: lgtoast .15s ease-out; }
.lg-toast[hidden] { display: none; }
.lg-toast .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; animation: lgpulse 1.4s ease-in-out infinite; }
@keyframes lgtoast { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes lgpulse { 50% { opacity: .35; } }

/* smaller screens: the brand panel shrinks to a header strip, then goes away on phones */
@media (max-width: 900px) {
  .lg-card { grid-template-columns: 1fr; max-width: 520px; }
  .lg-side { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 10px 14px; padding: 22px 28px; border-right: 0; border-bottom: 1px solid var(--lg-line); text-align: left; }
  .lg-biglogo { height: 40px; } .lg-name { font-size: 20px; letter-spacing: .16em; padding: 0; } .lg-badge { padding: 5px 12px; font-size: 10.5px; }
  .lg-hero, .lg-feats, .lg-safe { display: none; }
  .lg-main { padding: 30px 28px 34px; }
}
@media (max-width: 560px) {
  .lg-top { padding: 16px 16px 0; } .lg-mark p { display: none; } .lg-logo { height: 42px; } .lg-words { font-size: 13px; letter-spacing: .16em; gap: 8px; }
  .lg-theme { height: 36px; padding: 0 12px; } .lg-theme > span:last-child { display: none; }
  .lg-stage { padding: 18px 12px; } .lg-card { border-radius: 20px; }
  .lg-side { display: none; } .lg-main { padding: 26px 18px 28px; }
  .lg .otp { gap: 6px; } .lg .otp input { height: 50px; }
  .row2l { grid-template-columns: 1fr; }
}
@media (max-height: 760px) and (min-width: 901px) { .lg-stage { padding-block: 16px; } .lg-side, .lg-main { padding-block: 32px; } .lg-tabs { margin-bottom: 22px; } .lg-head { margin-bottom: 18px; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* approved leave on the schedule + leave cost preview */
.sched-row.leave { background: color-mix(in srgb, var(--c-leave) 7%, transparent); }
.sched-row.leave b { color: var(--c-leave); font-weight: 600; }
.cal .day.on-leave { background: color-mix(in srgb, var(--c-leave) 10%, var(--panel-2)); }
.cal .day.on-leave .sc-shift { color: var(--c-leave); }
.prev-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 12.5px; }
.prev-list li::before { content: "•"; margin-right: 8px; color: var(--faint); }

/* ================= phase 5: HR suite ================= */
.avatar { background: color-mix(in srgb, hsl(var(--ah, 190) 70% 58%) 16%, var(--panel)); color: hsl(var(--ah, 190) 75% var(--av-l, 62%)); border-color: color-mix(in srgb, hsl(var(--ah, 190) 70% 58%) 38%, transparent); }
:root[data-theme="light"] .avatar { --av-l: 38%; }
.avatar.av-lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.av-sm { width: 28px; height: 28px; font-size: 11px; }

/* notification bell */
.bell-wrap { position: relative; }
.bell-wrap .icon-btn { position: relative; }
.bell-n { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.bell-n[hidden] { display: none; }
.bell-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 380px; max-width: calc(100vw - 24px); max-height: min(560px, 75vh); overflow: auto; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.bell-item { display: flex; gap: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.bell-item:hover { background: var(--hover); text-decoration: none; }
.bell-item.unread { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.bell-item b { display: block; font-weight: 600; font-size: 13.5px; }
.bell-item span:not(.bell-ic) { display: block; color: var(--muted); font-size: 12.5px; }
.bell-item time { display: block; color: var(--faint); font-size: 11.5px; margin-top: 2px; }
.bell-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--panel-2); border: 1px solid var(--line); color: var(--accent-ink); }
.bell-ic .ic { width: 15px; height: 15px; }

/* drawer */
dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(560px, 100vw); border-radius: 0; border-width: 0 0 0 1px; display: flex; flex-direction: column; }
dialog.drawer.wide { width: min(860px, 100vw); }
dialog.drawer[open] { animation: slidein .18s ease-out; display: flex; }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.drawer-body { padding: 20px 24px 40px; display: grid; gap: 20px; align-content: start; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

/* record header */
.rec-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.rec-head h1 { font-size: 28px; }
.rec-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); margin-top: 6px; font-size: 13px; }
.rec-meta span { display: inline-flex; align-items: center; gap: 6px; } .rec-meta .ic { width: 15px; height: 15px; }
.kv2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.kv2 > div { min-width: 0; } .kv2 dt { color: var(--muted); font-size: 12.5px; } .kv2 dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 110px 18px 1fr; gap: 10px; padding: 10px 0; }
.tl time { color: var(--muted); font-size: 12.5px; text-align: right; }
.tl i { position: relative; } .tl i::before { content: ""; position: absolute; left: 4px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); } .tl i::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: -14px; width: 1px; background: var(--line); }
.tl:last-child i::after { display: none; }
.lc { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); }
.lc-onboarding { color: var(--c-remote); border-color: color-mix(in srgb, var(--c-remote) 45%, transparent); }
.lc-probation { color: var(--c-half); border-color: color-mix(in srgb, var(--c-half) 45%, transparent); }
.lc-active { color: var(--c-present); border-color: color-mix(in srgb, var(--c-present) 45%, transparent); }
.lc-notice { color: var(--c-absent); border-color: color-mix(in srgb, var(--c-absent) 45%, transparent); }
.lc-exited { color: var(--faint); }

/* directory + org chart */
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); display: grid; gap: 10px; text-decoration: none; color: var(--text); }
a.card:hover { border-color: var(--line-strong); background: var(--hover); text-decoration: none; }
.card .top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.card .top b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .card .top span { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .foot2 { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12.5px; }
.now { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--cc, var(--faint)); }
.now::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cc, var(--faint)); }
.now-in { --cc: var(--c-present); } .now-remote { --cc: var(--c-remote); } .now-break { --cc: var(--c-leave); } .now-leave { --cc: var(--c-leave); } .now-out, .now-away { --cc: var(--faint); }
.org { overflow-x: auto; padding: 8px 4px 24px; }
.org ul { position: relative; display: flex; justify-content: center; gap: 0; margin: 0; padding: 22px 0 0; list-style: none; }
.org > ul { padding-top: 0; }
.org li { position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.org > ul > li { padding-top: 0; }
.org li::before, .org li::after { content: ""; position: absolute; top: 0; height: 22px; border-top: 1px solid var(--line-strong); width: 50%; }
.org li::before { right: 50%; } .org li::after { left: 50%; border-left: 1px solid var(--line-strong); }
.org li:only-child::before, .org li:only-child::after { display: none; }
.org li:only-child { padding-top: 0; }
.org li:first-child::before, .org li:last-child::after { border-top: 0; }
.org li:last-child::before { border-right: 1px solid var(--line-strong); border-radius: 0 6px 0 0; }
.org li:first-child::after { border-radius: 6px 0 0 0; }
.org > ul > li::before, .org > ul > li::after { display: none; }
.org ul ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 1px solid var(--line-strong); }
.org-node { display: grid; justify-items: center; gap: 6px; width: 150px; padding: 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); text-align: center; color: var(--text); text-decoration: none; }
.org-node:hover { border-color: var(--accent-ink); text-decoration: none; }
.org-node b { font-weight: 600; font-size: 13px; line-height: 1.2; } .org-node span { color: var(--muted); font-size: 11.5px; line-height: 1.25; }
.org-node em { font-style: normal; font-size: 11px; color: var(--faint); }

/* celebrations */
.cel { display: flex; gap: 12px; align-items: center; padding: 12px 22px; }
.cel .when { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.cel.today { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cel-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); color: var(--c, var(--accent-ink)); }
.cel-ic .ic { width: 17px; height: 17px; }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); min-height: 160px; display: flex; flex-direction: column; }
.kcol h3 { display: flex; justify-content: space-between; padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--line); }
.kcol h3 span { color: var(--muted); font-weight: 500; }
.kcol .kl { display: grid; gap: 8px; padding: 10px; }
.kcol.drop { outline: 2px dashed var(--accent-ink); outline-offset: -4px; }
.kcard { padding: 11px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; display: grid; gap: 4px; text-align: left; }
.kcard:hover { border-color: var(--line-strong); }
.kcard b { font-weight: 600; } .kcard span { overflow-wrap: anywhere; } .kcard .small { color: var(--muted); }
.kcard[draggable="true"] { cursor: grab; }
.stars { color: var(--c-half); letter-spacing: 1px; font-size: 12px; }
.job-row { display: flex; gap: 14px; align-items: center; padding: 14px 22px; }
.stage-bar { display: flex; gap: 3px; } .stage-bar i { display: block; height: 6px; border-radius: 3px; background: var(--c, var(--line-strong)); min-width: 6px; }

/* documents: payslip, letters */
.doc { background: #fff; color: #111; border-radius: 12px; padding: 36px 40px; font-size: 13px; line-height: 1.5; border: 1px solid var(--line); }
.doc h1, .doc h2, .doc h3 { color: #111; }
.doc .doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid #111; padding-bottom: 14px; margin-bottom: 18px; }
.doc .doc-head img { height: 44px; width: auto; max-width: 160px; object-fit: contain; }
.doc .doc-head .co b { font-size: 16px; display: block; } .doc .doc-head .co span { color: #555; font-size: 12px; display: block; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.doc th, .doc td { border: 1px solid #ccc; padding: 6px 9px; font-size: 12.5px; color: #111; background: #fff; text-align: left; white-space: normal; }
.doc th { background: #f2f4f8; font-weight: 600; }
.doc td.r, .doc th.r { text-align: right; font-variant-numeric: tabular-nums; }
.doc .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.doc .kvd { display: grid; grid-template-columns: 140px 1fr; gap: 3px 10px; margin-bottom: 14px; } .doc .kvd dt { color: #555; } .doc .kvd dd { margin: 0; font-weight: 500; }
.doc .net { margin-top: 14px; padding: 12px 14px; border: 2px solid #111; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.doc .net b { font-size: 20px; }
.doc .muted { color: #555; }
.doc .letter-body { white-space: pre-wrap; font-size: 14px; line-height: 1.65; }
.doc .fine { margin-top: 22px; font-size: 11px; color: #666; }
#print-host { display: none; }
@media print {
  body.printing > *:not(#print-host) { display: none !important; }
  body.printing #print-host { display: block; }
  body.printing .doc { border: 0; padding: 0; border-radius: 0; }
  dialog { display: none !important; }
  @page { margin: 14mm; }
}

/* breakups and forms */
.bk { display: grid; gap: 0; }
.bk > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.bk > div:last-child { border-bottom: 0; }
.bk .t { font-weight: 650; border-top: 1px solid var(--line-strong); border-bottom: 0; padding-top: 10px; }
.bk .neg { color: var(--c-absent); }
.big-num { font: 650 34px/1 var(--font-display); letter-spacing: -.03em; }
.regime { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.regime label { position: relative; display: grid; gap: 4px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-strong); cursor: pointer; }
.regime label:has(input:checked) { border-color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.regime input { position: absolute; opacity: 0; }
.regime .better { position: absolute; top: 10px; right: 10px; }
.lines { display: grid; gap: 8px; }
.line-row { display: grid; grid-template-columns: 1fr 140px 36px; gap: 8px; align-items: center; }
.progress { height: 6px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; } .progress i { display: block; height: 100%; background: var(--accent); }
.checklist .li { padding: 10px 22px; }
.checklist .li.done b { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.owner { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-row > div { padding: 18px 22px; } .stat-row > div + div { border-left: 1px solid var(--line); }
.stat-row .n { font: 600 26px/1.1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; } .stat-row .l { color: var(--muted); margin-top: 4px; font-size: 13px; }
.warnline { color: var(--c-half); font-size: 12.5px; }
.public { min-height: 100vh; background: var(--bg); }
.public-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: var(--side); }
.public-main { max-width: 900px; margin: 0 auto; padding: 36px 20px 80px; display: grid; gap: 22px; }
.job-desc { white-space: pre-wrap; color: var(--muted); line-height: 1.6; }
@media (max-width: 900px) {
  .kv2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-row > div:nth-child(3) { border-left: 0; } .stat-row > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tl { grid-template-columns: 84px 18px 1fr; }
  .doc { padding: 22px 18px; } .doc .grid2 { grid-template-columns: 1fr; }
  .regime { grid-template-columns: 1fr; }
  .line-row { grid-template-columns: 1fr 110px 36px; }
  dialog.drawer, dialog.drawer.wide { width: 100vw; border-left: 0; }
}
.drawer-body > div:only-child { display: grid; gap: 18px; align-content: start; min-width: 0; }
.stack > *, .cols > *, .cols-even > *, .panel { min-width: 0; }
.stat-row > div { min-width: 0; }
@media (max-width: 560px) { .stat-row .n { font-size: 19px; white-space: normal; overflow-wrap: anywhere; } .stat-row > div { padding: 14px 16px; } .big-num { font-size: 26px; } .regime .big-num { font-size: 24px; } }

/* grouped fields inside a dialog */
.fs { margin: 4px 0 0; padding: 12px 14px 4px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 12px; min-width: 0; }
.fs legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
@media (max-height: 800px) { .lg-art .f7 { display: none; } }

/* ---------- official Ayzen logo on the sign-in page (brand guidelines: Deep Navy #0A1A33, Neon Aqua #07FEFF,
   clear space = height of the "N", minimum height 100px) ---------- */
.lg.official .lg-top { --h: 100px; padding: calc(var(--h) / 2) calc(var(--h) / 2) 0; align-items: flex-start; }
.lg-lockup { height: var(--h); flex: none; }
.lg-lockup img { display: block; height: 100%; width: auto; }
.lg-lockup .on-light { display: none; }
:root[data-theme="light"] .lg-lockup .on-dark { display: none; }
:root[data-theme="light"] .lg-lockup .on-light { display: block; }
.lg.official .lg-stage { padding-top: calc(var(--h, 100px) / 2); }
.lg.official .lg-stage { --h: 100px; }
/* The brand panel is always Deep Navy, so the Neon Aqua mark sits on its brand colour in both themes. */
.lg.official .lg-side { --lg-text: #F4F7FD; --lg-muted: #A9B6D2; --lg-line2: rgba(140,170,220,.28); background: #0A1A33; color: var(--lg-text); border-right-color: rgba(140,170,220,.14); }
.lg.official .lg-side .lg-feats .ic, .lg.official .lg-side .lg-safe .ic { color: #07FEFF; }
.lg.official .lg-side .lg-badge span { background: #07FEFF; box-shadow: 0 0 8px #07FEFF; }
.lg-mark3d { display: block; height: 120px; width: auto; margin: 4px 0 calc(60px - 16px); filter: drop-shadow(0 10px 28px rgba(7,254,255,.18)); }
.lg-tag { margin-top: -8px; font: 600 15px var(--font-display); letter-spacing: .02em; color: #07FEFF; }
@media (max-height: 820px) and (min-width: 901px) { .lg-mark3d { height: 100px; margin-bottom: 34px; } .lg.official .lg-side { gap: 12px; } }
@media (max-width: 900px) {
  .lg.official .lg-top { --h: 80px; }
  .lg-mark3d { height: 56px; margin: 0; } .lg-tag { margin: 0; flex-basis: 100%; }
}
@media (max-width: 560px) {
  .lg.official .lg-top { --h: 64px; padding: 32px 32px 0; }
  .lg-art .f7, .lg-art .f8 { display: none; }
  .lg.official .lg-theme { position: absolute; top: 14px; right: 14px; }
}
.lg.official .lg-art .f1 { display: none; }
@media (max-height: 820px) and (min-width: 901px) { .lg.official .lg-side, .lg.official .lg-main { padding-block: 26px; } .lg.official .lg-feats { gap: 10px; } .lg.official .lg-head { margin-bottom: 14px; } .lg.official .lg-form { gap: 14px; } .lg.official .lg-help { margin-top: 18px; } }
@media (max-width: 900px) { .lg.official .lg-stage { --h: 80px; } }
@media (max-width: 560px) { .lg.official .lg-stage { --h: 64px; } }

/* Login-help form: compact so the whole form fits on a laptop screen without scrolling */
.lg-support { gap: 12px; }
.lg-support .lg-back { margin-bottom: 0; }
.lg-support .lg-head.sm { margin-bottom: 2px; }
.lg-support .lg-head.sm h1 { font-size: 22px; }
.lg-support .lg-head.sm p { font-size: 13px; }
.lg .lg-support .lg-input input, .lg .lg-support .lg-input select { height: 42px; font-size: 13.5px; }
.lg .lg-support .lg-input input { padding-left: 40px; } .lg-support .lg-input > .ic { left: 13px; width: 16px; height: 16px; }
.lg-support textarea { min-height: 42px; height: 58px; padding: 9px 12px; }
.lg-support .lg-btn { height: 46px; font-size: 15px; }
.lg-support .lg-hint { margin-top: -2px; }
.lg-compact .lg-main { padding-block: 26px; }
.lg-compact .lg-feats { gap: 10px; }
/* short screens: tighten the page chrome */
@media (max-height: 760px) {
  .lg:not(.official) .lg-top { padding-top: 14px; }
  .lg:not(.official) .lg-logo { height: 44px; }
  .lg-stage { padding-block: 12px; }
  .lg-foot { padding-bottom: 12px; }
  .lg-side, .lg-main { padding-block: 26px; }
  .lg-biglogo { height: 64px; } .lg-side { gap: 12px; }
  .lg-tabs { margin-bottom: 18px; } .lg-head { margin-bottom: 16px; } .lg-form { gap: 14px; } .lg-help { margin-top: 16px; }
  .lg .lg-input input { height: 48px; } .lg-btn { height: 50px; }
}
