/* Honor Global Ops. House look (HHN palette, Poppins, light first). Tables and the home grid come from the kit
   (assets/kit), themed here through the --hk-* tokens. Layout contract: one content column, max 1440, no page
   sideways scroll; a wide table scrolls inside its own box. */

:root {
  --hk-bg: var(--bg); --hk-surface: var(--panel); --hk-surface-2: var(--surface); --hk-border: var(--line);
  --hk-text: var(--ink); --hk-muted: var(--muted); --hk-accent: var(--pri); --hk-accent-text: #fff;
  --hk-good-bg: var(--ok-tint); --hk-good-text: var(--ok-text); --hk-warn-bg: var(--warn-tint); --hk-warn-text: var(--warn-text);
  --hk-bad-bg: var(--bad-tint); --hk-bad-text: var(--bad-text); --hk-info-bg: var(--wait-tint); --hk-info-text: var(--wait-text);
  --hk-idle-bg: var(--mute-tint); --hk-idle-text: var(--mute-text); --hk-font: var(--font); --hk-radius: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); }
a { color: var(--link); }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; font-weight: 600; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 10px; background: var(--panel); min-height: 36px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.mono, .num { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.skip { position: absolute; left: -9999px; min-height: 28px; display: inline-flex; align-items: center; } .skip:focus { left: 8px; top: 8px; background: var(--panel); padding: 8px; z-index: 50; }
.hidden { display: none !important; }

/* shell */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; padding: 4px 8px 16px; }
.rail .sect { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #A9C1DD; padding: 14px 10px 4px; }
.rail a.nav { display: flex; flex: none; min-height: 32px; align-items: center; gap: 10px; color: #E6EEF8; text-decoration: none; padding: 7px 10px; border-radius: var(--radius); }
.rail a.nav svg { width: 18px; height: 18px; flex: none; }
/* Short laptop screens: tighten the menu so it fits without scrolling (no item cut in half at the bottom). */
@media (min-width: 961px) and (max-height: 860px) {
  .rail { padding: 10px 10px; }
  .rail a.nav { min-height: 25px; padding: 2px 10px; }
  .rail .sect { padding: 6px 10px 2px; }
  .rail .rail-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; padding-top: 6px; }
}
.rail a.nav:hover { background: rgba(255,255,255,.08); }
.rail a.nav.on { background: var(--blue); color: #fff; }
.navbadge { margin-left: auto; background: var(--bad); color: #fff; border-radius: 10px; font-size: 12px; padding: 0 7px; line-height: 18px; }
.rail-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.15); font-size: 12px; color: #CFDCEC; display: grid; gap: 4px; }
.rail-foot .who { color: #fff; font-weight: 500; }
.rail-foot button { background: none; border: 0; color: #CFDCEC; text-align: left; padding: 4px 0; min-height: 28px; cursor: pointer; text-decoration: underline; }
.page { min-width: 0; }
#main { max-width: 1440px; margin: 0 auto; padding: 22px 28px 48px; outline: none; }

/* page head */
.head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head .grow { flex: 1; min-width: 200px; }
.head p { color: var(--muted); margin: 0; }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.crumb a { color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); border-radius: var(--radius); padding: 7px 14px; min-height: 36px; cursor: pointer; text-decoration: none; font-weight: 500; }
.btn:hover { background: var(--surface); }
.btn.pri { background: var(--pri); border-color: var(--pri); color: var(--pri-ink); }
.btn.pri:hover { background: var(--pri-hover); }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: 13px; white-space: nowrap; }
.btn.wide { width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: default; }

/* cards, tiles, notices */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0; }
.card > h2 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card > h2 .muted { font-size: 13px; font-weight: 400; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.cards > .card { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.stat .lbl { font-size: 12px; color: var(--muted); }
.stat .val { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .sub { font-size: 12px; color: var(--muted); }
.stat.bad .val { color: var(--bad-text); } .stat.ok .val { color: var(--ok-text); } .stat.warn .val { color: var(--warn-text); }
.notice { border-radius: var(--radius); padding: 10px 12px; margin: 0 0 12px; border: 1px solid var(--line); background: var(--surface); }
.notice.tone-ok { background: var(--ok-tint); border-color: transparent; color: var(--ok-text); }
.notice.tone-bad { background: var(--bad-tint); border-color: transparent; color: var(--bad-text); }
.notice.tone-warn { background: var(--warn-tint); border-color: transparent; color: var(--warn-text); }
.notice.tone-muted { color: var(--muted); }
.chip { display: inline-block; border-radius: 10px; padding: 0 8px; font-size: 12px; line-height: 20px; background: var(--mute-tint); color: var(--mute-text); white-space: nowrap; }
.chip.ok { background: var(--ok-tint); color: var(--ok-text); } .chip.bad { background: var(--bad-tint); color: var(--bad-text); }
.chip.warn { background: var(--warn-tint); color: var(--warn-text); } .chip.info { background: var(--wait-tint); color: var(--wait-text); }

/* facts (profile) */
dl.facts { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 6px 14px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* simple tables (small lists inside cards; big lists use the kit table) */
.tablebox { overflow-x: auto; max-width: 100%; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 6px 8px; white-space: nowrap; }
table.list td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; overflow-wrap: anywhere; }
table.list td.n, table.list th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.list tr:last-child td { border-bottom: 0; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 12px; cursor: pointer; color: var(--muted); font-weight: 500; }
.tab.on { color: var(--ink); border-bottom-color: var(--pri); }
.tab .badge { background: var(--bad-tint); color: var(--bad-text); border-radius: 10px; padding: 0 6px; font-size: 12px; margin-left: 4px; }

/* hours bars on the profile */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { border: 1px solid var(--line); border-radius: 6px; padding: 6px; font-size: 12px; min-width: 0; background: var(--panel); }
.day.we { background: var(--surface); }
.day.leave { background: var(--wait-tint); }
.day .d { color: var(--muted); }
.day .h { font-family: var(--mono); }
.day .h.low { color: var(--bad-text); font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }

/* flags list */
.flag { border-left: 4px solid var(--bad); background: var(--panel); border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.flag .t { font-weight: 600; }
.flag .todo { color: var(--muted); font-size: 13px; }

/* forms */
.fld { margin-bottom: 12px; display: grid; gap: 4px; }
.fld label { font-weight: 500; }
.fld .hint { font-size: 12px; color: var(--muted); }
.fld .err { color: var(--bad-text); font-size: 12px; margin: 0; min-height: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* sign in */
.login-body { background: var(--bg); }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); }
.login-side { display: flex; align-items: center; justify-content: center; padding: 32px; color: #fff; background: var(--navy); }
.login-brand { display: grid; gap: 14px; justify-items: start; max-width: 420px; }
.login-name { font-size: 30px; font-weight: 600; }
.login-tag { color: #CFDCEC; font-size: 15px; }
.login-card { background: var(--panel); padding: 48px 36px; display: flex; flex-direction: column; justify-content: center; }
.login-card h1 { margin-bottom: 14px; }
.login-foot { font-size: 12px; color: var(--muted); margin-top: 14px; }
.qr { display: flex; justify-content: center; margin: 8px 0 12px; }
.qr svg { width: 200px; height: 200px; }
.secret { font-family: var(--mono); font-size: 13px; background: var(--surface); padding: 6px 8px; border-radius: 4px; overflow-wrap: anywhere; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 6px; opacity: 0; transition: .2s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* home grid tiles */
.tile-num { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile-sub { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.tile-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.tile-list li { padding: 4px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; justify-content: space-between; min-width: 0; }
.tile-list li:last-child { border-bottom: 0; }
.tile-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.tile-go { font-size: 13px; margin-top: 6px; display: inline-flex; align-items: center; min-height: 28px; }
/* The kit bar note may shrink to nothing and spill sideways; let it wrap to its own line instead. */
.hk .hk-bar .hk-grow { flex: 1 1 auto; }
/* Profile tabs: keep the tab row still when a short tab replaces a long one. */
.tabbody { min-height: 70vh; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; }
  .rail .sect { display: none; }
  .rail #nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .rail-foot { margin: 0 0 0 auto; border: 0; padding: 0; grid-auto-flow: column; gap: 10px; }
  #main { padding: 16px; }
  .login { grid-template-columns: 1fr; }
  .login-side { padding: 24px; }
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Columns that step aside on a phone (Data flow sources). */
@media (max-width: 700px) { .opt { display: none; } }

.nowrap { white-space: nowrap; }
td.src { min-width: 180px; max-width: 300px; }
@media (max-width: 700px) { td.src { min-width: 0; } }
.small { font-size: 12.5px; }

/* Data mapping: link boxes inside table cells */
table.map td { vertical-align: top; }
table.map .row.fix { padding: 3px 0; }
table.map .row.fix + .row.fix { border-top: 1px dashed var(--line); }
table.map select, table.map input.pick { min-height: 30px; height: 30px; padding: 3px 8px; font-size: 13px; min-width: 0; }
table.map select { width: 100%; max-width: 340px; }
table.map input.pick { width: 100%; max-width: 220px; }
table.map .row { flex-wrap: wrap; }
table.map .row > select, table.map .row > input { flex: 1 1 140px; }
@media (max-width: 700px) { table.map th, table.map td { padding-left: 6px; padding-right: 6px; } }
.mono { font-family: var(--mono); }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; color: var(--muted); padding: 6px 0; }

/* ---------- Shared filter bar (filters.js). Design: builder-runs fanout/design/filters.html ---------- */
.fbar { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 16px; }
.fbar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fsearch { position: relative; flex: 1 1 220px; min-width: 180px; max-width: 320px; }
.fsearch input { width: 100%; padding-left: 34px; padding-right: 30px; }
.fsearch svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.fsearch kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 11px var(--mono); color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: var(--surface); pointer-events: none; }
.fanchor { position: relative; display: inline-flex; }
.fpick { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--panel); border-radius: var(--radius); padding: 6px 10px 6px 12px; min-height: 36px; cursor: pointer; white-space: nowrap; max-width: 320px; }
.fpick .k { color: var(--muted); }
.fpick .v { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.fpick .caret { width: 14px; height: 14px; color: var(--faint); flex: none; }
.fpick.set { border-color: var(--pri); background: var(--wait-tint); }
.fpick.set .k { color: var(--wait-text); }
.fpick .n { background: var(--pri); color: #fff; border-radius: 9px; font-size: 11px; line-height: 18px; min-width: 18px; text-align: center; padding: 0 5px; }
.fbar-applied { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.fbar-applied .lbl { font-size: 12px; color: var(--muted); margin-right: 2px; }
.fbar-applied .spacer { flex: 1 1 0; }
.fcount { font-size: 13px; color: var(--muted); white-space: nowrap; }
.fcount b { color: var(--ink); font-weight: 600; }
.token { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1px 4px 1px 10px; font-size: 12.5px; line-height: 22px; max-width: 100%; }
.token b { font-weight: 500; overflow-wrap: anywhere; }
.token button { border: 0; background: none; width: 24px; height: 24px; border-radius: 12px; cursor: pointer; color: var(--muted); display: grid; place-items: center; padding: 0; flex: none; }
.token button:hover { background: var(--surface-2); color: var(--ink); }
.token button svg { width: 12px; height: 12px; }
.fclear { border: 0; background: none; color: var(--link); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 4px 6px; min-height: 30px; }
.fpop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 260px; max-width: min(560px, 92vw); max-height: 70vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(9, 49, 93, .16); padding: 12px; }
.fpop.right { left: auto; right: 0; }
.fpop h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.fpop-cols { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr); gap: 16px; }
.fpop-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.ffind { width: 100%; margin-bottom: 8px; }
.fdates { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fdates input { width: 140px; }
.fhint { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.presets { display: grid; gap: 2px; margin-bottom: 8px; }
.presets button { text-align: left; border: 0; background: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 14px; min-height: 32px; align-items: center; }
.presets button:hover { background: var(--surface); }
.presets button.on { background: var(--wait-tint); color: var(--wait-text); font-weight: 500; }
.presets button .d { color: var(--faint); font-size: 12px; font-weight: 400; white-space: nowrap; }
.opt-list { display: grid; gap: 2px; }
.opt-list label { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; min-height: 32px; }
.opt-list label:hover { background: var(--surface); }
.opt-list input { min-height: 0; width: 16px; height: 16px; accent-color: var(--pri); flex: none; }
.opt-list .t { overflow-wrap: anywhere; }
.opt-list .c { margin-left: auto; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; padding-left: 10px; }
button.stat { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
button.stat:hover { border-color: var(--line-strong); background: var(--surface); }
button.stat.on { border-color: var(--pri); box-shadow: inset 0 0 0 1px var(--pri); }
@media (max-width: 700px) { .fpop-cols { grid-template-columns: 1fr; } .fsearch { max-width: none; flex-basis: 100%; } .fpop { position: fixed; left: 4vw; right: 4vw; top: 12vh; max-width: none; } }
.day .h.bad { color: var(--bad-text); font-weight: 500; }

/* ---------- PTO bank (lists.js ptoPage). Design: fanout/design/pto.html ---------- */
.pto-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.pto-top > .card { margin-bottom: 16px; }
.card > h2 .grow { flex: 1 1 0; }
@media (max-width: 1200px) { .pto-top { grid-template-columns: minmax(0, 1fr); } }
.pstrip-box { overflow-x: auto; }
.pstrip { display: grid; gap: 2px 1px; font-size: 12px; min-width: 520px; }
@media (max-width: 1300px) { .opt2 { display: none; } }
@media (max-width: 1100px) { .bankt .opt { display: none; } }
.pstrip .ph { color: var(--muted); font-size: 12px; text-align: center; line-height: 1.2; padding-bottom: 4px; }
.pstrip .ph:first-child { text-align: left; }
.pstrip .ph b { display: block; font-size: 12px; color: var(--ink); }
.pstrip .ph.today b { background: var(--pri); color: #fff; border-radius: 4px; }
.pstrip .ph.we { color: var(--faint); }
.pstrip .pn { text-align: left; border: 0; background: none; padding: 2px 6px 2px 0; cursor: pointer; font: inherit; color: var(--ink); min-height: 30px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.pstrip .pn span { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pstrip .pn small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.pstrip button.pn:hover span { text-decoration: underline; }
.pstrip .pcount { text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); line-height: 22px; }
.pstrip .pcount.warn { background: var(--warn-tint); color: var(--warn-text); font-weight: 600; border-radius: 4px; }
.pstrip .pc { min-height: 30px; display: flex; align-items: center; border-radius: 3px; }
.pstrip .pc.we, .pstrip .pc.hol { background: var(--surface); }
.pstrip .pc.today { background: var(--wait-tint); }
.pstrip .bar, .legend .sw { display: block; width: 100%; height: 16px; background: var(--pri); border-radius: 3px; }
.pstrip .bar.pend, .legend .sw.pend { background: repeating-linear-gradient(135deg, var(--warn) 0 4px, var(--warn-tint) 4px 8px); }
.legend .sw { display: inline-block; width: 14px; height: 10px; margin-right: 5px; vertical-align: middle; }
.wlist { display: grid; gap: 0; }
.witem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.witem:first-child { border-top: 0; padding-top: 0; }
.witem .wmain div { font-size: 13px; color: var(--muted); }
.witem .wbal { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.witem .wbal small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.witem .wbal.bad, .witem .wbal.bad small { color: var(--bad-text); }
.witem .wact { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.bankt td { vertical-align: middle; }
.bankt td small { display: block; font-size: 12px; }
table.list td small { font-size: 12px; }
.bankcell { min-width: 140px; width: 20%; }
.bankt td.pname { min-width: 150px; }
.stats.tight { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
p.row { display: flex; gap: 8px; flex-wrap: wrap; }
.bank { position: relative; display: flex; align-items: center; height: 14px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.bank .zero { width: 2px; align-self: stretch; background: var(--ink); flex: none; }
.seg.used { background: #A9BCD3; } .seg.exp { background: repeating-linear-gradient(135deg, #C3D0E0 0 3px, #EEF3F9 3px 6px); }
.seg.ahead { background: var(--pri); } .seg.pend { background: repeating-linear-gradient(135deg, var(--warn) 0 3px, var(--warn-tint) 3px 6px); }
.seg.left { background: var(--ok); } .seg.left.low { background: var(--warn); } .seg.over { background: var(--bad); }
.bank .seg { display: block; height: 100%; flex: none; }
.legend .sw.seg { border-radius: 2px; }
.t-bad { color: var(--bad-text); } .t-warn { color: var(--warn-text); }
table.list tr.total td { font-weight: 600; border-top: 2px solid var(--line-strong); }
.segc { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--panel); font-size: 13px; }
.segc button { border: 0; background: none; padding: 4px 12px; min-height: 30px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.segc button + button { border-left: 1px solid var(--line); }
.segc button.on { background: var(--pri); color: #fff; }
table.list tr.hk-click { cursor: pointer; }
table.list tr.hk-click:hover td { background: var(--surface); }

/* Payroll (round 4): add forms, the week picker, log tools, the weekly checks */
.pform { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 0 12px; align-items: start; }
.pform .fld input, .pform .fld select { width: 100%; min-width: 0; }
.weekpick { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }
.weekpick select { max-width: 100%; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions input.pick { width: 180px; max-width: 100%; }
ul.hist { margin: 6px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); }
table.list tr.void td { color: var(--faint); }
label.cb { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
label.cb input { width: 16px; height: 16px; min-height: 0; accent-color: var(--pri); flex: none; }
.chk { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.chk:first-child { padding-top: 0; }
.chk:last-child { border-bottom: 0; padding-bottom: 0; }
.chk .t { font-weight: 600; }
.chk .tablebox { margin-top: 8px; }
details.more.card > summary { cursor: pointer; font-weight: 600; }
@media (max-width: 700px) { .chk { grid-template-columns: minmax(0, 1fr); } }