:root {
  --bg: oklch(0.15 0.014 255);
  --surface: oklch(0.205 0.014 255);
  --surface-2: oklch(0.27 0.016 255);
  --surface-3: oklch(0.32 0.017 255);
  --border: oklch(0.34 0.014 255);
  --text: oklch(0.95 0.006 255);
  --text-dim: oklch(0.66 0.012 255);
  --accent: oklch(0.78 0.15 75);
  --accent-ink: oklch(0.22 0.05 75);
  --good: oklch(0.72 0.13 155);
  --good-ink: oklch(0.18 0.05 155);
  --bad: oklch(0.68 0.17 25);
  --bad-ink: oklch(0.99 0.01 25);
  --warn: oklch(0.82 0.16 95);
  --warn-ink: oklch(0.26 0.06 95);
  --info: oklch(0.78 0.13 240);
  --info-ink: oklch(0.22 0.05 240);
  --tag-coffee-bg: oklch(0.8 0.1 55);
  --tag-coffee-ink: oklch(0.24 0.06 55);
  --tag-woolies-bg: oklch(0.78 0.1 150);
  --tag-woolies-ink: oklch(0.22 0.05 150);
  --tag-jrpack-bg: oklch(0.8 0.09 300);
  --tag-jrpack-ink: oklch(0.24 0.05 300);
  --tag-brasco-bg: oklch(0.8 0.09 15);
  --tag-brasco-ink: oklch(0.22 0.05 15);
  --tag-boxes-bg: oklch(0.8 0.08 190);
  --tag-boxes-ink: oklch(0.22 0.05 190);
  --tag-starch-bg: oklch(0.8 0.09 230);
  --tag-starch-ink: oklch(0.22 0.05 230);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, .num { font-family: 'Space Grotesk', system-ui, sans-serif; }
a { color: var(--accent); }
a:hover { color: oklch(0.85 0.15 75); }
button, input, select, textarea { font-family: inherit; font-size: 15px; }
input, select, textarea {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button { cursor: pointer; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 20px 20px 48px; }

.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.card + .card { margin-top: 10px; }

/* Whole-tile status tint for shift cards — deliberately the card's own
   background, not another colour chip, since the client tag already
   owns that visual language. Subtle enough that text/tags on top stay
   readable either theme. */
.card.status-completed { background: color-mix(in oklab, var(--good) 20%, var(--surface)); border-color: color-mix(in oklab, var(--good) 45%, var(--border)); }
.card.status-upcoming { background: color-mix(in oklab, var(--warn) 20%, var(--surface)); border-color: color-mix(in oklab, var(--warn) 45%, var(--border)); }
.card.status-unapproved { background: color-mix(in oklab, var(--bad) 20%, var(--surface)); border-color: color-mix(in oklab, var(--bad) 45%, var(--border)); }

.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 8px; }
.dim { color: var(--text-dim); }
.small { font-size: 12.5px; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.btn {
  border: none; border-radius: 11px; padding: 13px 16px; font-weight: 700;
  font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 14px;
  background: var(--accent); color: var(--accent-ink);
  min-height: 44px;
}
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.good { background: var(--good); color: var(--good-ink); }
.btn.bad { background: var(--bad); color: var(--bad-ink); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.icon { min-width: 44px; padding: 10px; border-radius: 10px; }

.tag {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 5px 9px; border-radius: 7px; display: inline-block;
}
.tag.starch { background: var(--tag-starch-bg); color: var(--tag-starch-ink); }
.tag.coffee { background: var(--tag-coffee-bg); color: var(--tag-coffee-ink); }
.tag.woolies { background: var(--tag-woolies-bg); color: var(--tag-woolies-ink); }
.tag.jrpack { background: var(--tag-jrpack-bg); color: var(--tag-jrpack-ink); }
.tag.brasco { background: var(--tag-brasco-bg); color: var(--tag-brasco-ink); }
.tag.boxes { background: var(--tag-boxes-bg); color: var(--tag-boxes-ink); }

.pill-status { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 20px; }
.pill-status.pending { background: var(--surface-3); color: var(--text-dim); }
.pill-status.approved, .pill-status.sent { background: var(--good); color: var(--good-ink); }
.pill-status.rejected { background: var(--bad); color: var(--bad-ink); }
.pill-status.due { background: var(--warn); color: var(--warn-ink); }
.pill-status.payin { background: var(--info); color: var(--info-ink); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.tabs button {
  flex: 1 1 30%; text-align: center; padding: 9px 4px; border-radius: 9px; border: none;
  font-size: 12.5px; font-weight: 600; background: transparent; color: var(--text-dim);
}
.tabs button.active { background: var(--accent); color: var(--accent-ink); }

/* Tab-bar badge — a pending-action count, not a status colour, so it
   stays a plain outlined circle regardless of which tab it's on. */
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 3px; margin-left: 4px;
  border-radius: 999px; border: 1.5px solid var(--warn);
  color: #fff; font-size: 9.5px; font-weight: 700; line-height: 1;
  vertical-align: middle;
}

/* Reusable collapsible section — one header button + chevron, used for
   the grouped nav's sub-content, tucked-away pallet-checkpoint inputs,
   and the split-out Requests sections. */
.collapsible-header {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex;
  align-items: center; gap: 10px; width: 100%;
}
.collapsible-chevron { color: var(--text-dim); flex-shrink: 0; transition: transform .15s; }
.collapsible-chevron.open { transform: rotate(180deg); }
.collapsible-body { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .collapsible-chevron { transition: none; } }

input[type="range"] { accent-color: var(--accent); width: 100%; padding: 0; background: transparent; border: none; }

.header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.header h1 { margin: 0; font-size: 19px; font-weight: 700; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  font-weight: 600; color: var(--accent); flex-shrink: 0; border: none;
}

.field label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 6px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: transparent; color: var(--text-dim);
  border-radius: 9px; padding: 8px 10px; font-size: 12.5px; font-weight: 600; min-height: 40px;
}
.chip.selected { border-color: var(--accent); background: var(--surface-2); color: var(--accent); }

.error-banner {
  background: oklch(0.3 0.1 25); color: oklch(0.95 0.02 25); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 14px;
  animation: error-banner-fade 6s ease-in forwards;
}
@keyframes error-banner-fade {
  0%, 75% { opacity: 1; }
  100% { opacity: 0; }
}
.empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 24px 0; }

.crew-list { display: flex; flex-direction: column; gap: 8px; }

.spinner { text-align: center; color: var(--text-dim); padding: 40px 0; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; width: 100%; max-width: 320px;
}

.busy-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .25);
  display: flex; align-items: center; justify-content: center; cursor: wait;
}

/* Default loading animation — the DockSplit wordmark (same Space
   Grotesk treatment as the login screen's own h1) sitting still, with
   a ring spinning around it. */
.brand-loader {
  position: relative; width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.brand-loader::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--surface-3);
}
.brand-loader::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent);
  animation: brand-spin .9s linear infinite;
}
.brand-loader .mark {
  font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700;
  font-size: 14px; letter-spacing: -0.01em; color: var(--text); text-align: center;
}
@keyframes brand-spin { to { transform: rotate(360deg); } }

/* Day split — slider popup (Pay > Review) + Pay > Allocation bars */
.split-popup {
  position: fixed; left: 50%; top: 12px; z-index: 200;
  width: min(440px, calc(100vw - 32px)); max-height: 70vh; overflow: hidden;
  background: var(--surface); border: 1px solid var(--accent); border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  pointer-events: none; opacity: 0; transform: translate(-50%, -8px);
  transition: opacity .12s, transform .12s;
}
.split-popup.at-bottom { top: auto; bottom: 12px; transform: translate(-50%, 8px); }
.split-popup.show { opacity: 1; transform: translate(-50%, 0); }
.split-row { display: grid; grid-template-columns: minmax(0, 7.5em) 1fr 3em 5.5em; align-items: center; gap: 8px; font-size: 13px; }
.split-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-track { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.split-fill { display: block; height: 100%; border-radius: 4px; background: var(--info); transition: width .08s; }
.split-pct { text-align: right; color: var(--text-dim); }
.split-amt { text-align: right; font-weight: 700; }
.split-row.active { margin: 0 -8px 4px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.split-row.active .split-name { font-weight: 700; color: var(--accent); }
.split-row.active .split-fill { background: var(--accent); }
.split-row.active .split-pct { color: var(--text); }
.alloc-input {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 0 10px;
  font-size: 12px; color: var(--text-dim);
}
.alloc-input:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
.alloc-input input { border: 0; background: transparent; padding: 9px 0; font-size: 13px; min-width: 0; outline: none; }

/* Undo bar for pay split/bonus edits — pinned to the bottom of the Pay tab */
.undo-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 150;
  width: min(448px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.undo-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#app { padding-bottom: 110px; }

/* Day totals (Pay > Allocation) — balance status + hold-to-edit totals */
.balance-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.balance-pill.ok { background: var(--surface-3); color: var(--text); }
.balance-pill.under { background: var(--good); color: var(--good-ink); }
.balance-pill.over { background: var(--bad); color: var(--bad-ink); }
.holdable { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.holdable.edited { color: var(--accent); }

/* Pay > Review rework — tappable needs-review dates, Starch/Coffee pots */
.review-date {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 0; border-top: 1px solid var(--border);
}
.review-date:first-child { border-top: 0; }
.review-date.here { color: var(--accent); }
.pot { display: inline-block; margin-right: 10px; white-space: nowrap; }
.pot::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.pot.starch::before { background: var(--tag-starch-bg); }
.pot.coffee::before { background: var(--tag-coffee-bg); }
.section-label { font-size: 12px; font-weight: 600; color: var(--text-dim); margin: 4px 0 10px; }

/* Thumb-only sliders (see .slider-guard in app.js): taps on the track do
   nothing and vertical swipes scroll the page; only the handle drags. */
.slider-guard { flex: 1; min-width: 0; display: block; padding: 4px 0; touch-action: pan-y; cursor: default; }
.slider-guard input[type="range"] {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 22px;
  pointer-events: none; background: transparent; margin: 0;
}
.slider-guard input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
.slider-guard input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
.slider-guard input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent);
  transition: transform .1s;
}
.slider-guard input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent);
}
.slider-guard.dragging input[type="range"]::-webkit-slider-thumb { transform: scale(1.2); }
.slider-guard.dragging input[type="range"]::-moz-range-thumb { transform: scale(1.2); }

/* "Keep day balanced" switch on the Allocation day pool card */
.lock-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; flex-shrink: 0; user-select: none; }
.lock-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.lock-track { width: 34px; height: 20px; border-radius: 10px; background: var(--surface-3); position: relative; transition: background .15s; }
.lock-knob { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-dim); transition: transform .15s, background .15s; }
.lock-switch input:checked + .lock-track { background: var(--accent); }
.lock-switch input:checked + .lock-track .lock-knob { transform: translateX(14px); background: var(--accent-ink); }
.lock-switch input:focus-visible + .lock-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Per-container chips under each person (Review + Allocation) */
.ct-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ct-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.ct-chip b { font-weight: 700; }
.ct-chip.off { opacity: .6; text-decoration: line-through; }
.ct-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ct-dot.starch { background: var(--tag-starch-bg); }
.ct-dot.coffee { background: var(--tag-coffee-bg); }
.ct-dot.woolies { background: var(--tag-woolies-bg); }
.ct-dot.jrpack { background: var(--tag-jrpack-bg); }
.ct-dot.brasco { background: var(--tag-brasco-bg); }
.ct-dot.boxes { background: var(--tag-boxes-bg); }

/* Day payout (Review) / Day pool (Allocation) — the day's headline card,
   tinted blue so it never reads as just another person card */
.card.day-hero {
  background: linear-gradient(160deg, color-mix(in oklab, var(--info) 24%, var(--surface)) 0%, color-mix(in oklab, var(--info) 9%, var(--surface)) 100%);
  border: 1px solid color-mix(in oklab, var(--info) 60%, var(--border));
  box-shadow: 0 6px 24px color-mix(in oklab, var(--info) 14%, transparent);
}
.card.day-hero .dim { color: color-mix(in oklab, var(--info) 35%, var(--text-dim)); }
.card.day-hero .hero-num { font-size: 32px; }
.card.day-hero .btn.secondary { background: color-mix(in oklab, var(--info) 14%, var(--surface-2)); }
.card.day-hero .split-track { background: color-mix(in oklab, var(--info) 10%, var(--surface-3)); }
.card.day-hero .split-fill { background: var(--text); }

/* "Other dates needing review" — caution card (yellow/black), distinct
   from the blue day card and the plain person cards */
.card.needs-review {
  background: color-mix(in oklab, var(--warn) 12%, var(--surface));
  border: 1px solid var(--warn);
  border-left: 5px solid var(--warn);
  box-shadow: 0 6px 22px color-mix(in oklab, var(--warn) 12%, transparent);
}
.needs-review-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-size: 13px; font-weight: 700; color: var(--warn);
}
.card.needs-review .review-date { border-top-color: color-mix(in oklab, var(--warn) 30%, var(--border)); }
.card.needs-review .review-date svg { color: var(--warn); }
.unsaved-note { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--warn); }

/* Pay > Allocation > Containers */
.ct-section { margin-top: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.ct-section > .collapsible-body { margin-top: 10px; }
.ct-section-head { display: flex; align-items: baseline; gap: 8px; }
.ct-card { padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); }
.ct-card .collapsible-header { padding: 0; }
.ct-card > .collapsible-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.method-tag { font-weight: 600; }
.method-tag.pallets { color: var(--good); }
.method-tag.even { color: var(--info); }
.method-tag.manual, .method-tag.mixed { color: var(--warn); }
.ct-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.stepper button { all: unset; cursor: pointer; width: 34px; text-align: center; font-size: 18px; font-weight: 700; color: var(--text); }
.stepper button:active { background: var(--surface-3); }
.stepper input { width: 52px; border: 0; border-radius: 0; padding: 7px 4px; text-align: center; font-size: 14px; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.chip:disabled { opacity: .45; cursor: default; }

.timeline { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 10px 4px; }
.tl-row, .tl-axis { display: grid; grid-template-columns: 4.6em 1fr 4em; align-items: center; gap: 8px; }
.tl-row { height: 22px; font-size: 12px; }
.tl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); }
.tl-bar { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: var(--good); }
.tl-bar.partial { background: var(--warn); }
.tl-val { text-align: right; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.tl-row.off { opacity: .5; }
.tl-row.off .tl-bar { background: var(--bad); }
.tl-axis { height: 18px; font-size: 10.5px; color: var(--text-dim); }
.tl-ticks { position: relative; height: 100%; }
.tl-ticks span { position: absolute; top: 2px; transform: translateX(-50%); }

.wk-row { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.wk-row.off { opacity: .7; }
.pallet-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pallet-row label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-dim); }
.pallet-row input { width: 58px; padding: 6px 8px; font-size: 13px; }
.method-tag { white-space: nowrap; }
.pallet-row { flex-wrap: nowrap; }
.pallet-row label { white-space: nowrap; }
.pallet-row input { width: 50px; padding: 6px 6px; text-align: center; }
.pallet-row .chip { flex-shrink: 0; padding: 5px 9px; }

/* Payroll — week approval progress */
.card.payroll-week.open { border-color: var(--warn); border-left: 5px solid var(--warn); }
.card.payroll-week.final { border-color: var(--good); border-left: 5px solid var(--good); }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 12px; }
.ds-cell {
  all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 0 5px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11px; color: var(--text-dim);
}
button.ds-cell { cursor: pointer; }
.ds-cell .ds-date { font-size: 14px; font-weight: 700; color: var(--text); font-family: 'Space Grotesk', system-ui, sans-serif; }
.ds-cell .ds-mark { font-size: 11px; font-weight: 700; min-height: 14px; }
.ds-cell.none { opacity: .45; }
.ds-cell.approved { background: color-mix(in oklab, var(--good) 18%, var(--surface-2)); border-color: color-mix(in oklab, var(--good) 60%, var(--border)); }
.ds-cell.approved .ds-mark { color: var(--good); }
.ds-cell.pending { background: color-mix(in oklab, var(--warn) 18%, var(--surface-2)); border-color: var(--warn); }
.ds-cell.pending .ds-mark { color: var(--warn); }
.wk-summary { font-size: 12.5px; font-weight: 600; }
.wk-summary.ok { color: var(--good); }
.wk-summary.warn { color: var(--warn); }
.bucket-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card.payroll-row.pending { border-left: 4px solid var(--warn); }

/* Containers v2 — timeline rows are hold-to-edit; editor modal */
.locked-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 9px; font-size: 12px; color: var(--warn); background: color-mix(in oklab, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in oklab, var(--warn) 45%, var(--border)); }
.all-approved { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--good); padding: 6px 0; }
.holdable-row { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; border-radius: 6px; }
.holdable-row:active { background: var(--surface-2); }
.tl-row { height: 30px; }
.tl-track { height: 12px; border-radius: 6px; }
.tl-bar { border-radius: 6px; }
.tl-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.tl-dot.ok { background: var(--good); }
.tl-dot.changed { background: var(--warn); }

.pe-card { max-width: 400px; }
.pe-readout { display: flex; justify-content: space-between; margin: 18px 0 14px; font-size: 13px; color: var(--text-dim); }
.pe-readout b { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 20px; color: var(--text); margin-left: 4px; }
.pe-readout.off { opacity: .4; }
.pe-track { position: relative; height: 16px; margin: 0 13px; border-radius: 8px; background: var(--surface-3); touch-action: none; cursor: pointer; }
.pe-track::before { content: ''; position: absolute; inset: -14px -13px; } /* bigger touch target */
.pe-track.off { opacity: .35; pointer-events: none; }
.pe-fill { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: var(--good); }
.pe-handle {
  position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent), 0 2px 8px rgba(0,0,0,.4);
  pointer-events: none; transition: transform .1s;
}
.pe-track.dragging .pe-handle { transform: translate(-50%, -50%) scale(1.12); }
.pe-ticks { position: relative; height: 16px; margin: 8px 13px 0; font-size: 10.5px; color: var(--text-dim); }
.pe-ticks span { position: absolute; transform: translateX(-50%); }

/* Pallet bars coloured by pay status; $ for the container on the right */
.tl-row, .tl-axis { grid-template-columns: 4.6em 1fr 4.9em; }
.tl-row { height: 34px; }
.tl-bar.approved { background: var(--good); }
.tl-bar.pending { background: var(--info); }
.tl-bar.changed { background: var(--warn); }
.tl-bar.off { background: var(--bad); }
.tl-val { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.tl-money { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 12.5px; color: var(--text); }
.tl-pal { font-size: 10.5px; color: var(--text-dim); }
.tl-noshow { color: var(--bad); font-weight: 600; }

/* Settings — Android app install steps */
.install-steps { margin: 4px 0 0; padding-left: 20px; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.install-steps li { margin-bottom: 6px; }
.install-steps b { color: var(--text); }

/* Worker Pay — "upcoming payslip" caution note (same caution look as needs-review) */
.card.upcoming-payslip {
  margin-bottom: 12px;
  background: color-mix(in oklab, var(--warn) 12%, var(--surface));
  border: 1px solid var(--warn);
  border-left: 5px solid var(--warn);
}

/* Push notifications card + manager alert composer */
.push-on { font-size: 13px; font-weight: 700; color: var(--good); }
.push-note { font-size: 12.5px; line-height: 1.45; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); }
.push-note.warn { color: var(--warn); background: color-mix(in oklab, var(--warn) 10%, var(--surface)); border-color: color-mix(in oklab, var(--warn) 45%, var(--border)); }
.push-list { margin-top: 14px; border-top: 1px solid var(--border); }
.push-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.push-row:last-child { border-bottom: 0; }
.alert-composer { border-color: color-mix(in oklab, var(--bad) 40%, var(--border)); }
.alert-people { max-height: 180px; overflow-y: auto; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; display: flex; flex-direction: column; gap: 6px; }

/* Overdue pay tag — red, alongside Paid (green) and Due (yellow) */
.pill-status.overdue { background: var(--bad); color: var(--bad-ink); }

/* 2.0 — update-required / welcome screens, version history */
.update-card { width: 100%; max-width: 360px; text-align: center; }
.update-notes { text-align: left; margin: 0 0 18px; padding-left: 20px; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.update-notes li { margin-bottom: 4px; }
.changelog-entry { padding: 10px 0; border-top: 1px solid var(--border); }
.changelog-entry:first-child { border-top: 0; }
.changelog-entry .update-notes { margin: 6px 0 0; }

/* crew "Schedule" day sheet — one tile: crew by position, then containers */
.card.day-sheet { padding: 16px; }
.day-sheet.empty-day { text-align: center; padding: 26px 16px; }
.start-badge { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.start-badge b { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 22px; color: var(--accent); }
.ds-group { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ds-group-title { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.ds-person { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 9px; font-size: 14px; }
.ds-person:nth-child(even) { background: var(--surface-2); }
.ds-person.me { background: color-mix(in oklab, var(--accent) 16%, var(--surface-2)); font-weight: 700; }
.me-tag { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); margin-left: 6px; vertical-align: 1px; }
.ds-container { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ds-container:last-child { border-bottom: 0; }
.ds-container.mine { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.ds-num { width: 20px; flex-shrink: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--text-dim); font-family: 'Space Grotesk', system-ui, sans-serif; }

/* 2.1 — work type switch (Full time green / Casual orange) */
.work-mode { display: inline-flex; align-items: center; gap: 8px; }
.wm-label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.wm-label.on.full { color: var(--good); }
.wm-label.on.casual { color: oklch(0.76 0.16 55); }
.work-switch { position: relative; display: inline-flex; cursor: pointer; }
.work-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ws-track { width: 46px; height: 26px; border-radius: 13px; background: var(--good); position: relative; transition: background .15s; }
.ws-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.work-switch.casual .ws-track { background: oklch(0.72 0.17 55); }
.work-switch.casual .ws-knob { transform: translateX(20px); }
.work-switch input:focus-visible + .ws-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.casual-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: color-mix(in oklab, oklch(0.72 0.17 55) 25%, var(--surface-2)); color: oklch(0.8 0.14 55); }

/* manager availability calendar — green / yellow / red count dots */
.avail-day { position: relative; aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--border); background: transparent; font-size: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 4px 1px 3px; color: var(--text); }
.avail-day.active { border-color: var(--accent); }
.avail-day.today .ad-num { color: var(--accent); font-weight: 700; }
.ad-dots { display: flex; gap: 1px; justify-content: center; flex-wrap: wrap; }
.ad-dot { min-width: 13px; height: 13px; padding: 0 2px; border-radius: 999px; font-size: 8px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ad-dot.good { background: var(--good); color: var(--good-ink); }
.ad-dot.warn { background: var(--warn); color: #000; }
.ad-dot.bad { background: var(--bad); color: #fff; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.legend-dot.good { background: var(--good); }
.legend-dot.warn { background: var(--warn); }
.legend-dot.bad { background: var(--bad); }
.avail-group { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.avail-group-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; }

/* ---- 2.2 motion ------------------------------------------------------
   One-shot classes are added by render()'s animateUi() only to what just
   appeared, so nothing replays while a screen is simply being used. */
@keyframes ds-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ds-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ds-sheet-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ds-expand { from { opacity: 0; transform: translateY(-6px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
@keyframes ds-spin-open { from { transform: rotate(0deg); } to { transform: rotate(180deg); } }
@keyframes ds-spin-close { from { transform: rotate(180deg); } to { transform: rotate(0deg); } }
@keyframes ds-busy-in { from { opacity: 0; } to { opacity: 1; } }

.anim-fade { animation: ds-fade-in .22s cubic-bezier(.2,.7,.3,1) both; }
.modal-overlay.anim-modal { animation: ds-overlay-in .18s ease-out both; }
.modal-overlay.anim-modal > * { animation: ds-sheet-in .26s cubic-bezier(.2,.8,.3,1) both; }
.anim-expand { animation: ds-expand .22s cubic-bezier(.2,.7,.3,1) both; }
.collapsible-chevron.spin-open { animation: ds-spin-open .2s ease both; }
.collapsible-chevron.spin-close { animation: ds-spin-close .2s ease both; }
.split-popup { transition: opacity .15s ease, transform .15s ease; }

/* the "working…" veil still blocks double-taps instantly, but only
   becomes visible if a request actually takes a moment */
.busy-overlay { animation: ds-busy-in .18s ease .3s both; }

/* tactile press feedback */
.btn, .chip, .tabs button, .avatar, .review-date, .ds-cell, .avail-day { transition: transform .08s ease, background-color .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease; }
.btn:active:not(:disabled), .chip:active:not(:disabled), .tabs button:active, .avatar:active, .review-date:active, button.ds-cell:active, .avail-day:active { transform: scale(.96); }

/* switches slide the instant they're tapped (driven by the checkbox
   itself, not by the re-render that follows) */
.lock-track, .lock-knob { transition: transform .18s cubic-bezier(.3,.7,.3,1), background .18s ease; }
.work-switch .ws-track { transition: background .2s ease; }
.work-switch .ws-knob { transition: transform .2s cubic-bezier(.3,.7,.3,1); }
.work-switch input:checked + .ws-track { background: oklch(0.72 0.17 55); }
.work-switch input:checked + .ws-track .ws-knob { transform: translateX(20px); }
.work-switch input:not(:checked) + .ws-track { background: var(--good); }
.work-switch input:not(:checked) + .ws-track .ws-knob { transform: none; }

/* bars and fills glide to new values */
.tl-bar, .split-fill { transition: width .2s ease, left .2s ease, background-color .2s ease; }

@media (prefers-reduced-motion: reduce) {
  .anim-fade, .anim-expand, .modal-overlay.anim-modal, .modal-overlay.anim-modal > *, .collapsible-chevron.spin-open,
  .collapsible-chevron.spin-close, .busy-overlay { animation: none !important; }
  .btn, .chip, .tabs button, .lock-track, .lock-knob, .ws-track, .ws-knob, .tl-bar, .split-fill { transition: none !important; }
}
.fulltime-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: color-mix(in oklab, var(--good) 22%, var(--surface-2)); color: var(--good); }

/* 2.3 — Containers: invoice-only marker + tags for the extra categories */
.invoice-only { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: var(--surface-3); color: var(--text-dim); margin-left: 4px; vertical-align: 1px; }
.tag.pallets { background: oklch(0.8 0.07 110); color: oklch(0.24 0.05 110); }
.tag.ibc { background: oklch(0.8 0.08 330); color: oklch(0.24 0.05 330); }
.tag.general { background: var(--surface-3); color: var(--text); }

/* 2.3.1 — Containers: access note + missing-number linker */
.access-note { font-size: 12.5px; padding: 8px 12px; margin-bottom: 12px; border-radius: 10px; background: color-mix(in oklab, var(--info) 12%, var(--surface)); border: 1px solid color-mix(in oklab, var(--info) 40%, var(--border)); color: var(--info); }
.unmatched-card { border-color: color-mix(in oklab, var(--warn) 50%, var(--border)); }
.unmatched-row { padding: 10px 0; border-top: 1px solid var(--border); }
.unmatched-row:first-child { border-top: 0; }
.count-pill { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; font-weight: 700; background: var(--warn); color: var(--warn-ink); text-align: center; }

/* 2.4 — Containers filters */
.filter-panel { margin-bottom: 12px; padding: 12px 14px; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-grid .field label { margin-bottom: 4px; }
.filter-grid select, .filter-grid input { padding: 8px 10px; font-size: 13px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filter-chip { all: unset; cursor: pointer; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 14px; background: color-mix(in oklab, var(--accent) 20%, var(--surface-2)); color: var(--accent); border: 1px solid color-mix(in oklab, var(--accent) 45%, var(--border)); }
.filter-chip span { margin-left: 4px; opacity: .8; }

/* 2.5 — container origin (green confirmed / yellow likely), owner, number check */
.origin-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.origin-pill.ok { background: color-mix(in oklab, var(--good) 22%, var(--surface-2)); color: var(--good); }
.origin-pill.likely { background: color-mix(in oklab, var(--warn) 22%, var(--surface-2)); color: var(--warn); }
.origin-pill.none { background: var(--surface-2); color: var(--text-dim); font-weight: 600; }
.num-bad { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: var(--bad); color: var(--bad-ink); vertical-align: 1px; }
.owner-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.origin-block { padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.origin-block.ok { border-color: color-mix(in oklab, var(--good) 55%, var(--border)); background: color-mix(in oklab, var(--good) 8%, var(--surface-2)); }
.origin-block.likely { border-color: color-mix(in oklab, var(--warn) 55%, var(--border)); background: color-mix(in oklab, var(--warn) 8%, var(--surface-2)); }
.origin-word { font-weight: 700; margin-left: 6px; }
.origin-block.ok .origin-word, .origin-block.ok .origin-pct { color: var(--good); }
.origin-block.likely .origin-word, .origin-block.likely .origin-pct { color: var(--warn); }
.origin-pct { font-size: 22px; font-weight: 700; }
.origin-bar { height: 12px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.origin-bar span { display: block; height: 100%; border-radius: 6px; transition: width .5s cubic-bezier(.2,.7,.3,1); }
.origin-block.ok .origin-bar span { background: var(--good); }
.origin-block.likely .origin-bar span { background: linear-gradient(90deg, color-mix(in oklab, var(--warn) 70%, var(--bad)), var(--warn)); }
.om-list { margin-top: 10px; padding-top: 8px; border-top: 1px dashed color-mix(in oklab, var(--warn) 40%, var(--border)); }
.om-row { display: grid; grid-template-columns: 1fr 64px 92px; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; padding: 5px 0; font-size: 12px; }
.om-name { font-weight: 600; }
.om-bar { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.om-bar span { display: block; height: 100%; border-radius: 4px; background: var(--warn); }
.om-val { text-align: right; font-weight: 700; font-size: 11.5px; }
.om-basis { grid-column: 1 / -1; font-size: 11px; }
.om-row.off { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .origin-bar span { transition: none; } }
.om-used { font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 6px; background: var(--warn); color: var(--warn-ink); margin-left: 4px; vertical-align: 1px; }
.om-row.used .om-bar span { background: linear-gradient(90deg, var(--warn), oklch(0.86 0.17 95)); }

/* 2.5.1 — green at 100%, hold-to-explain, carrier picker */
.origin-bar.full span, .om-row.full .om-bar span { background: var(--good) !important; }
.om-row.full .om-val { color: var(--good); }
.origin-bar.holdable-row { cursor: pointer; }
.om-row.holdable-row { border-radius: 8px; margin: 0 -6px; padding: 5px 6px; }
.om-row.holdable-row:active { background: var(--surface-3); }
.explain-line { margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.carrier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.carrier-grid .chip { text-align: center; padding: 9px 6px; }

/* 2.6 — simplified payment plan */
.plan-card { margin-bottom: 16px; border-color: color-mix(in oklab, var(--good) 45%, var(--border)); }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.plan-col { background: var(--surface-2); border-radius: 10px; padding: 10px; font-size: 13px; }
.plan-col .row.between:first-child { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.plan-row { padding: 3px 0; }
.split-tag { font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 6px; background: var(--warn); color: var(--warn-ink); }
.mask-banner { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in oklab, oklch(0.7 0.14 300) 22%, var(--surface)); border: 1px solid oklch(0.7 0.14 300); box-shadow: 0 6px 20px rgba(0,0,0,.35); font-size: 13px; }
.mask-dot { width: 10px; height: 10px; border-radius: 50%; background: oklch(0.75 0.15 300); box-shadow: 0 0 0 4px color-mix(in oklab, oklch(0.75 0.15 300) 30%, transparent); flex-shrink: 0; animation: ds-pulse 1.6s ease-in-out infinite; }
@keyframes ds-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in oklab, oklch(0.75 0.15 300) 10%, transparent); } }
.record-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: var(--surface-3); color: var(--text-dim); margin-left: 6px; vertical-align: 1px; }
@media (prefers-reduced-motion: reduce) { .mask-dot { animation: none; } }
.plan-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); }
.mask-banner.agreed { background: color-mix(in oklab, var(--good) 20%, var(--surface)); border-color: var(--good); }
.mask-banner.agreed .mask-dot { background: var(--good); box-shadow: 0 0 0 4px color-mix(in oklab, var(--good) 30%, transparent); animation: none; }
.agree-pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--border); color: var(--muted, inherit); opacity: .85; }
.agree-pill.ok { border: 1px solid var(--good); color: var(--good); background: color-mix(in oklab, var(--good) 14%, transparent); opacity: 1; }
.plan-card.pending { border: 1px solid oklch(0.7 0.14 300); }
.plan-card.agreed { border: 1px solid var(--good) !important; background: color-mix(in oklab, var(--good) 7%, var(--surface)); }
.stale-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; color: var(--warn); background: color-mix(in oklab, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in oklab, var(--warn) 45%, var(--border)); }

/* Pay > Review — crew fixes (no-show / replace / add crew member) */
.btn.warn { background: var(--warn); color: var(--warn-ink); }
.review-actions { gap: 8px; margin-top: 10px; align-items: center; }
.review-actions .btn { padding: 8px 14px; min-height: 0; }
.modal-card.cs-card { max-width: 420px; max-height: 88vh; overflow-y: auto; }
.cs-search { width: 100%; margin-bottom: 8px; }
.cs-list { display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.cs-person { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.cs-person:last-child { border-bottom: 0; }
.cs-person:active { background: var(--surface-2); }
.cs-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.cs-tag { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 10px; background: var(--surface-2); color: var(--text-dim); }
.cs-tag.info { background: color-mix(in oklab, var(--info) 22%, var(--surface-2)); color: var(--text); }
.cs-tag.warn { background: var(--warn); color: var(--warn-ink); }
.cs-tag.bad { background: var(--bad); color: var(--bad-ink); }
.cs-picked { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.cs-ct { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.cs-ct.on { border-color: var(--good); background: color-mix(in oklab, var(--good) 10%, var(--surface)); }
.cs-ct:disabled { opacity: .55; cursor: default; }
.cs-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.cs-ct.on .cs-check { background: var(--good); border-color: var(--good); color: var(--good-ink); }
.cs-swap { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; font-weight: 600; flex-wrap: wrap; }
.cs-swap-name.off { color: var(--text-dim); text-decoration: line-through; }
.cs-note { margin-top: 10px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; background: color-mix(in oklab, var(--warn) 18%, var(--surface)); border: 1px solid var(--warn); }
.cs-toggle { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; cursor: pointer; }
.cs-toggle input { padding: 0; width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--accent); }

/* Bases — profile menu switcher + header chip */
.base-switch { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.base-switch button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border: 0; border-radius: 9px; background: none; color: var(--text-dim); font-weight: 600; font-size: 14px; }
.base-switch button.active { background: var(--accent); color: var(--accent-ink, #1a1206); }
.base-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-weight: 700; background: color-mix(in oklab, var(--info) 22%, var(--surface-2)); color: var(--text); }

/* Profile pictures — .dp wraps a round picture (--dp = size) plus an
   optional animated aura image, drawn behind (.behind) or over (.over). */
.dp { position: relative; width: var(--dp); height: var(--dp); flex-shrink: 0; display: inline-flex; padding: 0; border: 0; background: none; border-radius: 50%; cursor: inherit; }
button.dp { cursor: pointer; }
.dp-in { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 700; font-size: calc(var(--dp) * .38); line-height: 1; }
.dp-in > img, .dp-in > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dp-emblem { display: block; width: 94%; height: 94%; background: var(--dp-col, var(--accent)); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.dp-in:has(.dp-emblem) { background: #0d1017; }
.dp-aura { position: absolute; left: 50%; top: 50%; pointer-events: none; z-index: 0; max-width: none; }
.dp-aura.over { z-index: 2; }
.dp-aura.ring { width: calc(var(--dp) * 1.95); height: calc(var(--dp) * 1.95); transform: translate(-52%, -50%); }
.dp-aura.fx { width: calc(var(--dp) * var(--aura, 2.2)); height: calc(var(--dp) * var(--aura, 2.2)); transform: translate(-50%, -50%); }
.header .dp { margin-right: 6px; }

/* Tile background: someone's chosen picture, faded, behind their name —
   strongest on the right, fading out to nothing on the left */
.card.has-bg { position: relative; overflow: hidden; isolation: isolate; }
.tile-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  container-type: size;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.4) 0%, rgba(0,0,0,.22) 28%, rgba(0,0,0,.06) 46%, transparent 56%);
  mask-image: linear-gradient(to left, rgba(0,0,0,.4) 0%, rgba(0,0,0,.22) 28%, rgba(0,0,0,.06) 46%, transparent 56%); }
.tile-bg img { position: absolute; display: block; max-width: none; width: var(--w); height: calc(var(--w) / var(--ar));
  left: clamp(calc(100cqw - var(--w)), calc(50cqw - var(--x) * var(--w)), 0px);
  top: clamp(calc(100cqh - var(--w) / var(--ar)), calc(50cqh - var(--y) * var(--w) / var(--ar)), 0px); }
.tile-sample { margin: 0; }

/* Crop tool */
.crop-stage { position: relative; margin: 14px auto 0; overflow: hidden; border-radius: 10px; touch-action: none; cursor: grab; background: #000; max-width: 100%; }
.crop-stage > img, .crop-stage > video { display: block; user-select: none; -webkit-user-drag: none; }
.crop-frame { position: absolute; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.58); pointer-events: none; }
.crop-frame.wide { border-radius: 12px; }
.crop-preview { display: flex; justify-content: center; padding: 26px 0 10px; }
.crop-preview .card { width: 100%; }

/* Colour themes (managers) — only the accent + a hint of tint in the
   surfaces; good/bad/warn/info never change so their meaning holds */
html[data-ds-theme="ocean"] { --accent: oklch(0.76 0.13 238); --accent-ink: oklch(0.2 0.05 238); --bg: oklch(0.15 0.02 245); --surface: oklch(0.205 0.02 245); --surface-2: oklch(0.27 0.022 245); }
html[data-ds-theme="teal"] { --accent: oklch(0.78 0.12 192); --accent-ink: oklch(0.2 0.05 192); --bg: oklch(0.15 0.016 205); --surface: oklch(0.205 0.017 205); --surface-2: oklch(0.27 0.019 205); }
html[data-ds-theme="violet"] { --accent: oklch(0.74 0.15 300); --accent-ink: oklch(0.99 0.01 300); --bg: oklch(0.15 0.02 295); --surface: oklch(0.205 0.022 295); --surface-2: oklch(0.27 0.024 295); }
html[data-ds-theme="rose"] { --accent: oklch(0.76 0.14 355); --accent-ink: oklch(0.2 0.05 355); --bg: oklch(0.15 0.016 350); --surface: oklch(0.205 0.017 350); --surface-2: oklch(0.27 0.019 350); }
html[data-ds-theme="carbon"] { --accent: oklch(0.88 0.015 255); --accent-ink: oklch(0.18 0.01 255); --bg: oklch(0.14 0 0); --surface: oklch(0.195 0 0); --surface-2: oklch(0.26 0 0); --surface-3: oklch(0.31 0 0); --border: oklch(0.33 0 0); }

.modal-card.dp-card { max-width: 420px; max-height: 90vh; overflow-y: auto; }
.dp-preview { display: flex; justify-content: center; padding: 76px 0 64px; overflow: hidden; }
.dp-upload { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.dp-label { font-size: 12px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 8px; }
.dp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dp-tile { aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--border); background: #0d1017; display: flex; align-items: center; justify-content: center; padding: 6px; cursor: pointer; }
.dp-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 35%, transparent); }
.dp-tile .dp-emblem { width: 100%; height: 100%; }
.dp-swatches { display: flex; gap: 10px; margin-top: 12px; }
.dp-swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.dp-swatch.on { box-shadow: 0 0 0 2px var(--text); }

.dp-sub { font-size: 12px; font-weight: 600; color: var(--text-dim); margin: 12px 0 6px; }
.dp-swatches.wrap { flex-wrap: wrap; }
.aura-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.aura-tile { aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--border); background: #0d1017; color: var(--text-dim); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; font-size: 10.5px; font-weight: 600; cursor: pointer; overflow: hidden; }
.aura-tile img { width: 100%; height: 72%; object-fit: contain; }
.aura-tile.on { border-color: var(--accent); color: var(--text); }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-tile { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; }
.theme-tile.on { border-color: var(--accent); }
.theme-dot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }

/* Managers' "What's new" — bell, popup feed, live toast */
.act-bell { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.act-bell.has { color: var(--text); border-color: var(--accent); }
.act-bell.has svg { animation: act-ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes act-ring { 0%, 70%, 100% { transform: none; } 75% { transform: rotate(14deg); } 82% { transform: rotate(-12deg); } 89% { transform: rotate(8deg); } }
.act-count { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--bad); color: var(--bad-ink); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.modal-card.act-card { max-width: 440px; max-height: 88vh; display: flex; flex-direction: column; }
.act-list { margin-top: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.act-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.act-row.new { background: color-mix(in oklab, var(--accent) 8%, var(--surface)); border-color: color-mix(in oklab, var(--accent) 40%, var(--border)); }
.act-row.imp { box-shadow: inset 3px 0 0 var(--warn); }
.act-ic { position: relative; flex-shrink: 0; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; }
.act-ic i { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-size: 15px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.act-tx { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.act-tx small { display: block; color: var(--text-dim); font-size: 11.5px; margin-top: 2px; }
.act-toast { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 80; width: min(440px, calc(100vw - 24px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 12px 34px rgba(0,0,0,.5); animation: act-in .35s cubic-bezier(.2,1.2,.4,1) both; }
.act-toast.imp { border-color: var(--warn); }
@keyframes act-in { from { transform: translate(-50%, -120%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .act-bell.has svg, .act-toast { animation: none; } }
