/* Crew Exchange — app layout. Built on the vendored brand tokens
   (jrco-brand.css supplies --red/--charcoal/--font/etc. and forces Neue Haas).
   Light-first body; dark Standard Brand Banner header. No blue chrome. */

:root {
  --cx-bg: #f4f4f4;
  --cx-card: #ffffff;
  --cx-ink: #202020;
  --cx-muted: #6b6b6b;
  --cx-line: #e2e2e2;
  --cx-red: #e92a2c;
  --cx-red-dark: #a71f23;
  --cx-grad: linear-gradient(135deg, #e92a2c 0%, #a71f23 100%);
  --cx-green: #2e7d32;
  --cx-amber: #b9770b;
  --cx-radius: 2px;
  --cx-maxw: 760px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--cx-bg); color: var(--cx-ink); }
/* R45 — type ladder aligned to the JRCO Field app scale
   (Project_Management/project-mobile-summary.html): body 16 / secondary 14 /
   caption 12 (floor 11) / row titles 16. Root 16px respects user text-size. */
body { -webkit-font-smoothing: antialiased; padding-bottom: 72px; font-size: 16px; line-height: 1.5; }

/* ---- main column ---- */
main {
  max-width: var(--cx-maxw);
  margin: 0 auto;
  padding: 14px 14px 24px;
}

/* ---- section heads with the 26deg stripe motif ---- */
.cx-h {
  font-family: var(--font-black, "neue-haas-grotesk-display", "Arial Black", Arial, sans-serif) !important;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-weight: 800;
  font-size: 18px;
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cx-h::before {
  content: "";
  width: 18px;
  height: 14px;
  background: var(--cx-grad);
  transform: skewX(-26deg);
  display: inline-block;
  flex-shrink: 0;
}
.cx-sub { color: var(--cx-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---- cards ---- */
.cx-card {
  background: var(--cx-card);
  border: 1px solid var(--cx-line);
  border-radius: var(--cx-radius);
  padding: 14px;
  margin-bottom: 12px;
}
.cx-card.tap { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.cx-card.tap:hover { border-color: var(--cx-red); box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.cx-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cx-title { font-weight: 700; font-size: 16px; }
.cx-meta { color: var(--cx-muted); font-size: 14px; line-height: 1.5; }

/* ---- badges ---- */
.cx-badge {
  display: inline-block; font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--cx-radius); border: 1px solid var(--cx-line); color: var(--cx-muted);
  white-space: nowrap;
}
.cx-badge.open { color: var(--cx-green); border-color: #bfe0c0; }
.cx-badge.warn { color: var(--cx-amber); border-color: #e7cf9b; }
.cx-badge.risk { color: var(--cx-red); border-color: #f0b6b7; }
.cx-badge.dark { color: #fff; background: var(--cx-ink); border-color: var(--cx-ink); }
.cx-chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---- buttons ---- */
.cx-btn {
  font-family: var(--font-black, "neue-haas-grotesk-display", "Arial Black", Arial, sans-serif) !important;
  text-transform: uppercase; letter-spacing: .02em; font-weight: 800;
  font-size: 14px; padding: 11px 16px; border-radius: var(--cx-radius);
  border: 1px solid var(--cx-ink); background: #fff; color: var(--cx-ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.cx-btn:disabled { opacity: .5; cursor: not-allowed; }
.cx-btn.primary { background: var(--cx-grad); border-color: transparent; color: #fff; }
.cx-btn.ghost { background: transparent; border-color: var(--cx-line); color: var(--cx-ink); }
.cx-btn.danger { border-color: var(--cx-red); color: var(--cx-red); }
.cx-btn.block { width: 100%; }
.cx-btn.lg { font-size: 16px; padding: 16px; }

/* ---- forms ---- */
.cx-field { margin-bottom: 12px; }
.cx-field label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--cx-muted); margin-bottom: 5px; }
.cx-input, .cx-select, textarea.cx-input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--cx-line); border-radius: var(--cx-radius);
  /* 16px prevents iOS focus auto-zoom (Field standard) */
  background: #fff; color: var(--cx-ink); font-size: 16px; font-family: var(--font-text, inherit);
}
.cx-input:focus, .cx-select:focus, textarea.cx-input:focus { outline: none; border-color: var(--cx-red); }
.cx-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* approvals: anomaly flags, worker notes, escalation */
.cx-card.cx-flagged { border-color: var(--cx-red, #e92a2c); box-shadow: inset 3px 0 0 var(--cx-red, #e92a2c); }
.cx-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.cx-note {
  margin-top: 8px; padding: 7px 10px; border-left: 2px solid var(--cx-line);
  background: var(--cx-paper, #f4f4f4); color: var(--cx-ink); font-size: 14px; font-style: italic;
}
.cx-reject-note {
  margin-top: 6px; padding: 7px 10px; border-left: 2px solid var(--cx-red, #e92a2c);
  background: #fbeeee; color: #7a1c1c; font-size: 13px;
}

/* read-only locked field (e.g. Phase = JRCO) — visually distinct from inputs */
.cx-locked-field {
  width: 100%; padding: 11px 12px; border: 1px dashed var(--cx-line); border-radius: var(--cx-radius);
  background: var(--cx-paper, #f4f4f4); color: var(--cx-muted); font-size: 15px;
  font-family: var(--font-mono, var(--font-text, inherit)); letter-spacing: .3px;
}

/* ---- bottom tab nav (mobile-first) ---- */
.cx-tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  display: flex; background: var(--cx-ink); border-top: 0;
}
.cx-tabs::before { content: ""; position: absolute; top: 0; left: 26px; right: 26px; height: 3px; background: var(--cx-grad); }
.cx-tab {
  position: relative;
  flex: 1; text-align: center; padding: 9px 2px 8px; color: #bfbfbf; text-decoration: none;
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.cx-tab .ic { font-size: 18px; line-height: 1; }
.cx-tab.active { color: #fff; }
.cx-tab.active .ic { filter: drop-shadow(0 0 0 var(--cx-red)); }
.cx-tab.active .lbl { color: var(--cx-red); }
/* attention count pinned to the tab icon's shoulder */
.cx-tab-badge {
  position: absolute; top: 3px; left: calc(50% + 6px);
  min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: var(--cx-grad); color: #fff; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0; line-height: 1;
  font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--cx-ink);
}

/* ---- empty / toast / spinner ---- */
.cx-empty { text-align: center; color: var(--cx-muted); padding: 40px 16px; font-size: 13.5px; }
.cx-toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%);
  background: var(--cx-ink); color: #fff; padding: 11px 16px; border-radius: var(--cx-radius);
  font-size: 13px; z-index: 300; max-width: 90%; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.cx-toast.err { background: var(--cx-red-dark); }
.cx-spin { text-align: center; color: var(--cx-muted); padding: 28px; font-size: 13px; }

/* ---- offline banner ---- */
.cx-offline { background: var(--cx-amber); color: #fff; text-align: center; font-size: 12px; padding: 6px; display: none; }
body.is-offline .cx-offline { display: block; }

/* ---- big clock ---- */
.cx-clock-status { text-align: center; padding: 18px 0 6px; }
.cx-clock-status .big { font-family: var(--font-black, sans-serif) !important; font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.cx-clock-status .lbl { color: var(--cx-muted); text-transform: uppercase; font-size: 12px; letter-spacing: .5px; }
.cx-geo-ok { color: var(--cx-green); } .cx-geo-bad { color: var(--cx-red); }

/* ---- Toggl-style running entry (renderClockedIn, 2026-09-30) ---- */
.cx-run { padding: 12px 14px 16px; }
.cx-run-head { display: flex; align-items: center; gap: 10px; }
.cx-run-x {
  flex: none; width: 44px; height: 44px; margin-left: -10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--cx-muted); text-decoration: none; border-radius: var(--cx-radius);
}
.cx-run-x:hover { color: var(--cx-ink); }
.cx-run-title { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-run-timer {
  flex: none; font-family: var(--font-black, "Arial Black", Arial, sans-serif) !important;
  font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  color: var(--cx-red-dark);
}
.cx-run-notes {
  display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 0;
  text-align: left; font: inherit; font-size: 16px; color: var(--cx-ink);
  background: none; border: 0; border-bottom: 1px solid var(--cx-line); cursor: pointer;
}
.cx-run-notes.empty { color: var(--cx-muted); }
.cx-run-notes-edit { margin-top: 6px; }
.cx-run-chips { margin-top: 10px; }
.cx-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--cx-ink);
  background: var(--cx-bg); border: 1px solid var(--cx-line); border-radius: var(--cx-radius);
}
.cx-chip.tap { cursor: pointer; }
.cx-chip.tap:active { border-color: var(--cx-red-dark); }
.cx-run-dot { width: 10px; height: 10px; border-radius: 50%; background: #bdbdbd; flex: none; }
.cx-run-dot.ok { background: var(--cx-green); }
.cx-run-dot.warn { background: var(--cx-amber); }
.cx-run-switch { display: none; margin-top: 10px; }
.cx-run-switch.open { display: block; }
.cx-run-range {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 14px; padding: 12px 0; border-top: 1px solid var(--cx-line); border-bottom: 1px solid var(--cx-line);
  font-size: 15px; font-weight: 600; color: var(--cx-ink); font-variant-numeric: tabular-nums;
}
.cx-run-range .arrow { color: var(--cx-muted); }
.cx-dial { position: relative; width: 220px; max-width: 70vw; margin: 16px auto 4px; }
.cx-dial svg { display: block; width: 100%; height: auto; transform: rotate(-90deg); }
.cx-dial-bg { fill: none; stroke: var(--cx-line); stroke-width: 10; }
.cx-dial-fg { fill: none; stroke: var(--cx-red); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .6s linear; }
.cx-dial-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: var(--cx-ink); pointer-events: none; letter-spacing: -.1em;
}
.cx-run-sub { text-align: center; color: var(--cx-muted); font-size: 13px; min-height: 18px; margin-top: 4px; }
.cx-run-actions { display: flex; justify-content: center; align-items: flex-start; gap: 28px; margin-top: 14px; }
.cx-round-wrap {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 0; padding: 4px; cursor: pointer; font: inherit;
}
.cx-round-wrap:disabled { opacity: .55; cursor: not-allowed; }
.cx-round {
  width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1;
}
.cx-round.stop { background: var(--cx-grad); color: #fff; box-shadow: 0 3px 10px rgba(167, 31, 35, .35); }
.cx-round.ghost { background: #fff; color: var(--cx-ink); border: 2px solid var(--cx-line); }
.cx-round.ghost.active { border-color: var(--cx-amber); background: #fff8e8; }
.cx-round-l { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--cx-muted); }
.cx-run-delete {
  display: block; width: 100%; min-height: 44px; margin-top: 12px;
  background: none; border: 0; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--cx-red-dark);
}

/* Clocked-out form: big round red Start (Toggl ▶) instead of a bar button. */
.cx-start-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 14px 0 6px; }
.cx-round.start { width: 88px; height: 88px; font-size: 38px; padding-left: 6px; background: var(--cx-grad); color: #fff; box-shadow: 0 4px 14px rgba(167, 31, 35, .35); }
.cx-round-wrap:disabled .cx-round.start { box-shadow: none; }

/* ---- auth ---- */
.cx-auth-wrap { max-width: 420px; margin: 8vh auto; padding: 0 18px; }
.cx-auth-logo { text-align: center; margin-bottom: 22px; }
.cx-seg { display: flex; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); overflow: hidden; margin-bottom: 16px; }
.cx-seg button { flex: 1; padding: 10px; border: 0; background: #fff; cursor: pointer; text-transform: uppercase; font-size: 12px; letter-spacing: .5px; }
.cx-seg button.active { background: var(--cx-ink); color: #fff; }

/* ---- table (reports/analytics) ---- */
.cx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cx-table th, .cx-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--cx-line); }
.cx-table th { text-transform: uppercase; font-size: 11px; letter-spacing: .5px; color: var(--cx-muted); }
.cx-table tr:last-child td { border-bottom: 0; }
.cx-scroll { overflow-x: auto; }

/* ---- clock-out DFOW hour adjustment (sliders) ---- */
.cx-alloc-remain {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 12px 0 4px; padding: 12px 14px;
  background: var(--cx-bg); border: 1px solid var(--cx-line); border-radius: var(--cx-radius);
}
.cx-alloc-remain-val {
  font-family: var(--font-black, sans-serif); font-size: 26px; font-weight: 800;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cx-alloc-row { padding: 12px 2px 14px; border-bottom: 1px solid var(--cx-line); }
.cx-alloc-row:last-of-type { border-bottom: 0; margin-bottom: 4px; }
.cx-alloc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.cx-alloc-name { font-size: 13.5px; font-weight: 600; }
.cx-alloc-val { font-size: 13px; color: var(--cx-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Big thumb — must be draggable with gloves in the field. */
.cx-range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%;
  height: 8px; border-radius: 4px; background: var(--cx-line); outline: none; margin: 6px 0 2px;
  touch-action: pan-y; /* vertical page scroll still works; horizontal drag moves the slider */
}
.cx-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--cx-grad); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer;
}
.cx-range::-moz-range-thumb {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--cx-red); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer;
}

/* ---- UX refresh (Field-style): pairing titles, big CTAs, tap targets ---- */
/* Thin/bold pairing section titles, matching JRCO Field ("Daily Report.") */
.cx-pair {
  font-size: 21px; font-weight: 300; letter-spacing: -.01em;
  margin: 22px 0 10px; color: var(--cx-ink);
}
.cx-pair b { font-weight: 800; letter-spacing: -.02em; }

/* Full-width primary CTA rows — one thumb tap, readable with gloves on. */
.cx-cta {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px;
  padding: 13px 16px; margin: 10px 0; box-sizing: border-box;
  border: 1px solid var(--cx-line); border-radius: var(--cx-radius);
  background: #fff; color: inherit; text-decoration: none;
}
.cx-cta.primary { background: var(--cx-grad); border: 0; color: #fff; }
.cx-cta.primary .cx-cta-s { opacity: .9; }
.cx-cta-ic { font-size: 22px; width: 28px; text-align: center; flex: none; }
.cx-cta-t { font-weight: 800; text-transform: uppercase; letter-spacing: .5px; font-size: 14px; }
.cx-cta-s { font-size: 12px; opacity: .72; margin-top: 2px; }
.cx-chev { margin-left: auto; font-size: 22px; opacity: .55; flex: none; }

/* Field-friendly minimum tap height on all buttons. */
.cx-btn { min-height: 44px; }

/* Compact status row card (clock status, links) */
.cx-clockrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; color: inherit; }

/* Admin "View as" banner — impossible to forget you're impersonating. */
.cx-imp-banner {
  position: sticky; top: 0; z-index: 300;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #f6edd6; border-bottom: 1px solid #e7cf9b;
  padding: 8px 14px; font-size: 12.5px; font-weight: 600; color: #6b5312;
}
.cx-imp-banner .cx-btn { min-height: 34px; padding: 4px 12px; }

/* ---- Clock-out review sheet: big text + glove-friendly time steppers ----
   Same controls on mobile and desktop — no tiny native datetime pickers. */
.cx-rev-hint { font-size: 14.5px; line-height: 1.45; color: var(--cx-muted); }
.cx-rev-field { margin: 16px 0 4px; }
.cx-rev-label {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .7px; color: var(--cx-muted);
}
/* Time editor: Clock in / Clock out tabs — tapping one opens the time picker. */
.cx-rev-editor { margin: 12px 0 4px; }
.cx-rev-tabs { display: flex; gap: 8px; }
.cx-rev-tab {
  flex: 1; text-align: left; padding: 10px 14px; min-height: 68px;
  background: #fff; border: 1px solid var(--cx-line); border-radius: var(--cx-radius);
  cursor: pointer; font: inherit;
}
.cx-rev-tab.active {
  border-color: var(--cx-red-dark);
  box-shadow: inset 0 -3px 0 var(--cx-red-dark);
  background: #fdf7f7;
}
.cx-rev-tab-l { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--cx-muted); }
.cx-rev-tab-t { display: block; font-size: 25px; font-weight: 800; letter-spacing: -0.02em; color: var(--cx-ink); margin: 1px 0; }
.cx-rev-tab-d { display: block; font-size: 12.5px; color: var(--cx-muted); }
/* Tappable time chip (opens the picker) — same footprint as the date chip. */
.cx-rev-timechip { cursor: pointer; font: inherit; font-weight: 800; }
.cx-rev-timechip:active { background: #fdf7f7; }

/* ---- Toggl-style time picker modal (js/time-picker.js) ---- */
.cx-tp-backdrop {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center;
  background: rgba(32, 32, 32, .55); padding: 16px;
}
.cx-tp {
  width: 100%; max-width: 340px; background: #fff; border-radius: var(--cx-radius);
  padding: 16px 16px 12px; box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.cx-tp-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--cx-muted); margin-bottom: 8px; }
.cx-tp-digits { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 10px; }
.cx-tp-blk {
  width: 84px; height: 76px; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: var(--cx-bg);
  font-family: var(--font-black, "Arial Black", Arial, sans-serif); font-size: 44px; font-weight: 800; letter-spacing: -.03em;
  color: var(--cx-ink); cursor: pointer; font-variant-numeric: tabular-nums;
}
.cx-tp-blk.on { background: #fdf0f0; border-color: var(--cx-red-dark); color: var(--cx-red-dark); }
.cx-tp-colon { font-size: 40px; font-weight: 800; line-height: 1; color: var(--cx-ink); }
.cx-tp-ampm { display: flex; flex-direction: column; gap: 4px; margin-left: 8px; }
.cx-tp-ap {
  width: 52px; height: 36px; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: #fff;
  font: inherit; font-size: 14px; font-weight: 800; color: var(--cx-muted); cursor: pointer;
}
.cx-tp-ap.on { background: #fdf0f0; border-color: var(--cx-red-dark); color: var(--cx-red-dark); }
.cx-tp-dial { display: block; width: 100%; max-width: 260px; margin: 4px auto; touch-action: none; user-select: none; }
.cx-tp-face { fill: #ececec; }
.cx-tp-num { font-size: 18px; font-weight: 700; fill: var(--cx-ink); pointer-events: none; }
.cx-tp-num.on { fill: #fff; }
.cx-tp-num.knob-lbl { font-size: 15px; }
.cx-tp-hand { stroke: var(--cx-red-dark); stroke-width: 3; }
.cx-tp-knob { fill: var(--cx-red-dark); }
.cx-tp-pivot { fill: var(--cx-red-dark); }
.cx-tp-nudges { display: flex; gap: 6px; margin: 10px 0 6px; }
.cx-tp-nudge {
  flex: 1; min-height: 44px; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: var(--cx-bg);
  font: inherit; font-size: 14px; font-weight: 700; color: var(--cx-ink); cursor: pointer;
}
.cx-tp-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.cx-tp-actions .cx-btn { min-width: 96px; }

.cx-rev-daterow { display: flex; gap: 8px; align-items: stretch; }
.cx-rev-day { min-width: 60px; min-height: 52px; font-size: 22px; font-weight: 800; padding: 0; }
.cx-rev-datechip {
  flex: 1; min-height: 52px; padding: 6px 12px; box-sizing: border-box;
  text-align: center; font-size: 17px; font-weight: 800; font-family: inherit;
  color: var(--cx-ink); background: #fff;
  border: 1px solid var(--cx-line); border-radius: var(--cx-radius);
}
.cx-rev-datechip::-webkit-calendar-picker-indicator { transform: scale(1.4); padding: 8px; cursor: pointer; }
.cx-rev-totalrow {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--cx-line); border-bottom: 1px solid var(--cx-line);
  padding: 14px 0; margin: 18px 0 4px;
}
.cx-rev-total { font-size: 34px; font-weight: 800; color: var(--cx-red-dark); letter-spacing: -0.02em; }
.cx-rev-warn { font-size: 15px; font-weight: 700; color: var(--cx-red-dark); margin-top: 10px; line-height: 1.4; }
.cx-rev-confirm {
  padding: 14px 0; cursor: pointer; align-items: center;
  font-size: 15.5px; font-weight: 700; line-height: 1.35;
}

/* ---- payroll dashboard (admin home) ---- */
.cx-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.cx-tile {
  display: block; background: var(--cx-card); border: 1px solid var(--cx-line);
  border-radius: var(--cx-radius); padding: 12px; text-decoration: none; color: inherit;
}
.cx-tile .n { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.cx-tile .l { font-size: 11px; color: var(--cx-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 5px; line-height: 1.3; }
.cx-tile.warn { border-color: #e7b9ba; }
.cx-tile.warn .n { color: var(--cx-red-dark); }
.cx-verdict {
  min-height: 44px; display: flex; align-items: center; padding: 6px 10px;
  font-size: 13px; font-weight: 700; line-height: 1.3;
  border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: var(--cx-bg);
}
.cx-verdict.ok { color: var(--cx-green); border-color: #bfd9c0; background: #f0f7f0; }
.cx-verdict.bad { color: var(--cx-red-dark); border-color: #e7b9ba; background: #fbf1f1; }
@media (max-width: 480px) {
  .cx-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* ---- paper timesheets (cx_31, js/views/timesheets.js) ---- */
.cx-ts-item { display: block; text-decoration: none; color: inherit; }
.cx-ts-preview { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #202020; border-radius: var(--cx-radius); }
.cx-ts-progress { margin-top: 10px; padding: 10px 12px; font-size: 14px; font-weight: 700; color: var(--cx-ink); background: var(--cx-bg); border-radius: var(--cx-radius); border-left: 3px solid var(--cx-red); }
.cx-ts-head { display: flex; gap: 12px; align-items: flex-start; }
.cx-ts-thumb {
  width: 96px; height: 128px; object-fit: cover; flex: none; cursor: zoom-in;
  border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: #eee;
}
.cx-ts-group .cx-title { margin-bottom: 6px; }
.cx-ts-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.cx-ts-tools .cx-btn { flex: 1; padding: 9px 10px; font-size: 13px; }
.cx-ts-row { padding: 10px 12px; transition: opacity .12s; }
.cx-ts-row.off { opacity: .55; }
.cx-ts-row.off .cx-ts-chk { opacity: 1; }
.cx-ts-rowhead { display: flex; gap: 10px; align-items: flex-start; }
.cx-ts-chk { width: 26px; height: 26px; flex: none; margin: 2px 0 0; accent-color: var(--cx-red); cursor: pointer; }
.cx-ts-name { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 15px; }
.cx-ts-no { font-size: 12px; color: var(--cx-muted); font-weight: 700; }
.cx-ts-sheetname { font-weight: 700; }
.cx-ts-match {
  display: inline-flex; align-items: center; min-height: 32px; margin-top: 4px; padding: 4px 10px;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: #fff; color: var(--cx-ink);
}
.cx-ts-match.ok { color: var(--cx-green); border-color: #bfe0c0; background: #f2f9f2; }
.cx-ts-match.warn { color: var(--cx-red-dark); border-color: #f0b6b7; background: #fdf3f3; }
.cx-ts-match:disabled { cursor: default; }
.cx-ts-times { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.cx-ts-time { min-width: 86px; justify-content: center; font-weight: 800; }
.cx-ts-time.empty { color: var(--cx-red-dark); border-style: dashed; }
.cx-ts-time:disabled { cursor: default; color: var(--cx-ink); opacity: 1; }
.cx-ts-brk { width: auto; min-height: 36px; padding: 6px 8px; font-size: 13px; }
.cx-ts-hours { margin-left: auto; font-weight: 800; font-size: 15px; white-space: nowrap; }
.cx-ts-hours small { font-weight: 400; color: var(--cx-muted); font-size: 12px; }
.cx-ts-hours.warn { color: var(--cx-amber); }
.cx-ts-tail { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 12px; }
.cx-ts-sig.ok { color: var(--cx-green); font-weight: 700; }
.cx-ts-sig.no { color: var(--cx-red-dark); font-weight: 700; }
.cx-ts-pp { margin-top: 8px; padding: 10px; border: 1px dashed var(--cx-line); border-radius: var(--cx-radius); background: var(--cx-bg); }
.cx-ts-foot { position: sticky; bottom: 78px; z-index: 5; box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
.cx-ts-viewer {
  position: fixed; inset: 0; z-index: 450; display: flex; flex-direction: column;
  background: rgba(20, 20, 20, .96);
}
.cx-ts-viewer-bar { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; flex: none; }
.cx-ts-viewer-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; }
.cx-ts-viewer-scroll img { display: block; width: 100%; height: auto; }

@media (min-width: 720px) {
  .cx-tabs { max-width: var(--cx-maxw); left: 50%; transform: translateX(-50%); border-radius: var(--cx-radius) var(--cx-radius) 0 0; }
}
