:root {
  color-scheme: dark;
  /* Fresh Audio: black & white, taken from the 2026 wave artwork */
  --ink: #000000;
  --paper: #ffffff;
  --bg: #000000;
  --panel: #0d0d0d;
  --panel-2: #161616;
  --panel-3: #1e1e1e;
  --line: #262626;
  --line-2: #3b3b3b;
  --text: #ffffff;
  --muted: #a6a6a6;
  --faint: #6e6e6e;
  --accent: #ffffff;
  --accent-ink: #000000;
  /* status (semantic, used with a label) */
  --sub: #ffb347;      /* submitted */
  --ok: #43d9a0;       /* approved */
  --inv: #82b9ff;      /* invoiced */
  --ret: #ff9f6b;      /* returned */
  --bad: #ff7a7a;
  /* day types (validated categorical set on the black surface) */
  --t-shoot: #3987e5;
  --t-travel: #d95926;
  --t-recce: #199e70;
  --t-office: #c98500;
  --t-rest: #d55181;
  --f-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--f-body); font-size: 15px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent; min-height: 100vh;
}
body.lock, body.splash-on { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- Poster (splash + sign in) ---------- */
.poster { position: fixed; inset: 0; background: var(--ink); color: var(--paper); overflow: hidden; }
.poster-type { position: relative; margin: 0; font-family: var(--f-display); line-height: .86; text-transform: uppercase; color: var(--paper); }
.poster-type b { display: block; font-weight: 700; font-size: clamp(64px, 19vw, 132px); letter-spacing: -.005em; }
.poster-type i { display: block; font-style: normal; font-weight: 200; font-size: clamp(56px, 17vw, 118px); margin-top: .1em; letter-spacing: .01em; }
.splash { position: fixed; inset: 0; z-index: 200; background: #000; transition: opacity .45s ease, visibility .45s; }
.splash { display: grid; align-content: center; padding: 0 max(28px, 12vw) 8vh; }
.splash .poster-type b { font-size: clamp(76px, 24vw, 170px); }
.splash .poster-type i { font-size: clamp(66px, 21vw, 150px); margin-top: .12em; }
.splash.leaving { opacity: 0; visibility: hidden; }

.login { position: fixed; overflow-y: auto; }
.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 440px; display: grid; gap: 12px;
  padding: calc(max(36px, 9vh) + var(--safe-t)) max(24px, 10vw) calc(28px + var(--safe-b)); animation: fade .5s ease-out both;
}
.login-card .poster-type { margin-bottom: 6px; }
.login-card .poster-type b { font-size: clamp(56px, 16vw, 112px); }
.login-card .poster-type i { font-size: clamp(48px, 14vw, 100px); }
.login-sub { margin: 0 0 10px; color: #cfcfcf; font-size: 16px; justify-self: start; background: #000; padding: 2px 6px 2px 0; }
.login-card .btn { width: 100%; }
.btn.google { background: #fff; color: #111; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 2px solid #000; }
.btn.google svg { width: 22px; height: 22px; }
.demo-login { width: 100%; display: grid; gap: 10px; margin-top: 6px; }
.demo-login .btn.ghost { background: #000; border-color: #fff; }
.login-note { margin: 0; font-size: 13px; color: #cfcfcf; justify-self: start; background: #000; padding: 2px 6px 2px 0; }
.login-note:empty { display: none; }
.login-err { margin: 0; padding: 10px 14px; border-radius: 4px; background: #000; border: 1px solid var(--bad); color: #ffd0d0; font-size: 14px; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; padding-bottom: calc(76px + var(--safe-b)); }
.bar {
  position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: rgba(0,0,0,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bar-wm { flex: none; font: 700 15px/.84 var(--f-display); text-transform: uppercase; letter-spacing: .01em; padding: 6px 8px 5px; background: #fff; color: #000; }
.bar-title { margin: 0; font: 700 22px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.bar-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-r { display: flex; align-items: center; gap: 8px; }
.sync { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.sync.off i { background: var(--sub); }
.sync.demo i { background: var(--inv); }
.avatar {
  appearance: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2) center/cover no-repeat;
  cursor: pointer; font: 700 16px var(--f-display); letter-spacing: .04em; color: var(--text); padding: 0;
}
.demo-banner { margin: 12px 16px 0; padding: 9px 14px; font-size: 13px; background: #111; border: 1px dashed var(--line-2); color: var(--muted); }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around;
  padding: 6px 6px calc(6px + var(--safe-b)); background: rgba(0,0,0,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab {
  appearance: none; border: 0; background: transparent; color: var(--faint); cursor: pointer; flex: 1 1 0; min-width: 0;
  display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 4px; font: 600 11px var(--f-body); letter-spacing: .04em;
  position: relative;
}
.tab svg { width: 23px; height: 23px; }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"] svg { stroke-width: 2.4; }
.tab .badge { position: absolute; top: 2px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 4px; background: var(--sub); color: #241400; font: 600 11px/18px var(--f-mono); }
@media (min-width: 860px) {
  .shell { padding-bottom: 32px; }
  .tabs { position: sticky; top: calc(61px + var(--safe-t)); bottom: auto; justify-content: flex-start; gap: 4px; padding: 8px 16px; border-top: 0; border-bottom: 1px solid var(--line); }
  .tab { flex: none; display: inline-flex; gap: 8px; padding: 9px 14px; font-size: 14px; }
  .tab svg { width: 18px; height: 18px; }
  .tab[aria-current="page"] { background: var(--panel-2); }
  .tab .badge { position: static; }
}
.page { max-width: 1120px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; animation: fade .25s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* ---------- Building blocks ---------- */
h2.sec { margin: 6px 0 0; font: 700 20px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } }
.stat { min-width: 0; }
.stat b { display: block; font: 700 clamp(22px, 6.6vw, 34px)/1 var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat span { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat.sub b { color: var(--sub); } .stat.ok b { color: var(--ok); } .stat.inv b { color: var(--inv); } .stat.acc b { color: var(--accent); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

.btn {
  appearance: none; border: 0; border-radius: 4px; min-height: 50px; padding: 0 18px; cursor: pointer;
  font: 600 16px var(--f-body); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.07); }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); }
.btn.ok { background: var(--ok); color: #03170f; }
.btn.inv { background: var(--inv); color: #04142a; }
.btn.danger { background: transparent; border: 1px solid rgba(255,122,122,.5); color: var(--bad); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 4px; }
.btn.xs { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: 4px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.big { width: 100%; min-height: 58px; font-size: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none; cursor: pointer; min-height: 38px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--muted); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 7px;
}
.chip .n { font: 500 12px var(--f-mono); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font: 600 11px/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; white-space: nowrap; }
.pill svg { width: 12px; height: 12px; }
.pill.submitted { color: var(--sub); } .pill.approved { color: var(--ok); } .pill.invoiced { color: var(--inv); } .pill.returned { color: var(--ret); }

/* Entry list */
.week { display: grid; gap: 8px; }
.week-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px; }
.week-h b { font: 600 15px var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.week-h span { font: 400 12px var(--f-mono); color: var(--faint); }
.entry {
  appearance: none; width: 100%; text-align: left; cursor: pointer; color: inherit; display: grid; grid-template-columns: 54px minmax(0,1fr) auto;
  gap: 12px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
}
.entry:hover { border-color: var(--line-2); background: #1a1a1a; }
.entry.returned { border-color: rgba(255,159,107,.55); }
.e-date { display: grid; justify-items: center; line-height: 1; padding: 6px 0; border-radius: 4px; background: var(--panel-2); }
.e-date small { font: 600 10.5px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.e-date b { font: 700 24px/1.05 var(--f-display); }
.e-mid { min-width: 0; display: grid; gap: 3px; }
.e-job { font: 600 17px/1.15 var(--f-display); letter-spacing: .03em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-meta .mono { font-size: 12px; }
.e-note { font-size: 12.5px; color: var(--ret); }
.e-right { display: grid; justify-items: end; gap: 6px; }
.e-hrs { font: 700 22px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.e-hrs small { font: 500 12px var(--f-body); color: var(--sub); margin-left: 4px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 6px; }

/* Filters */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.f { display: grid; gap: 5px; min-width: 0; }
.f > span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.f .txt { height: 44px; font-size: 15px; padding: 0 12px; }

/* Forms */
.txt {
  width: 100%; height: 52px; padding: 0 14px; font-size: 17px; background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 4px; min-width: 0;
}
.txt::placeholder { color: var(--faint); }
.txt[type="date"], .txt[type="time"] { -webkit-appearance: none; appearance: none; text-align: left; }
textarea.txt { height: auto; min-height: 84px; padding: 12px 14px; font-size: 16px; resize: vertical; line-height: 1.35; }
select.txt { padding-right: 8px; }
.field { display: grid; gap: 7px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend, .lbl { padding: 0; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 420px) { .four { grid-template-columns: 1fr 1fr; } }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.hint.warn { color: var(--sub); }
.hint.bad { color: var(--bad); }
.fs { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.015); }
.fs-h { margin: 0; display: flex; align-items: center; gap: 8px; font: 700 17px var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.fs-h svg { width: 18px; height: 18px; }
.calc { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; border-radius: 4px; background: var(--panel-3); font-size: 13.5px; }
.calc b { font-family: var(--f-mono); font-weight: 500; }
.auto-tag { font: 600 10px var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-left: 6px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opt { position: relative; display: block; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt span {
  min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px; text-align: center;
  border: 1px solid var(--line-2); border-radius: 4px; background: var(--panel-2); color: var(--muted); font-size: 14px; font-weight: 500;
}
.opt input:checked + span { color: #000; border-color: #fff; background: #fff; }
.opt input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.kit-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.kit-grid .opt span { min-height: 38px; padding: 0 12px; font-size: 13.5px; border-radius: 999px; }

.exp { display: grid; grid-template-columns: minmax(0,1fr) 110px; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--panel-2); }
.exp .txt { height: 44px; font-size: 15px; background: var(--panel); }
.exp .full { grid-column: 1 / -1; }
.exp-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.exp-foot select { width: auto; flex: 1 1 120px; }
.rc-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line-2); cursor: zoom-in; }

.lockbox { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 6px; background: rgba(130,185,255,.1); border: 1px solid rgba(130,185,255,.4); color: #d6e7ff; font-size: 14px; }
.lockbox svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.lockbox.ret { background: rgba(255,159,107,.1); border-color: rgba(255,159,107,.45); color: #ffe0cf; }

/* Detail list */
.facts { margin: 0; border: 1px solid var(--line); border-radius: 4px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* Sheet */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(2,8,10,.7); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 620px; max-height: 94%; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 8px 8px 0 0; padding: 18px 16px 0; animation: rise .22s ease-out; -webkit-overflow-scrolling: touch;
}
.sheet form, .sheet .sheet-body { display: grid; gap: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.eyebrow { margin: 0 0 4px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sheet h2 { margin: 0; font: 700 30px/1 var(--f-display); letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.x { appearance: none; flex: none; border: 1px solid var(--line-2); background: transparent; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; color: var(--muted); }
.actions { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; background: var(--panel); padding: 12px 0 calc(16px + var(--safe-b)); box-shadow: 0 -14px 12px -6px var(--panel); }
.actions.one { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: 8px; border-bottom: 1px solid var(--line-2); padding: 22px 22px 0; }
}
@media (max-width: 639px) {
  .scrim { align-items: flex-start; padding: calc(8px + var(--safe-t)) 8px calc(8px + var(--safe-b)); }
  .sheet { max-height: 100%; border: 1px solid var(--line-2); border-radius: 8px; }
}

/* Tables */
.twrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
table.t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
.t th, .t td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.t thead th { font: 600 11px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); position: sticky; top: 0; }
.t .n { text-align: right; font-family: var(--f-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.t thead .n { font-family: var(--f-body); }
.t tfoot td, .t tfoot th { background: var(--panel-2); font-weight: 600; border-bottom: 0; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: #1a1a1a; }
.t td.wrap { white-space: normal; min-width: 160px; }
.t input[type="checkbox"], .cbx { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.t input.cost { width: 96px; height: 36px; font-size: 14px; padding: 0 8px; text-align: right; font-family: var(--f-mono); }

.group { display: grid; gap: 10px; }
.group-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.group-h h3 { margin: 0; font: 700 20px/1.1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
.group-h .jn { font: 500 13px var(--f-mono); color: var(--text); background: var(--panel-3); padding: 2px 6px; }
.group-h .cl { color: var(--muted); font-size: 13.5px; }
.who-tot { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.who { padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel-2); font-size: 13px; display: grid; gap: 3px; }
.who b { font: 600 16px var(--f-display); letter-spacing: .04em; text-transform: uppercase; }

/* Approval cards */
.ap { display: grid; gap: 10px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.ap-top { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: start; }
.ap-top .cbx { margin-top: 4px; }
.ap-name { font: 700 18px/1.1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
.ap-sub { font-size: 13px; color: var(--muted); }
.ap-cost { display: grid; justify-items: end; gap: 4px; }
.ap-cost .lbl { font-size: 10.5px; }
.ap-cost input { width: 108px; height: 40px; text-align: right; font: 500 16px var(--f-mono); }
.ap-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 8px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); font: 500 12px var(--f-mono); color: var(--muted); }
.tag.hot { color: var(--sub); border-color: rgba(255,179,71,.45); }
.ap-act { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.selbar {
  position: sticky; bottom: calc(76px + var(--safe-b)); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 10px 12px; border-radius: 6px; background: #000; border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.selbar { border-color: #fff; }
.selbar b { font: 700 18px var(--f-display); letter-spacing: .05em; }
@media (min-width: 860px) { .selbar { bottom: 16px; } }

.list { display: grid; gap: 8px; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.li-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.li-main b { font: 600 17px/1.15 var(--f-display); letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.li-main small { color: var(--muted); font-size: 12.5px; }
.li.off { opacity: .5; }
.ph { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-3) center/cover; flex: none; display: grid; place-items: center; font: 700 15px var(--f-display); }

.subtabs { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
.subtab { appearance: none; border: 0; background: transparent; color: var(--muted); min-height: 40px; padding: 0 14px; border-radius: 4px; cursor: pointer; font: 600 16px var(--f-display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; flex: 1; }
.subtab[aria-selected="true"] { background: var(--text); color: var(--bg); }

.toast {
  position: fixed; left: 50%; top: calc(14px + var(--safe-t)); z-index: 300; transform: translate(-50%, -12px); max-width: min(92vw, 440px);
  padding: 12px 18px; background: #f1f7f8; color: #07161b; border-radius: 6px; font-weight: 500; text-align: center; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.lb { position: fixed; inset: 0; z-index: 250; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 16px; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Printable invoice sheet */
.print-only { display: none; }
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11px; }
  .bar, .tabs, .demo-banner, .no-print, .selbar, .toast, .scrim { display: none !important; }
  .shell { padding: 0; }
  .page { padding: 0; max-width: none; }
  .print-only { display: block; }
  .card, .twrap, .who { background: #fff; border-color: #ccc; }
  .t th, .t td { border-color: #ddd; color: #000; background: #fff !important; padding: 4px 6px; }
  .group { break-inside: avoid; }
  .muted, .cl, .group-h .jn { color: #444 !important; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- Day types ---------- */
.dt { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dt::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--dt, var(--faint)); }
.dt-shoot { --dt: var(--t-shoot); } .dt-travel { --dt: var(--t-travel); } .dt-recce { --dt: var(--t-recce); } .dt-office { --dt: var(--t-office); } .dt-rest { --dt: var(--t-rest); }
.seg.types { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.seg.types .opt span { flex-direction: column; gap: 6px; min-height: 58px; font: 700 15px var(--f-display); letter-spacing: .06em; text-transform: uppercase; padding: 6px 2px; }
.seg.types .opt span::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--dt); }
.e-date { position: relative; }
.e-date::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; background: var(--dt, transparent); }

/* ---------- Leaderboard ---------- */
.lb-hero { position: relative; background: #000; border: 1px solid var(--line); padding: 18px; }
.lb-hero .poster-type { position: static; }
.lb-hero .poster-type b { font-size: 48px; }
.lb-hero .poster-type i { font-size: 40px; margin-top: .06em; }
@media (min-width: 700px) { .lb-hero { padding: 26px 32px; } .lb-hero .poster-type b { font-size: 64px; } .lb-hero .poster-type i { font-size: 54px; } }
.lb-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-legend .chip { color: var(--text); }
.lb-legend .chip[aria-pressed="true"] { color: #000; }
.lb-tot.worked .dt::before { display: none; }
.lb-legend .chip i { width: 10px; height: 10px; border-radius: 2px; background: var(--dt, #fff); flex: none; }
.lb-legend .chip[aria-pressed="true"] i { outline: 1px solid #000; }
.lb-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 700px) { .lb-totals { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.lb-tot { background: var(--panel); padding: 12px; display: grid; gap: 4px; min-width: 0; }
.lb-tot b { font: 700 34px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.lb-tot .dt { font-size: 10.5px; }
.lb-tot.worked { background: #fff; color: #000; }
.lb-tot.worked .dt { color: #000; }
.lb-me { padding: 12px 14px; border: 1px solid #fff; font-size: 15px; }
.lb-me b { font-family: var(--f-display); font-size: 20px; letter-spacing: .03em; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-row { display: grid; grid-template-columns: 44px 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); }
.lb-row.me { border-color: #fff; }
.lb-row.top1 { background: #fff; color: #000; border-color: #fff; }
.lb-row.top1 small, .lb-row.top1 .lb-sub { color: #444; }
.lb-row.top1 .ph { background-color: #000; color: #fff; }
.lb-rank { font: 200 40px/1 var(--f-display); text-align: center; font-variant-numeric: tabular-nums; }
.lb-row.top1 .lb-rank, .lb-row.top2 .lb-rank, .lb-row.top3 .lb-rank { font-weight: 700; }
.lb-main { display: grid; gap: 6px; min-width: 0; }
.lb-main > b { font: 700 19px/1.05 var(--f-display); letter-spacing: .03em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-sub { font-size: 12px; color: var(--muted); }
.mix { display: flex; gap: 2px; height: 10px; }
.mix span { display: block; height: 100%; background: var(--dt); min-width: 3px; }
.mix span:first-child { border-radius: 2px 0 0 2px; } .mix span:last-child { border-radius: 0 2px 2px 0; }
.lb-num { display: grid; justify-items: end; line-height: 1; }
.lb-num b { font: 700 40px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.lb-num small { margin-top: 3px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.lb-row.zero { opacity: .55; }
@media (max-width: 420px) { .lb-row { grid-template-columns: 30px 34px minmax(0, 1fr) auto; gap: 10px; padding: 10px; } .lb-rank { font-size: 30px; } .lb-num b { font-size: 34px; } .ph { width: 34px; height: 34px; } }

/* ---------- Invoicing cards & payroll ticks ---------- */
.ap-pills { display: grid; justify-items: end; gap: 6px; }
.ap.locked { border-style: dashed; }
.tick {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 10px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-2); border-radius: 4px; font: 600 14px var(--f-body); color: var(--text);
}
.tick input { width: 24px; height: 24px; margin: 0; accent-color: var(--ok); cursor: pointer; }
.tick:has(input:checked) { border-color: var(--ok); color: var(--ok); }
.ap.pr.done { border-color: rgba(67,217,160,.35); }
@media (max-width: 480px) {
  .ap.pr .ap-top { grid-template-columns: minmax(0, 1fr) auto; }
  .ap.pr .tick { grid-column: 1 / -1; justify-self: start; }
}
