@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; }
.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 (ported from the Ayzen Workday spec) ================= */
.lg { min-height: 100vh; display: flex; flex-direction: column; background: #05070A; color: #fff; color-scheme: dark; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.lg ::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }
@media (min-width: 1024px) { .lg { flex-direction: row; } }

.lg-hero { position: relative; width: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 32px; min-height: 340px; border-bottom: 1px solid rgba(255,255,255,.06); background: #05070A; overflow: hidden; user-select: none; }
@media (min-width: 640px) { .lg-hero { padding: 48px; min-height: 440px; } }
@media (min-width: 1024px) { .lg-hero { width: 55%; padding: 64px; min-height: 100vh; border-bottom: 0; border-right: 1px solid rgba(255,255,255,.06); } }
.lg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.lg-brand, .lg-copy, .lg-foot { position: relative; z-index: 1; }
.lg-hero .brand-name { text-transform: uppercase; font-size: 13px; font-weight: 700; letter-spacing: .18em; line-height: 1; color: #fff; }
.lg-hero .brand-text > span { margin-top: 4px; font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #a1a1aa; }
.lg-hero .brand-login .logo { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 40%, transparent)); }
.lg-copy { max-width: 512px; padding-top: 56px; }
@media (min-width: 1024px) { .lg-copy { padding-top: 0; } }
.lg-copy h1 { margin: 0; font: 700 clamp(2.25rem, 5vw, 3.65rem)/1.08 var(--font-display); letter-spacing: -.038em; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.lg-copy h1 .hl { display: block; }
.lg-copy p { margin: 16px 0 0; max-width: 420px; font-size: 15px; line-height: 1.6; letter-spacing: -.01em; color: #a1a1aa; }
@media (min-width: 640px) { .lg-copy p { font-size: 16px; } }
.lg-foot { display: flex; align-items: center; gap: 8px; padding-top: 32px; font-size: 12px; color: #71717a; }
@media (min-width: 1024px) { .lg-foot { padding-top: 0; } }
.lg-foot .gdot { width: 6px; height: 6px; border-radius: 50%; background: rgba(52,211,153,.8); flex: none; }

.lg-panel { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; padding: 32px 24px; min-height: 520px; background: #05070A; }
@media (min-width: 640px) { .lg-panel { padding: 32px 40px; } }
@media (min-width: 1024px) { .lg-panel { width: 45%; padding: 32px 56px; min-height: 100vh; } }
.lg-glow { position: absolute; top: 50%; left: 50%; width: 340px; height: 340px; transform: translate(-50%, -50%); border-radius: 50%; background: color-mix(in srgb, var(--accent) 4%, transparent); filter: blur(130px); pointer-events: none; }
.lg-col { position: relative; z-index: 1; width: 100%; max-width: 360px; margin: 0 auto; }
.lg-view { animation: lgfade .2s ease-out; }
@keyframes lgfade { from { opacity: 0; transform: translateY(4px); } }

.lg-head { margin-bottom: 28px; }
.lg-head h2 { margin: 0; font: 600 28px/1.15 var(--font-display); letter-spacing: -.03em; color: #fff; }
.lg-head p { margin: 6px 0 0; font-size: 13.5px; letter-spacing: -.01em; color: #a1a1aa; }
.lg-head.sm { margin-bottom: 20px; } .lg-head.sm h2 { font-size: 24px; } .lg-head.sm p { margin-top: 4px; font-size: 13px; } .lg-head.sm b { color: #fff; font-weight: 500; }

.lg-form { display: grid; gap: 20px; }
.lg-field { display: grid; gap: 8px; }
.lg-field label { font-size: 13px; font-weight: 500; letter-spacing: -.01em; color: #d4d4d8; }
.lg .lg-field input, .lg .otp input { width: 100%; height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: #080D14; color: #fff; font: 400 14px var(--font); box-shadow: inset 0 1px 2px rgba(0,0,0,.6); transition: border-color .15s, box-shadow .15s; }
.lg .lg-field input::placeholder { color: #71717a; }
.lg .lg-field input:hover, .lg .otp input:hover { border-color: rgba(255,255,255,.22); }
.lg .lg-field input:focus, .lg .otp input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 1px 2px rgba(0,0,0,.6); }
.lg input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #080D14 inset; -webkit-text-fill-color: #fff; caret-color: #fff; }
.lg .otp { display: flex; justify-content: space-between; gap: 6px; }
.lg .otp input { width: 40px; padding: 0; text-align: center; font-size: 16px; font-weight: 700; }
.lg-err { font-size: 12.5px; color: #ff7a8a; } .lg-err:empty { display: none; }

.lg-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font: 600 13.5px var(--font); letter-spacing: -.01em; text-decoration: none; cursor: pointer; box-shadow: 0 2px 14px color-mix(in srgb, var(--accent) 22%, transparent); transition: box-shadow .15s, transform .15s, filter .15s; }
.lg-btn:hover { filter: brightness(.94); box-shadow: 0 4px 22px color-mix(in srgb, var(--accent) 36%, transparent); text-decoration: none; }
.lg-btn:active { transform: scale(.99); }
.lg-btn:disabled { opacity: .6; cursor: not-allowed; }
.lg-btn .arr { font-size: 15px; font-weight: 700; line-height: 1; transform: translateY(.5px); }
.lg-btn.ghost { background: rgba(255,255,255,.05); color: #fff; border: 1px solid rgba(255,255,255,.12); box-shadow: none; filter: none; }
.lg-btn.ghost:hover { background: rgba(255,255,255,.09); }
.lg-btn.ghost svg { width: 18px; height: 18px; }
.lg-btn.quiet { height: 36px; border-radius: 8px; background: rgba(255,255,255,.05); color: #fff; font-size: 12px; font-weight: 500; box-shadow: none; filter: none; }
.lg-btn.quiet:hover { background: rgba(255,255,255,.10); }
.lg .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.lg .divider { margin-bottom: 18px; color: #71717a; } .lg .divider::before, .lg .divider::after { border-color: rgba(255,255,255,.08); }
.lg-note { display: flex; gap: 10px; align-items: flex-start; margin: -8px 0 20px; padding: 10px 12px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); font-size: 12.5px; color: #e4e4e7; }
.lg-note .ic { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 1px; }
.lg-note.err { border-color: rgba(255,107,122,.45); background: rgba(255,107,122,.08); }

.lg-help { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; padding-top: 8px; font-size: 12px; color: #a1a1aa; }
.lg-help.bt { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.lg-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); color: #d4d4d8; font: 500 12px var(--font); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.4); transition: background .15s, border-color .15s, color .15s; }
.lg-pill:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.20); color: #fff; }
.lg-pill:active { transform: scale(.95); }
.lg-pill .ic { width: 14px; height: 14px; color: #a1a1aa; }
.lg-mail { margin: 10px 0 0; text-align: center; font-size: 12px; color: #71717a; } .lg-mail a { color: var(--accent); }
.lg-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px; padding: 0; border: 0; background: none; font: 400 12px var(--font); color: #a1a1aa; cursor: pointer; }
.lg-back:hover { color: #fff; } .lg-back .ic { width: 14px; height: 14px; }
.lg-resend { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; font-size: 12px; color: #a1a1aa; }
.lnk { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; } .lnk:hover { text-decoration: underline; } .lnk:disabled { color: #71717a; text-decoration: none; cursor: default; }

/* compact "Request admin approval" */
.lg-support { display: grid; gap: 12px; }
.lg-support h2 { margin: 0; font: 600 24px/1.15 var(--font-display); letter-spacing: -.025em; color: #fff; }
.lg-support .sub { margin: 4px 0 0; font-size: 12px; line-height: 1.35; color: #a1a1aa; }
.lg-support .f { display: grid; gap: 4px; }
.lg-support label { margin: 0; font-size: 11.5px; font-weight: 500; color: #d4d4d8; } .lg-support .opt { color: #71717a; font-weight: 400; }
.lg-support input, .lg-support select, .lg-support textarea { width: 100%; height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid #1E2E44; background: #0F1826; color: #fff; font: 400 13px var(--font); box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.lg-support select { padding-right: 32px; appearance: none; font-size: 12.5px; color: #e4e4e7; cursor: pointer; }
.lg-support textarea { height: auto; min-height: 0; padding: 8px; resize: none; font-size: 12.5px; line-height: 1.4; }
.lg-support ::placeholder { color: #71717a; }
.lg-support input:focus, .lg-support select:focus, .lg-support textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.lg-support input.em { padding-right: 38px; border-color: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 18%, transparent); }
.lg-support .sel { position: relative; }
.lg-support .arrows { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; font-size: 8px; line-height: 1; color: #a1a1aa; pointer-events: none; }
.lg-support .arrows > span + span { margin-top: -2px; }
.lg-support .arrows.um { flex-direction: row; gap: 2px; right: 10px; } .lg-support .arrows.um .ic { width: 14px; height: 14px; } .lg-support .arrows.um > span { margin: 0; }
.lg-support .send { height: 40px; margin-top: 4px; border-radius: 8px; font-size: 13px; } .lg-support .send .ic { width: 14px; height: 14px; stroke-width: 2.4; transform: rotate(12deg); }
.lg-support .back { justify-self: center; padding: 2px 0; border: 0; background: none; font: 500 12px var(--font); color: #d4d4d8; cursor: pointer; } .lg-support .back:hover { color: #fff; }
.lg-support .info { display: flex; align-items: flex-start; gap: 8px; margin-top: 2px; padding-top: 10px; border-top: 1px solid #162235; font-size: 11px; line-height: 1.3; color: #a1a1aa; }
.lg-support .info .ic { width: 14px; height: 14px; color: var(--accent); flex: none; margin-top: 1px; }
.lg-done { display: grid; justify-items: center; gap: 14px; padding: 20px 0; text-align: center; }
.lg-done .ok { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); } .lg-done .ok .ic { width: 20px; height: 20px; }
.lg-done h3 { margin: 0 0 4px; font: 600 16px var(--font); color: #fff; }
.lg-done p { margin: 0 auto; max-width: 280px; font-size: 12px; line-height: 1.6; color: #a1a1aa; } .lg-done p b { color: #fff; font-weight: 500; }
.lg-done .ref { padding: 4px 10px; border-radius: 4px; border: 1px solid #1E2E44; background: #0F1826; font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: #d4d4d8; }
.lg-done .lg-btn { width: 100%; }

.lg-toast { position: fixed; top: 20px; right: 20px; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 40px)); padding: 8px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: rgba(8,13,20,.95); color: #f4f4f5; font-size: 12px; font-weight: 500; letter-spacing: -.01em; box-shadow: 0 12px 32px rgba(0,0,0,.7); backdrop-filter: blur(8px); animation: lgtoast .15s ease-out; }
.lg-toast[hidden] { display: none; }
.lg-toast .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; animation: lgpulse 1.4s ease-in-out infinite; }
@keyframes lgtoast { from { opacity: 0; transform: translateY(-8px); } }
@keyframes lgpulse { 50% { opacity: .35; } }
.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); }
