/* DeskaskHRMS 5.4 — clean light theme, dark mode, grouped sidebar, command palette.
   Loaded after site.css and after the Branding colours, so brand colours still drive buttons and accents. */

:root {
  --mist: #f4f6fb;
  --paper: #ffffff;
  --line: #e4e8f1;
  --ink: #151a2e;
  --muted: #64708a;
  --soft: color-mix(in srgb, var(--cobalt) 9%, #ffffff);
  --soft-ink: var(--cobalt);
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 18px rgba(16,24,40,.05);
  color-scheme: light;
}
html[data-theme="dark"] {
  --mist: #0e1220;
  --paper: #161b2e;
  --line: #262d45;
  --ink: #e7eaf5;
  --muted: #98a3be;
  --soft: color-mix(in srgb, var(--cobalt) 24%, #161b2e);
  --soft-ink: #b7c3ff;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

body { background: var(--mist); color: var(--ink); }
a { color: var(--soft-ink); }

/* ---------- Sidebar: light, grouped ---------- */
.side { background: var(--paper); color: var(--muted); border-right: 1px solid var(--line); gap: 16px; }
.brand { color: var(--ink); }
.side-search {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--mist); color: var(--muted); font: inherit; cursor: pointer; text-align: left;
}
.side-search:hover { border-color: var(--cobalt); }
.side-search kbd { margin-left: auto; font: inherit; font-size: .72rem; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); }
.nav a { color: var(--muted); padding: 9px 12px; border-radius: 11px; position: relative; }
.nav a:hover { background: var(--soft); color: var(--soft-ink); }
.nav a.active { background: var(--soft); color: var(--soft-ink); font-weight: 700; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cobalt); }
.nav .grp { margin-top: 4px; }
.nav .grp summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 6px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted);
}
.nav .grp summary::-webkit-details-marker { display: none; }
.nav .grp summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.nav .grp[open] summary::after { transform: rotate(45deg); }
.nav .grp > div { display: flex; flex-direction: column; gap: 2px; }
.nav small { color: var(--muted); }
.side-link { color: var(--muted); }
.side-link:hover { background: var(--soft); color: var(--soft-ink); }
.me { background: var(--mist); }
.me b { color: var(--ink); }
.me span { color: var(--muted); }
.avatar { background: var(--cobalt); color: #fff; }
.theme-btn { justify-content: flex-start; }

/* ---------- Surfaces ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 16px; }
.topline h1 { letter-spacing: -.03em; }
.tbl th { color: var(--muted); border-bottom-color: var(--line); }
.tbl td { border-bottom-color: var(--line); }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--cobalt) 4%, transparent); }
.tbl .who .avatar { background: var(--soft); color: var(--soft-ink); }

/* Summary strips become separate tiles */
.main .band { background: transparent; border-radius: 0; overflow: visible; gap: 14px; margin-bottom: 22px; }
.main .band > div {
  background: var(--paper); color: var(--ink); border: 1px solid var(--line) !important; border-radius: 16px;
  padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.main .band > div::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cobalt); opacity: .85; }
.main .band > div:nth-child(2)::before { background: var(--warn); }
.main .band > div:nth-child(3)::before { background: #7c5cff; }
.main .band > div:nth-child(4)::before { background: var(--bad); }
.main .band .big { color: var(--ink); }
.main .band .accent { color: var(--ok); }
.main .band .lbl { color: var(--muted); }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.qa {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-weight: 600; box-shadow: var(--shadow);
  transition: transform .12s, border-color .12s;
}
.qa:hover { transform: translateY(-2px); border-color: var(--cobalt); }
.qa .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--soft); color: var(--soft-ink); flex: none; }

/* ---------- Forms & buttons ---------- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  background: var(--paper); color: var(--ink); border-color: var(--line);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
.btn.ghost { color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn { box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.btn:disabled { background: color-mix(in srgb, var(--muted) 35%, var(--paper)); color: var(--paper); box-shadow: none; }
.tabs a { background: var(--paper); border-color: var(--line); color: var(--muted); }
.tabs a.active { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.empty b { color: var(--ink); }

/* Status pills */
.badge { background: color-mix(in srgb, #64708a 14%, transparent); color: #3c4660; }
.badge.ok, .badge.built, .badge.final, .badge[data-state="succeeded"] { background: color-mix(in srgb, #12996a 15%, transparent); color: #0a6a46; }
.badge.late, .badge.pending, .badge.partly, .badge.draft, .badge[data-state="running"], .badge[data-state="queued"] { background: color-mix(in srgb, #d98400 16%, transparent); color: #8a5600; }
.badge.half { background: color-mix(in srgb, #e0561b 15%, transparent); color: #98400f; }
.badge.leave { background: color-mix(in srgb, #2e4bf2 14%, transparent); color: #2038c4; }
.badge.bad, .badge[data-state="failed"], .badge[data-state="rolledback"] { background: color-mix(in srgb, #d23b3b 14%, transparent); color: #a02424; }
html[data-theme="dark"] .badge { color: #c3cde3; }
html[data-theme="dark"] .badge.ok, html[data-theme="dark"] .badge.built, html[data-theme="dark"] .badge.final, html[data-theme="dark"] .badge[data-state="succeeded"] { color: #5be0ae; }
html[data-theme="dark"] .badge.late, html[data-theme="dark"] .badge.pending, html[data-theme="dark"] .badge.partly, html[data-theme="dark"] .badge.draft { color: #ffc766; }
html[data-theme="dark"] .badge.half { color: #ffa070; }
html[data-theme="dark"] .badge.leave { color: #a9b8ff; }
html[data-theme="dark"] .badge.bad { color: #ff9a9a; }

.callout { background: color-mix(in srgb, #d98400 12%, var(--paper)); border-color: color-mix(in srgb, #d98400 35%, var(--line)); color: var(--ink); }
.callout.warn, .form-errors, .validation-summary-errors { background: color-mix(in srgb, #d23b3b 10%, var(--paper)); border-color: color-mix(in srgb, #d23b3b 35%, var(--line)); color: var(--ink); }
.bar i { background: color-mix(in srgb, var(--cobalt) 22%, var(--paper)); }
.bar.now i { background: var(--cobalt); }
.bar b { color: var(--ink); }
.duelist b { color: var(--soft-ink); }
.slip { background: var(--paper); }
.toast.ok { background: #0f7a55; }

/* ---------- Check-in card keeps its dark face ---------- */
.punch { background: linear-gradient(160deg, color-mix(in srgb, var(--spruce) 88%, #000), var(--spruce)); box-shadow: var(--shadow); }
.punch-btn { box-shadow: 0 8px 22px rgba(0,0,0,.28); font-weight: 800; }

/* ---------- Login ---------- */
.login-art { background: linear-gradient(150deg, var(--spruce), color-mix(in srgb, var(--cobalt) 65%, var(--spruce))); }
.login-form { background: var(--paper); }
.login-form h2 { letter-spacing: -.03em; }

/* ---------- Command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 90; background: rgba(8,12,24,.5); display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.palette.on { display: flex; }
.palette-box { width: min(560px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; }
.palette-box input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 1.05rem; background: transparent; }
.palette-box input:focus { box-shadow: none; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-list a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.palette-list a small { color: var(--muted); }
.palette-list a.sel, .palette-list a:hover { background: var(--soft); color: var(--soft-ink); }
.palette-empty { padding: 18px; color: var(--muted); text-align: center; }

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
  .topbar-m { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
  .topbar-m .brand { color: var(--ink); }
  .icon-btn { color: var(--ink); }
  .nav a.active::before { left: -14px; }
  .tabbar { box-shadow: 0 -4px 18px rgba(16,24,40,.08); }
  .tabbar a.active { color: var(--soft-ink); }
  .main .band { grid-template-columns: repeat(2, 1fr); }
  .quick { grid-template-columns: repeat(2, 1fr); }
}

/* Printing is always light */
@media print {
  :root, html[data-theme="dark"] { --ink: #000; --muted: #444; --paper: #fff; --line: #ccc; --mist: #fff; }
  .palette { display: none !important; }
}

/* ===== 5.4.2: comfortable sizes and a text-size switch ===== */
html { font-size: calc(16px * var(--ts, 1)); }
html[data-size="s"] { --ts: .9; }
html[data-size="m"] { --ts: 1; }
html[data-size="l"] { --ts: 1.12; }
html[data-size="xl"] { --ts: 1.25; }
body { font-size: 1.03rem; }

.shell { grid-template-columns: 18rem minmax(0, 1fr); }
.side { padding: 1.5rem 1rem 1.1rem; gap: .9rem; }
.brand b { font-size: 1.45rem; }
.brand img { width: 2.5rem; height: 2.5rem; }
.side-search { font-size: 1rem; padding: .7rem .9rem; }
.side-search kbd { font-size: .78rem; }
.nav { gap: .2rem; }
.nav a { font-size: 1.0625rem; font-weight: 500; min-height: 2.875rem; padding: 0 .9rem; gap: .85rem; color: color-mix(in srgb, var(--ink) 82%, var(--paper)); }
.nav a .i { width: 1.375rem; height: 1.375rem; }
.nav a.active { background: var(--cobalt); color: #fff; font-weight: 700; }
.nav a.active::before { content: none; }
.nav a:hover:not(.active) { background: var(--soft); color: var(--soft-ink); }
.nav .grp summary { font-size: .84rem; padding: .7rem .9rem .3rem; color: color-mix(in srgb, var(--ink) 70%, var(--paper)); }
.nav .grp > div { gap: .2rem; }
.me b { font-size: 1rem; }
.me span { font-size: .875rem; color: var(--muted); }
.avatar { width: 2.6rem; height: 2.6rem; font-size: 1rem; }
.side-link { font-size: 1rem; padding: .6rem .8rem; color: color-mix(in srgb, var(--ink) 80%, var(--paper)); }
.side-link .i { width: 1.25rem; height: 1.25rem; }
.side-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.side-tools .side-link { border: 1px solid var(--line); justify-content: center; text-align: center; font-weight: 600; font-size: .9rem; padding: .55rem .4rem; }
.tbl td, .tbl th { font-size: 1rem; }
.tbl th { font-size: .92rem; }
.btn { font-size: 1rem; }
.badge { font-size: .88rem; }
.tabbar a { font-size: .8rem; }

@media (max-width: 960px) {
  .nav a.active { background: var(--cobalt); color: #fff; }
}

/* ===== 5.4.3: phone layout fixes ===== */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { width: min(86vw, 320px); }
  .topbar-m .brand { min-width: 0; flex: 1; }
  .topbar-m .brand b { font-size: 1.05rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .topbar-m .brand img { width: 2rem; height: 2rem; flex: none; }
  .main { padding-inline: 1rem; }
  .worktype { gap: .5rem; }
  .worktype .wt span { padding: .55rem .9rem; font-size: .95rem; }
}

/* ===== 5.4.4: every text box gets the same roomy style (also boxes with no type, tel, url, time, month) ===== */
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search],
input[type=tel], input[type=url], input[type=time], input[type=month], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 2.9rem; padding: .7rem .9rem; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.4; box-sizing: border-box;
}
input:not([type]):focus, input[type=tel]:focus, input[type=url]:focus, input[type=time]:focus, input[type=month]:focus, input[type=datetime-local]:focus {
  outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cobalt) 18%, transparent);
}
select { padding-right: 2rem; }
textarea { min-height: 6rem; }
.field { gap: .4rem; }
.field label { font-size: 1rem; }
.form-grid { gap: 1.2rem 1.4rem; }
input[type=file] { font: inherit; padding: .5rem; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 1.25rem; height: 1.25rem; accent-color: var(--cobalt); }

/* ---- Attendance calendar and team sheet (5.6.0) ---- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font-size: .78rem; font-weight: 600; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-d { min-height: 64px; border-radius: 10px; padding: 6px 8px; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: var(--ink); }
.cal-d .n { font-size: .8rem; color: var(--muted); }
.cal-d .m { font-weight: 700; font-size: .95rem; letter-spacing: .01em; }
.cal-d.blank { background: transparent; border-color: transparent; }
.cal-d.today { outline: 2px solid var(--cobalt); outline-offset: -1px; }
.cal-d.ok, .cs.ok { background: #dcf3ea; color: #0a6a46; border-color: #bfe6d6; }
.cal-d.late, .cs.late { background: #fff0d1; color: #86520a; border-color: #f2dba8; }
.cal-d.half, .cs.half { background: #ffe5d4; color: #98400f; border-color: #f5cdb1; }
.cal-d.bad, .cs.bad { background: #fbe0e0; color: #a02424; border-color: #f2c4c4; }
.cal-d.leave, .cs.leave { background: #e1e7ff; color: #2038c4; border-color: #c7d1fb; }
.cal-d.work, .cs.work { background: #d9f0f7; color: #0b5b73; border-color: #b8e0ec; }
.cal-d.off, .cs.off, .cal-d.holiday, .cs.holiday { background: #eceff3; color: #4d5b72; border-color: #dde2ea; }
.cal-d.future, .cal-d.na, .cs.future, .cs.na { background: transparent; color: var(--muted); }
.cal-d.ok .n, .cal-d.late .n, .cal-d.half .n, .cal-d.bad .n, .cal-d.leave .n, .cal-d.work .n, .cal-d.off .n, .cal-d.holiday .n { color: inherit; opacity: .75; }
html[data-theme="dark"] .cal-d.ok, html[data-theme="dark"] .cs.ok { background: #12372b; color: #5be0ae; border-color: #1d5a46; }
html[data-theme="dark"] .cal-d.late, html[data-theme="dark"] .cs.late { background: #3d3114; color: #ffc766; border-color: #5e4a1c; }
html[data-theme="dark"] .cal-d.half, html[data-theme="dark"] .cs.half { background: #3f2418; color: #ffa070; border-color: #623722; }
html[data-theme="dark"] .cal-d.bad, html[data-theme="dark"] .cs.bad { background: #3d1c1f; color: #ff9a9a; border-color: #5f2b2f; }
html[data-theme="dark"] .cal-d.leave, html[data-theme="dark"] .cs.leave { background: #1e2650; color: #a9b8ff; border-color: #333f7d; }
html[data-theme="dark"] .cal-d.work, html[data-theme="dark"] .cs.work { background: #123642; color: #7fd6ee; border-color: #1d5566; }
html[data-theme="dark"] .cal-d.off, html[data-theme="dark"] .cs.off, html[data-theme="dark"] .cal-d.holiday, html[data-theme="dark"] .cs.holiday { background: #1f2538; color: #98a3be; border-color: #2c3450; }
.cal-key { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; font-size: .85rem; color: var(--muted); }
.cal-key span { display: inline-flex; align-items: center; gap: 6px; }
.cal-key i { display: inline-block; min-width: 28px; text-align: center; font-style: normal; font-weight: 700; font-size: .75rem; padding: 2px 6px; border-radius: 6px; }
.cal-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 16px; }
.cal-sum div { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.cal-sum b { display: block; font-size: 1.25rem; }
.cal-sum span { font-size: .8rem; color: var(--muted); }
.sheet { border-collapse: separate; border-spacing: 2px; font-size: .8rem; }
.sheet th, .sheet td { text-align: center; padding: 0; }
.sheet th.name, .sheet td.name { text-align: left; position: sticky; left: 0; background: var(--paper); padding: 4px 10px 4px 4px; white-space: nowrap; z-index: 1; }
.sheet .cs { display: block; min-width: 26px; height: 26px; line-height: 24px; border-radius: 6px; border: 1px solid transparent; font-weight: 700; font-size: .7rem; }
.sheet th.wk { color: var(--muted); font-weight: 600; }
.sheet td.tot { padding: 0 6px; font-weight: 600; }
@media (max-width: 560px) { .cal { gap: 3px; } .cal-d { min-height: 50px; padding: 4px; border-radius: 8px; } .cal-d .m { font-size: .8rem; } }

/* ---- Face check (5.6.0) ---- */
.face-box { margin: 12px auto; max-width: 320px; text-align: center; }
.face-box video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: #000; transform: scaleX(-1); }
.face-box { position: relative; }
.face-cue { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font-size: 4.5rem; line-height: 1; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
.face-cue:empty { display: none; }
.face-steps { display: flex; gap: 6px; justify-content: center; margin: 6px 0 0; padding: 0; list-style: none; font-size: .85rem; }
.face-steps li { padding: 3px 10px; border-radius: 999px; background: var(--mist, #eef3f1); color: inherit; }
.face-steps li.done { background: #d8f0e4; } .face-steps li.now { outline: 2px solid currentColor; }

/* ---- Calendar: work from home, pending dot, selected day, plain list (5.7.0) ---- */
.cal-d.wfh, .cs.wfh { background: #e4f1e1; color: #2c6a21; border-color: #c9e3c3; }
html[data-theme="dark"] .cal-d.wfh, html[data-theme="dark"] .cs.wfh { background: #1c3318; color: #9be28a; border-color: #2d5227; }
.cal-d.wfh .n { color: inherit; opacity: .75; }
button.cal-d { font: inherit; cursor: pointer; text-align: left; width: 100%; }
button.cal-d:hover { filter: brightness(.97); }
.cal-d.sel { box-shadow: 0 0 0 2px var(--cobalt); }
.cal-d.pend { position: relative; }
.cal-d.pend::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e08a00; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

/* ===== 5.11.0: grouped Settings, search hits, menu counts, setup checklist ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.set-search { margin-bottom: 14px; max-width: 560px; }
.set-search input { width: 100%; }
.set-hits { margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; }
.set-hits a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.set-hits a:first-child { border-top: 0; }
.set-hits a:hover, .set-hits a:focus-visible { background: color-mix(in srgb, var(--cobalt) 10%, var(--paper)); }
.set-hits small { color: var(--muted); }
.tabs.sub { margin-top: -4px; padding-left: 2px; opacity: .95; }
.tabs.sub a { font-size: .9rem; }
.setup-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.setup-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.setup-list li:first-child { border-top: 0; }
.setup-list .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: .8rem; }
.setup-list li.done .tick { background: color-mix(in srgb, #12996a 85%, transparent); border-color: transparent; color: #fff; }
.setup-list li.done span.t { color: var(--muted); text-decoration: line-through; }
.setup-list .t { flex: 1; min-width: 0; }

/* ===== 5.12.0: employee form tabs and pinned save bar ===== */
.tabpane { display: grid; gap: 16px; }
.tabpane[hidden] { display: none; }
#form-tabs a.has-error::after { content: " •"; color: #d23b3b; font-weight: 700; }
.form-save { position: sticky; bottom: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--line); padding: .75rem 0; margin-top: 4px; }

/* ===== 5.13.0: filters, attention list, help, phone bar ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input[type=search] { min-width: 220px; flex: 1 1 220px; }
.filters select { max-width: 100%; }
.attn { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.attn li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.attn li:first-child { border-top: 0; }
.attn .n { min-width: 2.2rem; text-align: center; font-weight: 700; border-radius: 99px; padding: 2px 8px; background: color-mix(in srgb, #d98400 16%, transparent); color: #8a5600; }
html[data-theme="dark"] .attn .n { color: #ffc766; }
.attn .t { flex: 1; min-width: 0; }
.help { margin: 0 0 14px; }
.help summary { cursor: pointer; font-weight: 600; color: var(--cobalt); padding: 4px 0; }
.help .help-body { padding: 6px 0 2px; display: grid; gap: 6px; max-width: 70ch; }
.help .help-body p { margin: 0; }
.tabbar .more { background: none; border: 0; font: inherit; font-size: .74rem; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; cursor: pointer; }

/* ---------- Payslip and annual statement templates (5.16) ---------- */
.slip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* Modern */
.slip.tpl-modern .slip-head { background: var(--spruce); color: #fff; border: 0; border-radius: 12px; padding: 18px 22px; }
.slip.tpl-modern .slip-head .sub, .slip.tpl-modern .slip-head h2, .slip.tpl-modern .slip-head h3 { color: #fff; }
.slip.tpl-modern th { background: color-mix(in srgb, var(--spruce) 10%, transparent); color: var(--ink); padding: 8px 10px; border: 0; }
.slip.tpl-modern td { padding-left: 10px; padding-right: 10px; }
.slip.tpl-modern .net { background: var(--spruce); color: #fff; border-radius: 12px; }
.slip.tpl-modern .net b { color: #fff; }
/* Compact */
.slip.tpl-compact { padding: clamp(12px, 2.5vw, 24px); font-size: .86rem; }
.slip.tpl-compact .slip-head { padding-bottom: 8px; margin-bottom: 10px; }
.slip.tpl-compact .slip-head h2 { font-size: 1.1rem; }
.slip.tpl-compact .slip-head h3 { font-size: .95rem; }
.slip.tpl-compact .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 18px; margin-bottom: 12px; }
.slip.tpl-compact .kv div { padding: 2px 0; }
.slip.tpl-compact td { padding: 4px 0; }
.slip.tpl-compact th { padding: 4px 0; }
.slip.tpl-compact .extra { display: none; }
.slip.tpl-compact .net { padding: 8px 14px; }
/* Formal */
.slip.tpl-formal { font-family: Georgia, "Times New Roman", serif; border: 2px solid var(--ink); border-radius: 0; }
.slip.tpl-formal .slip-head { border-bottom: 3px double var(--ink); }
.slip.tpl-formal .kv div { border: 1px solid var(--line); padding: 5px 8px; }
.slip.tpl-formal .kv { gap: 0 28px; }
.slip.tpl-formal table { border: 1px solid var(--ink); }
.slip.tpl-formal th { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); padding: 7px 10px; border-bottom: 1px solid var(--ink); }
.slip.tpl-formal td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.slip.tpl-formal tfoot td { border-top: 1px solid var(--ink); }
.slip.tpl-formal .net { border-radius: 0; background: none; color: var(--ink); border: 2px solid var(--ink); }
.slip.tpl-formal .net b { color: var(--ink); }
/* Minimal */
.slip.tpl-minimal .slip-head { border-bottom: 0; }
.slip.tpl-minimal .kv div { border-bottom: 0; }
.slip.tpl-minimal th { text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; border-bottom: 1px solid var(--line); }
.slip.tpl-minimal td { border-bottom: 0; padding: 7px 0; }
.slip.tpl-minimal tfoot td { border-top: 1px solid var(--line); }
.slip.tpl-minimal .net { background: none; color: var(--ink); padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
.slip.tpl-minimal .net b { color: var(--ink); font-size: 2rem; }
/* picker */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tpl-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--paper); display: grid; gap: 10px; align-content: start; }
.tpl-card.on { border-color: var(--spruce); box-shadow: 0 0 0 2px var(--spruce); }
.tpl-thumb { height: 230px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; pointer-events: none; }
.tpl-thumb .slip { zoom: .42; border: 0; max-width: none; margin: 0; }

/* 5.16.0: detail blocks. Each template shows a different amount of detail. */
.slip .words { margin: 6px 0 0; font-style: italic; color: var(--muted); }
.slip .d-sign { display: none; justify-content: space-between; gap: 16px; margin-top: 34px; font-size: .85rem; }
.slip .d-sign span { flex: 1; border-top: 1px solid var(--ink); padding-top: 4px; text-align: center; }
.slip .d-leave table, .slip .d-pay table { width: 100%; }
/* Classic: everything except signatures */
/* Modern: everything except signatures */
/* Compact: figures only */
.slip.tpl-compact .d-pay, .slip.tpl-compact .d-leave, .slip.tpl-compact .d-employer, .slip.tpl-compact .d-decl { display: none; }
.slip.tpl-compact .d-tax { grid-template-columns: 1fr; }
/* Formal: everything and signatures */
.slip.tpl-formal .d-sign { display: flex; }
/* Minimal: year to date and tax only */
.slip.tpl-minimal .d-leave, .slip.tpl-minimal .d-employer, .slip.tpl-minimal .d-decl, .slip.tpl-minimal .d-month { display: none; }
@media print { .slip .d-sign { break-inside: avoid; } }
