/* Mi Sithech. Phone first: tabs along the bottom; on a wide screen they move to the left. */
:root {
  --night: #1B2350; --night-2: #2B3678; --sun: #F2B33D; --teal: #2E6B66; --teal-soft: #E6F1EF;
  --bg: #F4F5F8; --card: #FFFFFF; --ink: #1B1D24; --muted: #5F6370; --line: #E2E4EA; --error: #B3261E; --good: #2E6B66;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0F1430; --card: #182048; --ink: #E9ECF5; --muted: #A5ABC0; --line: #2A3360; --teal-soft: #173A37; --error: #FFB4AB; --good: #7FD1C4; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
h1 { font-size: 30px; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 20px; margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.center { text-align: center; }
.narrow { width: 100%; max-width: 420px; margin: 0 auto; }
.small { font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }

/* Dark welcome screens */
main.dark { min-height: 100%; background: linear-gradient(160deg, var(--night-2), var(--night)); color: #fff;
  padding: max(32px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
main.dark .small { color: rgba(255,255,255,.75); }
main.dark input, main.dark select { background-color: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); color: #fff; }
main.dark .link { color: var(--sun); }
main.light { min-height: 100%; padding: max(28px, env(safe-area-inset-top)) 20px 32px; }
main.center { display: flex; align-items: center; text-align: left; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 8px; }
.small-brand { flex-direction: row; justify-content: center; }
.logo { border-radius: 22%; display: block; }
.tagline { margin: 0; color: var(--sun); font-weight: 600; }
.notice { display: flex; gap: 8px; align-items: center; background: rgba(255,255,255,.08); padding: 12px; border-radius: 12px; color: var(--sun); font-weight: 600; margin: 0; }
.or { text-align: center; opacity: .7; font-size: 14px; }
.splash { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--night); color: #fff; }

/* Fields and buttons: at least 44px to tap */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
input, select { width: 100%; min-height: 48px; height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background-color: var(--card); }
/* Drop-downs are exactly the same box as a text field. Safari won't let a native
   menulist take our height, so we turn the native look off and draw the arrow ourselves. */
select { -webkit-appearance: none; appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235F6370' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
@media (prefers-color-scheme: dark) { select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23A5ABC0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); } }
main.dark select, header.top select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
select::-ms-expand { display: none; }
input.code { height: auto; min-height: 56px; }
input[type=checkbox], input[type=file] { height: auto; }
input.code { text-transform: uppercase; letter-spacing: .12em; font-size: 20px; text-align: center; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
button { min-height: 48px; border-radius: 12px; border: 0; padding: 0 18px; font-weight: 600; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--teal); color: #fff; }
.secondary { background: transparent; border: 1px solid var(--line); }
main.dark .secondary { border-color: rgba(255,255,255,.4); color: #fff; }
.google { background: #fff; color: #1f1f1f; display: flex; align-items: center; justify-content: center; gap: 10px; }
.google .g { color: #4285F4; font-weight: 800; font-size: 19px; }
.link { background: none; min-height: 44px; padding: 0; color: var(--teal); font-weight: 600; }
.msg { margin: 0; min-height: 1.2em; font-size: 15px; }
.msg.error { color: var(--error); }
main.dark .msg.error { color: #FFB4AB; }
.msg.good { color: var(--good); }
main.dark .msg.good { color: var(--sun); }
.lang { max-width: 220px; margin: 0 auto; }

/* Signed-in shell */
.shell { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
header.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; background: var(--night); color: #fff;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
header.top .who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
header.top .who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header.top .small { color: rgba(255,255,255,.75); }
header.top select { width: auto; background-color: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); max-width: 45%; }
.content { padding: 20px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); max-width: 760px; width: 100%; margin: 0 auto; }
nav.tabs { position: sticky; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.tab { background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--muted); min-height: 58px; border-radius: 0; padding: 6px 2px; }
.tab.on { color: var(--teal); }
@media (prefers-color-scheme: dark) { .tab.on { color: var(--sun); } }

@media (min-width: 900px) {
  .shell { grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; }
  header.top { grid-column: 1 / -1; }
  nav.tabs { grid-row: 2; grid-column: 1; position: sticky; top: 64px; align-self: start; grid-auto-flow: row; border-top: 0; border-right: 1px solid var(--line); height: calc(100vh - 64px); align-content: start; padding: 12px 0; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 15px; padding: 0 20px; min-height: 48px; }
  .content { grid-row: 2; grid-column: 2; }
}

/* Home and payslip lists */
.grow { flex: 1; min-width: 0; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 4px 0; }
h2.hello { font-size: 22px; }
.amt, .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.big { font-size: 20px; font-weight: 800; }
.teal { color: var(--teal); }
@media (prefers-color-scheme: dark) { .teal { color: var(--good); } }
button.card, button.li { width: 100%; text-align: left; font-weight: 400; }
.rowbtn { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.card.list { padding: 0 16px; }
.li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 0; border-radius: 0; background: none; }
.li + .li { border-top: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.chev { color: var(--muted); font-size: 22px; line-height: 1; }
.badge { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; padding: 3px; border: 1px solid rgba(0,0,0,.08); flex: none; }
.badge img { display: block; max-width: 120px; object-fit: contain; }
.badge.initials { background: var(--night); color: var(--sun); font-weight: 700; border-radius: 50%; padding: 0; }
body.away .amt, body.away .slip { filter: blur(10px); }

/* The payslip: always light, like paper */
.slip { --ink: #111114; --muted: #5c5c62; background: #fff; color: #111114; border-radius: 14px; overflow: hidden; font-size: 13px; line-height: 1.35;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); color-scheme: light; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.slip small { font-size: 10.5px; color: #5c5c62; }
.slip .hd { display: flex; gap: 10px; align-items: flex-start; background: #1b2350; color: #fff; padding: 14px; }
.slip .en { font-size: 17px; font-weight: 800; }
.slip .ea { font-size: 11px; color: rgba(255,255,255,.75); }
.slip .rt { text-align: right; }
.slip .ti { font-weight: 800; color: #f4b23e; font-size: 14px; }
.slip .emp { background: #f5f7fb; padding: 10px 16px; }
.slip .nmb { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.slip .fds { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.slip .fd { display: flex; flex-direction: column; }
.slip .fd b { font-size: 12.5px; }
.slip .pad, .slip .sec { padding: 0 16px; }
.slip .sh { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 11.5px; padding: 10px 0 4px; border-bottom: 2px solid #1b2350; }
.slip .sh span:last-child { font-weight: 400; color: #5c5c62; font-size: 10.5px; text-align: right; }
.slip .ln { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 5px 0; border-bottom: .5px solid #e5e5ea; }
.slip .ln .nm { flex: 1; }
.slip .ln .nm small { display: block; font-size: 9px; }
.slip .ln.tot { font-weight: 700; border-bottom: 0; }
.slip .note { flex: none; align-self: center; }
.slip .net { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #0b6b6a; color: #fff; border-radius: 10px; margin: 6px 12px 0; padding: 8px 12px; }
.slip .net small { display: block; color: rgba(255,255,255,.85); font-size: 10px; }
.slip .ctc { display: flex; justify-content: space-between; align-items: center; background: #eef0f7; border-radius: 10px; padding: 7px 10px; margin-top: 6px; }
.slip .ctc small { display: block; }
.slip .ctc .amt { font-weight: 800; font-size: 15px; }
.slip table.lv { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.slip .lv th { font-size: 10.5px; text-align: right; padding: 10px 0 4px 6px; border-bottom: 2px solid #1b2350; vertical-align: bottom; }
.slip .lv th:first-child, .slip .lv td:first-child { text-align: left; padding-left: 0; }
.slip .lv td { text-align: right; padding: 5px 0 5px 6px; border-bottom: .5px solid #e5e5ea; }
.slip .lv td.b { font-weight: 600; }
.slip .lv tr.adj td { text-align: left; font-size: 10.5px; color: #5c5c62; }
.slip .msgb { background: #fdf0d5; border-radius: 8px; padding: 9px; margin: 10px 16px 0; }
.slip .msgb small { font-weight: 700; display: block; }
.slip .ycols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 6px; font-size: 11px; }
@media (max-width: 520px) { .slip .ycols { grid-template-columns: 1fr; } }
.slip .yl { display: flex; justify-content: space-between; gap: 4px; padding: 1.5px 0; }
.slip .yl small { font-size: 8.5px; }
.slip .yt { font-weight: 700; border-top: .5px solid #d1d1d6; margin-top: 2px; }
.slip .ysum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: #eef0f7; border-radius: 8px; padding: 6px 9px; margin-top: 6px; }
.slip .ysum div { display: flex; flex-direction: column; }
.slip .ysum .b { font-weight: 800; }
.slip .muted { color: #5c5c62; }
.slip .tn { font-size: 10.5px; color: #5c5c62; padding: 6px 16px 0; margin: 0; }
.slip .ft { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 9.5px; color: #5c5c62; margin: 12px 16px 0; padding: 6px 0 12px; border-top: .5px solid #d9dbe5; }

/* Printing / saving as PDF: only the payslip, on A4 */
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; height: auto; }
  header.top, nav.tabs, .noprint { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .slip { box-shadow: none; border-radius: 0; font-size: 12px; }
  body.away .slip { filter: none; }
}
#app { min-height: 100%; }
.shell { min-height: 100vh; min-height: 100dvh; }
.slip .pad .sec { padding: 0; }

/* Leave */
h3.typeh { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--ink); }
.foot { margin: 0 4px; }
.li.col { flex-direction: column; align-items: stretch; gap: 3px; padding: 12px 0; }
.li.col > .link { align-self: flex-start; min-height: 36px; }
.status { font-size: 13px; font-weight: 700; color: var(--muted); }
.status.pending { color: #B26A00; } .status.approved { color: var(--teal); } .status.declined { color: var(--error); }
@media (prefers-color-scheme: dark) { .status.pending { color: var(--sun); } .status.approved { color: var(--good); } }
.link.danger { color: var(--error); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 360px) { .two { grid-template-columns: 1fr; } }
.card.inset { background: var(--bg); }
.li.warn, .li.warn .num { color: #B26A00; }
textarea { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font: inherit; color: inherit; resize: vertical; }
input[type=date] { -webkit-appearance: none; appearance: none; }

/* Leave calendar */
.cal { display: flex; flex-direction: column; gap: 8px; }
.navb { font-size: 26px; width: 44px; justify-content: center; color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-h { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal-d { position: relative; min-height: 42px; padding: 0; border-radius: 10px; background: transparent; font-weight: 500; font-variant-numeric: tabular-nums; }
.cal-d.we { background: var(--line); color: var(--muted); }
.cal-d.ph { background: #FCE9C2; color: #7A4B00; font-weight: 700; }
.cal-d .phdot { position: absolute; top: 4px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: #D9822B; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--muted); }
.cal-d.sel { background: var(--teal-soft); color: var(--ink); box-shadow: inset 0 0 0 2px var(--teal); }
.cal-d.sel.we, .cal-d.sel.ph { background: repeating-linear-gradient(135deg, var(--teal-soft) 0 5px, var(--line) 5px 8px); }
.cal-d.first, .cal-d.last { background: var(--teal); color: #fff; box-shadow: none; }
.cal-d.first.ph, .cal-d.last.ph, .cal-d.first.we, .cal-d.last.we { background: var(--teal); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sw.we { background: var(--line); } .sw.ph { background: #FCE9C2; border: 1px solid #D9822B; } .sw.sel { background: var(--teal); }
.chosen { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chosen div { display: flex; flex-direction: column; background: var(--bg); border-radius: 12px; padding: 8px 12px; }
.chosen small { color: var(--muted); font-size: 12px; }
.li.hols { color: var(--muted); }
.li.total { border-top: 2px solid var(--line); }
.num.big { font-size: 22px; font-weight: 800; color: var(--teal); }
@media (prefers-color-scheme: dark) {
  .cal-d.ph { background: #4A3A12; color: #FFD98A; }
  .sw.ph { background: #4A3A12; }
  .num.big { color: var(--good); }
}

/* Claims */
.row.wrap { flex-wrap: wrap; }
h3.plain { text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--ink); margin: 0; }
a.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 12px; padding: 0 18px; font-weight: 600; text-decoration: none; }
a.button.secondary { border: 1px solid var(--line); }
.receipt-preview img { display: block; max-width: 100%; max-height: 260px; margin: 0 auto; border-radius: 10px; border: 1px solid var(--line); }
.receipt-preview:empty { display: none; }
.pdfchip { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-weight: 600; }
.receipt-img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
input.amount { text-align: right; font-variant-numeric: tabular-nums; font-size: 18px; }
.status.cancelled { color: var(--muted); }

/* Travel by km */
.segs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 12px; padding: 3px; gap: 3px; }
.seg { min-height: 40px; background: transparent; color: var(--muted); border-radius: 10px; }
.seg.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.trip { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.trip > .link { align-self: flex-start; min-height: 36px; }

/* My details */
.li .val { text-align: right; max-width: 62%; overflow-wrap: anywhere; }
.small.b { font-weight: 700; color: var(--ink); }

/* Team */
.tab { position: relative; }
.tab[data-count]::after { content: attr(data-count); position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--error); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
@media (min-width: 900px) { .tab[data-count]::after { position: static; margin-left: auto; } }
.small-btn { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 4px; }
.danger-text { color: var(--error); }
.danger-bg { background: var(--error); }
.warn-text { color: #B26A00; }
@media (prefers-color-scheme: dark) { .warn-text { color: var(--sun); } }
.decide { background: var(--bg); border-radius: 12px; padding: 10px; }

/* Install help (step 8): how to put the app on the home screen */
.install .logo { flex: none; }
.install .wrap { flex-wrap: wrap; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.steps li { padding-left: 2px; }
.key { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 24px; margin: 0 2px; vertical-align: -6px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--teal); }
.key svg { stroke-width: 2.4; }
.install.welcome { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.install.welcome .key { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: var(--sun); }
@media (prefers-color-scheme: dark) { .key { color: var(--sun); } }
.install { display: flex; flex-direction: column; gap: 12px; }
.install p { margin: 0; }
.install p .link { min-height: 0; display: inline; }

/* Fingerprint and face sign-in */
p.good { margin: 0; color: var(--good); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.li .tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); margin-left: 8px; vertical-align: 2px; }

/* A notification that arrives while the app is open */
button.toast { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: var(--night); color: #fff;
  border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; font-weight: 400; }
button.toast .small { color: rgba(255,255,255,.75); }

/* Sithech (payroll) additions */
.emplogo { height: 32px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.emplogo.big { height: 52px; max-width: 160px; }
.logo-preview { max-height: 96px; max-width: 240px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.card.stat { display: flex; flex-direction: column; gap: 6px; }
.card.stat h3 { margin: 0; }
label.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
label.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--teal); }
.link.light { color: var(--sun); }
form h3 { margin-top: 10px; }
@media (min-width: 900px) { .content { max-width: 980px; } }
.amt.big.wrap { font-size: 17px; white-space: normal; line-height: 1.25; }

/* Eight pages don't fit across a phone: the bar scrolls sideways, each item on one line. */
@media (max-width: 899px) {
  nav.tabs { grid-auto-flow: column; grid-auto-columns: minmax(84px, 1fr); overflow-x: auto; scrollbar-width: none; }
  nav.tabs::-webkit-scrollbar { display: none; }
  .tab span { white-space: nowrap; }
}

/* People & access */
.li.wrap { flex-wrap: wrap; row-gap: 8px; }
.li.wrap .row { flex-wrap: wrap; }
.li select { width: auto; }
label.check.small { font-size: 14px; color: var(--muted); min-height: 36px; }
.code-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.code-big { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 30px; font-weight: 800; letter-spacing: .12em; color: var(--teal); }
.good-card { border-color: var(--teal); }
.scroll { overflow-x: auto; }
table.perm { border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.perm th, table.perm td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.perm thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
table.perm td.center, table.perm th:not(:first-child) { text-align: center; }
table.perm .yes { color: var(--teal); font-weight: 800; }
table.perm .no { color: var(--muted); }
@media (prefers-color-scheme: dark) { table.perm .yes { color: var(--good); } }

/* Drop-downs are the same size as the text boxes: one rule for both (input, select above). */
.row.wrap > .field { flex: 1 1 200px; align-self: flex-end; }
.field select, .field input { width: 100%; }
/* A field with no partner still takes one column, so it matches the boxes above it. */
.row.wrap > .fill { flex: 1 1 200px; }
@media (max-width: 560px) { .row.wrap > .fill { display: none; } }

/* Staff (step 4) */
.chip { background: var(--card); border: 1px solid var(--line); color: var(--muted); min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; }
.chip.on { background: var(--teal-soft); border-color: var(--teal); color: var(--teal); }
@media (prefers-color-scheme: dark) { .chip.on { color: var(--good); border-color: var(--good); } }
.pad { padding: 14px 16px; }
.pct { display: flex; align-items: center; gap: 6px; width: 120px; flex: none; }
.codecol { width: 120px; flex: none; }
.small.error { color: var(--error); }
.danger { background: transparent; border: 1px solid var(--error); color: var(--error); }
.danger:hover { background: var(--error); color: #fff; }

/* Staff import (step 4) */
.error-text { color: var(--error); }
.import-row { align-items: flex-start; cursor: pointer; }
.import-row input[type=checkbox] { width: 22px; height: 22px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--teal); }
.import-row input[type=checkbox]:disabled { opacity: .35; }
/* "‹ All staff" and other back links sit on the left, not stretched across the column. */
.stack > button.link:first-child { align-self: flex-start; }
/* Pay setup (step 5): the editor on the left, the draft payslip beside it on a wide screen. */
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.pay-grid > * { min-width: 0; }
@media (min-width: 1100px) { .pay-grid { grid-template-columns: minmax(0, 1fr) 360px; } .pay-side { position: sticky; top: 16px; } }
.item { border-top: 1px solid var(--line); padding-top: 12px; }
.item-head { align-items: flex-end; }
.item-head > .grow { flex: 1 1 220px; }
.item-head > .amt-col { flex: 0 1 150px; }
.seg { flex-wrap: wrap; gap: 6px; }
input.count { width: 84px; height: 40px; min-height: 0; padding: 6px 10px; }
select.add-menu { width: auto; min-width: 220px; }
.draft .list { margin: 0; }
.draft .li { min-height: 36px; padding: 4px 0; }
.draft .li.head { text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--muted); padding-top: 12px; font-size: 12px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bracket > .field, .band .field { flex: 1 1 120px; }
.fixed > .field { flex: 1 1 90px; }
.link.remove { color: var(--error); align-self: center; }
h3 .tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); margin-left: 8px; letter-spacing: 0; vertical-align: 1px; }
/* Pay run (step 6) */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--line); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--teal-soft); color: var(--teal); }
.pill.warn { background: #FDF0D5; color: #8A5A00; }
@media (prefers-color-scheme: dark) { .pill.good { color: var(--good); } .pill.warn { background: #3A2E12; color: var(--sun); } }
.period-step { align-items: center; }
.period-step h2 { text-align: center; flex: 1; }
.period-step button { min-width: 48px; font-size: 20px; }
.bulk > button { flex: 1 1 160px; }
.eq { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; }
.eq-cell { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; min-width: 0; }
.eq-cell .num { font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.eq-cell.net { background: var(--teal); color: #fff; }
.eq-cell.ctc { background: var(--night); color: #fff; }
.eq-cell.net .small, .eq-cell.ctc .small { color: rgba(255,255,255,.8); }
.eq-op { font-size: 20px; font-weight: 700; color: var(--muted); }
@media (max-width: 560px) { .eq { grid-template-columns: 1fr; } .eq-op { display: none; } }
.num.right { text-align: right; }
.slip-grid { align-items: start; }
@media (min-width: 1100px) { .slip-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); } }
.slip-wrap { overflow-x: auto; }
.tax-steps summary { cursor: pointer; font-weight: 600; }
.remove-choice { gap: 12px; }
.stack > .pill { align-self: flex-start; }
/* Leave (step 7) */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pill.bad { background: #FCE8E6; color: var(--error); }
.good-text { color: var(--good); }
.card.today { align-items: center; }
.card.today .sun { width: 34px; height: 34px; border-radius: 10px; background: var(--sun); color: var(--night); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.balance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.balance { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ring { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ring > span { width: 36px; height: 36px; border-radius: 50%; background: var(--card); }
.big-days { font-size: 28px; font-weight: 800; line-height: 1; }
.pair { display: flex; gap: 8px; }
.pair input { width: 90px; }
.cal-title { min-width: 150px; text-align: center; text-transform: none; letter-spacing: 0; font-size: 18px; color: var(--ink); }
.cal-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.team-grid { border-collapse: collapse; font-size: 13px; }
.team-grid th, .team-grid td { padding: 0; height: 36px; min-width: 28px; text-align: center; border-bottom: 1px solid var(--line); }
.team-grid thead th { height: 40px; font-size: 11px; }
.team-grid .wd { color: var(--muted); font-weight: 400; }
.team-grid .who { text-align: left; min-width: 160px; padding: 0 10px; position: sticky; left: 0; background: var(--card); z-index: 1; white-space: nowrap; }
.team-grid .who .link { min-height: 0; }
.team-grid .num { min-width: 48px; padding: 0 8px; text-align: right; font-weight: 700; }
.team-grid th.today { outline: 2px solid var(--sun); outline-offset: -2px; border-radius: 4px; }
.hol { background: #FDF0D5; }
.wkend { background: var(--bg); }
@media (prefers-color-scheme: dark) { .hol { background: #3A2E12; } }
.bar { display: block; height: 22px; margin: 0 -1px; }
.bar.s { border-top-left-radius: 6px; border-bottom-left-radius: 6px; margin-left: 2px; }
.bar.e { border-top-right-radius: 6px; border-bottom-right-radius: 6px; margin-right: 2px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mg-head { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 0; }
.mg-day { min-height: 84px; padding: 4px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mg-day.out { opacity: .4; }
.mg-num { font-size: 12px; font-weight: 700; padding: 0 5px; border-radius: 999px; }
.mg-num.today { background: var(--sun); color: var(--night); }
.mg-hol { font-size: 9px; color: #8A5A00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chiplet { font-size: 10px; font-weight: 600; border-radius: 4px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend { gap: 14px; color: var(--muted); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); }
.swatches { gap: 8px; }
.swatch-btn { width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid transparent; }
.swatch-btn.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card) inset; }

/* Wide content (the leave calendar, payslips) scrolls inside its own box rather than widening the page. */
main.content, .stack > * { min-width: 0; }

/* Home (step 8): getting started, to do, dates */
.stepmark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; color: #fff; }
.stepmark.done { background: var(--teal); border-color: var(--teal); }
.li.step.done strong { color: var(--muted); font-weight: 600; }
.li .tag.plain { background: var(--line); color: var(--muted); }
.dot.warn { background: #D98A00; } .dot.info { background: var(--teal); }
#todo p.muted { display: flex; align-items: center; gap: 6px; margin: 0; }
.li > .pill { flex: none; }

/* Two-step sign-in (step 9) */
.qr { align-self: center; background: #fff; padding: 8px; border-radius: 12px; line-height: 0; }
code.key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: .06em; overflow-wrap: anywhere; user-select: all; }

/* Reports (0.7.0) */
.rep-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table.rep { border-collapse: collapse; font-size: 13.5px; width: 100%; font-variant-numeric: tabular-nums; }
table.rep th, table.rep td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
table.rep td:first-child, table.rep th:first-child { white-space: normal; min-width: 150px; }
table.rep thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; white-space: normal; }
table.rep .num { text-align: right; }
table.rep tr.bold td { font-weight: 700; }
.rep-section { margin: 14px 0 0; padding-top: 12px; border-top: 2px solid var(--teal); color: var(--teal); }
.report h4 { margin: 8px 0 0; }
.rep-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 16px; margin: 0; }
.rep-fields dt { font-size: 12px; color: var(--muted); } .rep-fields dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pre { white-space: pre-line; }
.stepper { align-items: center; gap: 8px; } .stepper button { min-width: 48px; padding: 0; }
.stepper strong { text-align: center; }
input.codebox { width: 130px; flex: none; text-align: right; height: 40px; }
.li.sub { padding-left: 12px; }
.li .right { text-align: right; }
.notice-card { background: #FDF0D5; color: #8A5A00; padding: 12px; border-radius: 12px; margin: 0; }
@media (prefers-color-scheme: dark) { .notice-card { background: #3A2E12; color: var(--sun); } }

/* EMP501 */
details.cert { border-top: 1px solid var(--line); padding: 8px 0; } details.cert:first-child { border-top: 0; }
details.cert summary { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; list-style: none; min-height: 44px; }
details.cert summary::-webkit-details-marker { display: none; }
details.cert .codes { margin: 6px 0 0 4px; } details.cert .codes .li { min-height: 30px; padding: 3px 0; }
.pill.dark { background: var(--night, #1b2350); color: #fff; }
.dot.bad { background: var(--error); }
.plainval { display: flex; align-items: center; min-height: 48px; }
.code-text { overflow-wrap: anywhere; }

table.rep.grid th, table.rep.grid td { border: 1px solid var(--muted); min-width: 70px; height: 30px; }
table.rep.grid thead th { text-transform: none; letter-spacing: 0; color: var(--ink); }

/* The company stamp on UIF forms */
.rep-sign { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
.stamp { border: 3px double #1f3a93; color: #1f3a93; background: #fff; padding: 10px 14px; text-align: center; font-size: 12px; min-width: 200px; max-width: 260px; border-radius: 2px; }
.stamp strong { display: block; text-transform: uppercase; font-size: 13.5px; margin-bottom: 2px; }

/* People (0.8.0): an employee's record */
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line); }
.avatar.none { display: flex; align-items: center; justify-content: center; background: var(--night); color: var(--sun); font-weight: 700; font-size: 26px; }
.hidden { display: none !important; }
.editor { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline .ev { display: flex; gap: 12px; padding: 0 0 14px; position: relative; }
.timeline .ev::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -4px; width: 2px; background: var(--line); }
.timeline .ev:last-child::before { display: none; }
.timeline .evdot { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-top: 5px; background: var(--muted); position: relative; }
.timeline .start .evdot, .timeline .promotion .evdot, .timeline .recognition .evdot, .timeline .probation .evdot { background: var(--teal); }
.timeline .warning .evdot, .timeline .end .evdot { background: var(--error); }
.timeline .pay .evdot, .timeline .job .evdot, .timeline .transfer .evdot { background: var(--sun); }
.timeline .leave .evdot { background: var(--line); border: 2px solid var(--muted); }
.timeline .ev .link { min-height: 30px; }
.stack-s > .pill { align-self: flex-start; }
.letterhead-preview { width: 100%; max-width: 560px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tick { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; color: #fff; }
.tick.yes { background: var(--teal); }
.tick.no { background: var(--sun); color: var(--night); }

/* Practice view: a client's pills sit in a row under its name and may wrap; the name can be long. */
#clients .pills { gap: 6px; }
#clients .pill { white-space: normal; }
#clients .li { align-items: flex-start; }
#clients .li .chev { align-self: center; }

/* Owner dashboard on Home: key figures in a grid, then twelve bars. */
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 18px; }
.fig .amt.big { margin: 2px 0; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 6px; }
.bars .bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bars .fill { width: 100%; max-width: 38px; background: var(--teal); border-radius: 4px 4px 0 0; }
.bars .lab { font-size: 11px; color: var(--muted); line-height: 1; }
/* Staff list while changing several people: each row is a label with its tick box. */
.li.pickrow { cursor: pointer; }
.li.pickrow input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.ownfield { align-items: flex-end; }
.ownfield > .link { min-height: 48px; }

/* A two-language heading or cell (Mozambique): the Portuguese line, the English line under it. */
table.rep th.pre, table.rep td.pre { white-space: pre-line; }
table.rep thead th.pre { line-height: 1.35; }

/* A letter in two languages side by side (Mozambique): Portuguese on the left, English on the right. */
.rep-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; align-items: start; }
.rep-side > * { margin: 0; min-width: 0; }
.rep-side > :nth-child(odd) { border-right: 1px solid var(--line, #dfe3ea); padding-right: 22px; margin-right: -13px; }
.rep-side-head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rep-fields.one { grid-template-columns: 1fr; }

/* Gate passes */
.gate-item { gap: 8px; align-items: center; } .gate-item .gate-qty { width: 84px; flex: none; } .gate-item .grow { flex: 1; min-width: 0; }

/* Working offline: the line across the top while an employer is checked out */
.offline-bar { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; }

/* The client list on a wide screen: tiles side by side, using the width (27 Nov 2026). */
.wide { width: 100%; max-width: 1240px; margin: 0 auto; }
.two-up { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.two-up > * { margin: 0; }
@media (min-width: 900px) {
  .wide .two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .wide #clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
  .wide #clients > .li { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; align-items: flex-start; min-height: 112px; }
  .wide #clients > .li + .li { border-top: 1px solid var(--line); }
  .wide #clients > .li:hover { border-color: var(--teal, #0b6b6a); }
  .wide #practice .row.wrap > * { max-width: 420px; }
}

/* Night band (27 Nov 2026): the navy of the sign-in screen across the top of the client list, light below.
   The first card overlaps the band, so the page reads as one piece with the app's own navy header. */
main.light { background: linear-gradient(to bottom, var(--night) 0, var(--night) 232px, transparent 232px) no-repeat, var(--bg); position: relative; }
main.light::before { content: ""; position: absolute; left: 0; right: 0; top: 229px; height: 3px; background: var(--sun); }
main.light > * { position: relative; }
main.light .brand { margin-bottom: 18px; }
main.light .brand h1 { color: #fff; }
main.light .brand .logo, main.light .brand img { box-shadow: 0 0 0 2px rgba(255,255,255,.18); border-radius: 14px; }
main.light > .stack > .notice { background: rgba(255,255,255,.12); color: #fff; }

/* One look across every screen (27 Nov 2026 check of all screens). */
/* A card's title looks the same whichever heading it was written with. Home's number tiles keep their small label,
   and so do the labels of sections inside a card. */
section.card:not(.stat) > h3:first-child, section.card:not(.stat) > form > h3:first-child,
section.card:not(.stat) > .row:first-child > h3:first-child {
  text-transform: none; letter-spacing: 0; font-size: 20px; color: var(--ink); margin: 0; }
/* An empty message line or an unused slot takes no room, so the gaps between cards are all the same. */
.msg:empty, #xero-slot:empty, #offline-slot:empty { display: none; }
/* On a wide screen a card's own action button is as wide as it needs to be and sits on the left, everywhere. */
@media (min-width: 700px) {
  section.card > button:not(.li):not(.link):not(.rowbtn), section.card > form > button:not(.li):not(.link),
  section.card > .stack > button:not(.li):not(.link):not(.rowbtn) { align-self: flex-start; width: auto; min-width: 190px; }
}
@media (min-width: 700px) { section.card button.primary:not(.small-btn) { min-width: 190px; } }
