/* DTR design system: tokens, layout, components. One light theme, no build step.
   Type: 15px body, 14px tables and labels. Spacing: multiples of 4px (--s1..--s7). */

:root {
  --bg: #f3f5f8; --surface: #fff; --surface-2: #f7f9fb;
  --ink: #18212f; --ink-2: #364152; --muted: #586274; --faint: #6f7987;
  --line: #e2e7ee; --line-strong: #c9d1dc;
  --accent: #2350b0; --accent-hover: #1b3f8c; --accent-tint: #ecf1fb;
  --success: #17673f; --success-tint: #e6f4ec; --success-ink: #0f4a2c;
  --danger: #b3261e; --danger-tint: #fdeeed; --danger-ink: #7a1914;
  --warning: #8a5200; --warning-tint: #fff4e0; --warning-ink: #5c3600;
  --info-ink: #1b3f8c;
  --in: var(--success); --out: var(--danger);
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem;
  --radius: .5rem; --radius-sm: .375rem;
  --shadow: 0 1px 2px rgb(24 33 47 / .05);
  --shadow-lg: 0 12px 32px rgb(24 33 47 / .18);
  --sidebar: 15rem; --control: 2.5rem; --control-sm: 2rem;
  --side-col: 24rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: .9375rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
h1 { font-size: 1.375rem; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; margin: 0; }
h2 { font-size: 1rem; font-weight: 650; line-height: 1.3; margin: var(--s6) 0 var(--s3); }
h3 { font-size: .9375rem; font-weight: 650; margin: 0 0 var(--s2); }
p { margin: 0 0 var(--s3); }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .875em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- Shell ---- */
.skip { position: absolute; left: var(--s2); top: -4rem; background: var(--surface); padding: var(--s2) var(--s3); border-radius: var(--radius); z-index: 30; }
.skip:focus { top: var(--s2); }
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.app.bare { display: block; }
.topbar { display: none; }

.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: var(--s4) var(--s3) var(--s3); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s5); }
.brand { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s2); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem; letter-spacing: .02em; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: var(--radius-sm); background: var(--accent); color: #fff; font-size: .8125rem; font-weight: 700; }
.brand small { display: block; font-size: .6875rem; font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.2; }
.sidebar nav { display: flex; flex-direction: column; gap: var(--s4); }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-title { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--surface-2); border-radius: var(--radius-sm); padding: var(--s1) var(--s2); margin-bottom: var(--s1); }
.nav-group a { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 2rem; padding: 0 var(--s2); border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-size: .875rem; font-weight: 500; }
.nav-group a:hover { background: var(--surface-2); color: var(--ink); }
.nav-group a.active { background: var(--accent-tint); color: var(--accent); font-weight: 650; box-shadow: inset 3px 0 0 var(--accent); }
.count { min-width: 1.25rem; padding: 0 .375rem; border-radius: 1rem; background: var(--danger); color: #fff; font-size: .6875rem; font-weight: 700; text-align: center; line-height: 1.25rem; }
.sidebar-foot { margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s2) var(--s2); font-size: .8125rem; }
.sidebar-foot form { margin: 0; }
.sidebar-foot > :not(.avatar):not(.who-am-i) { grid-column: 1 / -1; }
.sidebar-foot button { width: 100%; }
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-weight: 700; font-size: .8125rem; }
.who-am-i { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; line-height: 1.3; }

main { width: 100%; max-width: 92rem; margin: 0 auto; padding: var(--s6) var(--s6) var(--s7); }
.bare main { max-width: 24rem; padding: 14vh var(--s4) var(--s6); }

@media (max-width: 900px) {
  :root { --control: 2.75rem; --control-sm: 2.25rem; }
  .app { display: block; }
  .topbar { display: flex; align-items: center; justify-content: space-between; height: 3.4rem; padding: 0 var(--s4); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .sidebar { display: none; position: fixed; inset: 3.4rem 0 0 0; height: auto; z-index: 15; border-right: 0; }
  .sidebar > .brand { display: none; }
  .nav-group a { min-height: 2.5rem; font-size: .9375rem; }
  .menu-open .sidebar { display: flex; }
  html:not(.js) .sidebar { display: flex; position: static; height: auto; }
  main { padding: var(--s4) var(--s4) var(--s6); }
}

/* ---- Page structure ---- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s4); margin-bottom: var(--s5); }
.page-header p { margin: var(--s1) 0 0; color: var(--muted); max-width: 62rem; }
.page-header h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.back { display: inline-flex; align-items: center; gap: var(--s1); margin-bottom: var(--s2); font-size: .8125rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.page-header p.back-row { margin: 0 0 var(--s1); }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin: var(--s6) 0 var(--s3); }
.section-head h2 { margin: 0; }
.section-head:first-child { margin-top: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); margin-bottom: var(--s4); box-shadow: var(--shadow); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { margin: 0 0 var(--s3); }
.card h2 + p.muted { margin-top: calc(-1 * var(--s2)); font-size: .875rem; }
.card-foot { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: var(--s5) calc(-1 * var(--s5)) calc(-1 * var(--s5)); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card.flush { padding: 0; overflow: hidden; }
.card.danger-zone { border-color: #f0c6c3; }

.cols { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.cols > .card { margin-bottom: 0; }
.cols + * { margin-top: var(--s4); }
/* Action forms in a narrow column, the records they create in the wide one. */
.split { display: grid; gap: var(--s5); grid-template-columns: minmax(0, var(--side-col)) minmax(0, 1fr); align-items: start; }
.split > * > :last-child { margin-bottom: 0; }
/* A column that starts with a heading lines it up with the heading inside a card next to it. */
.split > div > h2:first-child { margin-top: calc(var(--s5) + 1px); }
@media (max-width: 1100px) { .split > div > h2:first-child { margin-top: var(--s2); } }
.split.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, var(--side-col)); }
@media (max-width: 1100px) { .split, .split.reverse { grid-template-columns: minmax(0, 1fr); } }
.narrow { max-width: 52rem; }

.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.actions.center { justify-content: center; }
button.block { width: 100%; }
.login-brand { text-align: center; margin-bottom: var(--s5); }
.login-brand .brand-mark { width: 2.75rem; height: 2.75rem; font-size: 1.125rem; margin: 0 auto var(--s3); border-radius: var(--radius); }
.login-brand p { margin: var(--s1) 0 0; }
table.mono { font-size: .8125rem; }
textarea.mono { font-size: .875rem; }

/* ---- Buttons ----
   One filled (primary) button per area; everything else is the outlined default. */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--control); padding: 0 var(--s4); font: inherit; font-size: .875rem; font-weight: 600; line-height: 1.2; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; box-shadow: var(--shadow); white-space: nowrap; transition: background-color .12s, border-color .12s; }
button:hover, .button:hover { background: var(--surface-2); border-color: #b5bfcd; color: var(--ink); }
button.primary, .button.primary, a.button { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .button.primary:hover, a.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
a.button.secondary, button.secondary, .button.secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
a.button.secondary:hover, button.secondary:hover, .button.secondary:hover { background: var(--surface-2); border-color: #b5bfcd; color: var(--ink); }
button.danger, .button.danger { background: var(--surface); border-color: #e3a8a4; color: var(--danger); }
button.danger:hover, .button.danger:hover { background: var(--danger-tint); border-color: var(--danger); color: var(--danger); }
button.sm, .button.sm { min-height: var(--control-sm); padding: 0 var(--s3); font-size: .8125rem; }
button.link { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--accent); font-size: inherit; font-weight: 500; }
button.link:hover { background: none; color: var(--accent-hover); text-decoration: underline; }
/* On touch screens a text button still needs a finger-sized target. */
@media (pointer: coarse), (max-width: 700px) { button.link { min-height: 2.5rem; } }
button:disabled, .button[aria-disabled=true] { opacity: .5; cursor: not-allowed; box-shadow: none; }
button.loading { opacity: .6; cursor: progress; }

/* ---- Forms ---- */
.form { display: grid; gap: var(--s4); max-width: 34rem; }
.form.wide { max-width: none; }
/* Two columns of fields on wide screens; long and checkbox fields take the full row. */
.form.two { max-width: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); column-gap: var(--s5); }
.form.two > .actions, .form.two > .alert, .form.two > .field.check, .form.two > .field:has(textarea) { grid-column: 1 / -1; }
.card.form { max-width: 40rem; }
.form > .actions { padding-top: var(--s1); }
.form-row { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.field { display: grid; gap: .3125rem; align-content: start; }
.field label { font-weight: 600; font-size: .8125rem; color: var(--ink-2); }
.field .req { color: var(--danger); }
.field .help { color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.field .error { color: var(--danger); font-size: .8125rem; font-weight: 600; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { width: 100%; min-height: var(--control); padding: var(--s2) var(--s3); font: inherit; font-size: .9375rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .12s, box-shadow .12s; }
input:not([type=checkbox]):not([type=radio]):hover, select:hover, textarea:hover { border-color: #b5bfcd; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(35 80 176 / .15); }
input[type=file] { padding: var(--s1) var(--s2); }
textarea { min-height: 5rem; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox], input[type=radio] { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--accent); }
.field.check { grid-template-columns: auto 1fr; align-items: center; column-gap: var(--s2); }
.field.check label { font-weight: 500; font-size: .875rem; color: var(--ink); }
.field.check .help, .field.check .error { grid-column: 2; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); }
.inline-form { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; margin: 0; }
.inline-form .field { flex: 0 1 12rem; min-width: 10rem; }
.inline-form .field.grow { flex: 1 1 18rem; }
form.inline { display: inline; margin: 0; }
/* A toolbar: a single row of filters or inline actions above a table. */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; justify-content: space-between; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: var(--s4); }
.toolbar .inline-form .field { flex-basis: 10rem; }
.toolbar > p { margin: 0; }
.toolbar > form { flex: 1 1 auto; }

/* Settings: label and help on the left, the control on the right. */
.setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 14rem); gap: var(--s2) var(--s5); align-items: start; padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.setting:first-of-type { padding-top: 0; }
.setting:last-of-type { border-bottom: 0; padding-bottom: 0; }
.setting label { font-weight: 600; font-size: .875rem; }
.setting .help { display: block; color: var(--muted); font-size: .8125rem; margin-top: var(--s1); max-width: 40rem; }
.setting .error { display: block; color: var(--danger); font-size: .8125rem; font-weight: 600; margin-top: var(--s1); }
.setting.invalid input { border-color: var(--danger); }
@media (max-width: 640px) { .setting { grid-template-columns: 1fr; } }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: var(--s4); }
.card.flush > .table-wrap, .card > .table-wrap.bare { border: 0; border-radius: 0; box-shadow: none; margin: 0; }
table { border-collapse: collapse; width: 100%; font-size: .875rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: var(--s3) var(--s4); font-weight: 600; }
th, td { padding: .5625rem var(--s3); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th:first-child, td:first-child { padding-left: var(--s4); }
th:last-child, td:last-child { padding-right: var(--s4); }
thead th, tr:first-child > th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted); font-size: .75rem; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; border-bottom-color: var(--line-strong); padding-top: .625rem; padding-bottom: .625rem; }
tbody tr:hover { background: #f8fafd; }
tbody th { font-weight: 600; }
tr:last-child > td { border-bottom: 0; }
td.num, th.num { text-align: right; }
td.center, th.center { text-align: center; }
td.strong { font-weight: 600; color: var(--ink); }
td a { text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }
td.input-cell { width: 9rem; }
.table-wrap table { white-space: nowrap; }
.table-wrap td.wrap { white-space: normal; min-width: 14rem; }
/* Short text (notes, day types, shift names) may wrap sooner, so a table beside a form or with
   many columns keeps its last column (often the actions) on screen. */
.table-wrap td.wrap.narrow { min-width: 6rem; }
thead th.wrap { white-space: normal; }
.zero { color: #a3abb7; }
tr.dim td { color: var(--muted); }
/* Row actions stay quiet until the row is hovered or focused. */
.row-action, td button.link { color: var(--muted); font-weight: 500; text-decoration: none; }
tr:hover .row-action, tr:hover td button.link, .row-action:focus-visible { color: var(--accent); }
td.actions-cell { text-align: right; width: 1%; }
td.actions-cell > * + * { margin-left: var(--s3); }
td input:not([type=checkbox]):not([type=radio]) { min-height: var(--control-sm); padding: var(--s1) var(--s2); font-size: .875rem; }

/* ---- Alerts, badges, empty states ---- */
.alert, .notice { padding: var(--s3) var(--s4); border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); background: var(--surface); margin: 0 0 var(--s4); font-size: .875rem; }
.alert.info { background: var(--accent-tint); border-color: #d3def5; border-left-color: var(--accent); color: var(--info-ink); }
.alert.success, .notice.success { background: var(--success-tint); border-color: #c9e6d4; border-left-color: var(--success); color: var(--success-ink); }
.alert.warning, .notice.warning { background: var(--warning-tint); border-color: #f2dcb4; border-left-color: var(--warning); color: var(--warning-ink); }
.alert.error, .notice.error { background: var(--danger-tint); border-color: #f2c9c6; border-left-color: var(--danger); color: var(--danger-ink); }
.alert ul { margin: var(--s2) 0 0; padding-left: 1.2rem; }
.alert strong { font-weight: 650; }
.badge { display: inline-flex; align-items: center; gap: var(--s1); padding: 0 var(--s2); border-radius: 1rem; font-size: .75rem; font-weight: 600; line-height: 1.375rem; background: #eef1f5; color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.badge.success { background: var(--success-tint); color: var(--success-ink); }
.badge.warning { background: var(--warning-tint); color: var(--warning-ink); }
.badge.danger { background: var(--danger-tint); color: var(--danger-ink); }
.badge.info { background: var(--accent-tint); color: var(--info-ink); }
.badge.neutral { background: #eef1f5; color: var(--muted); }
.empty { text-align: center; padding: var(--s6) var(--s4); color: var(--muted); font-size: .875rem; }
.empty strong { display: block; color: var(--ink); font-size: .9375rem; margin-bottom: var(--s1); }

/* ---- Stat tiles and lists ---- */
.stats { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); margin: 0 0 var(--s5); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); box-shadow: var(--shadow); }
.stat dt, .stat .label { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
.stat dt a { color: inherit; }
.stat dd, .stat .value { margin: var(--s1) 0 0; font-size: 1.5rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat.attention { border-color: #f0d7aa; background: #fffcf6; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
ul.list { list-style: none; padding: 0; margin: 0; font-size: .875rem; }
ul.list > li { padding: var(--s2) 0; border-top: 1px solid var(--line); }
ul.list > li:first-child { border-top: 0; padding-top: 0; }
ul.list > li.none { color: var(--muted); }
ol.steps { margin: 0 0 var(--s5); padding-left: 1.25rem; display: grid; gap: var(--s2); }
ol.steps li::marker { font-weight: 650; color: var(--accent); }
.card ul:not(.plain):not(.list) { padding-left: 1.2rem; margin: var(--s2) 0 0; }
details.card { padding: 0; }
details.card > summary { cursor: pointer; font-weight: 600; padding: var(--s3) var(--s4); list-style-position: inside; }
details.card > summary:hover { background: var(--surface-2); }
details.card[open] > summary { border-bottom: 1px solid var(--line); }
details.card > :not(summary) { margin: var(--s3) var(--s4); }
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); text-align: center; box-shadow: var(--shadow-lg); color: var(--ink); }
dialog::backdrop { background: rgb(24 33 47 / .45); }

/* A request awaiting a decision (approvals inbox). */
.request-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s2); }
.request-head .when { margin-left: auto; }
.request-summary { font-size: 1rem; font-weight: 600; margin-bottom: var(--s1); }
.request-body { color: var(--muted); font-size: .875rem; }
.decision { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }

/* ---- Clock page ---- */
.clock { max-width: 26rem; margin: 0 auto; text-align: center; display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - var(--s6) - var(--s7)); min-height: calc(100dvh - var(--s6) - var(--s7)); }
@media (max-width: 900px) { .clock { min-height: calc(100dvh - 3.4rem - var(--s4) - var(--s6)); } }
.who { font-weight: 600; margin: 0; color: var(--muted); font-size: .875rem; }
.time { font-size: 3.25rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; margin: var(--s2) 0 var(--s5); font-variant-numeric: tabular-nums; }
.time small { display: block; font-size: .875rem; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: var(--s2); }
.clock > .card { padding: var(--s5); }
.punch { width: 100%; min-height: 4.5rem; font-size: 1.375rem; font-weight: 700; color: #fff; border: 0; border-radius: .625rem; box-shadow: 0 1px 2px rgb(24 33 47 / .1), 0 4px 12px rgb(24 33 47 / .08); }
.punch.in { background: var(--in); }
.punch.out { background: var(--out); }
.punch.in:hover { background: #125430; color: #fff; }
.punch.out:hover { background: #8f1d17; color: #fff; }
.pending { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); border: 1px solid #f2dcb4; border-left: 3px solid var(--warning); border-radius: var(--radius-sm); background: var(--warning-tint); text-align: left; font-size: .875rem; }
.pending strong { display: block; color: var(--warning); }
.row { display: flex; gap: var(--s2); justify-content: center; }
.today { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s1) var(--s4); margin: var(--s4) 0 0; padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.today dt { grid-row: 1; color: var(--muted); font-size: .75rem; font-weight: 600; }
.today dd { grid-row: 2; margin: 0; font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; }
#clock-status { font-weight: 600; font-size: 1rem; margin-bottom: var(--s1); }
#clock .punch { margin-top: var(--s4); }
#clock .alert { margin: var(--s4) 0 0; }

/* ---- Older class names, still used by a few pages ---- */
.stack { display: grid; gap: var(--s3); max-width: 34rem; }
.stack p { display: grid; gap: var(--s1); margin: 0; }
.row-form { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; }
.row-form label { display: grid; gap: var(--s1); font-weight: 600; }
.scroll { overflow-x: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

dialog.confirm { width: min(92vw, 26rem); text-align: left; padding: var(--s5); }
dialog.confirm h2 { margin: 0 0 var(--s2); font-size: 1.125rem; }
dialog.confirm p { color: var(--muted); margin-bottom: var(--s5); }
dialog.confirm .actions { justify-content: flex-end; }
dialog.confirm button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
dialog.confirm button.danger:hover { background: #8f1d17; }

/* Leave access: one tick list per leave type */
.access-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s4); }
.access-head h2 { margin: 0; }
.access-count { font-size: .875rem; }
.access-tools { margin-left: auto; display: flex; gap: var(--s4); }
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--s2); }
.access-item { display: flex; align-items: center; gap: var(--s2); min-height: var(--control-sm); padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: .875rem; cursor: pointer; }
.access-item:hover { border-color: var(--line-strong); background: var(--surface-2); }
.access-item:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.access-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access.dirty { border-color: var(--warning); }
.access-dirty { font-size: .875rem; font-weight: 600; color: var(--warning-ink); background: var(--warning-tint); padding: var(--s1) var(--s3); border-radius: var(--radius-sm); }
.access-dirty[hidden] { display: none; }
.access-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) 0; background: var(--bg); border-top: 1px solid var(--line); }

/* Sign-in pages (allauth templates in templates/allauth/) */
.center { text-align: center; }
.account-links { margin: 0; font-size: .8125rem; color: var(--muted, inherit); }
img.qr { display: block; margin: 0 auto var(--s3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: var(--s2); }

/* Install offer on phones (static/install.js): a card pinned above the bottom edge. */
.install-offer { position: fixed; z-index: 50; left: var(--s3); right: var(--s3); bottom: calc(var(--s3) + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.install-offer img { border-radius: var(--radius-sm); flex: none; }
.install-text { flex: 1 1 12rem; display: grid; gap: 2px; font-size: .875rem; color: var(--ink-2); }
.install-text strong:first-child { color: var(--ink); font-size: .9375rem; }
.install-actions { display: flex; gap: var(--s2); margin-left: auto; }
