/* PURSER — a pay office on paper: ivory page, navy ink, brass for the things that matter.
   Numbers are tabular everywhere, because a column of money must line up. */
:root {
  --paper: #F6F1E7; --card: #FFFDF8; --ink: #17212E; --navy: #0E1B2C; --muted: #6B7280; --line: #E3DBC9; --line-2: #D4CAB3;
  --brass: #A97B2D; --brass-soft: #F3E6CC; --ok: #2F7D5B; --ok-soft: #E1F1E8; --warn: #A15C12; --warn-soft: #FBEBD3; --bad: #B5382A; --bad-soft: #F9E1DC; --sea: #24557A; --sea-soft: #E1ECF4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 14.5px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; color: var(--navy); letter-spacing: .005em; }
h1 { font-size: 25px; } h2 { font-size: 19px; } h3 { font-size: 15.5px; }
p { margin: 0; } a { color: var(--sea); } small, .muted { color: var(--muted); } .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.serif { font-family: var(--serif); }

/* frame */
.shell { display: grid; grid-template-columns: 218px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #D9DEE7; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.brand b { font-family: var(--serif); font-size: 21px; letter-spacing: .16em; color: #F4ECDA; font-weight: 600; }
.brand small { display: block; color: #8F9BB0; letter-spacing: .08em; font-size: 10.5px; text-transform: uppercase; margin-top: -2px; }
.nav { all: unset; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: #C5CCD9; font-size: 14px; }
.nav:hover { background: #17283F; color: #fff; } .nav.on { background: #1D3350; color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
.nav .dot { margin-left: auto; background: var(--brass); color: var(--navy); font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.side .who { margin-top: auto; padding: 12px; border-top: 1px solid #22344F; font-size: 12.5px; color: #9BA7BA; }
.side .who b { color: #E8EDF5; display: block; font-weight: 600; }
.main { padding: 26px 34px 80px; max-width: 1500px; width: 100%; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.head p { color: var(--muted); margin-top: 3px; max-width: 760px; }

/* pieces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.card + .card { margin-top: 14px; } .grid > .card { margin-top: 0; } .grid { display: grid; gap: 14px; } .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .spread { justify-content: space-between; } .grow { flex: 1; }
.kpi small { text-transform: uppercase; letter-spacing: .09em; font-size: 10.5px; } .kpi b { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.25; color: var(--navy); font-variant-numeric: tabular-nums; } .kpi b span.l { display: block; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); background: #fff; white-space: nowrap; }
.chip.ok { color: var(--ok); background: var(--ok-soft); border-color: #BBDCCB; } .chip.warn { color: var(--warn); background: var(--warn-soft); border-color: #EFD2A6; }
.chip.bad { color: var(--bad); background: var(--bad-soft); border-color: #EDBDB5; } .chip.sea { color: var(--sea); background: var(--sea-soft); border-color: #BCD3E4; } .chip.brass { color: #7A5618; background: var(--brass-soft); border-color: #E3CD9E; }
.note { border-radius: 11px; padding: 10px 13px; font-size: 13.5px; border: 1px solid var(--line-2); background: #fff; }
.note.warn { background: var(--warn-soft); border-color: #EFD2A6; color: #6E400D; } .note.bad { background: var(--bad-soft); border-color: #EDBDB5; color: #7C241A; } .note.ok { background: var(--ok-soft); border-color: #BBDCCB; color: #1E5A40; } .note.sea { background: var(--sea-soft); border-color: #BCD3E4; color: #17405F; }

/* controls */
button, input, select, textarea { font: inherit; color: inherit; }
.btn { border: 1px solid var(--navy); background: var(--navy); color: #fff; border-radius: 10px; padding: 8px 15px; font-weight: 600; cursor: pointer; font-size: 13.5px; }
.btn:hover { background: #1A2F4A; } .btn:disabled { opacity: .45; cursor: default; }
.btn.brass { background: var(--brass); border-color: var(--brass); } .btn.brass:hover { background: #946A22; }
.btn.line { background: #fff; color: var(--navy); border-color: var(--line-2); } .btn.line:hover { border-color: var(--navy); background: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--sea); padding: 6px 8px; } .btn.ghost:hover { background: var(--sea-soft); }
.btn.danger { background: #fff; color: var(--bad); border-color: #E5B5AD; } .btn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
label.f { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.in { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; background: #fff; outline: none; }
.in:focus { border-color: var(--brass); box-shadow: 0 0 0 3px #A97B2D22; } select.in { appearance: auto; }
.form { display: grid; gap: 12px; } .form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .form .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; } .check input { width: 16px; height: 16px; accent-color: var(--brass); }

/* tables */
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; position: sticky; top: 0; background: var(--card); }
.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: #FBF6EA; } .t tfoot td { font-weight: 700; border-top: 2px solid var(--line-2); border-bottom: 0; background: #FBF6EA; }
.t th.num, .t td.num { text-align: right; }
.scroll { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }

/* drawer and modal */
.veil { position: fixed; inset: 0; background: #0E1B2C66; display: flex; justify-content: flex-end; z-index: 40; }
.drawer { width: min(720px, 96vw); height: 100%; background: var(--paper); overflow: auto; padding: 24px 26px 60px; box-shadow: -18px 0 40px #0E1B2C33; }
.veil.mid { justify-content: center; align-items: flex-start; padding-top: 7vh; } .modal { width: min(620px, 94vw); background: var(--paper); border-radius: 16px; padding: 22px 24px; max-height: 84vh; overflow: auto; box-shadow: 0 24px 60px #0E1B2C55; }
.trace li { margin: 0 0 7px; } .trace { padding-left: 18px; margin: 8px 0 0; color: #2C3848; font-size: 13.5px; }

/* sign in */
.gate { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 50% -10%, #1D3350 0%, var(--navy) 55%); padding: 20px; }
.gate .box { width: min(400px, 94vw); background: var(--paper); border-radius: 18px; padding: 30px 28px; box-shadow: 0 30px 80px #00000055; }
.gate .mark { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; } .gate .mark b { font-family: var(--serif); font-size: 26px; letter-spacing: .22em; color: var(--navy); }
.gate .mark small { letter-spacing: .1em; text-transform: uppercase; font-size: 10.5px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--brass); animation: sp .7s linear infinite; display: inline-block; vertical-align: -4px; } @keyframes sp { to { transform: rotate(360deg); } }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-2); margin-bottom: 14px; } .tab { all: unset; cursor: pointer; padding: 8px 13px; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; } .tab.on { color: var(--navy); border-bottom-color: var(--brass); font-weight: 600; }

/* phone: the side bar becomes a strip */
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; } .brand { padding: 0 8px 0 4px; } .brand small, .side .who { display: none; } .main { padding: 18px 14px 70px; } .g2, .g3, .g4, .form .two, .form .three { grid-template-columns: 1fr; } }

/* print: the payslips and the statutory sheet, nothing else */
.print-only { display: none; }
@media print {
  body { background: #fff; font-size: 11.5px; } .shell > .side, .no-print, .veil { display: none !important; } .shell { display: block; } .main { padding: 0; max-width: none; }
  .print-only { display: block; } .screen-only { display: none !important; } .slip { page-break-after: always; break-after: page; padding: 14mm 12mm; } .slip:last-child { page-break-after: auto; }
  .card { border-color: #999; } .t th { position: static; background: #fff; }
}
.slip h2 { font-size: 17px; } .slip .box { border: 1px solid #C9C0AA; border-radius: 8px; padding: 10px 12px; } .slip table { width: 100%; border-collapse: collapse; } .slip td, .slip th { padding: 4px 6px; font-size: 12px; text-align: left; } .slip th { border-bottom: 1px solid #999; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #555; } .slip td.num, .slip th.num { text-align: right; } .slip tfoot td { border-top: 1px solid #999; font-weight: 700; }
