/* Benny. Phone first: one column and a tab bar along the bottom; from 760px the tabs move to
   a sidebar and the Personal page splits in two. Same markup at every size.
   System fonts on purpose - no web-font host sees our staff's IP addresses (CSP is 'self'). */
:root {
  --bg: #EEF2EF; --surface: #FFFFFF; --sunk: #F5F8F6; --line: #D7E0DB;
  --fg: #18282A; --muted: #5B6E6C;
  --brand: #1F5F57; --brand-ink: #FFFFFF; --brand-soft: #DCEDE8;
  --sun: #F2B33D; --sun-soft: #FCEFD3;
  --ok: #2E7D4F; --ok-soft: #DDF1E4; --warn: #9A6200; --warn-soft: #FBEBCB; --bad: #B23A30; --bad-soft: #F8DEDA;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  --r: 10px;
  /* the stacked sales bars: one colour per salesperson; the web shop and "not assigned" always these two */
  --c1: #1F5F57; --c2: #D9702B; --c3: #3B6FB6; --c4: #9C4F96; --c5: #B8901C; --c6: #4E9A45; --c-web: #6CB7C9; --c-none: #B9C3C1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1716; --surface: #172221; --sunk: #121C1B; --line: #2A3A38;
    --fg: #E4EEEB; --muted: #93A8A4;
    --brand: #5FB8A8; --brand-ink: #0C1A18; --brand-soft: #1E3632;
    --sun-soft: #3A2F17;
    --ok: #6FCB92; --ok-soft: #173226; --warn: #E9B45A; --warn-soft: #352915; --bad: #F08A7E; --bad-soft: #3A1E1B;
    --c1: #5FB8A8; --c2: #F0995A; --c3: #7FA6E6; --c4: #CB8BC6; --c5: #E2C15A; --c6: #8BCB7F; --c-web: #5A9AAB; --c-none: #55615F;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--f-body); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- shell ---- */
.app { display: flex; min-height: 100dvh; }
.side { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 17px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--sun-soft); color: var(--warn);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; text-decoration: none;
}
.top-right { display: flex; align-items: center; gap: 10px; }
.update {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--brand);
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.update svg { width: 16px; height: 16px; }
.update.busy svg { animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .update.busy svg { animation: none; } }
.demo { margin: 0 16px 8px; padding: 6px 10px; border-radius: 8px; background: var(--sun-soft); color: var(--warn); font-size: 13px; font-weight: 600; }
.screen { flex: 1; padding: 4px 16px calc(96px + env(safe-area-inset-bottom, 0px)); max-width: 1100px; width: 100%; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
}
.tabbar a, .tabbar button {
  display: grid; justify-items: center; gap: 2px; padding: 6px 0;
  border: 0; background: none; cursor: pointer; text-decoration: none;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.tabbar form { display: contents; }
.tabbar [aria-current="page"] { color: var(--brand); }
.tabbar svg { width: 22px; height: 22px; }

@media (min-width: 760px) {
  .tabbar { display: none; }
  .side {
    display: flex; flex-direction: column; gap: 2px; width: 228px; flex: none;
    position: sticky; top: 0; height: 100dvh;
    background: var(--surface); border-right: 1px solid var(--line); padding: 20px 12px;
  }
  .side .brand { padding: 0 8px 18px; }
  .side a, .side button {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
    border: 0; background: none; text-align: left; cursor: pointer; text-decoration: none;
    color: var(--fg); font-weight: 500;
  }
  .side a:hover, .side button:hover { background: var(--sunk); }
  .side [aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
  .side svg { width: 18px; height: 18px; }
  .side-out { margin-top: auto; }
  .top .brand { visibility: hidden; }
  .top { padding: 20px 32px 8px; }
  .demo { margin: 0 32px 8px; }
  .screen { padding: 6px 32px 48px; }
  .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
}

/* ---- content ---- */
.stack, .split { display: grid; gap: 14px; }
.title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 0; text-wrap: balance; }
.sub { color: var(--muted); margin: 2px 0 0; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.hint.center { text-align: center; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.card h2 { margin: 0; font-size: 16px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.tile { text-decoration: none; color: var(--fg); gap: 4px; }
.tile:hover { border-color: var(--brand); }
.tile-title { font-weight: 600; }
.tile.attention { background: var(--sun-soft); border-color: transparent; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

.note { background: var(--sun-soft); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.flash { background: var(--ok-soft); color: var(--ok); border-radius: 8px; padding: 10px 12px; font-weight: 600; margin-bottom: 12px; }
.flash.bad { background: var(--bad-soft); color: var(--bad); }
.note.ok-note { background: var(--ok-soft); }
/* receipts paid back through pay (Payroll_258) */
.payback { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-radius: 8px; padding: 8px 12px; margin: 6px 0 4px; font-size: 14px; background: var(--sun-soft); }
.payback.ok { background: var(--ok-soft); }
.payback.bad { background: var(--bad-soft); color: var(--bad); }
.payback form, .payback-ask { margin: 6px 0 4px; }
.pill { background: var(--sunk); color: var(--muted); }
.muted-inline { color: var(--muted); font-weight: 400; }
.nowrap { white-space: nowrap; }

/* lists: one row per item, label left, state right */
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.card > h2 + .row, .card > h2 + .hint + .row { border-top: 0; }
.row > div { min-width: 0; }
.row .t { font-weight: 600; overflow-wrap: anywhere; }
.row .s { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.row-end { display: grid; justify-items: end; gap: 4px; flex: none; }
.row-end form { margin: 0; }
.amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.link { border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; font-size: 13px; }
.estimate { display: flex; justify-content: space-between; align-items: baseline; background: var(--brand-soft); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.estimate b { font-size: 18px; font-variant-numeric: tabular-nums; }
progress.meter { width: 100%; height: 8px; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: var(--sunk); }
progress.meter::-webkit-progress-bar { background: var(--sunk); }
progress.meter::-webkit-progress-value { background: var(--brand); border-radius: 4px; }
progress.meter::-moz-progress-bar { background: var(--brand); border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }

.row.first { border-top: 0; padding-top: 0; }
.big { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.bad-text { color: var(--bad); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
input[type="file"] { padding: 9px; font-size: 14px; }

/* receipts on the approvals screen */
.receipts { display: flex; flex-wrap: wrap; gap: 8px; }
.receipt-thumb { display: block; width: 120px; height: 120px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--sunk); }
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* approvals: now vs requested */
.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); }
.compare thead th { border-top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.compare tbody th { font-weight: 500; color: var(--muted); }
.compare tr.changed td:last-child { background: var(--sun-soft); font-weight: 600; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.reject summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 0; }
.reject[open] summary { margin-bottom: 10px; }

.kv { display: grid; grid-template-columns: fit-content(45%) minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: break-word; word-break: normal; font-variant-numeric: tabular-nums; }
.masked { font-family: var(--f-mono); letter-spacing: .03em; white-space: nowrap; }

/* ---- forms ---- */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; }
.pair, .trio { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 480px) {
  .pair { grid-template-columns: 1fr 1fr; }
  .trio { grid-template-columns: 2fr 1fr 1fr; }
}
input, select {
  width: 100%; min-width: 0; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 12px; font-size: 16px; /* 16px stops iOS zooming into the field */
}
input.upper { text-transform: uppercase; }
input:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.input-validation-error { border-color: var(--bad); }
.err { color: var(--bad); font-size: 13px; }
.err:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }

.btn {
  display: inline-block; border: 0; border-radius: 9px; padding: 12px 18px; cursor: pointer; text-decoration: none;
  background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 15px; text-align: center;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--sunk); color: var(--fg); border: 1px solid var(--line); }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- login ---- */
.login-page { display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px; }
.login { width: 100%; max-width: 380px; display: grid; gap: 14px; }
.big-brand { font-size: 30px; }
.big-brand .mark { width: 40px; height: 40px; font-size: 22px; border-radius: 11px; }
.login .btn { width: 100%; }
.center-link { display: block; text-align: center; margin-top: 4px; width: 100%; }
input.pin { font-family: var(--f-mono); font-size: 24px; letter-spacing: .5em; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .flash { animation: arrive .25s ease-out; }
  @keyframes arrive { from { opacity: 0; transform: translateY(-4px); } }
}

/* Fields Benny filled in from a receipt photo - marked until the person changes them. */
.filled { background: var(--sun-soft); }
.note.reading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .note.reading::before { animation: none; } }

/* ---- snap a receipt (Home + Receipts) ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.snap-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px; font-size: 18px; cursor: pointer; }
.snap-btn svg { width: 26px; height: 26px; }
.snap-btn[hidden] { display: none; }
.snap form { margin: 0; }
.snap label.snap-btn:has(+ input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.toggle label { position: relative; text-align: center; padding: 9px 6px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--muted); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle label:has(input:checked) { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.toggle label:has(input:focus-visible) { outline: 2px solid var(--brand); }
.snap-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.snap-results:not(:empty) { margin-top: 12px; }
.snap-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--sunk); }
.snap-item .what { font-weight: 600; }
.snap-item .more { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.snap-item .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.light { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; font-size: 16px; color: #fff; flex: none; }
.light.g { background: var(--ok); }
.light.y { background: var(--sun); color: #3A2A00; }
.light.r { background: var(--bad); }
.light.n { background: var(--line); color: var(--fg); }
.lit { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.answer { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }

/* ---- Time: hours grid ---- */
.period-nav { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.period-nav a { text-decoration: none; font-size: 20px; line-height: 1; padding: 0 6px; }
.hours { display: grid; gap: 0; }
.hour-row { display: grid; grid-template-columns: 1fr 72px; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.hour-row.weekend .hour-day b { color: var(--muted); }
.hour-row.today .hour-day b { color: var(--brand); }
.hour-day { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.hour-day .s { width: 100%; font-size: 12px; color: var(--muted); }
.hour-num { text-align: right; font-variant-numeric: tabular-nums; }
.hour-num.ro { padding-right: 12px; }
.hour-note { grid-column: 1 / -1; }
details.hour-note summary { font-size: 12px; color: var(--muted); cursor: pointer; list-style: none; }
details.hour-note summary::-webkit-details-marker { display: none; }
details.hour-note[open] summary { margin-bottom: 4px; }
.hour-note.s { font-size: 12px; color: var(--muted); }
.hours .estimate { margin-top: 8px; }
.hours button { margin-top: 10px; }


/* ---- Pay ---- */
h3.minor { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }

/* ---- More ---- */
.more-list { display: grid; padding: 4px 0; }
.more-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--fg); border-top: 1px solid var(--line); font-weight: 600; }
.more-list a:first-child { border-top: 0; }
.more-list svg { width: 22px; height: 22px; color: var(--brand); }
fieldset.field { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
fieldset.field legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }

/* ---- Mileage: usual trips ---- */
.usual { display: grid; gap: 6px; margin-bottom: 12px; }
.usual .label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--sunk); color: var(--fg); border-radius: 999px; padding: 8px 12px;
        font: inherit; font-size: 14px; cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip b { color: var(--brand); margin-right: 4px; }
.chip:active { filter: brightness(.95); }

/* ---- Arrange menu ---- */
.arrange { list-style: none; margin: 0; padding: 0; display: grid; }
.arrange li { position: relative; display: grid; grid-template-columns: 28px 1fr auto auto; align-items: center; gap: 10px;
              padding: 12px 4px; border-top: 1px solid var(--line); background: var(--surface); touch-action: none; user-select: none; }
.arrange li:first-child { border-top: 0; }
.arrange li.fixed { color: var(--muted); }
.arrange li.dragging { box-shadow: 0 4px 16px rgba(0, 0, 0, .18); border-radius: 8px; z-index: 2; cursor: grabbing; }
.arrange .grip { color: var(--muted); cursor: grab; display: grid; place-items: center; }
.arrange .grip svg, .arrange .name svg { width: 20px; height: 20px; vertical-align: -4px; }
.arrange .name { font-weight: 600; }
.arrange .where { font-size: 12px; color: var(--brand); }
.arrange .divider { position: absolute; top: -9px; left: 40px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
                    background: var(--surface); padding: 0 6px; color: var(--muted); }
.arrange .arrows { display: flex; gap: 4px; margin: 0; }
.arrow { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); color: var(--fg); font-size: 16px; cursor: pointer; }
.arrow:disabled { opacity: .35; cursor: default; }
.side-arrange { opacity: .75; font-size: 14px; }

/* which build is live (sign-in and More) */
.version { text-align: center; font-size: 12px; color: var(--muted); margin: 16px 0 0; font-variant-numeric: tabular-nums; }
.snap-alt { display: block; text-align: center; margin-top: 10px; font-size: 14px; color: var(--brand); text-decoration: underline; cursor: pointer; }
.answer.focus { background: var(--sun-soft); margin: 0 -12px; padding: 12px; border-radius: 8px; }

/* Personal: the person's photo (Bamboo's to start with) */
.who { display: flex; align-items: center; gap: 14px; }
.me-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--sunk); }
.me-photo.none { display: grid; place-items: center; font-weight: 600; font-size: 24px; color: var(--muted); }
.photo-form { margin: 8px 0 0; }

/* Welcome page (new hires, by link): a little wider, and the to-do list */
.login.wide { max-width: 560px; }
.welcome-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.welcome-steps li { display: flex; align-items: center; gap: 10px; }
.welcome-steps .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; flex: none; }
.welcome-steps li.done { color: var(--muted); }
.welcome-steps li.done .tick { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.welcome-steps .pill { margin-left: auto; }

.check input.inline-num { width: 8em; height: auto; display: inline-block; margin: 4px 0 0 4px; padding: 4px 8px; flex: none; }
fieldset.field { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
fieldset.field legend { font-weight: 600; margin-bottom: 4px; }
details > summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }

/* Pay: a row of buttons, and Penny's own payslip page (816px, US Letter) scaled to the card by benny.js.
   Without the script it scrolls sideways at full size. */
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.slip-frame { overflow-x: auto; }
.slip-frame iframe { display: block; width: 816px; height: 1056px; border: 0; transform-origin: 0 0; background: #fff; }
.slip-frame.fitted { overflow: hidden; }

/* Documents: View and Download side by side. */
.row .actions { flex: none; }

/* Hours: the pay period as a two-week calendar. Tap a day for 8 (benny.js); Paid / Bamboo days are read-only. */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 4px 0 12px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 0; }
.cal-day { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 64px; padding: 4px; border: 1px solid var(--line);
           border-radius: 8px; background: var(--card, #fff); cursor: pointer; }
.cal-day.weekend { background: color-mix(in srgb, var(--line) 35%, transparent); }
.cal-day.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-day.locked, .cal-day.future { cursor: default; opacity: .6; }
.cal-day.holiday .cal-date { color: var(--brand); }
.cal-date { font-size: 12px; font-weight: 600; line-height: 1; }
.cal-date small { font-weight: 400; color: var(--muted); }
.cal-hrs { width: 100%; min-width: 0; border: 0; padding: 4px 0; font-size: 17px; font-weight: 600; text-align: center;
           font-variant-numeric: tabular-nums; background: transparent; color: inherit; border-radius: 6px; }
.cal-hrs:focus { outline: 2px solid var(--brand); background: var(--card, #fff); }
.cal-hrs.ro { display: block; min-height: 1.6em; }
.cal-tag { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.1; min-height: 1.1em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 380px) { .cal { gap: 2px; } .cal-day { padding: 3px 2px; min-height: 58px; } .cal-hrs { font-size: 15px; } }
.cal-day.future { background: transparent; border-style: dashed; opacity: .45; }
.cal-top { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.cal-day.clock { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.cal-day.clock .cal-tag { color: var(--brand); font-weight: 600; }
.cal-extra { font-size: 11px; text-align: center; color: var(--brand); }
.cal-extra::before { content: "+"; }

/* Home: the person's cards. The tools (drag, arrows, ×) show on hover with a mouse, and always while arranging. */
.home-card { padding-top: 12px; }
.home-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.home-card-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: inherit; text-decoration: none; }
.home-card-title svg { width: 20px; height: 20px; color: var(--brand); }
.card-tools { display: none; align-items: center; gap: 2px; }
.card-tools form { display: inline-flex; gap: 2px; margin: 0; }
.card-tools .grip { cursor: grab; display: inline-flex; color: var(--muted); padding: 4px; touch-action: none; }
.card-tools .grip svg { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) { .home-card:hover .card-tools { display: inline-flex; } }
.home.arranging .card-tools, .home:has(.home-arrange[open]) .card-tools { display: inline-flex; }
.home-card.dragging { opacity: .6; outline: 2px dashed var(--brand); }
.home-drop { border: 2px dashed var(--brand); border-radius: 12px; padding: 18px; text-align: center; color: var(--brand); font-weight: 600; }
.home-arrange summary { cursor: pointer; font-weight: 600; }
.home-arrange .addable { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.home-arrange .addable form { margin: 0; }
.home-arrange .addable svg { width: 16px; height: 16px; vertical-align: -3px; }
.side a[data-card]:not([data-card=""]) { cursor: grab; }
/* Inside a Home card the snap box is part of the card, not a card of its own. */
.home-card .snap, .home-card .card { border: 0; box-shadow: none; padding: 0; background: transparent; }
.home-arrange .hint svg { width: 16px; height: 16px; vertical-align: -3px; display: inline; }

/* ---- the training ribbon on Home (Payroll_216) ---- */
.ribbon { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; background: var(--bad-soft); color: var(--bad);
          text-decoration: none; font-size: 15px; }
.ribbon svg { width: 20px; height: 20px; flex: none; }
.ribbon:hover, .ribbon:focus-visible { text-decoration: underline; }
.card.training h2 .pill { margin-left: 8px; vertical-align: 2px; }

/* ---- courses (Payroll_219): pictogram grid, quiz pictures, the marked quiz ---- */
.ghs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 10px 0; }
.ghs-grid figure { margin: 0; display: flex; gap: 10px; align-items: flex-start; }
.ghs-grid img { width: 72px; height: 72px; flex: none; }
.ghs-grid figcaption { font-size: 14px; }
.quiz-img { display: block; width: 96px; height: 96px; margin: 6px 0; }
.quiz ol, .quiz-review { padding-left: 22px; }
.quiz li, .quiz-review li { margin-bottom: 14px; }
.quiz-review li.wrong { border-left: 4px solid var(--bad); padding-left: 10px; }
.quiz-review li.right { border-left: 4px solid var(--ok); padding-left: 10px; }
.lesson h3 { margin-top: 14px; }
/* Payroll_252 (revised WHMIS course): tables, and the hazard classes folded under each pictogram */
.lesson table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.lesson th, .lesson td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.lesson details { margin-top: 4px; }
.lesson details summary { cursor: pointer; }
.lesson .hazard-classes { font-size: 13px; margin: 4px 0 0; }
.quiz legend .pill, .quiz-review .pill { margin-left: 8px; }

/* Edit a Done receipt until it is matched (23-Oct-2026) */
details.edit { margin: -4px 0 10px 44px; }
details.edit summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; padding: 2px 0; }
details.edit[open] summary { margin-bottom: 8px; }

/* ---- Ask Sid (24-Oct-2026): a chat on a phone; Talk back reads answers aloud ---- */
.sid-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sid-talk { display: flex; align-items: center; gap: 6px; white-space: nowrap; padding-top: 6px; font-weight: 600; }
.sid-talk input { width: 20px; height: 20px; }
.sid-chat { min-height: 240px; max-height: 60vh; overflow-y: auto; align-content: start; gap: 8px; }
.sid-msg { padding: 8px 12px; border-radius: 14px; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; }
.sid-bot { background: var(--sunk); border: 1px solid var(--line); justify-self: start; }
/* Sid's bar chart (the UK sales by month, 30-Oct-2026) */
.sid-chart { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); justify-self: stretch; }
.sid-chart figcaption { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.sid-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; height: 150px; align-items: end; }
.sid-bar { display: grid; grid-template-rows: 1fr auto; height: 100%; cursor: pointer; min-width: 0; }
.sid-bar .fill { align-self: end; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.sid-bar.partial .fill { opacity: .45; }
.sid-bar .sid-stack { align-self: end; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 2px; }
.sid-bar.partial .sid-stack { opacity: .55; }
.sid-bar .sid-stack > span { display: block; width: 100%; min-height: 0; }
.sid-bar .sid-stack > span + span { box-shadow: 0 1px 0 var(--surface); }
.sid-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.sid-key li { display: flex; align-items: center; gap: 5px; }
.sid-key i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sid-bar .lab { font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; padding-top: 3px; }
.sid-chart-tip { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.sid-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sid-table td { padding: 3px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sid-table td.n { text-align: right; white-space: nowrap; color: var(--muted); }
.sid-table tr.head td { font-weight: 700; padding-top: 10px; color: var(--fg); }
.sid-table tr.sub td { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 6px; }
.sid-open { justify-self: start; text-decoration: none; }
.sid-me { background: var(--brand); color: var(--brand-ink); justify-self: end; }
.sid-form { display: flex; gap: 8px; }
.sid-form input { flex: 1; min-width: 0; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); }
.sid-confirm { border-color: var(--sun); background: var(--sun-soft); }
.sid-confirm input { font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); width: 10em; }
.sid-status { margin: 0; padding: 8px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-weight: 600; }

/* ---- course photos (26-Oct-2026): real places and products at Duff Drive in a lesson ---- */
.lesson-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 10px 0; }
.lesson-photos figure { margin: 0; }
.lesson-photos img { width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); display: block; }
.lesson-photos figcaption { font-size: 14px; margin-top: 6px; }

/* One more photo of a receipt (Payroll_239) */
.more-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 14px; }
.more-photo p { flex-basis: 100%; margin: 0; }
.more-photo form { margin: 0; }
.more-photo .snap-alt { display: inline; margin: 0 0 0 10px; }

/* ---- counter POs (Payroll_240) ---- */
.snap-pair { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.snap-pair .snap-btn { font-size: 16px; gap: 6px; padding-left: 12px; padding-right: 12px; text-decoration: none; white-space: nowrap; }
.snap-pair .snap-btn svg { width: 22px; height: 22px; }
.po-vendors { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0; }
.po-vendor { min-height: 52px; white-space: normal; text-align: center; overflow-wrap: anywhere; flex-direction: column; gap: 2px; }
.po-where { display: block; font-size: 13px; font-weight: 400; opacity: .8; }
.po-first { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, rgba(0,0,0,.1)); }
.po-find { display: flex; gap: 8px; margin: 0; }
.po-find input { flex: 1; font-size: 16px; }
.po-lines summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.po-other { min-width: 0; }
.po-other[open] { grid-column: 1 / -1; display: grid; gap: 12px; }
.po-other summary { list-style: none; cursor: pointer; display: grid; place-items: center; }
.po-other summary::-webkit-details-marker { display: none; }
.po-other[open] summary { background: var(--surface); border-color: var(--brand); color: var(--brand); }
.po-other-body { grid-column: 1 / -1; display: grid; gap: 12px; padding-top: 4px; }
.po-nopo { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--fg); font-size: 14px; }
.po-head { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: start; }
.po-number { grid-column: 1 / -1; font-size: 40px; font-weight: 800; letter-spacing: .02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.po-number.waiting { font-size: 20px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.po-vendor-name { display: grid; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.po-vendor-name .s { font-size: 13px; font-weight: 400; color: var(--muted); }
.po-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: po-spin 1s linear infinite; flex: none; }
@keyframes po-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .po-spin { animation: none; } }
.po-snap { margin: 0; }
.po-photos { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.po-lines table { width: 100%; font-size: 14px; }
.po-lines td, .po-lines th { overflow-wrap: anywhere; }
.po-lines .num { text-align: right; white-space: nowrap; }
.po-setvendor { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.po-setvendor p { margin: 0; }
.po details.po-cancel { margin: 2px 0 10px; }
.answer .still { margin: 8px 0 4px; font-size: 15px; }
/* Help (28-Oct-2026) */
.help-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; }
.help h2 { margin-bottom: 2px; }
.help .who { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.help ul { margin: 0; padding-left: 20px; }
.help li { margin: 6px 0; line-height: 1.45; }
/* The box a receipt is still waiting on (11-Nov-2026) */
.field.need label { color: var(--bad); }
.field.need input, .field.need select { border: 2px solid var(--bad); background: var(--bad-soft); }
.field .card-new { margin-top: 6px; }
.field.need .card-new { border: 1px solid var(--line, #ccc); background: inherit; }

/* Benny Office on the web: the sub-menu above every Office page */
.office-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.office-tabs .chip { text-decoration: none; }
.office-tabs .chip[aria-current="page"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.card > h2 form { margin: 0; }
/* The fixed-asset register (Payroll_280): notes box, the photo grid, the "for Odoo" tick */
textarea.box { width: 100%; min-width: 0; min-height: 90px; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px;
               padding: 11px 12px; font: inherit; font-size: 16px; color: inherit; resize: vertical; }
textarea.box:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.asset-row { text-decoration: none; color: inherit; }
.asset-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--sunk); flex: none; }
.asset-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.asset-photo { display: grid; gap: 6px; align-content: start; min-width: 0; }
.asset-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--sunk); display: block; }
.asset-photo .doc { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; background: var(--sunk); color: var(--muted); font-size: 13px; }
.asset-photo form { margin: 0; }
.asset-photo .btn.small { width: 100%; }
.grow { flex: 1; }
/* Benny HR person file: small headings inside a card, and the fold-open forms */
.sub-h { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
details[open] > summary { margin-bottom: 8px; }
.link-row { text-decoration: none; color: inherit; }

/* Benny HR: the one country filter, in the top bar */
.country-pick select { padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--brand); font-weight: 600; font-size: 14px; }

/* ---- What we owe you (UK, Payroll_285): receipts + mileage = total ---- */
.owed-sum { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.owed-part { flex: 1 1 120px; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--sunk); color: var(--fg); text-decoration: none; min-width: 0; }
a.owed-part:hover { border-color: var(--brand); }
.owed-part b { font-size: 22px; font-weight: 700; }
.owed-part .s { font-size: 13px; color: var(--muted); }
.owed-part.total { background: var(--brand-soft); border-color: var(--brand); }
.owed-part.total b { color: var(--brand); }
.owed-op { align-self: center; font-size: 22px; font-weight: 700; color: var(--muted); }
@media (max-width: 480px) { .owed-op { flex-basis: 100%; text-align: center; line-height: 1; } }
.form.dates { margin-top: 8px; }
.total-row { border-top: 2px solid var(--line); }
.compare .num { text-align: right; white-space: nowrap; }
