/* Islanders Group payroll platform. One stylesheet, no framework, nothing loaded from outside. */

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #17212b;
  --muted: #5b6878;
  --faint: #8794a5;
  --line: #dde3ea;
  --line-strong: #c5ced9;
  --brand: #0b4f6c;
  --brand-dark: #083a50;
  --brand-soft: #e6f0f5;
  --accent: #0f8b8d;
  --ok: #17794a;
  --ok-bg: #e4f4eb;
  --warn: #8a5a00;
  --warn-bg: #fdf2d8;
  --bad: #b42318;
  --bad-bg: #fde7e4;
  --info: #0b4f6c;
  --info-bg: #e6f0f5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 33, 43, 0.06), 0 2px 8px rgba(23, 33, 43, 0.04);
  --side-width: 236px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: 0.86rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt { margin-top: 1rem; }
.mt-sm { margin-top: 0.5rem; }
.mb { margin-bottom: 1rem; }
.mb-0 { margin-bottom: 0; }
.w-narrow { max-width: 640px; }
.w-medium { max-width: 900px; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: 0.5rem; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1 1 auto; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--side-width) minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--brand-dark);
  color: #d5e3ea;
  padding: 1rem 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.25rem 0.5rem 1rem; color: #fff; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent);
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 0.95rem;
}
.brand-name { font-weight: 650; line-height: 1.15; }
.brand-name small { display: block; font-weight: 400; color: #9fbac6; font-size: 0.78rem; }
.nav-group { margin-top: 0.9rem; padding: 0 0.5rem 0.25rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #86a4b1; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.5rem 0.65rem; border-radius: 8px; color: #d5e3ea; font-size: 0.95rem;
}
.nav a:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.nav a.active { background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 600; }
.nav .count {
  background: #f0b429; color: #3d2c00; border-radius: 999px; font-size: 0.74rem; font-weight: 700;
  padding: 0.05rem 0.45rem; min-width: 1.35rem; text-align: center;
}
.side-foot { margin-top: auto; padding: 0.75rem 0.5rem 0; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.86rem; }
.side-foot .who { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .roles { color: #9fbac6; font-size: 0.78rem; margin-bottom: 0.5rem; }
.side-foot a, .side-foot button.linklike { color: #c6dbe4; }
button.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--brand); }
button.linklike:hover { text-decoration: underline; }

.main { min-width: 0; }
.envbar { background: #5c3d00; color: #ffe9b8; text-align: center; font-size: 0.82rem; padding: 0.25rem 1rem; }
.page { padding: 1.5rem 2rem 4rem; max-width: 1360px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 0.3rem; max-width: 70ch; }
.crumbs { font-size: 0.86rem; color: var(--muted); margin-bottom: 0.4rem; }
.crumbs a { color: var(--muted); }
.crumbs span.sep { margin: 0 0.35rem; color: var(--faint); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .card-head { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.card > .card-body { padding: 1.1rem; }
.card > .card-foot { padding: 0.8rem 1.1rem; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card.flush > .card-body { padding: 0; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.side-panel { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }

.stat { padding: 1rem 1.1rem; }
.stat .label { color: var(--muted); font-size: 0.82rem; }
.stat .value { font-size: 1.5rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat .note { color: var(--muted); font-size: 0.82rem; }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.12rem 0.55rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; background: #eceff3; color: #44505f; white-space: nowrap;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.dark { background: var(--ink); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.5rem 0.95rem; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 0.93rem;
  cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { background: var(--surface); border-color: #e3b1ab; color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { padding: 0.3rem 0.65rem; font-size: 0.84rem; }
.btn.large { padding: 0.7rem 1.3rem; font-size: 1rem; }
.btn[disabled], .btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.btn-row.tight { gap: 0.6rem; flex-wrap: nowrap; white-space: nowrap; }
.narrow { max-width: 44rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--line-strong); background: var(--surface-2); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.table td { padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: #fafcfd; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--line-strong); }
.table tr.subtotal td { font-weight: 600; background: var(--surface-2); }
.table tr.selected { background: var(--brand-soft); }
.table.compact td, .table.compact th { padding: 0.4rem 0.6rem; }
.table a.figure { color: inherit; border-bottom: 1px dotted var(--line-strong); }
.table a.figure:hover { color: var(--brand); border-bottom-color: var(--brand); text-decoration: none; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--bad); }
.pos { color: var(--ok); }

/* ---------- forms ---------- */
.form-row { margin-bottom: 0.9rem; }
.form-row label, label.field { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.form-row .help, .help { color: var(--muted); font-size: 0.84rem; margin-top: 0.2rem; }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"],
input[type="time"], input[type="month"], input[type="tel"], input[type="url"], input[type="datetime-local"],
input[type="search"], input[type="file"], select, textarea {
  width: 100%; padding: 0.5rem 0.65rem; border: 1px solid var(--line-strong); border-radius: 8px;
  font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 4.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
input[type="checkbox"], input[type="radio"] { width: 1rem; height: 1rem; accent-color: var(--brand); }
.inline-check { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.errorlist { list-style: none; margin: 0.25rem 0 0; padding: 0; color: var(--bad); font-size: 0.86rem; }
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; }
.filters > div { min-width: 150px; }
.filters label { font-size: 0.78rem; color: var(--muted); font-weight: 600; display: block; margin-bottom: 0.15rem; }

/* ---------- banners and messages ---------- */
.banner { padding: 0.7rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: flex; gap: 0.7rem; align-items: flex-start; }
.banner.info { background: var(--info-bg); border-color: #c4dbe6; color: #0b3f56; }
.banner.ok { background: var(--ok-bg); border-color: #bfe3cf; color: #0f5a36; }
.banner.warn { background: var(--warn-bg); border-color: #efd9a0; color: #6b4600; }
.banner.bad { background: var(--bad-bg); border-color: #f3c1bb; color: #8a1b12; }
.banner.working-paper {
  background: repeating-linear-gradient(135deg, #fdf2d8, #fdf2d8 14px, #fbe9bd 14px, #fbe9bd 28px);
  border-color: #e6c877; color: #5c3d00; font-weight: 650; justify-content: center; text-align: center;
}
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li { margin-bottom: 0.5rem; }

/* ---------- stepper ---------- */
.stepper { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.stepper.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stepper.three .step .name { font-size: 0.98rem; }
.stepper .step { position: relative; padding: 0 0.4rem; text-align: center; }
.stepper .step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 0.4rem; border-radius: 50%;
  background: #e7ebf0; color: var(--muted); font-weight: 700; font-size: 0.86rem; position: relative; z-index: 1;
}
.stepper .step::after { content: ""; position: absolute; top: 14px; left: calc(-50% + 15px); right: calc(50% + 15px); height: 2px; background: #e1e6ec; }
.stepper .step:first-child::after { display: none; }
.stepper .step.done::before { background: var(--ok); color: #fff; content: "✓"; }
.stepper .step.done::after, .stepper .step.current::after { background: var(--ok); }
.stepper .step.current::before { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.stepper .step .name { font-size: 0.82rem; font-weight: 600; color: var(--muted); line-height: 1.25; }
.stepper .step.current .name { color: var(--ink); }
.stepper .step .who { font-size: 0.74rem; color: var(--faint); }

/* ---------- blockers and task lists ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.65rem 1.1rem; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; flex: 0 0 22px; margin-top: 0.1rem; }
.checklist .mark.todo { background: var(--warn-bg); color: var(--warn); }
.checklist .mark.done { background: var(--ok-bg); color: var(--ok); }
.checklist .mark.stop { background: var(--bad-bg); color: var(--bad); }
.checklist .title { font-weight: 600; }
.checklist .detail { color: var(--muted); font-size: 0.88rem; }

.tasks a.task { display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); color: inherit; }
.tasks a.task:last-child { border-bottom: 0; }
.tasks a.task:hover { background: var(--surface-2); text-decoration: none; }
.tasks .n { font-size: 1.25rem; font-weight: 700; min-width: 2.2rem; text-align: center; color: var(--brand); font-variant-numeric: tabular-nums; }
.tasks .go { margin-left: auto; color: var(--faint); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line-strong); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: 0.55rem 0.9rem; color: var(--muted); font-weight: 600; font-size: 0.93rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { font-size: 0.74rem; background: #e7ebf0; border-radius: 999px; padding: 0.05rem 0.4rem; margin-left: 0.25rem; color: var(--muted); }
.tabs .count.hot { background: var(--warn-bg); color: var(--warn); }

/* ---------- key/value ---------- */
dl.kv { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 0.45rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 0.88rem; }
dl.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- drawer ("How this was calculated") ---------- */
.drawer-shade { position: fixed; inset: 0; background: rgba(23, 33, 43, 0.35); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 96vw); background: var(--surface);
  box-shadow: -8px 0 30px rgba(23, 33, 43, 0.18); z-index: 41; display: flex; flex-direction: column;
}
.drawer-head { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.drawer-body { padding: 1.2rem; overflow-y: auto; flex: 1 1 auto; }
.formula { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 0.9rem; font-family: var(--mono); font-size: 0.88rem; overflow-x: auto; white-space: pre-wrap; }
.trace-step { border-left: 3px solid var(--brand-soft); padding: 0.1rem 0 0.1rem 0.9rem; margin: 0.9rem 0; }
.trace-step h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.35rem; }
.quote { border-left: 3px solid var(--accent); background: #f1f8f8; padding: 0.5rem 0.75rem; border-radius: 0 6px 6px 0; font-size: 0.9rem; }

/* ---------- misc ---------- */
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 0.25rem; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.tag { font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
progress { width: 100%; height: 8px; accent-color: var(--brand); }
details > summary { cursor: pointer; font-weight: 600; }
.htmx-indicator { opacity: 0; transition: opacity 150ms ease-in; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line-strong); padding: 0.75rem 1.1rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; z-index: 2; border-radius: 0 0 var(--radius) var(--radius); }
.doc-frame { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.diff-old { background: var(--bad-bg); text-decoration: line-through; padding: 0 0.2rem; border-radius: 3px; }
.diff-new { background: var(--ok-bg); padding: 0 0.2rem; border-radius: 3px; }
.sev-critical { color: #fff; background: #7a1009; }
.sev-high { color: var(--bad); background: var(--bad-bg); }
.sev-medium { color: var(--warn); background: var(--warn-bg); }
.sev-low { color: #44505f; background: #eceff3; }
.qr svg { display: block; width: 190px; height: 190px; }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: linear-gradient(160deg, #083a50 0%, #0b4f6c 55%, #0f8b8d 130%); }
.auth-card { width: min(430px, 100%); background: var(--surface); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25); padding: 1.8rem; }
.auth-card .brand { color: var(--ink); padding: 0 0 1.1rem; }
.auth-card .brand-name small { color: var(--muted); }
.auth-card h1 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.auth-steps { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.auth-steps span { flex: 1; height: 4px; border-radius: 4px; background: #e1e6ec; }
.auth-steps span.on { background: var(--brand); }

@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .page { padding: 1rem; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.side-panel, .split, .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 1rem; }
  .stepper .step::after { display: none; }
}
@media print {
  .side, .envbar, .btn, .btn-row, .tabs, .filters, .sticky-actions { display: none !important; }
  .app { display: block; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; }
}

/* ---------- regularisation report ---------- */
.detail-row > td.detail-cell { padding: 0; border-bottom: 0; }
.detail-row > td.detail-cell > div:not(:empty):not(.hidden) { border-bottom: 1px solid var(--line); }
.inline-panel { background: var(--surface-2); padding: 1rem 1.1rem; border-left: 3px solid var(--brand); }
.option-list { display: grid; gap: 0.35rem; }
.option { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-weight: 400; }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.option input { margin-top: 0.2rem; }

/* ---------- contract register ---------- */
.doc-pane { position: sticky; top: 0.75rem; min-width: 0; }
.doc-pages { max-height: 78vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 0.5rem; }
.doc-image { display: block; max-width: 100%; height: auto; margin: 0 auto; background: #fff; border: 1px solid var(--line); }
.doc-image + .doc-image { margin-top: 0.6rem; }
.doc-text { white-space: pre-wrap; overflow: auto; max-height: 72vh; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; font-size: 0.9rem; overflow-wrap: anywhere; }
.term { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.term:first-child { padding-top: 0; }
.term:last-child { border-bottom: 0; padding-bottom: 0; }
.term .term-label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.term.unsure { border-left: 3px solid #f0b429; padding-left: 0.75rem; }
.term.has-error { border-left: 3px solid var(--bad); padding-left: 0.75rem; }
.term-evidence { display: grid; gap: 0.35rem; margin-top: 0.45rem; }
.term-evidence .quote { font-size: 0.86rem; }
.term-row { padding: 0.55rem 0; border-bottom: 1px dashed var(--line); }
.term-row:last-child { border-bottom: 0; }
.term-row .quote { margin-top: 0.4rem; font-size: 0.86rem; }
.term-row-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 0.5rem; }
.term-row-main.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.term-row-head { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.term-row-flags { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin-top: 0.4rem; }
.leave-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem 0.75rem; }
@media (max-width: 1000px) {
  .doc-pane { position: static; }
  .leave-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- the month on one page (salary run) ---------- */
.month-nav { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.headline { text-align: center; margin: 1.1rem 0 0; font-size: 1.15rem; line-height: 1.5; }
.headline .tag { font-size: 0.72rem; }
.inline-fields { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.inline-fields select { width: auto; max-width: 22rem; }
.inline-fields input[type="time"] { width: 7.6rem; }
.inline-fields input[type="file"] { width: auto; max-width: 28rem; }
.table.decide td { vertical-align: middle; }
.table.decide tr.subtotal td { border-top: 1px solid var(--line-strong); }
.card > .card-body + .card-body, .card > .table-wrap + .card-body, .card > form + .card-body { border-top: 1px solid var(--line); }
.card.flush > .card-body.pad, .card.flush > .card-body.by-rule, .card.flush > .card-body.add-forms, .card.flush > .card-body.entered { padding: 0.9rem 1.1rem; }
.add-forms h3 { font-size: 0.95rem; margin: 0 0 0.6rem; }
.add-forms details { border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.9rem; background: var(--surface-2); margin-bottom: 0.5rem; }
.add-forms details[open] { background: var(--surface); }
.add-forms details > summary { font-weight: 600; }
.add-forms details form { margin-top: 0.8rem; }
