/* ── Design tokens — dark (default) ─────────────────────────────────────── */
:root {
  --bg: #07070f;
  --surface: #0e0e1a;
  --card-bg: var(--surface); /* resolves per-theme; was referenced but never defined */
  --surface2: #141426;
  --surface3: #1c1c30;
  --stroke: rgba(255,255,255,.07);
  --stroke2: rgba(255,255,255,.13);

  --text: #fff;
  --text1: #fff;
  --text2: rgba(255,255,255,.72);
  --muted: #7a7a9a;
  --muted2: rgba(255,255,255,.32);

  --primary: #2563EB;
  --primary-dark: #1d4ed8;
  --accent: #2563EB;
  --danger: #ef4444;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.6);

  --ease: cubic-bezier(.25,.46,.45,.94);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
}

/* ── Light tokens — system auto (CSS level, no JS needed) ───────────────── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f2f7;
    --surface: #ffffff;
    --surface2: #e5e5ea;
    --surface3: #d1d1d6;
    --stroke: rgba(0,0,0,.12);
    --stroke2: rgba(0,0,0,.18);
    --text: #000000;
    --text1: #000000;
    --text2: rgba(0,0,0,.60);
    --muted: #3c3c43;
    --muted2: rgba(60,60,67,.60);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.10);
    --shadow-md: 0 4px 16px rgba(0,0,0,.12);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.16);
  }
}

/* ── Explicit overrides (user setting or JS-set) ─────────────────────────── */
[data-theme="dark"] {
  --bg: #07070f;
  --surface: #0e0e1a;
  --surface2: #141426;
  --surface3: #1c1c30;
  --stroke: rgba(255,255,255,.07);
  --stroke2: rgba(255,255,255,.13);
  --text: #fff;
  --text1: #fff;
  --text2: rgba(255,255,255,.72);
  --muted: #7a7a9a;
  --muted2: rgba(255,255,255,.32);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { height: 100%; overflow-x: hidden; }

/* ── WKWebView tap & gesture performance ─────────────────────────────────────
   touch-action:manipulation tells iOS "no double-tap zoom, no wait" — eliminates
   the 300ms tap delay and the 22-second gesture-recognizer blocking seen in Capacitor. */
a, button, input, textarea, select, label,
[role="button"], [tabindex], .btn, .card, .moreRow,
.segBtn, .fr26HourBtn, .fr26Chip, .tabItem, .moreTab,
.typeIconBtn, .clockInBtn, .repeatChip, .comboSuggestChip,
summary, details { touch-action: manipulation; }

/* Prevent iOS text-selection callout on UI chrome (not on text inputs) */
header, nav, .tabBar, .moreTabBar, .fr26QuickHours,
.fr26QuickTools, .heroGoalRingWrap, .heroChartCard,
button, [role="button"] { -webkit-user-select: none; user-select: none; }

body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* iOS-safe body scroll lock when overlay is open */
body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  overflow: hidden;
}
/* Lock #spa-more's scroll container too when a modal is open */
body.modal-open #spa-more {
  overflow: hidden;
}

button, a, [role="button"], summary, label { touch-action: manipulation; }

/* ── SPA page switching ────────────────────────────────────────────────────────
   #spa-more is NEVER hidden with display:none — iOS WKWebView excludes
   display:none subtrees from its touch hit-test tree and doesn't reliably
   re-add them, making every button inside permanently unresponsive.
   Instead we keep #spa-more in the DOM at all times, just slid off-screen.
   The bottom .tabBar (always-in-DOM, always tappable) proves this pattern works.
────────────────────────────────────────────────────────────────────────────── */
#spa-more {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  z-index: 10;
  /* Slid off-screen right by default; CSS moves it on-screen for the active page */
  transform: translateX(100%);
  -webkit-overflow-scrolling: touch;
}
body[data-page="more"] #spa-more {
  transform: translateX(0);
}

/* ── Stats / Breakdown page ──────────────────────────────────────────────── */
#spa-stats {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: var(--bg);
  z-index: 10;
  transform: translateX(100%);
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
body[data-page="stats"] #spa-stats {
  transform: translateX(0);
}
.statsPageInner {
  padding: 0 0 24px;
}
/* Horizontal scrollable period chips */
/* Fix #9: Fade right edge to hint scrollability */
.statsChipsOuter {
  position: relative;
}
.statsChipsOuter::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 12px;
  width: 48px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--bg));
}
.statsChipsWrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 8px;
}
.statsChipsWrap::-webkit-scrollbar { display: none; }
.statsChip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--surface2, #1e2d42);
  background: transparent;
  color: var(--text2, #8a9bb8);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.statsChip.active {
  background: var(--primary, #2563EB);
  border-color: var(--primary, #2563EB);
  color: #fff;
}
/* Custom date range */
.statsCustomRange {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 12px;
  flex-wrap: wrap;
}
.statsDateInput {
  flex: 1;
  min-width: 120px;
  font-size: 13px;
  padding: 8px 10px;
}
.statsDateSep {
  color: var(--muted, #6b7280);
  font-size: 14px;
  flex-shrink: 0;
}
.statsDateApply {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
}
/* Inner content padding for chart/list */
#breakdownChart, #breakdownSummary, #breakdownList {
  padding-left: 16px;
  padding-right: 16px;
}
/* Stats page header subtitle */
.statsHeaderSub {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #6b7280);
  margin-top: 2px;
  letter-spacing: 0.02em;
}
/* Donut + legend — stacked so the donut's position never depends on how much
   legend content there is. Side-by-side (donut left, legend right) made the
   donut visually drift left/right as the legend's width changed between
   periods (1 job type vs 6). Centering the donut on its own row and putting
   the legend in a centered wrapping row below fixes that permanently. */
.breakdownChart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.brkDonutWrap {
  flex-shrink: 0;
}
.brkLegend {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  min-width: 0;
  width: 100%;
}
.brkLegendItem {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text1);
}
.brkLegendName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.brkDot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
/* Summary cells */
.breakdownSummary {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.brkSumCell {
  flex: 1;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.brkSumVal {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.brkSumLabel {
  font-size: 11px;
  color: var(--muted, #6b7280);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
/* Per-type rows */
.breakdownList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brkRow {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.brkRowBody {
  flex: 1;
  min-width: 0;
}
.brkRowName {
  font-weight: 600;
  font-size: 15px;
  color: var(--text1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brkRowCount {
  font-size: 12px;
  color: var(--muted, #6b7280);
  margin-top: 3px;
}
.brkRowRight {
  text-align: right;
  flex-shrink: 0;
}
.brkRowEarnings {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
}
.brkRowHours {
  font-size: 12px;
  color: var(--muted, #6b7280);
  margin-top: 3px;
}

/* ── Monthly trend bar chart (Stats page) ───────────────────────────── */
.breakdownMonthly { margin-bottom: 16px; }
.mnthTrend {
  background: var(--surface2);
  border-radius: var(--r-lg);
  padding: 14px 16px 10px;
}
.mnthTrendTitle {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.mnthBarsScroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.mnthBarsWrap {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding-bottom: 24px; /* room for labels */
  min-width: min-content;
}
.mnthBarCol {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}
.mnthBarAmt {
  font-size: 8px;
  color: var(--muted);
  margin-bottom: 3px;
  white-space: nowrap;
}
.mnthBar {
  width: 30px;
  min-height: 4px;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  opacity: 0.75;
}
.mnthBarLabel {
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
  white-space: nowrap;
}

/* ── Floating details save bar ───────────────────── */
/* Save button spacing when moved inside the Details panel */
#detailsPanel .fr26BtnPrimary { margin-top: 16px; }

.detailsSaveBar {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  animation: slideUpBar 180ms var(--ease);
}

.detailsSaveFloatBtn {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 28px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 16px rgba(0,0,0,.45);
}

@keyframes slideUpBar {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Header ─────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: rgba(7,7,15,.94);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Standalone PWA: guarantee status-bar clearance on every iPhone model */
@media (display-mode: standalone) {
  header {
    padding-top: max(52px, calc(12px + env(safe-area-inset-top, 44px)));
  }
  .top {
    padding-top: max(52px, calc(12px + env(safe-area-inset-top, 44px)));
  }
  #swUpdateBanner {
    padding-top: max(52px, calc(10px + env(safe-area-inset-top, 44px)));
  }
}

h1 {
  font-size: 12px;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}

main {
  padding: 12px 16px calc(80px + env(safe-area-inset-bottom));
  max-width: 680px;
  margin: 0 auto;
}

/* ── Bottom tab bar ──────────────────────────────── */
.tabBar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  background: rgba(17,17,19,.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--stroke2);
  padding-bottom: env(safe-area-inset-bottom);
}

.tabItem {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 0 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: color 150ms var(--ease);
  position: relative;
  border: none;
  background: transparent;
}

.tabItem--active {
  color: var(--primary);
}

.tabItem svg { transition: transform 150ms var(--ease-bounce); }
.tabItem:active svg { transform: scale(.88); }

.tabBadge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-pill);
  padding: 0 4px;
  line-height: 16px;
  text-align: center;
}

.stripLabel {
  font-size: 8px;
  font-weight: 500;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}

.stripValue {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.5px;
  margin-top: 3px;
  white-space: nowrap;
}

.stripValue--accent { color: var(--accent); }
.stripValue--primary { color: var(--primary); }

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r-xl);
  padding: 16px;
  margin-bottom: 16px;
  /* Scope layout recalculation to this card — prevents a change inside from
     forcing a full-page reflow on every render cycle */
  contain: layout style;
}

.card--tight { padding: 12px; }

/* ── Typography ──────────────────────────────────── */
.h {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.2px;
  margin: 0 0 8px;
}

.muted  { color: var(--muted); font-size: 13px; }
.small  { font-size: 12px; color: var(--muted); }
.linkBtn { background: none; border: none; padding: 0; color: var(--primary); font-size: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; touch-action: manipulation; }
.mono   { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ── Layout helpers ──────────────────────────────── */
.row     { margin-top: 12px; }
.u-row   { display: flex; align-items: center; gap: 10px; }
.u-wrap  { flex-wrap: wrap; }

.list    { display: grid; gap: 8px; }

.item {
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  /* content-visibility: skip render for off-screen items (big win for long lists).
     contain-intrinsic-size gives the browser a height estimate for accurate scrollbar. */
  content-visibility: auto;
  contain-intrinsic-size: 0 76px;
  contain: layout style paint;
}

.itemInner {
  padding: 16px;
  background: var(--surface2);
  border-radius: inherit;
  position: relative;
  z-index: 2;
  transition: transform 200ms ease;
  will-change: transform;
}
.item.swiping .itemInner { transition: none; }
.item:not(.swiping):active .itemInner { background: var(--surface3); }

/* Swipe action zones — sit behind .itemInner, revealed on swipe */
.swipeZone {
  position: absolute;
  top: 0; bottom: 0; width: 90px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
}
.swipeZone span { font-size: 18px; line-height: 1; }
.swipeDeleteZone { right: 0; background: var(--danger); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.swipeEditZone   { left: 0;  background: var(--primary); border-radius: var(--r-lg) 0 0 var(--r-lg); }

/* ── Entry card layout ───────────────────────────── */
.itemTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.right { text-align: right; flex-shrink: 0; }
.itemLeft { flex: 1; min-width: 0; }

/* Headline row: checkbox + badge + ref */
.itemHeadline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.itemCheck {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
  touch-action: manipulation;
}

.itemRef {
  font-size: 13px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.itemRef:active { opacity: .6; }

/* Compact meta line below headline */
.itemMeta {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.itemNotes {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text2);
  font-style: italic;
  line-height: 1.4;
}

/* Right: pay + hours stacked */
.itemRight {
  text-align: right;
  flex-shrink: 0;
}
.itemPay {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1;
  color: var(--accent);
}
.itemHrs {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

/* ── Collapsible entries ─────────────────────────── */
.item .itemTop { cursor: pointer; user-select: none; -webkit-user-select: none; }

.itemMeta, .itemNotes, .itemActions {
  overflow: hidden;
  transition: max-height 220ms var(--ease), opacity 180ms var(--ease), margin-top 200ms var(--ease);
}
.itemMeta   { max-height: 56px; }
.itemNotes  { max-height: 80px; }
.itemActions { max-height: 60px; }

.item.collapsed .itemMeta,
.item.collapsed .itemNotes,
.item.collapsed .itemActions {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}
.item.collapsed .entryThumbWrap {
  max-height: 0 !important;
  margin-top: 0;
}

/* CSS chevron — more consistent than Unicode across devices */
.itemChevron {
  width: 16px;
  height: 16px;
  margin-top: 6px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.itemChevron::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted2);
  border-bottom: 2px solid var(--muted2);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms var(--ease);
}
.item.collapsed .itemChevron::after {
  transform: rotate(-45deg) translateY(2px);
}

/* Action buttons — compact pill style */
.itemActions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.iBtn {
  padding: 10px 16px;
  min-height: 40px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke2);
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  transition: background 120ms var(--ease), transform 80ms var(--ease);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}
.iBtn:active { background: var(--surface3); transform: scale(.94); }
.iBtn--danger { color: var(--danger); border-color: rgba(237,73,86,.25); background: rgba(237,73,86,.06); }
.iBtn--sameRO { color: var(--primary); border-color: rgba(37,99,235,.3); background: rgba(37,99,235,.08); font-weight: 600; }

/* ── Week group header ───────────────────────────── */
.weekGroupHdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 16px 0 4px;
  padding: 0 2px;
}
.weekGroupRange {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.weekGroupTotals {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}

/* ── Entry photo thumbnail ───────────────────────── */
.entryThumbWrap {
  border-radius: var(--r-md);
  overflow: hidden;
  max-width: 240px;
  max-height: 0;
  margin-top: 0;
  transition: max-height 300ms var(--ease), margin-top 200ms var(--ease);
}
.entryThumbWrap.loaded {
  background: var(--surface3);
  max-height: 90px;
  min-height: 44px;
  margin-top: 8px;
}
.entryThumb {
  width: 100%;
  display: block;
  max-height: 90px;
  min-height: 44px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.entryThumbWrap.loaded .entryThumb { opacity: 1; }

/* ── Day group header ────────────────────────────── */
.dayGroupHeader {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 8px 0;
  padding: 0 2px;
}

/* ── Inputs ──────────────────────────────────────── */
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .2px;
  text-transform: uppercase;
}

input, select, textarea, button { font-family: inherit; font-size: 16px; } /* 16px prevents iOS auto-zoom */

input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke2);
  background: var(--surface2);
  color: var(--text);
  outline: none;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
  -webkit-appearance: none;
}

input::placeholder, textarea::placeholder { color: var(--muted2); }
textarea { min-height: 88px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

/* ── Buttons ─────────────────────────────────────── */
.btn,
button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke2);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 150ms var(--ease), transform 100ms var(--ease), opacity 150ms var(--ease);
  -webkit-appearance: none;
}

.btn:active { transform: scale(.95); opacity: .8; transition-duration: 60ms; }

.btn.primary {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
}

.btn.primary:active { background: var(--primary-dark); }

.btn.danger {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
}

.btn.danger-ghost {
  background: transparent;
  border-color: rgba(237,73,86,.35);
  color: var(--danger);
  font-size: 13px;
}

/* ── Segmented controls ──────────────────────────── */
.seg {
  display: inline-flex;
  background: var(--surface2);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--stroke);
}

.segBtn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}

.segBtn.active {
  background: var(--surface3);
  color: var(--text);
}

.rangeTabs .segBtn.active {
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* ── FR26 form ───────────────────────────────────── */
.fr26 { padding: 0; overflow: hidden; }
.fr26Form { position: relative; padding-bottom: 0; }

.fr26EmployeeBar {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--stroke);
  background: var(--surface2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  transition: max-height 250ms var(--ease), opacity 200ms var(--ease), padding 250ms var(--ease);
}
/* When empId is already set, collapse the bar to a subtle indicator */
.fr26EmployeeBar.empSet {
  grid-template-columns: 1fr;
  padding: 5px 16px;
}
.fr26EmployeeBar.empSet .fr26EmployeeLabel { display: none; }
.fr26EmployeeBar.empSet .fr26Input {
  font-size: 11px;
  height: 22px;
  opacity: 0.45;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  color: var(--muted);
  cursor: pointer;
}
.fr26EmployeeBar.empSet .fr26Input:focus {
  opacity: 1;
  background: var(--surface3);
  border: 1.5px solid var(--stroke);
  padding: 6px 10px;
  height: auto;
}

.fr26EmployeeLabel {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}

.fr26InputCompact { padding: 10px 12px; }

.fr26Group {
  border-top: 1px solid var(--stroke);
  overflow: hidden;
}

.fr26Group:first-child { border-top: 0; }

.fr26PrimaryEntry > .fr26Row:first-child { border-top: 0; }

.fr26GroupHeader {
  padding: 10px 16px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: .1px;
}

.fr26Sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.fr26TopRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 6px;
}

.fr26Row {
  display: grid;
  gap: 6px;
  padding: 8px 16px;
  border-top: 1px solid var(--stroke);
  background: var(--surface);
}

/* Hours field hero sizing */
#hours.fr26Input {
  font-size: 34px;
  font-weight: 900;
  text-align: center;
  padding: 8px 16px;
  letter-spacing: -1px;
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--stroke2);
  border-radius: 0;
  box-shadow: none;
}

#hours.fr26Input:focus {
  border-color: transparent;
  border-bottom-color: var(--primary);
  box-shadow: none;
}

.fr26Label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .4px;
  text-transform: uppercase;
}

.fr26Input, .fr26Textarea, .fr26File {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke2);
  background: var(--surface2);
  color: var(--text);
  outline: none;
  font-size: 15px;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.fr26Input:focus, .fr26Textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,149,246,.2);
}

.fr26Input::placeholder, .fr26Textarea::placeholder { color: var(--muted2); }

.fr26InlineField {
  position: relative;
}

.fr26InlineField .fr26Input {
  width: 100%;
  padding-right: 56px;
}

.fr26InlineClearBtn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  font-size: 13px;
  border-radius: var(--r-sm);
}

.typeSuggestStrip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.typeSuggestChip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 5px 10px 4px;
  border-radius: var(--r-pill);
  background: var(--surface3);
  border: 1px solid var(--stroke2);
  color: var(--text1);
  cursor: pointer;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  transition: background 120ms, border-color 120ms;
  gap: 1px;
}

.typeSuggestChip:active { background: var(--surface2); opacity: .75; }

.tscName {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  display: block;
}

.tscMeta {
  font-size: 10px;
  color: var(--muted2);
  letter-spacing: 0.02em;
}

.typeSuggestHint {
  font-size: 12px;
  color: var(--muted2);
  padding: 4px 2px;
}

.fr26FieldHint {
  font-size: 11px;
  color: var(--muted2);
  margin-top: -1px;
}

.fr26QuickHours {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding: 2px 0 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.fr26QuickHours::-webkit-scrollbar { display: none; }

/* Label shown when chips are tuned to a specific job type */
.fr26ChipHint {
  flex: 0 0 auto;
  align-self: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: .03em;
  opacity: .75;
  white-space: nowrap;
  padding-right: 2px;
}

.fr26HourBtn {
  flex: 0 0 auto;
  min-width: 64px;
  height: 44px;
  padding: 0 8px;
  border: 1.5px solid var(--stroke2);
  border-radius: 12px;
  background: var(--surface3);
  color: var(--text2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 100ms var(--ease), border-color 100ms var(--ease), color 100ms var(--ease), transform 100ms var(--ease-bounce);
}

.fr26HourBtn:active { transform: scale(.88); transition-duration: 60ms; }

.fr26HourBtn.selected {
  background: rgba(37, 99, 235, .18);
  border-color: var(--primary);
  border-width: 2px;
  color: var(--primary);
  font-weight: 700;
}

/* Custom hour chips */
#customHourChips { display: contents; }
.fr26HourBtnCustom {
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.35);
  color: var(--primary);
}
/* + button */
/* Job-type hours chip — appears first when a known job type is selected */
.fr26HourBtnType {
  background: rgba(37,99,235,.18);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  order: -1;
  position: relative;
}
.fr26HourBtnType::after {
  content: "↑";
  font-size: 10px;
  position: absolute;
  top: 2px;
  right: 3px;
  opacity: .7;
}

.fr26BtnSaveRoll {
  margin-top: 8px;
  width: 100%;
  background: rgba(37,99,235,.1);
  color: var(--primary);
  border: 1.5px solid rgba(37,99,235,.4);
  border-radius: var(--r-md);
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.fr26HourBtnAdd {
  min-width: 42px;
  color: var(--primary);
  border-color: rgba(37,99,235,.4);
  background: transparent;
  font-size: 20px;
  font-weight: 400;
}

.fr26Check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  text-transform: none;
  letter-spacing: 0;
}

.fr26Check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface3);
  border: 1px solid var(--stroke2);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 200ms, border-color 200ms;
}

.fr26Check input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 200ms var(--ease-bounce), background 200ms;
}

.fr26Check input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: transparent;
}

.fr26Check input[type="checkbox"]:checked::after {
  transform: translateX(16px);
  background: #fff;
}

.fr26Textarea { min-height: 88px; resize: vertical; }

.fr26Hint {
  padding: 8px 16px 12px;
  color: var(--muted2);
  font-size: 11px;
}

.fr26Chip {
  border: 1px solid var(--stroke2);
  background: var(--surface2);
  color: var(--text2);
  border-radius: var(--r-pill);
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms var(--ease);
  touch-action: manipulation;
}

.fr26Chip:active { background: var(--surface3); }
.fr26ChipGhost { background: transparent; color: var(--muted); }

.fr26PrimaryAction {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--stroke);
  background: var(--surface);
}

.fr26BtnPrimary, .fr26BtnGhost {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 150ms var(--ease), transform 100ms var(--ease), box-shadow 150ms var(--ease);
}

.fr26BtnPrimary {
  width: 100%;
  min-height: 56px;
  border: none;
  background: var(--primary);
  color: #fff;
  letter-spacing: .2px;
  font-size: 17px;
  font-weight: 800;
  border-radius: var(--r-lg);
  box-shadow: 0 4px 16px rgba(37,99,235,.28);
}

.fr26BtnPrimary:active { opacity: .85; transform: scale(.99); }
.fr26BtnPrimary:disabled { background: var(--surface2); color: var(--muted2); opacity: 1; box-shadow: none; }

.fr26BtnGhost {
  border: 1px solid var(--stroke2);
  background: transparent;
  color: var(--text);
  padding: 10px 18px;
}

.fr26OptionalGroup { overflow: hidden; }

.fr26OptionalSummary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--text2);
  border-top: 1px solid var(--stroke);
}

.fr26OptionalSummary::-webkit-details-marker { display: none; }

.fr26OptionalSummary::after {
  content: "+";
  color: var(--primary);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
}

.fr26OptionalGroup[open] .fr26OptionalSummary::after { content: "−"; }

.fr26OptionalMeta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.fr26OptionalBody { border-top: 1px solid var(--stroke); }

.fr26PhotoActions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  padding: 14px 16px;
}

.fr26PhotoActions .btn { width: 100%; }

/* ── Scan hero ─────────────────────────────────────────────────────── */
.scanHeroWrap {
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scanHeroBtn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--r-lg);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 18px rgba(37,99,235,.30);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.scanHeroBtn:active {
  transform: scale(.97);
  box-shadow: 0 2px 8px rgba(37,99,235,.20);
}
.scanHeroIcon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  opacity: .95;
}
.scanHeroLabel {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  display: block;
}
.scanHeroSub {
  font-size: 11px;
  font-weight: 500;
  opacity: .75;
  display: block;
  margin-top: 1px;
}
.scanHeroAlt {
  display: flex;
  gap: 8px;
}
.scanAltBtn {
  flex: 1;
  padding: 7px 0;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .1s;
}
.scanAltBtn:active { background: var(--surface3); }

.fr26InlineStatus {
  padding: 0 16px 12px;
  color: var(--muted);
  font-size: 13px;
}

.fr26ScanStatus {
  padding: 0 16px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  min-height: 20px;
  transition: opacity 0.3s;
}
.fr26ScanStatus.scanning {
  color: var(--muted);
  font-weight: 400;
}

/* Alternative job chips shown after OCR scan */
.fr26ScanJobAlts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
}
.fr26ScanJobAlt {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid rgba(37,99,235,.5);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}
.fr26ScanJobAlt:active {
  background: var(--primary);
  color: #fff;
}

.fr26QuickTools {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px;
  border-top: 1px solid var(--stroke);
  background: var(--surface2);
}
.fr26QuickTools::-webkit-scrollbar { display: none; }
.fr26QuickTools > * { flex: 0 0 auto; }

/* ── Stats pills ─────────────────────────────────── */
.pillRow {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.pillRow::-webkit-scrollbar { display: none; }

.pill {
  flex: 1 1 0;
  min-width: 52px;
  background: var(--surface2);
  border-radius: var(--r-md);
  padding: 9px 6px;
  border: 1px solid var(--stroke);
  text-align: center;
}

.k { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.v { font-size: 15px; font-weight: 800; margin-top: 3px; letter-spacing: -.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill .muted { font-size: 11px; margin-top: 1px; }

/* ── Type badges ─────────────────────────────────── */
.typeBadge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
}

.typeBadge--sold     { background: rgba(34,197,94,.15);   color: #4ade80; }
.typeBadge--preowned { background: rgba(59,130,246,.15);  color: #60a5fa; }
.typeBadge--fpf      { background: rgba(251,146,60,.15);  color: #fb923c; }
.typeBadge--warranty { background: rgba(250,204,21,.15);  color: #fde047; }
.typeBadge--default  { background: var(--surface3);       color: var(--muted); }

/* ── Goal bar ────────────────────────────────────── */
.goalBar {
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--surface3);
  overflow: hidden;
  margin-top: 10px;
}

.goalBarFill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--primary);
  transition: width 600ms var(--ease);
  width: 0%;
}

.goalBarFill.complete { background: var(--accent); }

/* ── Warnings ────────────────────────────────────── */
#dupWarnGlobal {
  display: none;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(251,146,60,.3);
  background: rgba(251,146,60,.1);
  color: #fb923c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

#dupWarnGlobal[data-level="strong"] {
  border-color: rgba(237,73,86,.35);
  background: rgba(237,73,86,.1);
  color: var(--danger);
}

/* ── Earnings preview ────────────────────────────── */
#earningsPreview {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: transparent;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 200ms var(--ease), opacity 200ms var(--ease);
}

#earningsPreview.hasValue {
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  max-height: 32px;
  opacity: 1;
  margin-top: 10px;
}

/* ── Toast ───────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(40,40,44,.96);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 48px);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  z-index: 9000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Modal ───────────────────────────────────────── */
.modalShell {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  z-index: 200;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  align-items: center;
  justify-content: center;
}

.modalShell.open { display: flex; }

.photo-error {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(255,255,255,.2);
  color: #fca5a5;
  background: rgba(239,68,68,.1);
  text-align: center;
  font-size: 13px;
}

.warningBanner {
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,196,0,.25);
  color: #fde68a;
  background: rgba(255,196,0,.08);
  font-size: 13px;
}

/* ── History overlay ─────────────────────────────── */
.historyOverlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: flex-end;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.historyOverlay.open { display: flex; }

.historySheet {
  width: 100%;
  max-height: 92dvh;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 1px solid var(--stroke2);
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 240ms var(--ease);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.historyHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--stroke);
  flex-shrink: 0;
}

.historyTitle {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.histCloseBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--surface3);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms;
}

.histCloseBtn:active { background: var(--stroke2); }

.historyControls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--stroke);
  flex-shrink: 0;
}

.histRangeSeg { width: 100%; }
.histRangeSeg .segBtn { flex: 1; font-size: 13px; padding: 8px 6px; }

.historySummary {
  display: flex;
  border-bottom: 1px solid var(--stroke);
  flex-shrink: 0;
  background: var(--surface2);
}

.histSumCell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-right: 1px solid var(--stroke);
}

.histSumCell:last-child { border-right: 0; }

.historyList {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.histDayHeader {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0 8px;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 8px;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.histDayKey {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.histDayTotals {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.histDayPay {
  color: var(--accent);
  font-weight: 700;
}

.histEntryRow {
  background: var(--surface2);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

[data-theme="light"] .histEntryRow { background: var(--surface); }

.histEntryLeft { flex: 1; min-width: 0; }

.histEntryType {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* New cleaner entry layout */
.histEntryTopLine {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.histEntryRefNum {
  font-size: 16px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: -.2px;
  color: #fff;
}

[data-theme="light"] .histEntryRefNum { color: var(--text); }

/* Tappable ref when entry has a photo */
.histEntryRefNum--photo {
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.histEntryRefNum--photo:active { opacity: .7; }
.histEntryRefPhotoIcon { font-size: 13px; line-height: 1; }
[data-theme="light"] .histEntryRefNum--photo { color: var(--primary); }

.histPhotoTag {
  font-size: 14px;
  line-height: 1;
}

.histEntryTypeLine {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.histEntryVin {
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  margin-top: 5px;
}

.histEntryVinVal {
  color: #fff;
  font-weight: 600;
  letter-spacing: .4px;
}

[data-theme="light"] .histEntryVinVal { color: var(--text); }

.histEntryNotes {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}

.histEntryRef {
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  margin-top: 4px;
}

.histEntryMeta {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 4px;
}

.histEntryRight {
  text-align: right;
  flex-shrink: 0;
}

.histEntryPay {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1;
  color: var(--accent);
}

.histEntryHrs {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.histEntryActions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ── More page ───────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17,17,19,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  border-bottom: 1px solid var(--stroke);
}

.topRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 16px calc(80px + env(safe-area-inset-bottom));
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

@media (max-width: 480px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
}

.danger {
  border-color: rgba(237,73,86,.25);
  background: rgba(237,73,86,.06);
}

/* ── Input class on more page ────────────────────── */
.input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke2);
  background: var(--surface2);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  margin-top: 8px;
  -webkit-appearance: none;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,149,246,.2);
}

/* ── More page cards ─────────────────────────────── */
.topTitle {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.3px;
}

/* Persistent entry point to the Team dashboard — sits above the tab panels so
   it's visible no matter which More sub-tab is open, since it was previously
   only reachable from a buried Settings row or a tech-only "join" prompt. */
.teamEntryBanner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 16px 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: transform 130ms cubic-bezier(.34,1.56,.64,1);
}
.teamEntryBanner:active { transform: scale(.985); }
.teamEntryIcon { font-size: 22px; flex: 0 0 auto; line-height: 1; }
.teamEntryBody { flex: 1; min-width: 0; }
.teamEntryTitle { display: block; font-size: 14.5px; font-weight: 700; color: var(--text); }
.teamEntrySub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.teamEntryGo { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }

.moreCard { padding: 0; overflow: hidden; }

.moreCardHeader {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 10px 16px 8px;
}

.moreCardSub {
  font-size: 13px;
  color: var(--muted);
  padding: 0 16px 12px;
  margin-top: -4px;
}

.moreDivider {
  height: 1px;
  background: var(--stroke);
  margin: 0 16px;
}

.moreRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  min-width: 0;
}

.moreRow > * { min-width: 0; }

.moreRowLabel {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.moreRowSub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.moreInput {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke2);
  background: var(--surface2);
  color: var(--text);
  font-size: 16px; /* 16px prevents iOS auto-zoom on focus */
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.moreInput:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 0,149,246),.2);
}

.moreInputNarrow { width: auto; min-width: 90px; max-width: 140px; text-align: right; }

.moreInputGroup {
  display: flex;
  gap: 8px;
  align-items: center;
}

.moreInputStack { border-top: 1px solid var(--stroke); }

/* Auth */
.authFields { padding: 0 16px; }

.moreAuthActions {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
}

.moreAuthSecondary {
  display: flex;
  gap: 8px;
  padding: 8px 16px 4px;
}

.moreTextBtn {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 10px;
}

.moreAuthStatus {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 16px 14px;
  min-height: 16px;
}

/* Accent color picker */
.accentPickerLabel {
  display: inline-block;
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  overflow: visible;
}
.accentPickerLabel input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}
.accentColorPreview {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--stroke2);
  background: var(--primary);
  pointer-events: none;
  transition: border-color 150ms, transform 120ms;
}
.accentPickerLabel:active .accentColorPreview { transform: scale(.9); }

/* Toggle switch (More page) */
.moreToggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.moreToggle input { opacity: 0; width: 0; height: 0; position: absolute; }

.moreToggleTrack {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--surface3);
  border: 1px solid var(--stroke2);
  transition: background 200ms, border-color 200ms;
}

.moreToggleTrack::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 200ms var(--ease-bounce), background 200ms;
}

.moreToggle input:checked ~ .moreToggleTrack {
  background: var(--primary);
  border-color: transparent;
}

.moreToggle input:checked ~ .moreToggleTrack::after {
  transform: translateX(18px);
  background: #fff;
}

/* Save row */
.moreSaveRow {
  padding: 12px 16px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.moreSaveBtn { flex: 1; min-width: 120px; min-height: 48px; }

/* Export grid */
.exportGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--stroke);
  border-top: 1px solid var(--stroke);
}

.exportBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 12px;
  background: var(--surface);
  border: 0;
  cursor: pointer;
  transition: background 150ms var(--ease);
}

.exportBtn:active { background: var(--surface2); }

.exportBtnIcon {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--primary);
  background: rgba(0,149,246,.12);
  padding: 6px 10px;
  border-radius: var(--r-md);
}

.exportBtnLabel {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}

/* Review controls */
.reviewControls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 12px;
}

.reviewRangeSeg,
.reviewFocusSeg { width: 100%; }

.reviewRangeSeg .segBtn,
.reviewFocusSeg .segBtn { flex: 1; }

/* Pay stub result */
.moreResultText {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 16px 0;
}

.moreResultMono {
  font-size: 13px;
  color: var(--muted);
  font-family: inherit;
  padding: 4px 16px 6px;
}

/* Danger */
.moreDangerCard { border-color: rgba(237,73,86,.2); background: rgba(237,73,86,.04); }
.moreDangerHeader { color: var(--danger); }

.dangerActions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.dangerBtn {
  flex: 1;
  background: rgba(237,73,86,.1);
  border-color: rgba(237,73,86,.25);
  color: var(--danger);
}

.dangerBtnStrong {
  background: rgba(237,73,86,.18);
  border-color: rgba(237,73,86,.35);
  color: var(--danger);
}

/* ── Page-level helpers ──────────────────────────── */
.statusMsg {
  max-width: 680px;
  margin: 8px auto 0;
  padding: 0 16px;
}

.offlineBanner {
  max-width: 680px;
  margin: 8px auto 0;
  padding: 10px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(237,73,86,.3);
  background: rgba(237,73,86,.1);
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.headerTotal {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.3px;
  opacity: 0;
  transition: opacity 300ms;
}

/* ── Strip comeback hint ─────────────────────────── */
.stripComebackHint {
  font-size: 10px;
  font-weight: 700;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-top: 2px;
}

/* ── Insights card ───────────────────────────────── */
.insightGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 0;
}
.insightCell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.insightLabel {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
}
.insightValue {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.4px;
}
.insightValue--warn { color: #fbbf24; }
.insightTopEarner {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--stroke);
  font-size: 13px;
  color: var(--text2);
}
.insightTopEarner strong { color: var(--text); }

/* ── Cloud nudge / install banners ───────────────── */
.cloudNudge,
.installBanner {
  max-width: 680px;
  margin: 8px auto 0;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cloudNudge {
  background: rgba(0,149,246,.12);
  border: 1px solid rgba(0,149,246,.3);
  color: #60b8ff;
}
.installBanner {
  background: rgba(41,217,165,.12);
  border: 1px solid rgba(41,217,165,.3);
  color: var(--accent);
}

/* ── Comeback badge ───────────────────────────────── */
.comebackBadge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: rgba(250,204,21,.18);
  color: #fde047;
  vertical-align: middle;
}

.entryListHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.entryListHeader > div > div:first-child {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.entryListHeader > div > .small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.searchRow {
  margin-top: 8px;
}

/* Primary entry actions: scrollable chip row */
.entryActions {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 2px;
}
.entryActions::-webkit-scrollbar { display: none; }
.entryActions .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
}

/* Selection actions: hidden until items selected */
.entrySelectionActions {
  display: none;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--stroke);
}

.has-selection .entrySelectionActions { display: flex; }

/* ── Filter select pill ──────────────────────────── */
#filterSelect {
  width: auto;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface2);
  border: 1px solid var(--stroke2);
  color: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
}

/* ── Search highlight ────────────────────────────── */
.srchHl {
  background: rgba(250,204,21,.35);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* ── Empty state ─────────────────────────────────── */
.emptyState {
  text-align: center;
  padding: 32px 16px;
}

.emptyStateTitle {
  font-size: 16px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 6px;
}

.emptyStateSub {
  font-size: 13px;
  color: var(--muted);
}

/* ── Light theme — forced dark (app is always dark) ── */
[data-theme="light"] {
  /* iOS system light — standard, accessible, universal */
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface2: #e5e5ea;
  --surface3: #d1d1d6;
  --stroke: rgba(0,0,0,.12);
  --stroke2: rgba(0,0,0,.18);
  --text: #000000;
  --text1: #000000;
  --text2: rgba(0,0,0,.60);
  --muted: #3c3c43;
  --muted2: rgba(60,60,67,.60);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.10);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.16);
}

[data-theme="light"] header {
  background: rgba(240,242,245,.94);
  border-bottom-color: rgba(0,0,0,.10);
}

[data-theme="light"] .tabBar {
  background: rgba(255,255,255,.97);
  border-top-color: rgba(0,0,0,.10);
}

[data-theme="light"] .card {
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

[data-theme="light"] .item { box-shadow: 0 1px 3px rgba(0,0,0,.05); }

[data-theme="light"] .moreTabBar {
  background: #ffffff;
  border-bottom-color: rgba(0,0,0,.08);
}

[data-theme="light"] .moreToggleTrack {
  background: var(--surface3);
  border-color: var(--stroke2);
}

/* Light theme — hero & chart fixes */
[data-theme="light"] .heroSection { background: var(--surface); border-bottom: 1px solid var(--stroke); }
[data-theme="light"] .heroChartInner { background: var(--surface); border-color: var(--stroke2); border-top-color: rgba(37,99,235,.3); }
[data-theme="light"] .heroGoalPctText { color: var(--text); }
[data-theme="light"] .hcChartArea { border-top-color: var(--stroke2); }
[data-theme="light"] .heroAmt { color: var(--text); }
[data-theme="light"] .heroEyebrow { color: var(--muted); }
[data-theme="light"] .heroSubLine { color: var(--text2); }
[data-theme="light"] .heroPaceLine { color: var(--primary); }
[data-theme="light"] .hcTab { color: var(--muted); }
[data-theme="light"] .hcStat { border-right-color: var(--stroke2); }
[data-theme="light"] .hcStatsRow { border-top-color: var(--stroke2); }
[data-theme="light"] .hcGoalBarTrack { background: rgba(0,0,0,.12); }
[data-theme="light"] .hcEntriesList { border-top-color: var(--stroke2); }
[data-theme="light"] .hcEntryRow { border-bottom-color: var(--stroke2); }
[data-theme="light"] .hcEntryMore { border-top-color: var(--stroke2); }

/* Light theme — form & input visibility */
[data-theme="light"] .fr26Input { background: #fff; color: var(--text); border: 1.5px solid rgba(0,0,0,.22); }
[data-theme="light"] .fr26Input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
[data-theme="light"] .fr26Textarea { background: #fff; color: var(--text); border: 1.5px solid rgba(0,0,0,.22); }
[data-theme="light"] input::placeholder, [data-theme="light"] textarea::placeholder { color: #94a3b8; }
[data-theme="light"] .fr26Label { color: var(--text); font-weight: 600; }
[data-theme="light"] .fr26HourBtn { background: var(--surface2); color: var(--text2); border-color: rgba(0,0,0,.18); }
[data-theme="light"] .fr26HourBtn.selected { background: rgba(37,99,235,.15); border-color: var(--primary); color: var(--primary-dark); }
[data-theme="light"] .fr26HourBtn:hover { background: var(--surface3); }
[data-theme="light"] .fr26Chip { background: var(--surface2); color: var(--text); border-color: rgba(0,0,0,.18); }
[data-theme="light"] .fr26Check span { color: var(--text); }
[data-theme="light"] .segBtn { background: transparent; color: var(--text2); border-color: rgba(0,0,0,.15); }
[data-theme="light"] .segBtn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
[data-theme="light"] .pill { background: var(--surface2); color: var(--text); }
[data-theme="light"] .tabItem { color: var(--muted); }
[data-theme="light"] .tabItem--active { color: var(--primary); }
[data-theme="light"] .goalBar { background: var(--surface3); }
[data-theme="light"] .entryListHeader { color: var(--text); }
[data-theme="light"] select { background: #fff; color: var(--text); border: 1.5px solid rgba(0,0,0,.22); }
/* More page light mode */
[data-theme="light"] .moreInput { background: #fff; color: var(--text); border: 1.5px solid rgba(0,0,0,.22); }
[data-theme="light"] .moreRowLabel { color: var(--text); font-weight: 600; }
[data-theme="light"] .moreRowSub { color: var(--muted2); }
[data-theme="light"] .moreCardHeader { color: var(--text); }
[data-theme="light"] .moreTab { color: var(--muted); }
[data-theme="light"] .moreTab.active { color: var(--primary); border-bottom-color: var(--primary); }
/* Type chips light mode */
[data-theme="light"] .typeSuggestChip { background: #fff; border-color: rgba(0,0,0,.20); color: var(--text); }
[data-theme="light"] .typeSuggestChip:active { background: var(--surface2); }
[data-theme="light"] .tscMeta { color: var(--muted2); }
/* Bulk list light mode */
[data-theme="light"] .bulkEntryRef { color: var(--text); }
[data-theme="light"] .bulkEntryType { color: var(--muted); }
[data-theme="light"] .bulkEntryMeta { color: var(--muted); }
[data-theme="light"] .bulkDeleteBar { background: #fff; border-top-color: rgba(0,0,0,.14); }
/* Entry items light mode */
[data-theme="light"] .itemRef { color: var(--text); }
[data-theme="light"] .itemType { color: var(--muted); }
[data-theme="light"] .itemNotes { color: var(--muted); }
/* Misc */
[data-theme="light"] .hcRangeLabel { color: var(--text); }
[data-theme="light"] .hcStatVal { color: var(--text); }
[data-theme="light"] .hcStatLabel { color: var(--muted); }
[data-theme="light"] .k { color: var(--muted); }
[data-theme="light"] .tourMascotAvatar { background: var(--surface3); }

/* ── System light mode — same rules without needing JS to set data-theme ── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) header { background: rgba(240,242,245,.94); border-bottom-color: rgba(0,0,0,.10); }
  :root:not([data-theme="dark"]) .tabBar { background: rgba(255,255,255,.97); border-top-color: rgba(0,0,0,.10); }
  :root:not([data-theme="dark"]) .card { box-shadow: 0 1px 4px rgba(0,0,0,.06); }
  :root:not([data-theme="dark"]) .item { box-shadow: 0 1px 3px rgba(0,0,0,.05); }
  :root:not([data-theme="dark"]) .moreTabBar { background: #ffffff; border-bottom-color: rgba(0,0,0,.08); }
  :root:not([data-theme="dark"]) .heroSection { background: var(--surface); border-bottom: 1px solid var(--stroke); }
  :root:not([data-theme="dark"]) .heroChartInner { background: var(--surface); border-color: var(--stroke2); border-top-color: rgba(37,99,235,.3); }
  :root:not([data-theme="dark"]) .hcGoalBarTrack { background: rgba(0,0,0,.12); }
  :root:not([data-theme="dark"]) .fr26Input { background: #fff; color: var(--text); border: 1.5px solid rgba(0,0,0,.22); }
  :root:not([data-theme="dark"]) .fr26Input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
  :root:not([data-theme="dark"]) .fr26Textarea { background: #fff; color: var(--text); border: 1.5px solid rgba(0,0,0,.22); }
  :root:not([data-theme="dark"]) input::placeholder, :root:not([data-theme="dark"]) textarea::placeholder { color: #94a3b8; }
  :root:not([data-theme="dark"]) .fr26HourBtn { background: var(--surface2); color: var(--text2); border-color: rgba(0,0,0,.18); }
  :root:not([data-theme="dark"]) .fr26HourBtn.selected { background: rgba(37,99,235,.15); border-color: var(--primary); color: var(--primary-dark); }
  :root:not([data-theme="dark"]) .fr26Chip { background: var(--surface2); color: var(--text); border-color: rgba(0,0,0,.18); }
  :root:not([data-theme="dark"]) .segBtn { background: transparent; color: var(--text2); border-color: rgba(0,0,0,.15); }
  :root:not([data-theme="dark"]) .segBtn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
  :root:not([data-theme="dark"]) select { background: #fff; color: var(--text); border: 1.5px solid rgba(0,0,0,.22); }
  :root:not([data-theme="dark"]) .moreInput { background: #fff; color: var(--text); border: 1.5px solid rgba(0,0,0,.22); }
  :root:not([data-theme="dark"]) .typeSuggestChip { background: #fff; border-color: rgba(0,0,0,.20); color: var(--text); }
  :root:not([data-theme="dark"]) .bulkDeleteBar { background: #fff; border-top-color: rgba(0,0,0,.14); }
}

/* ── Short-pay trend ─────────────────────────────── */
.ptSummary {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--stroke);
}
.ptSummaryWarn { color: var(--danger); background: rgba(237,73,86,.07); }
.ptSummaryOk   { color: #10b981; }

.ptList { }

.ptRow {
  padding: 12px 16px;
  border-bottom: 1px solid var(--stroke);
}
.ptRow:last-child { border-bottom: 0; }
.ptRow--short { background: rgba(237,73,86,.05); }

.ptWeek {
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.ptCols {
  display: flex;
  gap: 0;
}

.ptCol { flex: 1; }
.ptColRight { text-align: right; }

.ptColLabel {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.ptColVal {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
  letter-spacing: -.3px;
}

.ptColSub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.ptActions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ptActionBtn {
  min-width: 72px;
}

.ptDeltaShort { color: var(--danger); }
.ptDeltaOver  { color: #10b981; }
.ptDeltaEven  { color: var(--muted); }

/* ── Compact list mode ───────────────────────────── */
body.compact .itemInner { padding: 9px 12px; }
body.compact .itemTop { font-size: 13px; }
body.compact .itemPay { font-size: 16px; }
body.compact .itemMeta { margin-top: 3px; }
body.compact .itemActions { margin-top: 5px; }
body.compact .small   { font-size: 11px; }
body.compact .list    { gap: 1px; }

/* ── iBtn active state (comeback toggle) ─────────── */
.iBtn--active {
  background: rgba(0,149,246,.18);
  color: var(--primary);
  border-color: rgba(0,149,246,.5);
}

/* ── Collapsible More-page sections ─────────────── */
.moreSectionDetails { }
.moreSectionSummary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.moreSectionSummary::-webkit-details-marker { display: none; }
.moreSectionSummary::after {
  content: "›";
  font-size: 18px;
  color: var(--muted2);
  transition: transform 200ms var(--ease);
  line-height: 1;
}
.moreSectionDetails[open] > .moreSectionSummary::after {
  transform: rotate(90deg);
}

/* ── Job type list rows (More page) ──────────────── */
/* Quick-add form (always visible) */
.typeAddInline {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.typeAddNameInput {
  width: 100%;
  box-sizing: border-box;
}
.typeAddRow2 {
  display: flex;
  gap: 8px;
  align-items: center;
}
.typeAddRow2 .moreInputNarrow {
  width: 72px;
  flex-shrink: 0;
}
.typeAddRow2 .typeAddSubmitBtn {
  flex: 1;
  min-height: 40px;
}
.typeAddMiniLabel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* Keep old classes for backwards compat */
.typeAddDetails { border-top: 1px solid var(--stroke); }
.typeAddForm { padding: 0 16px 14px; border-top: 1px solid var(--stroke); }
.typeAddFields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 12px; }
.typeAddFields .typeNameField { grid-column: 1 / -1; }
.typeAddFields .btn { grid-column: 1 / -1; width: 100%; }

.typeRow {
  padding: 12px 16px;
  border-top: 1px solid var(--stroke);
  transition: background 120ms;
}
.typeRow:first-child { border-top: none; }
.typeRow:active { background: var(--surface2); }
.typeRowMain {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.typeRowInfo {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.typeRowName {
  font-weight: 600;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.typeRowMeta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.typeRowActions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.typeRowActions .iBtn {
  padding: 8px 14px;
  font-size: 12px;
  min-height: 38px;
}
.typeEditForm {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--stroke);
  animation: itemSlideIn 200ms ease both;
}
.typeEditFields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
}
.typeEditActions {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
}
.typeEditActions .btn { flex: 1; }
.typeEditLabel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.typeEditLabel input { font-size: 14px; }

/* ── Inner More-page tab bar ─────────────────────────── */
.moreTabBar {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--stroke);
  padding: 0 4px;
  position: sticky;
  top: 0;
  z-index: 110; /* above .top header (z-index:100) so it's never covered when scrolled */
}

.moreTab {
  flex: 1;
  padding: 12px 4px 11px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 140ms var(--ease);
  touch-action: manipulation;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.moreTab.active { color: var(--primary); }

.moreTab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.moreTabPanel { display: none; }
.moreTabPanel.active { display: block; }

/* ── Icon-only buttons for job type rows ─────────────── */
.typeIconBtn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--stroke2);
  background: var(--surface2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 120ms, color 120ms;
  touch-action: manipulation;
  padding: 0;
}
.typeIconBtn:active { opacity: .65; }
.typeIconBtn--del {
  color: var(--danger);
  border-color: rgba(239,68,68,.2);
  background: rgba(239,68,68,.05);
}

/* ── Bulk delete (History tab) ───────────────────────── */
.bulkEntryRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-top: 1px solid var(--stroke);
  transition: background 120ms;
  cursor: default;
  /* pan-y: iOS handles vertical scroll natively; we own horizontal for swipe-to-delete */
  touch-action: pan-y;
}
.bulkEntryRow:first-child { border-top: none; }
.bulkEntryRow.is-selected { background: rgba(37,99,235,.08); }
.bulkEntryCheck { display: flex; align-items: center; flex-shrink: 0; }
.bulkEntryCheck input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }
.bulkEntryInfo { flex: 1; min-width: 0; }
.bulkEntryRef { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulkEntryType { font-weight: 400; color: var(--muted); font-size: 13px; }
.bulkEntryNoRef { color: var(--muted); font-weight: 400; font-style: italic; }
.bulkEntryMeta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.bulkDeleteBar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--stroke);
  background: var(--surface);
  z-index: 10;
}

/* RO# always-visible row */
.fr26RowRef .fr26LabelRow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.fr26RefTypeSeg { font-size: 11px; }
.fr26RefTypeSeg .segBtn { padding: 4px 10px; font-size: 11px; min-height: 30px; }

.moreCardHeaderRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 12px;
}

/* ── Offline dot ─────────────────────────────────── */
.offlineDot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
  transition: background 400ms;
}
/* 3 states: offline (red pulse), pending (orange pulse), synced (green dim)
   will-change only on animated states — avoids a permanent compositor layer */
.offlineDot--offline  { background: var(--danger); animation: pulseDot 1.4s ease-in-out infinite; will-change: transform, opacity; }
.offlineDot--pending  { background: #f59e0b; animation: pulseDot 1s ease-in-out infinite; will-change: transform, opacity; }
.offlineDot--synced   { background: var(--primary); opacity: .55; }

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}

/* Rate hint in earnings preview */
.epRate { font-size: 11px; color: var(--muted2); margin-left: 4px; }

/* ── Week summary bar (History tab) ──────────────── */
.histWeekBar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--stroke);
  font-size: 12px;
}
.histWeekLabel { color: var(--muted); font-weight: 600; flex-shrink: 0; }
.histWeekStat  { color: var(--text2); }
.histWeekPay   { color: var(--primary); font-weight: 700; margin-left: auto; }

/* ── Short-pay badge on More button ──────────────── */
.headerMoreBtn { position: relative; }
.shortPayBadge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* ── Onboarding modal ────────────────────────────── */
#onboardingModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 24px;
}
.onboardCard {
  width: 100%;
  max-width: 360px;
  padding: 28px 24px 24px;
}
.onboardTitle {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.onboardSub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.onboardField {
  margin-bottom: 14px;
}
.onboardLabel {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 6px;
}

/* ── Dup warning — make it impossible to miss ────── */
#dupWarnGlobal {
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
#dupWarnGlobal[data-level="strong"] {
  background: rgba(237,73,86,.15);
  color: #f87171;
  border: 1px solid rgba(237,73,86,.35);
  animation: shakeWarn .35s ease;
}
#dupWarnGlobal[data-level="weak"] {
  background: rgba(234,179,8,.12);
  color: #fbbf24;
  border: 1px solid rgba(234,179,8,.3);
}
@keyframes shakeWarn {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

/* ── Onboarding Tour ─────────────────────────────── */
#tourOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: all;
  background: rgba(0,0,0,0.72);
  transition: background 300ms ease;
}

#tourOverlay.tour-has-target { background: transparent; }

#tourOverlay:not(.tour-has-target) .tourTooltip {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

/* Spring-based spotlight — feels physical when it jumps between elements */
#tourSpotlight {
  position: fixed;
  border-radius: var(--r-lg);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.72);
  border: 2.5px solid var(--primary);
  transition:
    top    420ms cubic-bezier(0.34, 1.3, 0.64, 1),
    left   420ms cubic-bezier(0.34, 1.3, 0.64, 1),
    width  420ms cubic-bezier(0.34, 1.3, 0.64, 1),
    height 420ms cubic-bezier(0.34, 1.3, 0.64, 1);
  pointer-events: none;
  display: none;
}

/* Tooltip slides up on first appear */
.tourTooltip {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  background: var(--surface);
  border: 1px solid rgba(0,149,246,.25);
  border-radius: var(--r-xl);
  padding: 20px 18px 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,.55), 0 0 0 1px rgba(0,149,246,.1);
  z-index: 10001;
  max-width: 520px;
  margin: 0 auto;
  animation: tourTooltipIn 480ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes tourTooltipIn {
  from { opacity: 0; transform: translateY(36px) scale(0.93); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Each step's content fades+slides in */
.tourTooltip.step-enter .tourStepLabel { animation: tourContentIn 280ms cubic-bezier(0.4,0,.2,1) both; }
.tourTooltip.step-enter .tourTitle     { animation: tourContentIn 300ms cubic-bezier(0.4,0,.2,1) 40ms  both; }
.tourTooltip.step-enter .tourBody      { animation: tourContentIn 300ms cubic-bezier(0.4,0,.2,1) 90ms  both; }

@keyframes tourContentIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.tourHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tourStepLabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--primary);
}

.tourSkip {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: color 150ms;
}
.tourSkip:hover  { color: var(--text); }
.tourSkip:active { color: var(--text2); }

.tourTitle {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -.2px;
  color: var(--text);
}

.tourBody {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 18px;
}

.tourFooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Pill-shaped progress dots — active dot expands into a capsule */
.tourDots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.tourDot {
  height: 6px;
  width: 6px;
  border-radius: 3px;
  background: var(--stroke2);
  transition: width 300ms cubic-bezier(0.34,1.4,.64,1), background 200ms ease;
}

.tourDot--active {
  width: 20px;
  background: var(--primary);
}

/* Next button press feedback */
#tourNextBtn {
  transition: transform 100ms ease, opacity 100ms ease;
  min-width: 80px;
}
#tourNextBtn:active { transform: scale(0.94); opacity: .85; }

/* Double-ring expanding pulse on spotlight */
@keyframes tourPulse {
  0%   {
    box-shadow: 0 0 0 9999px rgba(0,0,0,.72),
                0 0 0 0   rgba(0,149,246,.7),
                0 0 0 0   rgba(0,149,246,.3);
  }
  60%  {
    box-shadow: 0 0 0 9999px rgba(0,0,0,.72),
                0 0 0 10px rgba(0,149,246,.0),
                0 0 0 20px rgba(0,149,246,.0);
  }
  100% {
    box-shadow: 0 0 0 9999px rgba(0,0,0,.72),
                0 0 0 0   rgba(0,149,246,.7),
                0 0 0 0   rgba(0,149,246,.3);
  }
}

#tourSpotlight.pulse {
  animation: tourPulse 1.8s cubic-bezier(0.4,0,0.6,1) infinite;
}

/* ── Tour mascot — FR Buddy guide character ──────────────────────────────── */
.tourMascotBar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.tourMascotAvatar {
  width: 46px;
  height: 46px;
  border-radius: 22%;
  background: #0b1220; /* light override below */
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  animation: mascotBob 2.8s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(37,99,235,0.25);
}

@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  45%       { transform: translateY(-5px) rotate(1.5deg); }
  70%       { transform: translateY(-2px) rotate(0deg); }
}

.tourMascotName {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .03em;
}

.tourMascotSub {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

/* Very small phones (< 380px) */
@media (max-width: 380px) {
  .moreSaveBtn { min-width: 0; font-size: 13px; padding: 10px 8px; }
  .moreInputNarrow { min-width: 72px; }
  .seg { font-size: 13px; }
  .segBtn { padding: 8px 6px; }
  .fr26HourBtn { font-size: 13px; min-width: 52px; }
  .histEntryRefNum { font-size: 14px; }
}

/* Tablet / small desktop (681px – 960px) */
@media (min-width: 681px) {
  .wrap, main { padding-left: 24px; padding-right: 24px; }
  .moreCard { border-radius: var(--r-xl); }
  .card { border-radius: var(--r-xl); }
  .historySheet { max-width: 640px; margin: 0 auto; border-radius: var(--r-xl); align-self: center; }
  .historyOverlay { align-items: center; }
  .moreSaveBtn { min-width: 0; }
}

/* Wide desktop (> 960px) */
@media (min-width: 961px) {
  header { max-width: 680px; margin: 0 auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .top   { max-width: 680px; margin: 0 auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
  body   { background: var(--surface2); }
  main, .wrap {
    background: var(--bg);
    border-radius: var(--r-xl);
    margin-top: 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,.4);
  }
  .tabBar { max-width: 680px; left: 50%; transform: translateX(-50%); border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .historySheet { max-width: 640px; margin: 0 auto; border-radius: var(--r-xl); align-self: center; }
  .historyOverlay { align-items: center; }
}

/* ── Entry type-color left border ─────────────────── */
.item {
  border-left: 3px solid var(--surface3);
  border-radius: var(--r-lg);
}
.item[data-tc="sold"]     { border-left-color: #22c55e; }
.item[data-tc="warranty"] { border-left-color: #f59e0b; }
.item[data-tc="fpf"]      { border-left-color: #60a5fa; }
.item[data-tc="preowned"] { border-left-color: #a78bfa; }
.item[data-tc="default"]  { border-left-color: var(--surface3); }

/* ── Hero section ─────────────────────────────────── */
.heroSection {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px 16px;
  max-width: 680px;
  margin: 0 auto;
  background: linear-gradient(to bottom, rgba(37,99,235,.07) 0%, transparent 100%);
  position: relative;
}

.heroGoalRingWrap {
  position: relative;
  width: 102px;
  height: 102px;
  flex-shrink: 0;
}
.heroGoalRingWrap svg { display: block; width: 102px; height: 102px; }
.heroGoalRingCenter {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.heroGoalPctText {
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -.8px;
}
.heroGoalSubText {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 3px;
  text-transform: uppercase;
}

.heroRight { flex: 1; min-width: 0; }
.heroEyebrow {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.heroAmt {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1.8px;
  line-height: 1;
}
.heroSubLine {
  font-size: 12px;
  color: var(--text2);
  margin-top: 5px;
}
.heroPaceLine {
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  margin-top: 3px;
  min-height: 14px;
}
.heroPayPeriodLine {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: .01em;
}
[data-theme="light"] .heroPayPeriodLine { color: var(--muted2); }
.heroPaceWarn {
  font-size: 11px;
  font-weight: 600;
  /* Amber, not red: being behind pace mid-week is a nudge, not an error. */
  color: #f59e0b;
  margin-top: 2px;
  min-height: 14px;
  letter-spacing: .01em;
}
.heroEfficiency {
  font-size: 11px;
  margin-top: 3px;
  line-height: 1.3;
}
.effLabel { color: var(--muted); }

/* ── Clock-in button ──────────────────────────────── */
.clockInBtn {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--stroke);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .15s, color .15s, border-color .15s;
}
.clockInBtn--active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,.08);
}
.clockInBtn:active { transform: scale(.95); }

/* ── Repeat / combo chips ─────────────────────────── */
.repeatChip, .comboSuggestChip {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  border: 1.5px dashed var(--stroke);
  background: var(--surface2);
  color: var(--text2);
  transition: background .12s, border-color .12s;
}
.repeatChip:active, .comboSuggestChip:active { background: var(--surface3); }
.comboSuggestChip { border-style: dashed; border-color: rgba(37,99,235,.4); color: var(--primary); }

/* ── Owe Me tracker ───────────────────────────────── */
.oweMeTotalBadge {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
  background: rgba(237,73,86,.1);
  padding: 2px 8px;
  border-radius: 10px;
}
.oweMeRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--stroke);
  gap: 8px;
}
.oweMeDesc { font-size: 13px; color: var(--text); flex: 1; }
.oweMeRight { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.oweMeAmt { font-size: 13px; font-weight: 700; color: var(--danger); }
.oweMeDate { font-size: 11px; color: var(--muted2); }

/* ── Hero chart card (unified range + chart + stats) ─ */
.heroChartCard {
  padding: 0 16px 10px;
  max-width: 680px;
  margin: 0 auto;
}
.heroChartInner {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-top: 2px solid rgba(37,99,235,.25);
  border-radius: var(--r-xl);
  overflow: hidden;
}

/* Range tabs row */
.hcRangeTabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 10px 12px 8px;
}
.hcTab {
  padding: 7px 14px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, color 150ms, box-shadow 150ms;
  touch-action: manipulation;
}
.hcTab.hcTab--active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(37,99,235,.35);
}
/* Nav group: label flanked by prev/next arrows */
.hcNavGroup {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hcRangeLabel {
  font-size: 12px;
  color: var(--muted2);
  font-weight: 600;
  letter-spacing: .2px;
  min-width: 52px;
  text-align: center;
}

/* Chart area — always visible, skeleton → real bars */
.hcChartArea {
  padding: 8px 10px 0;
  border-top: 1px solid var(--stroke);
}
.heroChartSvg {
  width: 100%;
  height: 56px;
  display: block;
  overflow: visible;
}
/* Skeleton bars shown before JS loads */
.hcBarSkel {
  fill: rgba(255,255,255,.07);
}
.hcBarSkel--today {
  fill: rgba(37,99,235,.18);
}
[data-theme="light"] .hcBarSkel { fill: rgba(0,0,0,.07); }
[data-theme="light"] .hcBarSkel--today { fill: rgba(37,99,235,.18); }

.heroChartLabelsRow {
  display: flex;
  justify-content: space-between;
  padding: 3px 2px 8px;
}
.heroChartLabel {
  font-size: 10px;
  color: var(--muted2);
  font-weight: 500;
  text-align: center;
  flex: 1;
}
.heroChartLabel--now { color: var(--primary); font-weight: 700; }

/* Stats row */
.hcStatsRow {
  display: flex;
  border-top: 1px solid var(--stroke);
}
.hcStat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px;
  border-right: 1px solid var(--stroke);
}
.hcStat:last-child { border-right: none; }
.hcStatVal {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.5px;
  line-height: 1;
}
.hcStat--pay .hcStatVal { color: var(--primary); }
.hcStatLbl {
  font-size: 10px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 4px;
}

/* Goal bar — now lives inside heroRight */
.hcGoalBar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}
.hcGoalBarTrack {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.12);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.hcGoalBarFill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--primary);
  transition: width 600ms var(--ease);
  width: 0%;
}
.hcGoalBarFill.complete { background: var(--accent); }
.hcGoalBarMeta {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Nav buttons — live inside .hcNavGroup flanking the label */
.hcNavBtn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface2);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
  transition: background 120ms, color 120ms;
}
.hcNavBtn:not(:disabled):active { background: var(--primary); color: #fff; }
.hcNavBtn:disabled { opacity: .3; cursor: default; }

/* VIN search bar */
.hcVinSearch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 4px;
}
.hcVinSearchInput {
  flex: 1;
  padding: 6px 10px;
  height: auto;
  border-radius: 8px;
  letter-spacing: .05em;
}
.hcVinClearBtn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  flex-shrink: 0;
}
.hcVinClearBtn:active { color: var(--fg); }

/* Inline entries list */
.hcEntriesList {
  border-top: 1px solid var(--stroke);
}
/* Entry row wrapper */
.hcEntryWrap {
  border-bottom: 1px solid var(--stroke);
}
.hcEntryWrap:last-child { border-bottom: none; }

.hcEntryRow {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 8px;
  min-height: 52px;
  background: var(--card-bg, var(--bg));
  transition: background 120ms;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}
.hcEntryRow:active { background: var(--surface2); }

/* Inline action buttons — edit + delete, always visible */
.hcEntryActions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}
.hcEntryEditBtn {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--surface2);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hcEntryEditBtn:active { background: var(--surface3); color: var(--text); }

.hcEntryDelBtn {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  border: none;
  background: rgba(239,68,68,.1);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hcEntryDelBtn:active { background: rgba(239,68,68,.22); }

.hcEntryLeft {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.hcEntryRef {
  font-size: 13px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--text);
  line-height: 1.2;
}
.hcEntryRef--photo {
  color: var(--text);
}
/* Dedicated photo chip — clearly tappable */
.hcEntryPhotoChip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(37,99,235,.1);
  border: 1px solid rgba(37,99,235,.28);
  border-radius: var(--r-pill);
  padding: 2px 8px 2px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  align-self: flex-start;
  margin-top: 2px;
}
.hcEntryPhotoChip:active { background: rgba(37,99,235,.22); opacity: .85; }
.hcEntryPhotoIcon { font-size: 12px; }
.hcEntryType {
  font-size: 13px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcEntryVin {
  font-size: 10px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .04em;
}
.hcEntryDate {
  font-size: 10px;
  color: var(--muted);
}
.hcEntryRight {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.hcEntryPay {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}
.hcEntryHrs {
  font-size: 11px;
  color: var(--muted);
}
/* .hcEntryEditBtn defined above in .hcEntryActions block */
.hcEntryEmpty {
  padding: 20px 14px;
  font-size: 13px;
  color: var(--muted2);
  text-align: center;
}
.hcEntryMore {
  padding: 10px 14px;
  font-size: 11px;
  color: var(--muted2);
  text-align: center;
  border-top: 1px solid var(--stroke);
}

/* Action buttons inside heroChartCard */
.hcActionRow {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--stroke);
}
.hcActionRow::-webkit-scrollbar { display: none; }
.hcActionRow .btn {
  flex: 0 0 auto;
  font-size: 13px;
  padding: 7px 14px;
  white-space: nowrap;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke2);
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  touch-action: manipulation;
}

/* JS compat — always hidden, JS can't override */
.js-compat { display: none !important; }

/* ─── Animations & Live Effects ─────────────────────── */
/* ── Action Sheet ──────────────────────────────────────────────────── */
.asOverlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  background: rgba(0,0,0,0);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background 220ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.asOverlay--in {
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.asCard {
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 0 16px calc(env(safe-area-inset-bottom, 20px) + 12px);
  transform: translateY(100%);
  transition: transform 220ms var(--ease);
}
.asOverlay--in .asCard {
  transform: translateY(0);
}
.asHandle {
  width: 36px; height: 4px;
  background: var(--stroke2);
  border-radius: 99px;
  margin: 10px auto 14px;
}
.asTitle {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}
.asMsg {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.4;
}
.asConfirm {
  width: 100%;
  padding: 15px;
  border-radius: var(--r-lg);
  border: none;
  background: var(--surface2);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  margin-bottom: 10px;
}
.asConfirm.asDanger {
  background: rgba(239,68,68,.12);
  color: #ef4444;
}
.asConfirm:active { opacity: .75; }
.asCancel {
  width: 100%;
  padding: 15px;
  border-radius: var(--r-lg);
  border: none;
  background: var(--surface2);
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
}
.asCancel:active { opacity: .75; }

[data-theme="light"] .asCard { background: #f2f2f7; }
[data-theme="light"] .asConfirm { background: #fff; }
[data-theme="light"] .asCancel { background: #fff; }

@keyframes itemSlideIn {
  from { opacity:0; transform:translateY(18px) scale(.96); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}
.item.item-enter { animation:itemSlideIn 340ms cubic-bezier(.34,1.56,.64,1) both; }

@keyframes btnPop {
  0%,100% { transform:scale(1); }
  40%     { transform:scale(.90); }
  70%     { transform:scale(1.07); }
}
.fr26BtnPrimary.btn-success { animation:btnPop 400ms cubic-bezier(.34,1.56,.64,1); }

.fr26HourBtn { transition:transform 130ms cubic-bezier(.34,1.56,.64,1),background 120ms,border-color 120ms,color 120ms; }
.fr26HourBtn:active { transform:scale(.83); }

@keyframes heroNumPop {
  0%,100% { transform:scale(1); }
  50%     { transform:scale(1.09); }
}
.heroAmt.pop { animation:heroNumPop 360ms cubic-bezier(.34,1.56,.64,1); }

@keyframes cfDrop {
  0%   { opacity:1; transform:translate(0,0) rotate(0deg); }
  100% { opacity:0; transform:var(--cf-end) rotate(var(--cf-rot)); }
}
.cfp {
  position:fixed; width:8px; height:8px; border-radius:2px;
  pointer-events:none; z-index:9999;
  animation:cfDrop var(--cf-dur,700ms) ease-in forwards;
}

/* Pull-to-refresh */
#ptrBar {
  height:0; overflow:hidden; display:flex; align-items:center;
  justify-content:center; gap:7px; font-size:11px; color:var(--primary);
  transition:height 200ms ease; background:var(--bg);
}
#ptrBar.active { height:34px; }
#ptrDot {
  width:14px; height:14px; border:2px solid var(--primary);
  border-top-color:transparent; border-radius:50%;
}
@keyframes spinDot { to { transform:rotate(360deg); } }
#ptrDot.spin { animation:spinDot 500ms linear infinite; }

/* Milestone toast */
.mToast {
  position:fixed; bottom:88px; left:50%;
  transform:translateX(-50%) translateY(14px);
  background:var(--surface2); border:1.5px solid var(--primary);
  color:#fff; padding:10px 22px; border-radius:24px;
  font-size:13px; font-weight:600; opacity:0;
  transition:opacity 230ms ease, transform 230ms ease;
  pointer-events:none; z-index:998; white-space:nowrap;
}
.mToast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* Streak pill */
.heroStreak {
  display:inline-flex; align-items:center; gap:3px;
  font-size:10px; font-weight:700; color:var(--primary);
  background:rgba(37,99,235,.1); border:1px solid rgba(37,99,235,.2);
  border-radius:8px; padding:2px 7px; margin-top:4px; letter-spacing:.04em;
}

/* Short-pay flag */
.shortPayFlag {
  font-size:10px; font-weight:700;
  background:rgba(245,158,11,.15); color:#f59e0b;
  border-radius:4px; padding:1px 5px; margin-left:4px; vertical-align:middle;
}

/* Empty state */
.emptyWrap {
  padding:36px 16px; display:flex; flex-direction:column;
  align-items:center; gap:6px; text-align:center;
}
.emptyIcon { font-size:40px; line-height:1.1; }
.emptyTitle { font-size:15px; font-weight:600; color:var(--text); margin-top:4px; }
.emptySub { font-size:12px; color:var(--muted); max-width:220px; line-height:1.55; }

/* ── fr26Wrap — form positioned outside <main> ────── */
.fr26Wrap {
  padding: 0 16px 8px;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Label row (label + timer button on same line) ── */
.fr26LabelRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Job timer button ───────────────────────────── */
.fr26TimerBtn {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--stroke2);
  border-radius: var(--r-pill);
  background: var(--surface2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 120ms, color 120ms, border-color 120ms;
  touch-action: manipulation;
  letter-spacing: .3px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.fr26TimerBtn::before { content: "⏱"; font-size: 14px; font-family: inherit; }
.fr26TimerBtn--running {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.45);
  color: #ef4444;
}
.fr26TimerBtn--running::before { content: "■"; font-size: 10px; }
.fr26TimerBtn:active { transform: scale(.93); transition-duration: 60ms; }
[data-theme="light"] .fr26TimerBtn { background: var(--surface2); border-color: var(--stroke); }

/* ── Comeback chip active state ─────────────────── */
.fr26ChipComeback--active {
  background: rgba(239,68,68,.12) !important;
  border-color: rgba(239,68,68,.45) !important;
  color: #ef4444 !important;
}

/* ── Short-pay alert banner ─────────────────────── */
.shortPayAlert {
  display: none;
  margin: 0 16px 6px;
  max-width: calc(680px - 32px);
  margin-left: auto;
  margin-right: auto;
  padding: 10px 14px;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--r-lg);
  font-size: 13px;
  font-weight: 600;
  color: #f59e0b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.shortPayAlert a {
  color: inherit;
  text-decoration: none;
  margin-left: auto;
  font-size: 12px;
  opacity: .85;
  white-space: nowrap;
}
.shortPayAlert:empty, .shortPayAlert[hidden] { display: none !important; }

/* ── Hero records (best day / best week) ──────────── */
.heroRecords {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
  letter-spacing: .1px;
}

/* ── Tech Rank badge ─────────────────────────────── */
.techRankBadge {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 5px;
  letter-spacing: .1px;
  opacity: .9;
}

/* ── Level-up overlay ────────────────────────────── */
.levelUpOverlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.levelUpCard {
  text-align: center;
  padding: 40px 48px;
  background: var(--surface2);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.levelUpEmoji {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
}
.levelUpLabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.levelUpRank {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -.5px;
}
.levelUpSub {
  font-size: 14px;
  color: var(--muted);
}
@keyframes levelUpIn {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes levelUpOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.05); }
}
.levelUp-enter .levelUpCard { animation: levelUpIn 350ms cubic-bezier(.34,1.56,.64,1) forwards; }
.levelUp-exit  { animation: levelUpOut 400ms ease forwards; }

/* ── Goal setter popover ─────────────────────────── */
.heroGoalRingWrap { cursor: pointer; }
.heroGoalRingWrap:active { opacity: .85; }

.goalPopover {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.goalPopoverInner {
  width: 100%;
  max-width: 320px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.goalPopoverTitle {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}
.goalTypeSeg { display: flex; gap: 6px; }
.goalTypeSeg .segBtn { flex: 1; }
.goalPopoverHint {
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
}
.goalPopoverActions {
  display: flex;
  gap: 8px;
  flex-direction: column;
}
.goalSaveBtn {
  min-height: 48px;
  font-size: 15px;
}

/* ── 8-week earnings chart ────────────────────────── */
.eightWkLabels {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  margin-top: 4px;
}
.eightWkLabel {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}
.eightWkLabel--now {
  color: var(--primary);
  font-weight: 700;
}
.eightWkEmptyState {
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── Comeback stats grid ─────────────────────────── */
.cbStatsGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.cbStat {
  background: var(--surface2);
  border-radius: var(--r-md);
  padding: 10px 8px;
  text-align: center;
}
.cbStat--cost { background: rgba(239,68,68,.08); }
.cbStatVal {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.5px;
  line-height: 1.2;
}
.cbStat--cost .cbStatVal { color: #ef4444; }
.cbStatLbl {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cbAlert {
  font-size: 12px;
  color: #f59e0b;
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--r-md);
  padding: 8px 12px;
  line-height: 1.4;
}
.cbGood {
  font-size: 12px;
  color: var(--primary);
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.18);
  border-radius: var(--r-md);
  padding: 8px 12px;
}

[data-theme="light"] .cbStat { background: var(--surface2); }
[data-theme="light"] .cbStat--cost { background: rgba(239,68,68,.07); }
[data-theme="light"] .shortPayAlert { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.35); }

/* ── What's New / Payday Summary modal sheet ────── */
.whatsNewSheet {
  background: var(--card-bg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-lg);
  border-radius: 16px;
  padding: 20px 20px 24px;
  max-width: 420px;
  width: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.whatsNewHeader { display:flex; align-items:center; gap:12px; }
.whatsNewTitle { font-size:18px; font-weight:800; color:var(--text1); line-height:1.1; }
.whatsNewVersion { font-size:12px; color:var(--primary); font-weight:700; margin-top:2px; }
.modalCloseBtn {
  margin-left: auto;
  background: var(--surface2);
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  font-size: 14px; color: var(--text2);
  cursor: pointer;
  display: flex; align-items:center; justify-content:center;
  flex-shrink: 0;
}
.whatsNewList { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.whatsNewList li { display:flex; gap:10px; align-items:flex-start; font-size:14px; color:var(--text1); line-height:1.4; }
.whatsNewList li::before { content:"✓"; color:var(--primary); font-weight:800; flex-shrink:0; margin-top:1px; }

/* ── UX Polish fixes ────────────────────────────────────────── */

/* Fix #1: Save button — always looks actionable */
.fr26PrimaryAction { padding: 10px 14px 12px; }
.fr26BtnPrimary { box-shadow: 0 4px 20px rgba(37,99,235,.35); }

/* Fix #5: Clear chip — danger tint so it's not confused with positive actions */
.fr26ChipDanger {
  color: var(--danger) !important;
  border-color: rgba(239,68,68,.4) !important;
}
.fr26ChipDanger:active { background: rgba(239,68,68,.10) !important; }

/* Fix #11: Stats header — make "Breakdown" smaller, just a label not a hero h1 */
#spa-stats header h1 { font-size: 18px; font-weight: 700; }

/* Fix #15: Accordion rows in History — add descriptive sub-text color */
.moreSectionSummary { cursor: pointer; }
.moreSectionSummary::marker { color: var(--primary); }

/* Fix #16: Auth form — add a hint label so fields don't look broken */
.authHint {
  font-size: 12px;
  color: var(--muted);
  padding: 0 0 10px;
}

/* Fix #19: Standardize .btn border-radius to match fr26BtnPrimary */
.btn { border-radius: var(--r-md); }

/* Fix #20: Header title styling */
header h1 .headerIcon { font-size: 15px; margin-right: 4px; }

/* Light theme: stats chips fade */
[data-theme="light"] .statsChipsOuter::after {
  background: linear-gradient(to right, transparent, var(--bg));
}

/* ── Recent Job Type Quick-Tap Chips ────────────────────────────── */
.recentTypeChips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.recentTypeChips:empty { display: none; }
.recentTypeChips::-webkit-scrollbar { display: none; }

.recentTypeChip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: var(--r-md);
  background: rgba(37,99,235,.12);
  border: 1.5px solid rgba(37,99,235,.28);
  cursor: pointer;
  transition: background 120ms var(--ease), transform 100ms var(--ease-bounce), border-color 120ms;
  max-width: 140px;
}
.recentTypeChip:active { transform: scale(.91); background: rgba(37,99,235,.22); }
.recentTypeChipName {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.recentTypeChipHours {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}

@keyframes recentChipPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.recentTypeChip.tapped { animation: recentChipPop 260ms cubic-bezier(.34,1.56,.64,1); }

/* ── Snappy Polish Pack ─────────────────────────────────────────── */

/* Validation shake */
@keyframes fieldShake {
  0%,100% { transform:translateX(0); }
  18%     { transform:translateX(-9px); }
  36%     { transform:translateX(8px); }
  54%     { transform:translateX(-6px); }
  72%     { transform:translateX(5px); }
  88%     { transform:translateX(-2px); }
}
.shake { animation:fieldShake 370ms ease !important; }
.invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.18) !important;
  transition: border-color 100ms, box-shadow 100ms !important;
}
.invalid-chip { box-shadow: 0 0 0 3px rgba(239,68,68,.2); }

/* Input focus glow — snappy pop on focus */
@keyframes inputFocusPop {
  from { box-shadow: 0 0 0 0 rgba(37,99,235,.45); }
  to   { box-shadow: 0 0 0 4px rgba(37,99,235,.18); }
}
input.fr26Input:focus, textarea.fr26Input:focus {
  animation: inputFocusPop 180ms ease forwards;
}

/* Chip bounce on programmatic select */
@keyframes chipSelect {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.26); }
  100% { transform: scale(1); }
}
.fr26HourBtn.chipPop { animation: chipSelect 290ms cubic-bezier(.34,1.56,.64,1); }

/* Earnings preview pop when value changes */
@keyframes epPop {
  from { opacity:0.55; transform:scale(.93) translateY(5px); }
  to   { opacity:1;    transform:scale(1)   translateY(0); }
}
#earningsPreview.pop { animation: epPop 230ms cubic-bezier(.34,1.56,.64,1); }

/* Stronger save button press */
.fr26BtnPrimary:active {
  transform: scale(0.93) !important;
  transition-duration: 45ms !important;
}

/* Page fade-in on SPA tab switch */
@keyframes spaPageIn {
  from { opacity:0; transform:translateY(9px); }
  to   { opacity:1; transform:translateY(0); }
}
.spaPageIn { animation: spaPageIn 210ms cubic-bezier(.25,.46,.45,.94) both; }

/* Tab icon pulse on switch */
@keyframes tabIconPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.32); }
  100% { transform: scale(1); }
}
.tabItem--active .tabIcon { animation: tabIconPop 280ms cubic-bezier(.34,1.56,.64,1); }

/* Save success: background flash green */
@keyframes saveBtnFlash {
  0%,100% { background: var(--primary); transform: scale(1); }
  35%     { background: #1d4ed8; transform: scale(.96); }
  65%     { background: #4ade80; transform: scale(1.04); }
}
.fr26BtnPrimary.btn-success {
  animation: saveBtnFlash 380ms cubic-bezier(.34,1.56,.64,1) !important;
}

/* Earnings preview — rate sub-label */
.epRate { font-size: 11px; opacity: 0.65; font-weight: 500; margin-left: 2px; }

/* ── Chart card: dollar amounts above day labels + vs-last-week meta ── */
.heroChartLabel {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  cursor: pointer;
}
.heroChartLabelAmt {
  font-size: 8px;
  font-weight: 700;
  color: var(--primary);
  min-height: 10px;
  line-height: 1;
  white-space: nowrap;
}
.heroChartMeta {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  padding: 2px 4px 6px;
  opacity: 0.8;
  letter-spacing: .1px;
}

/* ── Motion Pack v1.5 ──────────────────────────────────────────────────────── */

/* Pay total lands with a reward glow (fires only when earnings grew) */
@keyframes heroAmtGlow {
  0%   { text-shadow: 0 0 0 rgba(255,255,255,0); }
  35%  { text-shadow: 0 0 22px rgba(255,255,255,.65), 0 0 6px rgba(96,158,255,.55); }
  100% { text-shadow: 0 0 0 rgba(255,255,255,0); }
}
.heroAmt.landed { animation: heroAmtGlow 680ms ease-out; }

/* Entry rows give a subtle press-in so taps feel physical */
.item { transition: transform 130ms cubic-bezier(.34,1.56,.64,1); }
.item:active { transform: scale(.985); }

/* Scan hero: bouncier spring on press (primary action deserves the best feel) */
.scanHeroBtn { transition: transform .14s cubic-bezier(.34,1.56,.64,1), box-shadow .14s var(--ease); }
.scanHeroBtn:active { transform: scale(.955); }

/* Tab bar: label lifts slightly on the active tab */
.tabItem { transition: transform 160ms cubic-bezier(.34,1.56,.64,1); }
.tabItem:active { transform: scale(.9); }

/* Generic pressable pill/chip springiness */
.recentTypeChip { transition: transform 140ms cubic-bezier(.34,1.56,.64,1); }
.recentTypeChip:active { transform: scale(.9); }

/* ── History search + row detail ───────────────────────────────────────────── */
.entrySearchCount { font-size: 11px; color: var(--muted); margin-top: 6px; letter-spacing: .02em; }
.bulkEntryVin {
  font-size: 11px; color: var(--muted); margin-top: 2px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em;
}
.bulkEntryNotes {
  font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bulkEntryPhoto {
  flex: 0 0 auto; align-self: center;
  width: 38px; height: 38px; margin-left: 8px;
  background: var(--surface2); border: 1px solid var(--stroke2, var(--stroke));
  border-radius: 10px; font-size: 17px; line-height: 1; cursor: pointer;
  touch-action: manipulation;
  transition: transform 130ms cubic-bezier(.34,1.56,.64,1), border-color 120ms;
}
.bulkEntryPhoto:active { transform: scale(.88); border-color: var(--primary); }

/* ── Requests to manager ───────────────────────────────────────────────────── */
.reqBadge {
  display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 6px;
  background: var(--primary); color: #fff; border-radius: 9px;
  font-size: 11px; font-weight: 700; text-align: center; vertical-align: middle;
}
.reqGate { padding: 6px 0; }
.reqGateText { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin: 0 0 10px; }
.reqEmpty { font-size: 12px; color: var(--muted); line-height: 1.55; padding: 8px 0; }

.reqItem {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r-lg, 12px); padding: 11px 12px; margin-bottom: 7px;
  transition: transform 130ms cubic-bezier(.34,1.56,.64,1), border-color 120ms;
}
.reqItem:active { transform: scale(.985); }
.reqItemTop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reqItemSubject { font-size: 13.5px; font-weight: 600; color: var(--text); }
.reqItemMeta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.reqItemNote {
  font-size: 11.5px; color: var(--text2); margin-top: 6px;
  padding-top: 6px; border-top: 1px solid var(--stroke); line-height: 1.5;
}

.reqSt { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap; letter-spacing: .02em; }
.reqSt--open      { background: rgba(245,158,11,.16); color: #f59e0b; }
.reqSt--ack       { background: rgba(37,99,235,.15);  color: var(--primary); }
.reqSt--done      { background: rgba(74,222,128,.16); color: #4ade80; }
.reqSt--declined  { background: rgba(239,68,68,.14);  color: var(--danger); }

.reqKinds { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin-bottom: 14px; }
.reqKind {
  display: flex; align-items: center; gap: 7px; padding: 10px 11px;
  background: var(--surface2); border: 1px solid var(--stroke2, var(--stroke));
  border-radius: var(--r-lg, 12px); cursor: pointer; touch-action: manipulation;
  transition: transform 130ms cubic-bezier(.34,1.56,.64,1), background 120ms, border-color 120ms, color 120ms;
}
.reqKind:active { transform: scale(.94); }
.reqKind--on { background: rgba(37,99,235,.13); border-color: rgba(37,99,235,.5); }
.reqKindEmoji { font-size: 15px; }
.reqKindLabel { font-size: 12.5px; font-weight: 600; color: var(--text); }

.reqLabel { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .03em; margin: 10px 0 4px; }
.reqOpt { font-weight: 500; opacity: .7; }
.reqGrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.reqErr { font-size: 12px; color: var(--danger); margin-top: 10px; line-height: 1.5; }

.tcGroup {
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r-lg, 12px); padding: 12px; margin-top: 10px;
}
.tcGroupHead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tcGroupInto { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tcCanonicalInput { flex: 1; padding: 8px 10px; font-size: 13.5px; font-weight: 700; }
.tcVariants { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.tcVariant { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); }
.tcVariant input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); flex: 0 0 auto; }
.tcApplyBtn { width: 100%; font-size: 13px; padding: 9px; }

.reqDetailsHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 4px; }
.reqDraftBtn {
  display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
  color: var(--primary); background: rgba(37,99,235,.12); border: 1px solid rgba(37,99,235,.3);
  border-radius: 999px; padding: 5px 10px; cursor: pointer; touch-action: manipulation;
  transition: transform 130ms cubic-bezier(.34,1.56,.64,1), opacity 120ms;
}
.reqDraftBtn:active { transform: scale(.94); }
.reqDraftBtn:disabled { opacity: .55; cursor: default; transform: none; }
.reqDraftErr { font-size: 11.5px; color: var(--danger); margin-top: 6px; line-height: 1.5; }

.reqMeta { margin-bottom: 12px; }
.reqMetaRow { font-size: 11.5px; color: var(--primary); font-weight: 600; margin-bottom: 5px; }
.reqMetaDetails { font-size: 12.5px; color: var(--text2); line-height: 1.55; white-space: pre-wrap; }
.reqMetaNote {
  font-size: 12px; color: var(--text2); line-height: 1.55; margin-top: 9px;
  background: var(--surface2); border-radius: var(--r-lg, 12px); padding: 9px 11px;
}
.reqMetaNote strong { color: var(--text); }

.reqMsgs { max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.reqNoMsgs { font-size: 12px; color: var(--muted); padding: 6px 0; }
.reqMsg { max-width: 86%; padding: 8px 11px; border-radius: 13px; }
.reqMsg--mine { align-self: flex-end; background: rgba(37,99,235,.15); }
.reqMsg--them { align-self: flex-start; background: var(--surface2); }
.reqMsgBody { font-size: 12.5px; color: var(--text); line-height: 1.5; white-space: pre-wrap; }
.reqMsgWho { font-size: 10px; color: var(--muted); margin-top: 3px; }

.reqReplyRow { display: flex; gap: 8px; align-items: center; }
.reqReplyRow .fr26Input { flex: 1; }

/* ── Pro lock (teaser shown to free users when billing is live) ────────────── */
.proLock {
  text-align: center; padding: 20px 14px;
  background: rgba(37,99,235,.06);
  border: 1px dashed rgba(37,99,235,.35);
  border-radius: var(--r-lg, 12px);
}
.proLockIcon { font-size: 24px; line-height: 1; margin-bottom: 8px; }
.proLockTitle { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.proLockText {
  font-size: 12px; color: var(--muted); line-height: 1.55;
  max-width: 300px; margin: 0 auto 14px;
}
.proLockBtn { width: auto; padding: 10px 22px; font-size: 13.5px; }

/* ── Lost Time: capture modal ──────────────────────────────────────────────── */
.ltModal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0; animation: ltFadeIn 160ms ease both;
}
@keyframes ltFadeIn { from { opacity:0; } to { opacity:1; } }
.ltInner {
  width: 100%; max-width: 520px;
  border-radius: 20px 20px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  margin: 0; max-height: 88vh; overflow-y: auto;
  animation: ltSlideUp 260ms cubic-bezier(.25,.46,.45,.94) both;
}
@keyframes ltSlideUp { from { transform: translateY(28px); } to { transform: translateY(0); } }

.ltHead { margin-bottom: 12px; }
.ltTitle { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.ltSub { font-size: 12px; color: var(--muted); margin-top: 3px; }

.ltRemainRow {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 8px 12px; margin-bottom: 12px;
  background: var(--surface2); border-radius: var(--r-lg, 12px);
}
.ltRemainLabel { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .03em; }
.ltRemainVal { font-size: 17px; font-weight: 700; color: #f59e0b; }
.ltRemainVal--done { color: var(--primary); }

.ltChips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.ltChip {
  padding: 8px 12px; font-size: 12.5px; font-weight: 600;
  background: var(--surface2); color: var(--text2);
  border: 1px solid var(--stroke2, var(--stroke));
  border-radius: var(--r-pill, 999px);
  cursor: pointer; touch-action: manipulation;
  transition: transform 130ms cubic-bezier(.34,1.56,.64,1), background 120ms, color 120ms, border-color 120ms;
}
.ltChip:active { transform: scale(.9); }
.ltChip--on {
  background: rgba(37,99,235,.14); color: var(--primary);
  border-color: rgba(37,99,235,.5);
}

.ltRows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ltRow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r-lg, 12px);
}
.ltRowName { font-size: 13px; font-weight: 600; color: var(--text); }
.ltStepper { display: inline-flex; align-items: center; gap: 10px; }
.ltRowHrs {
  font-size: 13px; font-weight: 700; color: var(--primary);
  min-width: 42px; text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ltStep {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--stroke2, var(--stroke));
  color: var(--text); font-size: 16px; font-weight: 700; line-height: 1;
  cursor: pointer; touch-action: manipulation;
  transition: transform 120ms cubic-bezier(.34,1.56,.64,1);
}
.ltStep:active { transform: scale(.86); }

.ltHint { font-size: 11px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
.ltActions { display: flex; gap: 10px; align-items: center; }
.ltBtnGhost {
  flex: 0 0 auto; padding: 12px 18px;
  background: transparent; border: 1px solid var(--stroke2, var(--stroke));
  border-radius: var(--r-lg, 12px);
  color: var(--muted); font-size: 14px; font-weight: 600;
  cursor: pointer; touch-action: manipulation;
}
.ltBtnSave { flex: 1; }

/* ── Lost Time: breakdown card ─────────────────────────────────────────────── */
.ltHeadline { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ltHeadlineNum {
  font-size: 32px; font-weight: 700; color: #f59e0b;
  line-height: 1; letter-spacing: -1px;
}
.ltHeadlineUnit { font-size: 17px; font-weight: 600; margin-left: 1px; }
.ltHeadlineMeta { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.ltHeadlineMeta strong { color: var(--text); font-weight: 700; }

.ltCallout {
  font-size: 12px; color: var(--text2); line-height: 1.5;
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.24);
  border-radius: var(--r-lg, 12px);
  padding: 8px 11px; margin-bottom: 12px;
}
.ltCallout strong { color: #f59e0b; font-weight: 700; }

.ltBars { display: flex; flex-direction: column; gap: 9px; }
.ltBarTop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ltBarName { font-size: 12.5px; font-weight: 600; color: var(--text); }
.ltBarVal { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.ltBarTrack { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.ltBarFill {
  height: 100%; background: #f59e0b; border-radius: 3px;
  transition: width 500ms cubic-bezier(.25,.46,.45,.94);
}

.ltFootnote { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 12px; opacity: .85; }
.ltEmpty { padding: 14px 0; }
.ltEmptyTitle { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ltEmptySub { font-size: 11.5px; color: var(--muted); line-height: 1.55; }

/* ── Emp # collapsed chip ──────────────────────────────────────────────────── */
.fr26EmployeeBar--collapsed .fr26EmployeeLabel,
.fr26EmployeeBar--collapsed #empId { display: none; }
.fr26EmployeeBar--collapsed { justify-content: flex-end; padding-top: 2px; padding-bottom: 2px; }
.empChip {
  background: transparent; border: none;
  color: var(--muted); font-size: 11px; font-weight: 600;
  letter-spacing: .02em; padding: 2px 4px; cursor: pointer;
  touch-action: manipulation; opacity: .75;
  transition: opacity 120ms, transform 130ms cubic-bezier(.34,1.56,.64,1);
}
.empChip:active { transform: scale(.92); opacity: 1; }

/* ── Hero "More stats" disclosure ──────────────────────────────────────────── */
.heroDetailsToggle {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; padding: 3px 9px 3px 10px;
  background: transparent;
  border: 1px solid var(--stroke2, var(--stroke));
  border-radius: var(--r-pill, 999px);
  color: var(--muted);
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  cursor: pointer; touch-action: manipulation;
  transition: color 120ms, border-color 120ms, transform 130ms cubic-bezier(.34,1.56,.64,1);
}
.heroDetailsToggle:active { transform: scale(.93); }
.heroDetailsToggle--open { color: var(--primary); border-color: rgba(37,99,235,.45); }
.heroDetailsChev {
  font-size: 12px; line-height: 1;
  transition: transform 200ms cubic-bezier(.4,0,.2,1);
}
.heroDetailsToggle--open .heroDetailsChev { transform: rotate(180deg); }

.heroDetails { animation: heroDetailsIn 220ms cubic-bezier(.25,.46,.45,.94) both; }
.heroDetails[hidden] { display: none; }
@keyframes heroDetailsIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Job Scorecard ─────────────────────────────────────────────────────────── */
.jobScorecard { margin: 4px 0 18px; }
.jobScorecard:empty { display: none; }

.jsHeader {
  display: flex; align-items: baseline; gap: 8px;
  padding: 0 2px 8px;
}
.jsTitle { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.jsSubtitle { font-size: 11px; color: var(--muted); }

.jsHeadline {
  font-size: 12px; line-height: 1.5; color: var(--text2);
  background: rgba(37,99,235,.10);
  border: 1px solid rgba(37,99,235,.22);
  border-radius: var(--r-lg, 12px);
  padding: 9px 12px; margin-bottom: 10px;
}
.jsHeadline strong { color: var(--primary); font-weight: 700; }
.jsHeadline--muted {
  background: var(--surface2); border-color: var(--stroke);
  color: var(--muted);
}

.jsRows { display: flex; flex-direction: column; gap: 6px; }

.jsRow {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r-lg, 12px);
  padding: 10px 12px;
  transition: transform 130ms cubic-bezier(.34,1.56,.64,1);
}
.jsRow:active { transform: scale(.985); }
.jsRow--best { border-color: rgba(37,99,235,.45); background: rgba(37,99,235,.07); }

.jsRowMain { flex: 1; min-width: 0; }
.jsRowName {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13.5px; font-weight: 600; color: var(--text);
}
.jsRowSub { font-size: 11px; color: var(--muted); margin-top: 3px; }

.jsRowRate { text-align: right; flex-shrink: 0; }
.jsRateVal { font-size: 15px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.jsRateLbl { font-size: 9.5px; color: var(--muted); letter-spacing: .03em; margin-top: 1px; }

.jsBadge {
  font-size: 9px; font-weight: 700; letter-spacing: .04em;
  border-radius: 5px; padding: 2px 5px; white-space: nowrap;
}
.jsBadge--best { background: rgba(37,99,235,.18); color: var(--primary); }
.jsBadge--warn { background: rgba(245,158,11,.16); color: #f59e0b; }
.jsBadge--thin { background: var(--surface3, var(--surface2)); color: var(--muted); font-weight: 600; }

/* ── Accessibility: honor reduced-motion ──────────────────────────────────────
 * Users who enable "Reduce Motion" in iOS get near-instant, motion-free UI.
 * Haptics still fire — only visual animation is neutralized. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .cfp { display: none !important; }
}
