:root {
  --ink: #102a43;
  --ink-2: #243b53;
  --muted: #34495a;
  --paper: #ffffff;
  --canvas: #f4f2ec;
  --line: #d4dce2;
  --line-strong: #9aabb8;
  --accent: #f5c451;
  --accent-ink: #2d240d;
  --teal: #04504c;
  --teal-dark: #043d3a;
  --good: #07563a;
  --good-pale: #e5f5ed;
  --warn: #713300;
  --warn-pale: #fff1dd;
  --bad: #8a1710;
  --bad-pale: #fde9e7;
  --blue-pale: #eaf2f8;
  --chip: #e8edf1;
  --radius: 18px;
  --radius-small: 12px;
  --tap: 56px;
  font-family: Inter, ui-sans-serif, system-ui, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(8, 118, 111, 0.07), transparent 30rem),
    var(--canvas);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; color: inherit; }
button, a, summary, select, input[type="checkbox"], input[type="radio"] { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--teal-dark); text-underline-offset: 0.18em; }
img { display: block; max-width: 100%; }
code { overflow-wrap: anywhere; font-size: 0.84em; }
h1, h2, h3, p, dl, dd { margin-top: 0; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -0.025em; }
h1 { margin-bottom: 0.5rem; font-size: clamp(1.8rem, 8vw, 2.6rem); }
h2 { margin-bottom: 0.35rem; font-size: clamp(1.3rem, 5vw, 1.7rem); }
h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
p { margin-bottom: 0.75rem; }

:focus-visible {
  outline: 3px solid #1769aa;
  outline-offset: 3px;
}

[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 8px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(154, 171, 184, 0.55);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
/* One letter, "L": sized to fill the mark as the two letters did. */
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px 12px 12px 4px;
  background: var(--ink);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}
.brand-mark--large { width: 62px; height: 62px; border-radius: 20px 20px 20px 6px; font-size: 1.9rem; }
/* The brand word gives way first, so that the header never runs past a 320 to 414 px screen (v1-1): the mark keeps its
   size, the word shortens with an ellipsis when the status badge is wide. */
.brand { min-width: 0; }
.brand-mark { flex: none; }
.brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.account-menu { position: relative; }
.account-menu > summary {
  display: grid;
  place-items: center;
  min-width: 56px;
  height: 56px;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  font-size: 0.78rem;
  font-weight: 800;
  list-style: none;
}
/* An account code (TL-01) stays on one line; a very long one shortens with an ellipsis, so the header never runs past a
   320 px screen (v1-1). */
.account-menu > summary { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  width: 220px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
  outline: 1px solid rgba(16, 42, 67, 0.05);
}
.account-popover strong { display: block; margin-bottom: 0.5rem; }

.app-main {
  width: min(100%, 780px);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 24px 16px calc(104px + env(safe-area-inset-bottom));
}
body[data-active-view="squad"] .app-main,
body[data-active-view="week"] .app-main,
body[data-active-view="review"] .app-main,
body[data-active-view="overview"] .app-main,
body[data-active-view="admin_squads"] .app-main,
body[data-active-view="admin_phones"] .app-main { width: min(100%, 1200px); }

.connection-strip {
  position: sticky;
  z-index: 45;
  top: 64px;
  padding: 0.55rem 1rem;
  background: var(--warn-pale);
  color: #6f360b;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding: 5px max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}
.bottom-nav a {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 130px;
  min-height: 58px;
  gap: 0.1rem;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}
.bottom-nav a[aria-current="page"] { color: var(--teal-dark); background: #e8f5f3; }
.bottom-nav a[aria-current="page"]::before {
  position: absolute;
  top: 1px;
  width: 22px;
  height: 3px;
  border-radius: 4px;
  background: var(--teal);
  content: "";
}
.nav-glyph { height: 24px; font-size: 1.1rem; line-height: 24px; }

.page-head { margin-bottom: 1.5rem; }
.page-head > p:last-child { max-width: 42rem; color: var(--muted); }
.page-head--split { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.eyebrow {
  margin-bottom: 0.35rem;
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}
.back-link { display: inline-block; margin-bottom: 1.1rem; font-weight: 750; text-decoration: none; }
.back-link--inverse { color: #d9edf2; }
.supporting, .muted-copy, .section-intro { color: var(--muted); }
.meta-line { margin: 0; color: var(--muted); font-size: 0.82rem; }
.stack-lg { display: grid; gap: 1.6rem; }

.card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.card--dark { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.card--dark .eyebrow { color: #91d8d2; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading--inside { align-items: center; margin-bottom: 1rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  gap: 0.65rem;
  padding: 0.74rem 1.05rem;
  border: 2px solid transparent;
  border-radius: 13px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: transform 100ms ease, background-color 140ms ease, opacity 140ms ease;
}
.button:active:not(:disabled) { transform: scale(0.985); }
.button:disabled { opacity: 0.46; }
.button--primary { background: var(--teal); color: #fff; }
.button--primary:hover:not(:disabled) { background: var(--teal-dark); }
.button--accent { background: var(--accent); color: var(--accent-ink); }
.button--secondary { border-color: var(--line-strong); background: var(--paper); color: var(--ink); }
.button--quiet { min-height: 56px; padding: 0.55rem 0.8rem; background: var(--blue-pale); color: var(--ink); }
.button--danger { background: var(--bad); color: #fff; }
.button--large { min-height: 62px; font-size: 1.04rem; }
.button--small { min-height: 56px; padding: 0.55rem 0.8rem; font-size: 1rem; }
.button--full { width: 100%; }
.button-help { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.83rem; text-align: center; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.button-row--center { justify-content: center; }
.text-button { min-height: 56px; padding: 0; border: 0; background: transparent; color: var(--teal-dark); font-weight: 800; }
.icon-button { display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--blue-pale); font-size: 1.7rem; }

.message-stack { display: grid; gap: 0.65rem; margin-bottom: 1.2rem; }
.message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid #9ab4c6;
  border-radius: var(--radius-small);
  background: var(--blue-pale);
}
.message p { margin: 0.15rem 0 0; font-size: 0.9rem; }
.message-mark { display: grid; flex: 0 0 28px; place-items: center; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; }
.message--success { border-color: #8bc6aa; background: var(--good-pale); }
.message--success .message-mark { background: var(--good); }
.message--error { border-color: #e2a5a0; background: var(--bad-pale); }
.message--error .message-mark { background: var(--bad); }
.message--info { border-color: #9ab4c6; background: var(--blue-pale); }
.message--warning { border-color: #e1a262; background: var(--warn-pale); }
.message--warning .message-mark { background: var(--warn); }

.inline-error {
  padding: 0.8rem 0.9rem;
  border-left: 4px solid var(--bad);
  border-radius: 8px;
  background: var(--bad-pale);
  color: #70170f;
}
.inline-error ul { margin: 0.45rem 0 0; padding-left: 1.3rem; }
.check-summary { margin-bottom: 1rem; padding: 1rem; border-radius: var(--radius-small); }
.check-summary--error { border: 1px solid #e2a5a0; background: var(--bad-pale); }
.check-summary--success { border: 1px solid #8bc6aa; background: var(--good-pale); }
.check-summary p:last-of-type { margin-bottom: 0.75rem; }

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}
.status-pill--success, .status-pill--good { background: var(--good-pale); color: #07563a; }
.status-pill--bad, .status-pill--error { background: var(--bad-pale); color: #811a12; }
.status-pill--warm, .status-pill--warning { background: var(--warn-pale); color: #73380a; }
.status-pill--ready { background: #dff2f0; color: var(--teal-dark); }
.status-pill--live { background: var(--accent); color: var(--accent-ink); }
.status-pill--live span { width: 7px; height: 7px; margin-right: 0.35rem; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
.status-pill--large { min-height: 34px; padding: 0.45rem 0.75rem; font-size: 0.8rem; }
.count-chip { display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0 0.55rem; border-radius: 16px; background: var(--ink); color: #fff; font-size: 0.8rem; font-weight: 850; white-space: nowrap; }
.count-chip--bad { background: var(--bad); }
.count-chip--large { height: 40px; padding: 0 0.8rem; border-radius: 20px; }

.sync-live { display: flex; }
.sync-badge {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 22px;
  background: #edf4f3;
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 850;
}
.sync-dot { width: 9px; height: 9px; border: 3px solid rgba(20, 125, 85, 0.13); border-radius: 50%; background: var(--good); }
.sync-badge.is-pending { background: var(--warn-pale); color: #73380a; }
.sync-badge.is-pending .sync-dot { border-color: rgba(184, 91, 18, 0.14); background: var(--warn); }
.sync-badge.is-error { background: var(--bad-pale); color: #811a12; }
.sync-badge.is-error .sync-dot { background: var(--bad); }
.sync-dialog { width: min(calc(100% - 24px), 460px); padding: 0; border: 2px solid var(--line-strong); border-radius: 20px; background: var(--paper); color: var(--ink); }
.sync-dialog::backdrop { background: rgba(16, 42, 67, 0.6); backdrop-filter: blur(3px); }
.help-dialog, .walkthrough { width: min(calc(100% - 24px), 500px); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 2px solid var(--line-strong); border-radius: 20px; background: var(--paper); color: var(--ink); }
.help-dialog::backdrop, .walkthrough::backdrop { background: rgba(5, 20, 31, .78); backdrop-filter: blur(3px); }
.help-dialog .dialog-body { display: grid; gap: .8rem; }
.setup-dialog ol { display: grid; gap: .6rem; padding-left: 1.4rem; }
.header-help { flex: 0 0 56px; font-size: 1.25rem; font-weight: 900; }
.walkthrough { padding: 1.3rem; }
.walkthrough-step { min-height: 250px; align-content: center; }
.walkthrough-step h2 { font-size: 1.7rem; }
.walkthrough-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stamp-flash { position: fixed; z-index: 200; inset: 0; display: grid; place-content: center; justify-items: center; gap: .6rem; padding: 2rem; background: rgba(7, 86, 58, .96); color: #fff; text-align: center; }
.stamp-flash-mark { display: grid; width: 104px; height: 104px; place-items: center; border: 6px solid #fff; border-radius: 50%; font-size: 4rem; font-weight: 900; }
.stamp-flash strong { max-width: 20rem; font-size: 1.7rem; }
.stamp-flash time { font-size: 2.5rem; font-variant-numeric: tabular-nums; font-weight: 900; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.1rem 0.8rem; border-bottom: 1px solid var(--line); }
.dialog-head h2, .dialog-head p { margin-bottom: 0; }
.dialog-body { padding: 1.1rem; }
.sync-count { display: flex; align-items: baseline; gap: 0.55rem; margin-bottom: 0.7rem; }
.sync-count strong { font-size: 2.4rem; }

.field { display: grid; gap: 0.4rem; }
.field > span:first-child, fieldset > legend { font-size: 0.88rem; font-weight: 800; }
.field em { color: var(--muted); font-size: 0.78rem; font-style: normal; font-weight: 500; }
.field small { color: var(--muted); font-size: 0.78rem; }
.field input, .field select, .field textarea,
.filter-bar input, .filter-bar select {
  width: 100%;
  min-height: var(--tap);
  padding: 0.72rem 0.8rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
  font-size: 1rem;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--teal); outline: 3px solid rgba(8, 118, 111, 0.15); }
.field--compact { margin-top: 0.8rem; }
.field--inline { display: block; min-width: 170px; }
.password-wrap, .input-prefix, .input-suffix { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 11px; background: var(--paper); overflow: hidden; }
.password-wrap input, .input-prefix input, .input-suffix input { min-width: 0; border: 0; border-radius: 0; }
.password-wrap:focus-within, .input-prefix:focus-within, .input-suffix:focus-within { border-color: var(--teal); outline: 3px solid rgba(8, 118, 111, 0.15); }
.password-wrap input:focus, .input-prefix input:focus, .input-suffix input:focus { outline: 0; }
.password-wrap .reveal-button { align-self: stretch; min-width: 64px; padding: 0 0.75rem; border: 0; background: #edf2f5; font-size: 0.82rem; font-weight: 800; }
.input-prefix > span, .input-suffix > span { padding: 0 0.8rem; color: var(--muted); font-weight: 800; }
.input-prefix > span { border-right: 1px solid var(--line); }
.input-suffix > span { border-left: 1px solid var(--line); }
.form-grid { display: grid; gap: 1rem; }
.check-row { display: flex; align-items: flex-start; gap: 0.8rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 12px; }
.check-row input { flex: 0 0 24px; width: 24px; height: 24px; margin: 0.08rem 0 0; accent-color: var(--teal); }
.check-row span { display: grid; gap: 0.15rem; }
.check-row small { color: var(--muted); }
.field-note--warning { color: var(--bad) !important; font-weight: 800; }
.field-note--good { color: var(--good) !important; font-weight: 750; }
.late-step-nudge { margin-top: 0.65rem; }

.login-main { display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.login-shell { width: min(100%, 430px); }
.login-brand { margin-bottom: 1.4rem; }
.login-brand .brand-mark { margin-bottom: 1.2rem; }
.login-brand p:last-child { color: var(--muted); }
.login-card { display: grid; gap: 1rem; padding: 22px; }
.login-help { margin: 1rem 0 0; color: var(--muted); font-size: 0.85rem; text-align: center; }

.state-page { display: grid; min-height: 62vh; place-items: center; align-content: center; text-align: center; }
.state-page > p { max-width: 34rem; color: var(--muted); }
.state-illustration { display: grid; width: 82px; height: 82px; place-items: center; margin-bottom: 1rem; border-radius: 26px 26px 26px 8px; background: var(--accent); color: var(--accent-ink); font-size: 2rem; font-weight: 900; }
.state-illustration--error { background: var(--bad-pale); color: var(--bad); }

.day-score { display: flex; align-items: baseline; min-width: 78px; justify-content: flex-end; color: var(--muted); }
.day-score strong { color: var(--ink); font-size: 2.3rem; line-height: 1; }
.day-score span { font-weight: 750; }
.window-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.8rem; }
.window-banner--ready { border-color: #9acbb4; background: #f5fbf8; }
.window-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 900; }
.window-banner--ready .window-icon { background: var(--good); color: #fff; }
.window-copy h2 { margin: 0; font-size: 1.05rem; }
.window-copy p { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.83rem; }
.active-trip { padding: 22px; }
.active-trip h2 { margin-bottom: 0.8rem; }
.card-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.6rem; color: #c4d6e2; font-size: 0.8rem; }
.compact-facts, .trip-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 1rem; overflow: hidden; border-radius: 12px; background: var(--line); }
.compact-facts > div, .trip-facts > div { padding: 0.7rem; background: var(--paper); }
.compact-facts dt, .trip-facts dt { color: var(--muted); font-size: 0.72rem; }
.compact-facts dd, .trip-facts dd { margin: 0; font-weight: 800; }
.compact-facts dd { overflow-wrap: anywhere; }
/* A fact that would sit alone in its row takes the whole row, so no empty cell shows the line colour. */
.compact-facts > div:last-child:nth-child(odd), .compact-facts-wide { grid-column: 1 / -1; }
.compact-facts > div:nth-child(odd):has(+ .compact-facts-wide) { grid-column: 1 / -1; }
.compact-facts-wide dd { white-space: pre-line; }
.compact-facts--inverse { background: #486581; }
.compact-facts--inverse > div { background: #243f59; }
.compact-facts--inverse dt { color: #b7cad7; }

.plan-list { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.plan-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; padding: 14px; }
.plan-card--done { opacity: 0.76; }
.plan-card--active { border: 2px solid var(--teal); }
.plan-order { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--blue-pale); font-weight: 900; }
.plan-card--done .plan-order { background: var(--good-pale); color: var(--good); }
.plan-body { min-width: 0; }
.plan-body p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.85rem; }
.plan-title-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.plan-title-row h3 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.icon-link { display: grid; width: 56px; height: 56px; place-items: center; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font-size: 1.15rem; font-weight: 900; text-decoration: none; }
.icon-link--disabled { background: var(--chip); color: var(--muted); }
.mini-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.mini-row:last-child { border-bottom: 0; }
.mini-row > span:first-child { display: grid; }
.mini-row small { color: var(--muted); }

.empty-state { padding-block: 2rem; text-align: center; }
.empty-state p { max-width: 32rem; margin: 0 auto; color: var(--muted); }
.empty-state--compact { padding-block: 1.2rem; }
.empty-mark { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 0.8rem; border-radius: 16px; background: var(--blue-pale); font-size: 1.25rem; font-weight: 900; }
.empty-mark--good { background: var(--good-pale); color: var(--good); }
.empty-inline { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem; border-radius: 10px; background: #f2f5f7; }
.empty-inline > span { display: grid; flex: 0 0 32px; height: 32px; place-items: center; border-radius: 50%; background: var(--paper); font-weight: 900; }
.empty-inline p { margin: 0; color: var(--muted); }

.numbered-flow { display: grid; gap: 1rem; }
.flow-step { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.9rem; overflow: hidden; }
.step-number { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 900; }
.flow-content { min-width: 0; }
.flow-content > p:not(.eyebrow) { color: var(--muted); }
.clock-card { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin: 1rem 0 0.7rem; padding: 0.8rem; border-radius: 12px; background: var(--ink); color: #fff; }
.clock-card span { color: #bed1dc; font-size: 0.8rem; }
.clock-card strong { font-size: 1.5rem; letter-spacing: 0.04em; }
.clock-card small { flex: 1 0 100%; color: #bed1dc; }
.accuracy-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; margin: 1rem 0 0.55rem; padding: 0.85rem; border: 2px solid var(--line); border-radius: 14px; background: #f8fafb; }
.accuracy-card.is-ready { border-color: #78bb9c; background: var(--good-pale); }
.accuracy-card.is-warning { border-color: #e1a262; background: var(--warn-pale); }
.accuracy-card.is-error { border-color: #df8c85; background: var(--bad-pale); }
.accuracy-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 1.45rem; }
.accuracy-card > span:nth-child(2) { display: grid; }
.accuracy-card small, .location-note { color: var(--muted); font-size: 0.82rem; }
.accuracy-card strong { font-size: 1.2rem; }
.tap-result { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.7rem; padding: 0.75rem; border-radius: 10px; background: var(--good-pale); color: #07563a; font-weight: 750; }
.tap-result > span:first-child { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--good); color: #fff; }
.scanner { position: relative; margin-top: 0.8rem; overflow: hidden; border-radius: 14px; background: #071624; }
.scanner video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.scanner-frame { position: absolute; top: 15%; right: 20%; bottom: 26%; left: 20%; border: 3px solid var(--accent); border-radius: 16px; outline: 100vmax solid rgba(7, 22, 36, 0.46); }
.scanner p { position: absolute; right: 0.5rem; bottom: 2.6rem; left: 0.5rem; margin: 0; color: #fff !important; text-align: center; }
.scanner .text-button { width: 100%; color: var(--accent); }
.manual-code { margin-top: 0.75rem; padding: 0.65rem; border: 1px solid var(--line); border-radius: 12px; }
.manual-code summary { min-height: var(--tap); padding: 0.7rem 0; color: var(--teal-dark); font-weight: 800; cursor: pointer; }
.setup-gate { border-color: #d49b4b; background: var(--warn-pale); }
.sticky-action { position: sticky; z-index: 20; bottom: calc(76px + env(safe-area-inset-bottom)); border: 3px solid var(--paper); }

.trip-hero {
  margin: -24px -16px 1.5rem;
  padding: 22px 18px 24px;
  background: #102a43 linear-gradient(145deg, #102a43, #0b4554);
  color: #fff;
}
.trip-hero .eyebrow { color: #8dd4ce; }
.trip-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.7rem; }
.trip-code { padding: 0.35rem 0.5rem; border: 1px solid rgba(255,255,255,0.28); border-radius: 8px; color: #d7e4eb; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.72rem; }
.trip-facts { margin-bottom: 1rem; background: rgba(255,255,255,0.2); }
.trip-facts > div { background: rgba(0,0,0,0.13); }
.trip-facts dt { color: #bcd0dc; }
.trip-progress { display: block; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 5px; background: rgba(255,255,255,0.18); }
.trip-progress::-webkit-progress-bar { background: rgba(255,255,255,0.18); }
.trip-progress::-webkit-progress-value { border-radius: 5px; background: var(--accent); }
.trip-progress::-moz-progress-bar { border-radius: 5px; background: var(--accent); }
.trip-layout { display: grid; gap: 2rem; }
.after-trip { scroll-margin-top: 78px; }

.map-card { padding: 14px; }
.map-instruction { color: var(--muted); font-size: 0.88rem; }
.location-live { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding: 0.85rem; border: 2px solid var(--line); border-radius: 14px; background: #f8fafb; }
.location-live.is-ready { border-color: #78bb9c; background: var(--good-pale); }
.location-live.is-warning { border-color: #e1a262; background: var(--warn-pale); }
.location-live.is-error { border-color: #df8c85; background: var(--bad-pale); }
.location-live > span:nth-child(2) { display: grid; min-width: 0; }
.location-live small { color: var(--muted); }
.location-pulse { width: 16px; height: 16px; border: 4px solid #a4b4bf; border-radius: 50%; background: #fff; }
.location-live.is-active .location-pulse, .auto-file-state.is-active .location-pulse { border-color: var(--teal); animation: pulse 1.5s ease-in-out infinite; }
.tracking-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; margin: 0.7rem 0; }
.tracking-facts > span { display: grid; align-content: start; min-height: 62px; padding: 0.55rem; border-radius: 10px; background: #edf3f4; }
.tracking-facts small { color: var(--muted); font-size: 0.7rem; }
.tracking-facts strong { overflow-wrap: anywhere; font-size: 0.8rem; }
.tracking-facts--final { grid-template-columns: minmax(0, 1fr); }
.tracking-facts--final > span { min-height: 0; }
.point-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.75rem 0; }
.point-summary article { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.5rem; padding: 0.65rem; border: 1px solid var(--line); border-radius: 11px; }
.point-summary article > span:nth-child(2) { display: grid; min-width: 0; }
.point-summary article > span:last-child { grid-column: 2; color: var(--muted); font-size: 0.76rem; }
.point-summary small { color: var(--muted); font-size: 0.72rem; }
.point-toggle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.8rem; }
.point-choice { display: flex; align-items: center; min-width: 0; min-height: 58px; gap: 0.55rem; padding: 0.55rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); text-align: left; }
.point-choice.is-active { border: 2px solid var(--teal); background: #eff9f7; }
.point-choice > span:last-child { display: grid; min-width: 0; }
.point-choice small { overflow: hidden; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.point-dot { display: grid; flex: 0 0 32px; height: 32px; place-items: center; border-radius: 50% 50% 50% 6px; background: var(--teal); color: #fff; font-weight: 900; }
.point-dot--dest { background: var(--bad); }
.map-surface { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 2px solid var(--line); border-radius: 14px; background: #dfe8e8; cursor: crosshair; }
.map-surface--review { cursor: default; }
.map-surface img { width: 100%; height: 100%; object-fit: cover; user-select: none; }
.map-placeholder { position: absolute; inset: 0; background-color: #e2ebe6; background-image: linear-gradient(32deg, transparent 48%, #b6c8bf 49%, #b6c8bf 52%, transparent 53%), linear-gradient(142deg, transparent 46%, #c2d1ca 47%, #c2d1ca 51%, transparent 52%), linear-gradient(90deg, rgba(255,255,255,.7) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.7) 1px, transparent 1px); background-size: 100% 100%, 100% 100%, 38px 38px, 38px 38px; }
.map-placeholder span { position: absolute; height: 10px; border-radius: 8px; background: #fff; transform: rotate(-16deg); }
.map-placeholder span:nth-child(1) { top: 23%; left: 5%; width: 72%; }
.map-placeholder span:nth-child(2) { top: 57%; right: -8%; width: 80%; transform: rotate(20deg); }
.map-placeholder span:nth-child(3) { top: 72%; left: 12%; width: 45%; transform: rotate(-5deg); }
.map-overlay { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.map-marker path { fill: var(--teal); stroke: #fff; stroke-width: 7px; }
.map-marker circle { fill: #fff; }
.map-marker text { fill: var(--ink); font-size: 25px; font-weight: 900; text-anchor: middle; }
.map-marker--dest path { fill: var(--bad); }
.map-marker.is-hidden { display: none; }
.map-route { stroke: var(--ink); stroke-width: 9px; stroke-dasharray: 18 12; stroke-linecap: round; opacity: .72; }
.map-route.is-hidden { display: none; }
.map-empty { position: absolute; z-index: 4; top: 50%; right: 1rem; left: 1rem; margin: 0; padding: 0.65rem; border-radius: 10px; background: rgba(255,255,255,.92); color: var(--muted); font-size: 0.82rem; font-weight: 750; text-align: center; transform: translateY(-50%); }
.map-cursor { fill: rgba(245,196,81,.45); stroke: var(--ink); stroke-width: 5px; opacity: 0; }
.map-surface:focus .map-cursor { opacity: 1; }
.distance-readout { display: flex; align-items: center; gap: 0.7rem; margin: 0.75rem 0; padding: 0.75rem; border-radius: 12px; background: #edf3f4; }
.distance-readout > span:first-child { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--paper); font-weight: 900; }
.distance-readout > span:last-child { display: grid; }
.distance-readout small { color: var(--muted); }
.field-error { color: var(--bad); font-size: 0.84rem; font-weight: 750; }

.stamp-list { margin: 0; padding: 0; list-style: none; }
.stamp-item { display: grid; grid-template-columns: 38px minmax(0, 1fr); min-height: 80px; }
.payment-checkpoint { display: grid; grid-template-columns: 38px minmax(0, 1fr); margin-bottom: 1rem; }
.stamp-rail { position: relative; display: flex; justify-content: center; }
.stamp-rail::after { position: absolute; top: 35px; bottom: -2px; width: 3px; border-radius: 3px; background: var(--line); content: ""; }
.stamp-item:last-child .stamp-rail::after { display: none; }
.stamp-rail span { position: relative; z-index: 1; display: grid; width: 30px; height: 30px; place-items: center; border: 3px solid var(--canvas); border-radius: 50%; background: #dbe3e8; color: var(--muted); font-size: 0.78rem; font-weight: 900; }
.stamp-item--done .stamp-rail span { background: var(--good); color: #fff; }
.stamp-item--queued .stamp-rail span { background: var(--warn); color: #fff; }
.stamp-item--ready .stamp-rail span { border: 5px solid rgba(245,196,81,.3); background: var(--accent); color: var(--accent-ink); }
.stamp-item--done .stamp-rail::after { background: var(--good); }
.stamp-content { padding: 0 0 0.85rem 0.45rem; }
.stamp-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 70px; gap: 0.8rem; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); text-align: left; }
.stamp-button:disabled { cursor: not-allowed; opacity: 0.62; }
.stamp-item--ready .stamp-button { min-height: 82px; border: 2px solid var(--ink); background: var(--ink); color: #fff; opacity: 1; }
.stamp-item--done .stamp-button { border-color: #a2ceb7; background: #f4fbf7; opacity: 1; }
.stamp-item--queued .stamp-button { border-color: #e3b785; background: var(--warn-pale); opacity: 1; }
.stamp-item--error .stamp-button { border-color: #c35b52; background: var(--bad-pale); }
.stamp-item--done, .stamp-item--queued { min-height: 66px; }
.stamp-item--done .stamp-button, .stamp-item--queued .stamp-button { min-height: 58px; }
.stamp-main { display: grid; gap: 0.18rem; }
.stamp-main strong { font-size: 1.03rem; }
.stamp-main small { color: var(--muted); }
.stamp-item--ready .stamp-main small { color: #bfd0dc; }
.stamp-action { display: grid; flex: 0 0 48px; min-height: 42px; place-items: center; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 0.76rem; font-weight: 900; }
.stamp-item--done .stamp-action { background: var(--good); color: #fff; font-size: 1.1rem; }
.stamp-item--queued .stamp-action { background: var(--warn); color: #fff; }
.undo-button { min-height: 56px; margin-top: 0.2rem; padding: 0 0.65rem; border: 0; background: transparent; color: var(--bad); font-size: 1rem; font-weight: 800; }
.skip-choice { margin-top: 0.35rem; }
.skip-choice summary { min-height: var(--tap); padding: 0.75rem 0; color: var(--muted); font-weight: 800; cursor: pointer; }
.skip-choice p { margin-bottom: 0.45rem; color: var(--muted); }
.skip-actions { display: grid; gap: 0.45rem; }
.skip-actions .button { justify-content: flex-start; text-align: left; }

.upload-stack { display: grid; gap: 0.8rem; }
.upload-card--done { border-color: #9acbb4; }
.upload-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
.upload-heading h3, .upload-heading p { margin: 0; }
.upload-heading p { color: var(--muted); font-size: 0.82rem; }
.upload-icon { display: grid; min-width: 42px; height: 42px; place-items: center; padding: 0 0.35rem; border-radius: 12px; background: var(--blue-pale); color: var(--ink); font-size: 0.72rem; font-weight: 900; }
.file-picker { display: block; }
.file-picker > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-picker .button { width: 100%; }
/* The file input is hidden, so the focus shows on the button that stands for it. */
.file-picker:focus-within .button, .file-picker--drop:focus-within { outline: 3px solid #1769aa; outline-offset: 3px; }
.file-picker--drop { display: grid; min-height: 130px; place-items: center; align-content: center; gap: 0.25rem; padding: 1rem; border: 2px dashed var(--line-strong); border-radius: 14px; background: #f8fafb; text-align: center; }
.file-picker--drop > span { font-size: 1.5rem; }
.file-picker--drop small { color: var(--muted); }
.file-ready { margin: 0.6rem 0; padding: 0.6rem; border-radius: 8px; background: var(--good-pale); color: #07563a; font-weight: 750; }
.auto-file-state { display: flex; align-items: center; gap: 0.65rem; padding: 0.75rem; border-radius: 11px; background: #edf3f4; }
.auto-file-state > span:last-child { display: grid; }
.auto-file-state small { color: var(--muted); }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.75rem; border-radius: 10px; background: var(--good-pale); }
.file-row > span:first-child { display: grid; min-width: 0; }
.file-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row small { color: var(--muted); }
.receipt-gate { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.7rem; margin-top: 0.55rem; padding: 0.7rem; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.receipt-gate > div { display: grid; gap: 0.15rem; min-width: 0; }
.receipt-gate small { color: var(--muted); }
.receipt-gate--success { border-color: #9acbb4; background: var(--good-pale); color: #07563a; }
.receipt-gate--bad { border-color: #e1aca7; background: var(--bad-pale); color: var(--bad); }
.receipt-gate--warm { border-color: #e6c88a; background: var(--warn-pale); color: #76500b; }
.receipt-gate-source { font-weight: 800; }
.not-required { margin: 0; color: var(--muted); font-style: italic; }
.crop-tool { margin-top: 0.75rem; }
.crop-canvas-wrap { position: relative; overflow: hidden; border-radius: 12px; background: #0b1e2e; }
.crop-canvas-wrap canvas { display: block; width: 100%; max-height: 54vh; object-fit: contain; }
.crop-guide { position: absolute; inset: 10%; border: 2px solid var(--accent); border-radius: 5px; pointer-events: none; }
.crop-sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin: 0.7rem 0; }
.crop-sliders > * { display: grid; gap: 0.2rem; color: var(--muted); font-size: 0.72rem; font-weight: 750; }
.crop-sliders input { width: 100%; accent-color: var(--teal); }

.checklist-card { display: grid; gap: 1rem; }
.check-list { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.check-item { display: flex; align-items: flex-start; gap: 0.7rem; min-height: 52px; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.check-item:last-child { border-bottom: 0; }
.check-item > span:nth-child(2) { display: grid; flex: 1; }
.check-item small { color: var(--muted); }
.check-item > a { align-self: center; font-size: 0.8rem; font-weight: 800; }
.check-mark { display: grid; flex: 0 0 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--chip); font-weight: 900; }
.check-item--pass .check-mark { background: var(--good-pale); color: var(--good); }
.check-item--warning .check-mark { background: var(--warn-pale); color: var(--warn); }
.check-item--fail .check-mark { background: var(--bad-pale); color: var(--bad); }
.submitted-state { display: flex; align-items: center; gap: 0.8rem; padding: 1rem; border-radius: 12px; background: var(--good-pale); }
.submitted-state > span { display: grid; flex: 0 0 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--good); color: #fff; font-size: 1.2rem; }
.submitted-state p { margin: 0; color: var(--muted); }

.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 1.5rem; }
.metric-card { display: grid; min-height: 118px; align-content: center; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.metric-card > span { color: var(--muted); font-size: 0.78rem; font-weight: 750; }
.metric-card strong { font-size: clamp(1.7rem, 7vw, 2.3rem); line-height: 1.15; }
.metric-card small { color: var(--muted); }
.metric-card--good { border-top: 4px solid var(--good); }
.metric-card--warm { border-top: 4px solid var(--warn); }
.metric-card--bad { border-top: 4px solid var(--bad); }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.8rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
thead th { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
tbody th { font-size: 0.9rem; }
.action-list { display: grid; gap: 0.65rem; }
.action-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; }
.action-symbol { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--bad-pale); color: var(--bad); font-weight: 900; }
.action-copy { display: grid; min-width: 0; }
.action-copy small, .action-time { color: var(--muted); }
.action-time { font-size: 0.74rem; }
.status-grid { display: grid; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; min-height: 58px; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.status-row > span:first-child { display: grid; }
.status-row small { color: var(--muted); }

.week-score { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.week-score > div:first-child > strong { display: block; margin: 0.2rem 0; font-size: clamp(2.2rem, 10vw, 4rem); line-height: 1; }
.week-score > div:first-child > strong span { color: #9fb6c4; font-size: 0.5em; }
.week-score p:last-child { margin: 0; color: #bfd0dc; }
.week-progress { display: grid; flex: 0 0 104px; gap: 0.35rem; color: var(--accent); text-align: right; }
.week-progress progress, .mini-progress, .rank-bar { overflow: hidden; border: 0; border-radius: 6px; background: #d8e1e6; }
.week-progress progress { width: 104px; height: 12px; }
.week-progress progress::-webkit-progress-bar, .mini-progress::-webkit-progress-bar, .rank-bar::-webkit-progress-bar { background: #d8e1e6; }
.week-progress progress::-webkit-progress-value { background: var(--accent); }
.week-progress progress::-moz-progress-bar { background: var(--accent); }
.mini-progress { width: 90px; height: 7px; }
.mini-progress::-webkit-progress-value, .rank-bar::-webkit-progress-value { background: var(--teal); }
.mini-progress::-moz-progress-bar, .rank-bar::-moz-progress-bar { background: var(--teal); }
.two-column { display: grid; gap: 0.8rem; margin: 0.8rem 0; }
.rank-list { display: grid; gap: 0.8rem; margin: 0; padding: 0; list-style: none; }
.rank-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 38%); align-items: center; gap: 0.8rem; }
.rank-list li > span:first-child { display: grid; }
.rank-list small { color: var(--muted); }
.rank-bar { display: block; width: 100%; height: 8px; }
.rank-bar::-webkit-progress-value { background: var(--bad); }
.rank-bar::-moz-progress-bar { background: var(--bad); }
.handoff-card, .danger-zone, .confirmation-card { display: flex; align-items: center; gap: 1rem; margin-top: 0.8rem; }
.handoff-status { display: grid; flex: 0 0 48px; height: 48px; place-items: center; border-radius: 15px; background: var(--good-pale); color: var(--good); font-size: 1.3rem; font-weight: 900; }
.handoff-copy { flex: 1; min-width: 0; }
.handoff-copy h2, .handoff-copy p { margin-bottom: 0.25rem; }
.handoff-copy > p:not(.eyebrow), .danger-zone p, .confirmation-card p { color: var(--muted); }
.danger-zone { border-color: #e1aca7; }
.danger-zone > div, .confirmation-card > div { flex: 1; }
.danger-zone p, .confirmation-card p { margin: 0.2rem 0 0; }

.filter-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 0.8rem; padding: 0.8rem; }
.filter-search { grid-column: 1 / -1; }
.review-workspace { display: grid; gap: 0.8rem; }
.review-queue { display: grid; align-content: start; gap: 0.45rem; }
.review-queue-row { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 0.7rem; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none; }
.review-queue-row.is-selected { border: 2px solid var(--teal); background: #eff9f7; }
.review-queue-row > span { display: grid; min-width: 0; }
.review-queue-row > span:last-child { justify-items: end; }
.review-queue-row small { color: var(--muted); }
.review-detail { display: grid; align-content: start; gap: 0.8rem; }
.review-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.review-title p:last-child { margin: 0; color: var(--muted); }
.fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin: 1rem 0 0; }
.fact-grid > div { padding: 0.7rem; border-radius: 10px; background: #f1f5f6; }
.fact-grid dt { color: var(--muted); font-size: 0.72rem; }
.fact-grid dd { margin: 0; font-weight: 800; }
.file-review-grid { display: grid; gap: 0.55rem; }
.file-review { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 0.65rem; min-height: 62px; padding: 0.6rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.file-review > span:nth-child(2) { display: grid; }
.file-review small { color: var(--muted); }
.decision-form { display: grid; gap: 1rem; }
.decision-form fieldset { margin: 0; padding: 0; border: 0; }
.choice-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-fieldset legend { padding: 0; font-weight: 800; }
.field-help { margin: 0.2rem 0 0.5rem; color: var(--muted); font-size: 0.9rem; }
.choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.6rem; margin-top: 0.5rem; }
.choice-cards--stacked { grid-template-columns: 1fr; }
.choice-cards > * { position: relative; }
.choice-cards input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-cards span { display: grid; min-height: 78px; align-content: center; padding: 0.75rem; border: 2px solid var(--line); border-radius: 13px; background: var(--paper); }
.choice-cards input:checked + span { border: 2px solid var(--teal); background: #e9f6f4; }
.choice-cards input:focus-visible + span { outline: 3px solid #1769aa; outline-offset: 3px; }
.choice-cards small { color: var(--muted); }
.reenrol-code { width: min(100%, 280px); margin: 0 auto 1rem; border: 10px solid #fff; border-radius: 12px; }

/* The registration pages, Regu and Ponsel program (release 3.2). */
.admin-columns { display: grid; gap: 0.8rem; align-items: start; }
.admin-list { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; min-height: 66px; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none; }
.admin-row.is-selected { border: 2px solid var(--teal); background: #eff9f7; }
.admin-row > span:first-child { display: grid; min-width: 0; }
.admin-row small { color: var(--muted); }
.admin-form { margin-top: 1rem; }
.admin-add { margin: 0.8rem 0 1rem; }
.admin-add > summary { width: fit-content; list-style: none; cursor: pointer; }
.admin-add > summary::-webkit-details-marker { display: none; }
.admin-add > .admin-form { padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #f8fafb; }
.admin-add h3, .admin-add fieldset { margin: 0; }
.admin-notice { margin-top: 0.8rem; }
.admin-notice form { margin-top: 0.6rem; }
.admin-busy { margin: 0.6rem 0 0; color: var(--muted); font-weight: 750; }
.admin-busy:empty { display: none; }
.admin-cell { display: grid; gap: 0.2rem; justify-items: start; }
.admin-cell small { color: var(--muted); }
.admin-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.admin-actions form { margin: 0; }
.admin-inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.admin-inactive { margin-top: 0.8rem; }
.admin-inactive > summary { min-height: var(--tap); padding: 0.7rem 0; color: var(--teal-dark); font-weight: 800; cursor: pointer; }
.admin-inactive-none { margin-top: 0.8rem; }
.admin-history > summary { padding: 0.2rem 0; color: var(--teal-dark); font-size: 0.9rem; font-weight: 800; cursor: pointer; }
.admin-history ul { margin: 0.2rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; }
.admin-head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.6rem; }
.admin-steps-title { margin: 0; font-weight: 800; }
.admin-steps { display: grid; gap: 0.4rem; margin: 0; padding-left: 1.4rem; }
.admin-setup .reenrol-code { margin-bottom: 0; }
.text-button--danger { color: var(--bad); }
/* Hapus permanen (release 3.2.1): a details element beside Nonaktifkan that opens a small form. The form takes the width
   its cell gives it, up to 13rem, and no fixed width: a fixed 13rem lifted the least width of the actions column, and the
   seven-column members table then grew to 753 of 733 px at a 1366 px desk and scrolled sideways. */
.admin-delete > summary, .admin-delete-card > summary { display: inline-flex; align-items: center; min-height: 56px; list-style: none; color: var(--bad); font-weight: 800; cursor: pointer; }
.admin-delete > summary::-webkit-details-marker, .admin-delete-card > summary::-webkit-details-marker { display: none; }
.admin-delete[open], .admin-delete-card[open] { flex: 1 1 100%; }
.admin-delete-form { display: grid; gap: 0.6rem; width: auto; max-width: 13rem; margin-top: 0.3rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--blue-pale); text-align: left; }
.admin-delete-form .button { width: 100%; }
.week-frozen { margin-bottom: 1.2rem; }
.sticker { display: grid; justify-items: center; gap: 0.5rem; width: min(100%, 300px); margin: 0 auto; padding: 1rem; border: 2px dashed var(--line-strong); border-radius: 14px; background: #fff; color: #102a43; text-align: center; }
.sticker-name { font-size: 1.8rem; line-height: 1.1; letter-spacing: 0.02em; }
.sticker-code { width: min(100%, 220px); height: auto; }
.sticker p { margin: 0; font-weight: 750; }
.print-sheet { display: none; }

.chart-card { min-height: 330px; }
.legend { display: flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.76rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--teal); }
.bar-chart { display: flex; min-height: 230px; align-items: flex-end; justify-content: space-around; gap: 0.45rem; padding-top: 1rem; }
.bar-column { display: grid; flex: 1 1 0; max-width: 62px; height: 210px; grid-template-rows: auto 1fr auto; gap: 0.35rem; text-align: center; }
.bar-value, .bar-column small { color: var(--muted); font-size: 0.72rem; }
.bar-track { width: 100%; height: 100%; overflow: visible; }
.bar-back { fill: #e6ecef; }
.bar-fill { fill: var(--teal); }
.data-note { margin-top: 1rem; color: var(--muted); font-size: 0.78rem; text-align: center; }

.toast-stack { position: fixed; z-index: 100; right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); left: 12px; display: grid; justify-items: center; gap: 0.45rem; pointer-events: none; }
.toast { width: min(100%, 480px); padding: 0.8rem 1rem; border: 2px solid var(--paper); border-radius: 12px; background: var(--ink); color: #fff; font-size: 0.88rem; font-weight: 750; animation: toast-in 180ms ease-out; }
.toast--error { background: #811a12; }
.is-loading { position: relative; pointer-events: none; }
.is-loading::after { position: absolute; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; content: ""; animation: spin .7s linear infinite; }
.is-loading > * { opacity: .3; }

/* Essential field text stays at the 18 px body size. Smaller text below is metadata. */
.account-menu > summary,
.connection-strip,
.bottom-nav a,
.meta-line,
.button-help,
.message p,
.field > span:first-child,
fieldset > legend,
.field em,
.field small,
.password-wrap .reveal-button,
.login-help,
.window-copy p,
.plan-body p,
.clock-card span,
.accuracy-card small,
.location-note,
.map-instruction,
.tracking-facts strong,
.point-summary article > span:last-child,
.point-summary small,
.map-empty,
.field-error,
.stamp-action,
.upload-heading p,
.crop-sliders > *,
.check-item > a,
.toast,
.check-row small,
.auto-file-state small { font-size: 1rem; }

.eyebrow,
.status-pill,
.count-chip,
.sync-badge,
.trip-code,
.tracking-facts small,
.stamp-rail span,
.upload-icon,
.metric-card > span,
thead th,
.action-time,
.fact-grid dt,
.legend,
.bar-value,
.bar-column small,
.data-note { font-size: 0.875rem; }

body[data-theme="dark"] {
  --ink: #f5f8fa;
  --ink-2: #dce6ec;
  --muted: #d1dce4;
  --paper: #102a43;
  --canvas: #061521;
  --line: #718494;
  --line-strong: #aab7c1;
  --teal: #07514d;
  --teal-dark: #b4f1ec;
  --good: #17754f;
  --good-pale: #0b392a;
  --warn: #9a4e12;
  --warn-pale: #43270d;
  --bad: #a72b21;
  --bad-pale: #451917;
  --blue-pale: #18384d;
  --chip: #1e3b52;
  background: #061521;
  color: #f5f8fa;
}
body[data-theme="dark"] .app-header,
body[data-theme="dark"] .bottom-nav { border-color: #718494; background: rgba(16, 42, 67, .98); }
body[data-theme="dark"] .brand-mark,
body[data-theme="dark"] .card--dark,
body[data-theme="dark"] .message-mark,
body[data-theme="dark"] .count-chip,
body[data-theme="dark"] .icon-link,
body[data-theme="dark"] .step-number,
body[data-theme="dark"] .clock-card,
body[data-theme="dark"] .accuracy-mark,
body[data-theme="dark"] .stamp-item--ready .stamp-button,
body[data-theme="dark"] .toast { border-color: #aab7c1; background: #020b12; color: #fff; }
body[data-theme="dark"] .card--dark .eyebrow,
body[data-theme="dark"] .back-link--inverse { color: #b4f1ec; }
body[data-theme="dark"] .status-pill--success,
body[data-theme="dark"] .status-pill--good { color: #d9ffed; }
body[data-theme="dark"] .status-pill--warning,
body[data-theme="dark"] .status-pill--warm,
body[data-theme="dark"] .sync-badge.is-pending { color: #ffe5c4; }
body[data-theme="dark"] .status-pill--error,
body[data-theme="dark"] .status-pill--bad,
body[data-theme="dark"] .sync-badge.is-error { color: #ffe2df; }
body[data-theme="dark"] .status-pill--ready,
body[data-theme="dark"] .sync-badge,
body[data-theme="dark"] a:not(:where(.button)),
body[data-theme="dark"] .text-button { color: #b4f1ec; }
body[data-theme="dark"] .accuracy-card,
body[data-theme="dark"] .location-live,
body[data-theme="dark"] .tracking-facts > span,
body[data-theme="dark"] .auto-file-state,
body[data-theme="dark"] .file-picker--drop,
body[data-theme="dark"] .filter-bar,
body[data-theme="dark"] .map-empty,
body[data-theme="dark"] .empty-inline,
body[data-theme="dark"] .password-wrap .reveal-button { background: #17364a; color: #f5f8fa; }
body[data-theme="dark"] .sync-badge:not(.is-pending):not(.is-error),
body[data-theme="dark"] .status-pill--ready,
body[data-theme="dark"] .bottom-nav a[aria-current="page"] { background: #123f3c; }
body[data-theme="dark"] .connection-strip { color: #ffe5c4; }
body[data-theme="dark"] .inline-error,
body[data-theme="dark"] .field-error,
body[data-theme="dark"] .state-illustration--error,
body[data-theme="dark"] .action-symbol,
body[data-theme="dark"] .check-item--fail .check-mark { color: #ffe2df; }
body[data-theme="dark"] .toast--error { background: #811a12; }
body[data-theme="dark"] .tap-result,
body[data-theme="dark"] .file-ready,
body[data-theme="dark"] .plan-card--done .plan-order,
body[data-theme="dark"] .empty-mark--good,
body[data-theme="dark"] .handoff-status,
body[data-theme="dark"] .check-item--pass .check-mark { color: #d9ffed; }
body[data-theme="dark"] .check-item--warning .check-mark { color: #ffe5c4; }
body[data-theme="dark"] .undo-button { color: #ffb4ad; }
body[data-theme="dark"] .admin-delete > summary, body[data-theme="dark"] .admin-delete-card > summary { color: #ffb4ad; }
body[data-theme="dark"] .field-note--warning { color: #ffb4ad !important; }
body[data-theme="dark"] .field-note--good { color: #9ee7c5 !important; }
body[data-theme="dark"] .accuracy-card.is-ready,
body[data-theme="dark"] .location-live.is-ready,
body[data-theme="dark"] .stamp-item--done .stamp-button,
body[data-theme="dark"] .window-banner--ready { background: #0b392a; }
body[data-theme="dark"] .accuracy-card.is-warning,
body[data-theme="dark"] .location-live.is-warning,
body[data-theme="dark"] .stamp-item--queued .stamp-button { background: #43270d; }
body[data-theme="dark"] .accuracy-card.is-error,
body[data-theme="dark"] .location-live.is-error,
body[data-theme="dark"] .stamp-item--error .stamp-button { background: #451917; }
body[data-theme="dark"] .choice-cards input:checked + span { border-color: #76d5cd; background: #123f3c; }
body[data-theme="dark"] .map-placeholder { filter: brightness(.42) contrast(1.2); }
body[data-theme="dark"] .map-marker text { fill: #061521; }
body[data-theme="dark"] .trip-hero { background: #020b12 linear-gradient(145deg, #020b12, #07343f); }

/* Night review fix: coordinator surfaces that deliberately use a light setup treatment must
   switch as a unit. A white card with the dark theme's white text is unreadable. */
body[data-theme="dark"][data-active-view="admin_squads"] .metric-card,
body[data-theme="dark"][data-active-view="admin_phones"] .metric-card {
  border-color: #4c657a;
  background: #102a43;
  color: var(--ink);
}
body[data-theme="dark"][data-active-view="admin_squads"] .metric-card small,
body[data-theme="dark"][data-active-view="admin_phones"] .metric-card small { color: var(--muted); }
body[data-theme="dark"] .admin-phone-card {
  border-color: #4c657a;
  background: #102a43;
  color: var(--ink);
}
body[data-theme="dark"] .admin-phone-card .field input,
body[data-theme="dark"] .admin-phone-card .field select,
body[data-theme="dark"] .admin-phone-card .field textarea {
  border-color: #8ea0ad;
  background: #0b2135;
  color: var(--ink);
}
body[data-theme="dark"] .admin-phone-card .field small,
body[data-theme="dark"] .admin-phone-card .muted-copy { color: var(--muted); }
body[data-theme="dark"] .admin-phone-card .section-heading--inside .eyebrow { color: #b4f1ec; }

/* Regu for the ketua regu (release 3.3): the head, the board that refreshes itself, the petugas cards and their sheet, the
   plan sheet, the attendance code, the tester's attendance card and the coordinator's roster of the day. Colours come from
   the theme's variables; the few fixed ones have a dark twin below. */
.lead-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.8rem 1rem; }
.lead-head-title { min-width: 0; }
.lead-head-title h1 { margin-bottom: 0.25rem; overflow-wrap: anywhere; }
.lead-head-title p { margin: 0; }
.lead-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lead-board { display: grid; gap: 1.6rem; }
.lead-board-holder { margin-bottom: 1.6rem; }
.board-stamp { margin: 0; color: var(--muted); font-size: 1rem; font-weight: 700; }
.board-section { display: grid; gap: 0.7rem; min-width: 0; }
.board-section > h2, .board-section > p { margin: 0; }
.board-section > .section-heading { align-items: center; justify-content: flex-start; gap: 0.6rem; margin: 0; }
.board-actions { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.board-action { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding: 0.8rem; border: 1px solid var(--line); border-left: 5px solid var(--bad); border-radius: var(--radius-small); background: var(--paper); }
.board-action--warm { border-left-color: var(--warn); }
.board-action--warm .action-symbol { background: var(--warn-pale); color: var(--warn); }
.board-action .action-copy strong { overflow-wrap: anywhere; }
.board-action .action-copy small { font-size: 1rem; }
.member-grid { display: grid; gap: 0.7rem; }
.member-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0.6rem; padding: 14px; }
.member-copy { display: grid; gap: 0.3rem; min-width: 0; }
.member-copy p { margin: 0; }
.member-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.6rem; }
.member-top h3 { margin: 0; overflow-wrap: anywhere; }
.member-detail { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.member-line { color: var(--muted); font-size: 1rem; }
/* The whole card opens its sheet: the button keeps its own size, and the area it answers covers the card. */
.member-open { display: grid; width: 48px; height: 48px; align-self: center; place-items: center; border: 0; border-radius: 14px; background: var(--blue-pale); color: var(--ink); font-size: 1.6rem; font-weight: 900; line-height: 1; }
.member-open::after { position: absolute; inset: 0; border-radius: var(--radius); content: ""; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; }
.tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0.15rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 0.875rem; font-weight: 800; line-height: 1.1; }
.tag--warm { border-color: #e1a262; background: var(--warn-pale); color: #73380a; }
.board-counts { padding: 0.8rem 0.9rem; border-radius: var(--radius-small); background: var(--blue-pale); font-weight: 750; }
.board-section > .button { justify-self: start; }
.lead-issue { padding-block: 0; }
.lead-issue > summary { display: flex; align-items: center; min-height: 56px; color: var(--teal-dark); font-weight: 800; cursor: pointer; }
.lead-issue[open] { padding-bottom: 18px; }
.lead-issue > form { margin-top: 0.4rem; }
/* The sheets are narrow dialogs: their forms keep one column at any screen width. */
.lead-sheet .form-grid { grid-template-columns: minmax(0, 1fr); }
.lead-sheet-body { align-content: start; }
.lead-sheet-content { display: grid; gap: 0.8rem; min-width: 0; }
.lead-sheet-content p { margin: 0; }
.sheet-status { display: grid; justify-items: start; gap: 0.35rem; }
.sheet-line { overflow-wrap: anywhere; }
.sheet-section { display: grid; gap: 0.45rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.sheet-section h3 { margin: 0; }
.sheet-section > .button { justify-self: start; }
.sheet-plans { margin: 0; padding: 0; list-style: none; }
.sheet-plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.sheet-plan:last-child { border-bottom: 0; }
.sheet-plan-copy { display: grid; gap: 0.2rem; min-width: 0; }
.sheet-plan-copy strong { overflow-wrap: anywhere; }
.sheet-plan-copy small { color: var(--muted); font-size: 1rem; }
.sheet-plan-side { display: grid; justify-items: end; gap: 0.35rem; }
.sheet-phone { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.sheet-phone small { color: var(--muted); font-size: 1rem; }
.quota-line { margin: 0; padding: 0.7rem 0.8rem; border-radius: 10px; background: var(--blue-pale); font-weight: 750; }
.dialog-head--bare { justify-content: flex-end; padding-bottom: 0; border-bottom: 0; }
.attendance-code { display: grid; justify-items: center; gap: 0.6rem; text-align: center; }
.attendance-code > * { margin: 0; }
.attendance-code > .eyebrow, .attendance-code > h2 { justify-self: stretch; }
.attendance-help { color: var(--muted); }
.attendance-qr { width: min(100%, 280px); height: auto; border: 10px solid #fff; border-radius: 12px; background: #fff; }
.attendance-stale { justify-self: stretch; text-align: left; }
.attendance-count { font-weight: 800; }
.attendance-list { display: grid; gap: 0.3rem; justify-self: stretch; padding: 0; list-style: none; text-align: left; }
.attendance-list:empty { display: none; }
.attendance-list li { padding: 0.45rem 0.7rem; border-radius: 10px; background: var(--good-pale); font-weight: 750; overflow-wrap: anywhere; }
.attendance-list--waiting li { background: var(--chip); font-weight: 600; }
/* The tester's attendance card on Hari ini (markup in partials/today_content.html). */
.attendance-card { display: grid; gap: 0.8rem; border: 2px solid var(--teal); }
.attendance-card--done { border-color: #9acbb4; background: #f5fbf8; }
.attendance-copy h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.attendance-copy > p:not(.eyebrow) { margin: 0; color: var(--muted); }
.attendance-card .scanner { margin-top: 0; }
/* The coordinator's roster of the day on Regu (/admin/squads). */
.roster-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; margin: 0 0 1rem; }
.roster-form .field { flex: 1 1 12rem; min-width: 0; }
.roster-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.roster-line { font-weight: 750; }
/* A squad row of the list: its lines keep the width, and its pill goes under them when both do not fit beside each other. */
.admin-row { flex-wrap: wrap; row-gap: 0.4rem; }
.admin-table td.admin-absen { font-size: 1rem; }
body[data-theme="dark"] .tag--warm { border-color: #9a4e12; color: #ffe5c4; }
body[data-theme="dark"] .board-action--warm .action-symbol { color: #ffe5c4; }
body[data-theme="dark"] .attendance-card--done { border-color: #17754f; background: #0b392a; }

/* The petugas's day (release 3.4): Batal / ditolak and its sheet, the fee chips, the next line and a plan's start time, a
   refusal under its plan, the drafts to complete, the session reminder, the 15-minute timer, the end in place of the
   outcome, and the sign-in line of a set-up phone. Plain and working; colours come from the theme's variables, and the
   one fixed text colour has a dark twin below. Every new surface keeps a tap height of 44 px or more. */
.end-open { margin-top: 0.35rem; }
.end-sheet-intro, .end-sheet-foot { margin: 0; }
.end-sheet-foot { color: var(--muted); }
.end-choices { display: grid; gap: 0.6rem; }
.end-choice { justify-content: flex-start; text-align: left; }
.choice-cards--chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice-cards--chips > * { flex: 1 1 auto; }
.choice-cards--chips span { min-height: 52px; padding: 0.55rem 0.95rem; border-radius: 999px; text-align: center; }
.choice-cards input:disabled + span { opacity: 0.55; cursor: not-allowed; }
.next-line { margin: 0 0 0.8rem; padding: 0.75rem 0.9rem; border-left: 4px solid var(--teal); border-radius: var(--radius-small); background: var(--blue-pale); font-weight: 750; }
.plan-when { font-weight: 750; }
.plan-result { grid-column: 1 / -1; min-width: 0; }
.plan-result:empty { display: none; }
.plan-result .message a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }
.to-complete-list { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.to-complete-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; min-height: 64px; padding: 0.75rem 1rem; border: 1px solid var(--line); border-left: 5px solid var(--warn); border-radius: var(--radius-small); background: var(--paper); color: var(--ink); text-decoration: none; }
.to-complete-copy { display: grid; gap: 0.15rem; min-width: 0; }
.to-complete-copy strong { overflow-wrap: anywhere; }
.to-complete-copy small { color: var(--muted); font-size: 1rem; }
.to-complete-go { flex: none; color: var(--teal-dark); font-weight: 800; white-space: nowrap; }
.session-end p { margin-bottom: 0.6rem; }
.idle-timer { margin: 0.45rem 0 0; padding: 0.55rem 0.8rem; border-radius: 10px; background: var(--warn-pale); color: #73380a; font-weight: 800; font-variant-numeric: tabular-nums; }
.end-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; padding: 0.75rem 0.9rem; border: 2px solid var(--line); border-radius: 13px; background: var(--blue-pale); }
.end-result p { margin: 0; overflow-wrap: anywhere; }
.login-bound { margin: 0; font-size: 1.15rem; font-weight: 850; overflow-wrap: anywhere; }
.login-link { display: inline-flex; align-items: center; min-height: 48px; font-weight: 800; }
body[data-theme="dark"] .idle-timer { color: #ffe5c4; }
body[data-theme="dark"] .to-complete-row { color: var(--ink); }

/* One task at the top of the tester's day: the current trip or the one real next action. */
.today-next { display: grid; gap: 0.6rem; padding: 18px; border: 2px solid var(--teal); background: #eff9f7; }
.today-next h2 { margin: 0; font-size: 1.28rem; }
.today-next .next-line { margin: 0; border-left-color: var(--accent); background: transparent; }
.today-next--complete { border-color: var(--warn); background: var(--warn-pale); }
.today-next--later, .today-next--done, .today-next--none { border-color: var(--line-strong); background: var(--paper); }
.attendance-card--compact { padding-block: 0.85rem; border-color: #9acbb4; background: #f5fbf8; }
.attendance-checkout { display: grid; gap: 0.65rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.attendance-checkout p { margin: 0; color: var(--muted); }
.plan-action { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.5rem 0.75rem; border: 0; border-radius: 12px; background: var(--teal); color: #fff; font: inherit; font-size: 0.94rem; font-weight: 850; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.plan-action--quiet { background: var(--chip); color: var(--ink); }
.plan-action--warning { background: var(--warn-pale); color: #73380a; }
.plan-action--plain { background: transparent; color: var(--muted); font-weight: 750; }
.plan-card > form { display: contents; }
.window-check-complete { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 0.8rem; border-color: #9acbb4; background: #f5fbf8; }
.window-check-complete .message-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--good); color: #fff; }
.window-check-complete h2 { margin: 0.1rem 0; }
.window-check-complete p { margin: 0 0 0.75rem; color: var(--muted); }
.scan-confirmed { display: flex; align-items: center; gap: 0.45rem; margin: 0.65rem 0 0; padding: 0.6rem 0.75rem; border-radius: 10px; background: var(--good-pale); color: var(--good); font-weight: 800; }
.scan-confirmed > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--good); color: #fff; }
.post-trip-stage { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 0.9rem; padding: 0.75rem 0.85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--blue-pale); }
.post-trip-stage > span:first-child { display: grid; flex: 0 0 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; }
.post-trip-stage > span:last-child { display: grid; gap: 0.1rem; }
.post-trip-stage small { color: var(--muted); }
.trip-layout { gap: 1.25rem; }

body[data-theme="dark"] .today-next { border-color: #4ba7a0; background: #102f34; }
body[data-theme="dark"] .today-next--complete { border-color: #9d6b31; background: #392b12; }
body[data-theme="dark"] .today-next--later,
body[data-theme="dark"] .today-next--done,
body[data-theme="dark"] .today-next--none { border-color: var(--line); background: var(--paper); }
body[data-theme="dark"] .attendance-card--compact,
body[data-theme="dark"] .window-check-complete { border-color: #17754f; background: #0b392a; }
body[data-theme="dark"] .plan-action--quiet { background: var(--chip); color: var(--ink); }
body[data-theme="dark"] .plan-action--warning { background: #392b12; color: #ffe5c4; }
body[data-theme="dark"] .scan-confirmed { background: #0b392a; color: #d9ffed; }
body[data-theme="dark"] .post-trip-stage { background: var(--blue-pale); }

/* One visual family, with role-specific emphasis: field work is teal, operational work is deep teal, and setup work is indigo. */
body[data-theme="dark"] { color-scheme: dark; }
.lead-head-context { color: var(--teal-dark); font-weight: 850; }
.lead-workspace .lead-board { gap: 1.15rem; }
.lead-focus { padding: 1.05rem; border: 2px solid #0a6d66; border-radius: var(--radius); background: linear-gradient(135deg, #e8f6f4, #f7fbfb); }
.lead-focus h2, .lead-focus p { margin: 0; }
.lead-focus .eyebrow { color: #07514d; }
.lead-focus > p:not(.eyebrow) { color: var(--ink-2); }
.lead-focus--attention { border-color: #b95e12; background: linear-gradient(135deg, #fff2df, #fffaf3); }
.lead-focus--attention .eyebrow { color: #8c4308; }
.lead-focus--attendance_in, .lead-focus--attendance_out { border-color: #1769aa; background: #edf6fb; }
.lead-attendance { padding: 1rem; border: 1px solid #bcd6d3; border-radius: var(--radius); background: #f7fbfa; }
.lead-attendance .section-heading { justify-content: space-between; }
.lead-attendance .muted-copy { margin: 0; }
.lead-attendance-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.lead-attendance-actions .button { justify-content: center; min-height: 52px; }
.member-now { color: var(--ink-2); font-weight: 800; }
.lead-plan-summary { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }
.lead-plan-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding: 0.75rem; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius-small); background: var(--paper); }
.lead-plan-row--warm { border-left-color: var(--warn); }
.lead-plan-member { display: inline-grid; min-width: 2.25rem; min-height: 2.25rem; place-items: center; border-radius: 10px; background: var(--blue-pale); color: var(--ink-2); font-size: 0.85rem; font-weight: 900; }
.lead-plan-copy { display: grid; gap: 0.12rem; min-width: 0; }
.lead-plan-copy strong { overflow-wrap: anywhere; }
.lead-plan-copy small { color: var(--muted); font-size: 0.92rem; }
.plan-sheet-section { display: grid; gap: 0.7rem; padding: 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--paper); }
.plan-sheet-section > .eyebrow { margin: 0; color: var(--teal-dark); }

body[data-active-view="admin_squads"] { background: radial-gradient(circle at 95% 0, rgba(79, 70, 229, 0.12), transparent 28rem), #f5f3ee; }
body[data-active-view="admin_squads"] .admin-head .eyebrow,
body[data-active-view="admin_phones"] .admin-head .eyebrow { color: #51458c; }
.admin-workspace { display: grid; gap: 1.15rem; }
body[data-active-view="admin_squads"] .metric-card { border: 1px solid #dedbea; background: rgba(255, 255, 255, 0.86); }
.setup-roadmap { border-color: #dcd8ee; background: linear-gradient(135deg, #f5f3ff, #fbfaff); }
.setup-roadmap .section-heading { margin-bottom: 0.75rem; }
.setup-roadmap-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.setup-roadmap-step { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.55rem; min-height: 72px; padding: 0.7rem; border: 1px solid #ddd9ec; border-radius: 14px; background: rgba(255, 255, 255, 0.76); }
.setup-roadmap-step > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #e7e4f7; color: #51458c; font-weight: 900; }
.setup-roadmap-step div { display: grid; min-width: 0; }
.setup-roadmap-step small { color: var(--muted); font-size: 0.88rem; }
.setup-roadmap-step.is-done { border-color: #a7cdb9; background: #f3faf6; }
.setup-roadmap-step.is-done > span { background: #dff1e7; color: var(--good); }
.next-action-card { display: grid; gap: 0.55rem; padding: 1.05rem; border: 2px solid #5146b7; border-radius: var(--radius); background: linear-gradient(135deg, #eef0ff, #fbfbff); }
.next-action-card h2, .next-action-card h3, .next-action-card p { margin: 0; }
.next-action-card .eyebrow { color: #51458c; }
.next-action-card > p:not(.eyebrow) { color: var(--ink-2); }
.next-action-card .button, .next-action-card form { justify-self: start; }
.next-action-card--ready { border-color: #67a982; background: #f2faf5; }
.next-action-card--ready .eyebrow { color: var(--good); }
.admin-team-rail { border-color: #dedbea; background: rgba(255, 255, 255, 0.88); }
.admin-row { border-color: #dedbea; background: #fff; }
.admin-row.is-selected { border-color: #5146b7; background: #f1f1ff; }
.admin-row-status { display: grid; justify-items: end; gap: 0.15rem; margin-left: auto; }
.admin-row-status small { font-size: 0.82rem; text-align: right; }
.admin-team-workbench { display: flex; flex-direction: column; gap: 1rem; border-color: #dedbea; background: rgba(255, 255, 255, 0.9); }
.admin-team-workbench > .section-heading { order: 1; margin-bottom: 0; }
.admin-team-workbench > .next-action-card { order: 2; }
.admin-team-workbench > .message,
.admin-team-workbench > .admin-busy { order: 3; margin: 0; }
.admin-team-workbench > .admin-add { order: 4; margin: 0; }
.admin-team-workbench > .admin-roster-filter { order: 5; margin: 0; padding-top: 1rem; border-top: 1px solid #dedbea; }
.admin-team-workbench > .admin-member-groups { order: 6; }
.admin-team-workbench > .admin-inactive,
.admin-team-workbench > .admin-inactive-none { order: 7; }
.admin-member-groups { display: grid; gap: 1rem; }
.admin-member-group, .admin-roster-section { padding: 0.9rem; border: 1px solid #dedbea; border-radius: var(--radius-small); background: #fbfbfe; }
.admin-member-group .section-heading, .admin-roster-section .section-heading { margin-bottom: 0.7rem; }
.admin-member-group h3, .admin-roster-section h3 { margin-bottom: 0.1rem; }
.admin-member-group .muted-copy, .admin-roster-section .muted-copy { margin: 0; }
.admin-group-empty { margin: 0; color: var(--muted); }
.admin-person-grid { display: grid; gap: 0.7rem; }
.admin-person-card { display: grid; gap: 0.65rem; padding: 0.9rem; border-color: #d7d4e8; }
.admin-person-card--lead { border-left: 4px solid #5146b7; }
.admin-person-card--tester { border-left: 4px solid var(--teal); }
.admin-person-heading { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 0.5rem; }
.admin-person-heading h3, .admin-person-heading p { margin: 0; }
.admin-person-detail, .admin-person-attendance { margin: 0; color: var(--ink-2); }
.admin-person-attendance { padding: 0.55rem 0.65rem; border-radius: 10px; background: var(--blue-pale); font-weight: 750; }
.admin-person-setup { margin: 0; }
.admin-person-info, .admin-person-more { border-top: 1px solid var(--line); }
.admin-person-info > summary, .admin-person-more > summary { min-height: 44px; padding-top: 0.65rem; color: #51458c; font-weight: 800; cursor: pointer; }
.admin-person-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; margin: 0; }
.admin-person-facts > div { padding: 0.55rem; border-radius: 10px; background: #f2f4fb; }
.admin-person-facts dt { color: var(--muted); font-size: 0.78rem; }
.admin-person-facts dd { margin: 0.2rem 0 0; font-size: 0.92rem; font-weight: 750; overflow-wrap: anywhere; }
.admin-person-more > .admin-actions { padding-top: 0.2rem; }
.admin-roster-list { display: grid; gap: 0.4rem; }
.admin-roster-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.45rem 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.admin-roster-row:last-child { padding-bottom: 0; border-bottom: 0; }
.admin-roster-row span { color: var(--muted); font-size: 0.92rem; }
body[data-active-view="admin_phones"] .admin-workspace > .card:first-child { border-color: #dcd8ee; background: linear-gradient(135deg, #f5f3ff, #fff); }

body[data-theme="dark"][data-active-view="admin_squads"] { background: radial-gradient(circle at 95% 0, rgba(105, 90, 220, 0.22), transparent 28rem), var(--canvas); }
body[data-theme="dark"] .setup-roadmap,
body[data-theme="dark"] .admin-member-group,
body[data-theme="dark"] .admin-roster-section { border-color: #4c4a75; background: #16162a; }
body[data-theme="dark"] .setup-roadmap-step { border-color: #4c4a75; background: #20203a; }
body[data-theme="dark"] .setup-roadmap-step > span { background: #302f59; color: #d9d6ff; }
body[data-theme="dark"] .setup-roadmap-step.is-done { border-color: #26684d; background: #113726; }
body[data-theme="dark"] .setup-roadmap-step.is-done > span { background: #1c5138; color: #d9ffed; }
body[data-theme="dark"] .next-action-card { border-color: #7770d9; background: #1b1d42; }
body[data-theme="dark"] .next-action-card--ready { border-color: #3c8b64; background: #103825; }
body[data-theme="dark"] .admin-team-rail,
body[data-theme="dark"] .admin-team-workbench,
body[data-theme="dark"] .admin-row { border-color: #4c4a75; background: var(--paper); }
body[data-theme="dark"] .admin-row.is-selected { border-color: #7770d9; background: #20204a; }
body[data-theme="dark"] .admin-person-card { border-color: #4c4a75; background: #14182d; }
body[data-theme="dark"] .admin-person-facts > div { background: #202640; }
body[data-theme="dark"] .lead-focus { border-color: #2d8f87; background: #102f34; }
body[data-theme="dark"] .lead-focus--attention { border-color: #9d6b31; background: #392b12; }
body[data-theme="dark"] .lead-focus--attendance_in,
body[data-theme="dark"] .lead-focus--attendance_out { border-color: #417fb1; background: #112f43; }
body[data-theme="dark"] .lead-attendance { border-color: #2d625d; background: #102b2b; }

@media (min-width: 700px) {
  .setup-roadmap-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-person-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-table th, .admin-table td { padding-inline: 0.5rem; }
  .admin-table .status-pill { white-space: normal; }
}

@media (max-width: 520px) {
  .setup-roadmap-list { grid-template-columns: 1fr; }
  .next-action-card .button, .next-action-card form, .next-action-card form .button { width: 100%; }
  .lead-attendance-actions { grid-template-columns: 1fr; }
  .lead-plan-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .lead-plan-row > .button, .lead-plan-row > .status-pill { grid-column: 2; justify-self: start; }
  .admin-row-status { width: 100%; justify-items: start; margin-left: 0; }
  .admin-row-status small { text-align: left; }
  .admin-person-facts { grid-template-columns: 1fr; }
  .admin-person-setup .button { width: 100%; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (min-width: 700px) {
  .app-main { padding-inline: 24px; }
  .trip-hero { margin-inline: -24px; padding-inline: 26px; border-radius: 0 0 26px 26px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid--wide { grid-column: 1 / -1; }
  .upload-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: 180px 180px minmax(220px, 1fr) auto; }
  .filter-search { grid-column: auto; }
  .review-workspace { grid-template-columns: minmax(260px, .75fr) minmax(420px, 1.4fr); align-items: start; }
  .review-queue { position: sticky; top: 76px; max-height: calc(100vh - 170px); overflow-y: auto; padding: 2px; }
  /* The members table has seven columns and fits its card at a 1366 px desk: its cells take less side room, and a
     long phone status may wrap rather than push the actions out of sight. Release 3.3 adds an eighth (Absen) and
     widens the people's column from 1000 px (below), so the table still fits with a delete form open. */
  .admin-table th, .admin-table td { padding-inline: 0.5rem; }
  .admin-table .status-pill { white-space: normal; }
  /* Release 3.3: the petugas cards of Regu, two in a row. */
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-layout { gap: 2rem; }
}

@media (min-width: 1000px) {
  .two-column--wide { grid-template-columns: 1.4fr .8fr; }
  .bottom-nav { top: 64px; right: auto; bottom: 0; left: 0; width: 88px; min-height: auto; flex-direction: column; justify-content: flex-start; padding: 22px 8px; border-top: 0; border-right: 1px solid var(--line); }
  .bottom-nav a { flex: 0 0 auto; width: 70px; min-height: 64px; }
  .bottom-nav a[aria-current="page"]::before { top: auto; left: 1px; width: 3px; height: 22px; }
  body[data-active-view="squad"] .app-main,
  body[data-active-view="week"] .app-main,
  body[data-active-view="review"] .app-main,
  body[data-active-view="overview"] .app-main,
  body[data-active-view="admin_squads"] .app-main,
  body[data-active-view="admin_phones"] .app-main { padding-left: 108px; }
  /* Release 3.3: the people's column takes more of the width, for the members table's eighth column (Absen). */
  .admin-columns { grid-template-columns: minmax(240px, .6fr) minmax(0, 2fr); }
  .admin-phone-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) auto; align-items: end; }
  .member-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 999px) {
  /* The menu is fixed at the foot of the screen below 1000 px (above it, it is a side bar). When the script focuses a box
     that is only partly in view, such as the one of Hapus permanen just below the row that was tapped, the browser leaves
     the page where it is and the box stays behind the menu. This room (the menu is 68 px high, with the safe area below
     it) makes the browser scroll to bring a focused box clear of it. Only the two registration pages ask for it. */
  html:has(.admin-workspace) { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  body[data-user-role="tester"] .bottom-nav { display: none; }
  body[data-user-role="tester"] .app-main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  body[data-user-role="tester"] .sticky-action { bottom: calc(12px + env(safe-area-inset-bottom)); }
}

@media (max-width: 520px) {
  /* Keep the product name legible while the help and account actions stay visible. */
  .app-header { gap: .35rem; padding-inline: 10px; }
  .brand { min-width: 0; gap: .45rem; font-size: .9rem; }
  .brand > span:last-child {
    min-width: 0;
    max-width: 6.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .header-actions { gap: .3rem; }
  .sync-badge { min-height: 48px; padding-inline: .5rem; font-size: .68rem; }
  .header-help,
  .account-menu > summary { width: 48px; min-width: 48px; height: 48px; }
  .account-menu > summary { padding-inline: .3rem; }
  body[data-user-role="tester"] .account-menu > summary {
    width: auto; min-width: 64px; max-width: 7rem; padding-inline: 6px;
    font-size: .875rem; font-variant-numeric: tabular-nums;
  }
}

@media (max-width: 520px) {
  .window-banner { grid-template-columns: auto 1fr; }
  .window-banner .button { grid-column: 1 / -1; width: 100%; }
  .plan-card { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .plan-card > .plan-action,
  .plan-card > form { grid-column: 1 / -1; width: 100%; }
  .plan-card > form .plan-action { width: 100%; }
  .tracking-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracking-facts > span:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .plan-title-row { display: block; }
  .plan-title-row .status-pill { margin-top: 0.3rem; }
  .handoff-card, .danger-zone, .confirmation-card { align-items: stretch; flex-direction: column; }
  .handoff-card .button, .danger-zone .button, .confirmation-card .button { width: 100%; }
  .page-head--split { align-items: flex-start; }
  /* Release 3.3: an action row of Regu puts its button under its words, the head's buttons share the width, and the
     plan sheet's two days stack, so "Hari ini · 08-10" never breaks inside its date. */
  .board-action { grid-template-columns: auto minmax(0, 1fr); }
  .board-action > .button { grid-column: 2; justify-self: start; }
  .lead-head-actions { width: 100%; }
  .lead-head-actions .button { flex: 1 1 auto; }
  .plan-sheet-form .choice-cards { grid-template-columns: minmax(0, 1fr); }
  .plan-sheet-form .choice-cards span { min-height: 56px; }
}

@media (max-width: 699px) {
  .responsive-table table, .responsive-table thead, .responsive-table tbody, .responsive-table tr, .responsive-table th, .responsive-table td { display: block; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .responsive-table tbody { display: grid; gap: 0.7rem; }
  .responsive-table tr { padding: 0.8rem; border: 1px solid var(--line); border-radius: 12px; }
  .responsive-table th, .responsive-table td { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; padding: 0.35rem 0; border: 0; text-align: right; }
  .responsive-table th::before, .responsive-table td::before { color: var(--muted); content: attr(data-caption); font-size: 0.72rem; font-weight: 750; text-align: left; text-transform: uppercase; }
  .responsive-table tbody th { font-size: 1rem; }
  .mini-progress { margin-left: auto; }
  .admin-cell { justify-items: end; text-align: right; }
  .admin-actions, .admin-inline-form { justify-content: flex-end; }
  /* The opened delete form takes the card's width on a phone, up to a size a thumb still reaches across. */
  .admin-delete-form { width: 100%; max-width: 24rem; }
  .admin-head-actions { justify-content: flex-start; }
  /* The frozen pill goes under the title on a phone, so it does not squeeze the title into a narrow column. */
  .admin-head { flex-direction: column; }
}

@media (orientation: landscape) and (max-height: 520px) {
  body::before { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 2rem; background: var(--ink); color: #fff; content: "Putar ponsel ke posisi tegak untuk melanjutkan."; font-size: 1.2rem; font-weight: 800; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .app-header, .bottom-nav, .sync-dialog, .filter-bar, .button, .connection-strip { display: none !important; }
  .app-main { width: 100% !important; padding: 0 !important; }
  .card { break-inside: avoid; }
  /* "Cetak stiker" prints the sticker alone: admin.js puts a copy in the print sheet for the time of the print. */
  body.is-printing-sticker > :not(.print-sheet), body.is-printing-sticker dialog { display: none !important; }
  body.is-printing-sticker .print-sheet { display: block !important; }
  .print-sheet .sticker { width: 5.5cm; margin: 0; padding: 0.4cm; border: 1px solid #000; border-radius: 0; }
  .print-sheet .sticker-name { font-size: 20pt; }
  .print-sheet .sticker-code { width: 3cm; height: 3cm; }
  .print-sheet .sticker p { font-size: 9pt; }
}
/* Coordinator-to-lead reporting: a compact handoff surface inside the existing two-menu journey. */
.admin-team-workbench > .admin-reporting { order: 7; }
.admin-team-workbench > .admin-inactive,
.admin-team-workbench > .admin-inactive-none { order: 8; }
.admin-reporting { display: grid; gap: 0.85rem; padding: 1rem; border-color: #cfcbea; background: linear-gradient(135deg, #faf9ff, #fff); }
.admin-reporting .section-heading { margin: 0; }
.admin-reporting h3, .admin-reporting h4 { margin: 0; }
.report-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.report-metric-grid > div { display: grid; gap: 0.15rem; padding: 0.7rem; border: 1px solid #e0def0; border-radius: 12px; background: #fff; }
.report-metric-grid strong { color: #5146b7; font-size: 1.35rem; line-height: 1; }
.report-metric-grid small { color: var(--muted); font-size: 0.8rem; }
.admin-report-form { margin: 0; padding-top: 0.85rem; border-top: 1px solid #e0def0; }
.admin-report-history { display: grid; gap: 0.55rem; padding-top: 0.85rem; border-top: 1px solid #e0def0; }
.admin-report-list, .lead-report-list { display: grid; gap: 0.55rem; }
.admin-report-item, .lead-report { display: grid; gap: 0.3rem; padding: 0.7rem; border-left: 4px solid #5146b7; border-radius: 10px; background: #f4f3ff; }
.admin-report-item > div, .lead-report-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 0.8rem; }
.admin-report-item p, .lead-report p { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.admin-report-item small, .lead-report small { color: var(--muted); font-size: 0.82rem; }
.lead-reports { padding: 1rem; border: 1px solid #cfcbea; border-radius: var(--radius); background: linear-gradient(135deg, #faf9ff, #fff); }
body[data-theme="dark"] .admin-reporting,
body[data-theme="dark"] .lead-reports { border-color: #4c4a75; background: #17172e; }
body[data-theme="dark"] .report-metric-grid > div { border-color: #4c4a75; background: #20203a; }
body[data-theme="dark"] .admin-report-form,
body[data-theme="dark"] .admin-report-history { border-color: #4c4a75; }
body[data-theme="dark"] .admin-report-item,
body[data-theme="dark"] .lead-report { background: #242047; }
@media (min-width: 700px) {
  .report-metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Coordinator setup refinement: keep the registration form aligned and give the desktop rail enough room for its menu text. */
body[data-active-view="admin_phones"] .admin-workspace > .admin-phone-card {
  border-color: #d8e2e7;
  background: #fff;
  max-width: 1160px;
}
body[data-active-view="admin_phones"] .admin-phone-card .section-heading--inside {
  max-width: 44rem;
  margin-bottom: 1.35rem;
}
body[data-active-view="admin_phones"] .admin-phone-card .section-heading--inside .eyebrow {
  color: var(--teal-dark);
}
body[data-theme="dark"][data-active-view="admin_phones"] .admin-workspace > .admin-phone-card {
  border-color: #4c657a;
  background: #102a43;
  color: var(--ink);
}
body[data-theme="dark"][data-active-view="admin_phones"] .admin-phone-card .section-heading--inside .eyebrow {
  color: #b4f1ec;
}
.admin-phone-form .admin-phone-field small {
  min-height: 2.2em;
}
.admin-phone-submit {
  min-height: var(--tap);
  max-width: 210px;
  padding-inline: 1.15rem;
  font-size: .95rem;
}
.admin-team-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem .8rem;
}
.admin-team-heading-actions .admin-delete > summary {
  min-height: 44px;
  font-size: .82rem;
}

@media (min-width: 1000px) {
  .admin-phone-form {
    grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1.1fr) minmax(180px, .75fr) minmax(180px, .7fr);
    max-width: 1080px;
    align-items: start;
    gap: 1.15rem;
  }
  .admin-phone-form .admin-phone-submit {
    align-self: start;
    margin-top: 2.05rem;
    width: 100%;
  }

  body[data-user-role="coordinator"] .bottom-nav {
    width: 220px;
    align-items: stretch;
    justify-content: flex-start;
    gap: .5rem;
    padding: 24px 14px;
  }
  body[data-user-role="coordinator"] .bottom-nav a {
    width: auto;
    max-width: none;
    min-height: 60px;
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: .75rem;
    padding: .75rem 1rem;
    font-size: .92rem;
    text-align: left;
    white-space: nowrap;
  }
  body[data-user-role="coordinator"] .bottom-nav a[aria-current="page"]::before {
    top: 50%;
    left: 0;
    width: 4px;
    height: 28px;
    transform: translateY(-50%);
  }
  body[data-user-role="coordinator"] .nav-glyph {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }
  body[data-user-role="coordinator"] .app-main {
    padding-left: 244px;
  }
}

@media (max-width: 699px) {
  .admin-phone-form .admin-phone-field small {
    min-height: 0;
  }
}

/* Keep the phone name and its buttons in one calm row. The old auto-sized table let one
   item wrap onto a second line, which made the row look vertically detached. */
@media (min-width: 700px) {
  .admin-phone-table table {
    table-layout: fixed;
  }
  .admin-phone-table th,
  .admin-phone-table td {
    vertical-align: top;
  }
  .admin-phone-table th:nth-child(1) { width: 10%; }
  .admin-phone-table th:nth-child(2) { width: 14%; }
  .admin-phone-table th:nth-child(3) { width: 12%; }
  .admin-phone-table th:nth-child(4) { width: 14%; }
  .admin-phone-table th:nth-child(5) { width: 50%; }
  .admin-phone-table td:last-child {
    padding-top: .7rem;
  }
  .admin-phone-table .admin-actions {
    align-items: flex-start;
    gap: .35rem .55rem;
  }
  .admin-phone-table .button--small {
    padding-inline: .65rem;
    font-size: .9rem;
  }
  .admin-phone-table .admin-delete > summary {
    min-height: 56px;
    padding: .55rem .65rem;
    border: 2px solid #e1aca7;
    border-radius: 13px;
    background: #fff8f7;
    font-size: .9rem;
    line-height: 1.1;
  }
}

/* The team-lead board is a dashboard, not a single long column. Keep related work visible
   together so attendance, reports, and the action queue fit in the first viewport. */
@media (min-width: 700px) {
  .lead-workspace .lead-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem 1rem;
  }
  .lead-workspace .lead-board > .board-stamp,
  .lead-workspace .lead-board > .lead-focus,
  .lead-workspace .lead-board > [data-board-plans],
  .lead-workspace .lead-board > [data-board-members] {
    grid-column: 1 / -1;
  }
  .lead-workspace .lead-board > [data-board-attendance],
  .lead-workspace .lead-board > .lead-reports,
  .lead-workspace .lead-board > [data-board-actions] {
    align-self: start;
  }
  .lead-workspace .lead-board > [data-board-members] .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .lead-workspace .lead-board > [data-board-members] .member-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 699px) {
  .lead-workspace .lead-board,
  .lead-workspace .lead-board-holder {
    margin-bottom: .8rem;
  }
  .lead-workspace .lead-board {
    gap: .8rem;
  }
  .lead-workspace .lead-focus,
  .lead-workspace .lead-attendance,
  .lead-workspace .lead-reports {
    padding: .8rem;
  }
  .lead-workspace .board-action {
    padding: .65rem;
  }
}

@media (max-width: 699px) {
  .lead-workspace {
    padding-top: 12px;
  }
  .lead-workspace .lead-head {
    gap: .45rem .7rem;
    margin-bottom: .8rem;
  }
  .lead-workspace .lead-head-title h1 {
    font-size: 2.2rem;
  }
  .lead-workspace .lead-head-title .muted-copy {
    font-size: 1rem;
    line-height: 1.35;
  }
  .lead-workspace .lead-head-actions {
    width: auto;
    margin-left: auto;
  }
  .lead-workspace .lead-head-actions .button {
    min-height: 48px;
    flex: 0 0 auto;
    padding-inline: .9rem;
  }
  .lead-workspace .board-stamp {
    overflow: hidden;
    font-size: .9rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lead-workspace .lead-focus {
    gap: .45rem;
    padding: .85rem;
  }
  .lead-workspace .lead-focus .button {
    min-height: 48px;
  }
  .lead-workspace .lead-attendance {
    gap: .55rem;
    padding: .85rem;
  }
  .lead-workspace .lead-attendance .muted-copy {
    line-height: 1.35;
  }
  .lead-workspace .lead-reports {
    padding: .85rem;
  }
}

/* Keep the selected team readable when it has no accounts. The empty state belongs after the team header,
   and the destructive confirmation gets a full-width, calmer layout when opened. */
.admin-team-workbench > .empty-state {
  order: 6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .15rem 1rem;
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px dashed #cfc9e5;
  border-radius: 14px;
  background: #fbfaff;
  text-align: left;
}
.admin-team-workbench > .empty-state .empty-mark {
  grid-row: 1 / span 2;
  margin: 0;
}
.admin-team-workbench > .empty-state h3,
.admin-team-workbench > .empty-state p {
  margin: 0;
}
.admin-team-workbench > .empty-state p {
  max-width: none;
}
.admin-team-heading-actions .admin-delete[open] {
  flex: 1 1 100%;
}
.admin-team-heading-actions .admin-delete-form {
  width: 100%;
  max-width: 34rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.admin-team-heading-actions .admin-delete-form .button {
  width: auto;
  min-width: 10rem;
}
@media (max-width: 699px) {
  .admin-team-workbench > .empty-state {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .admin-team-heading-actions .admin-delete-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-team-heading-actions .admin-delete-form .button {
    width: 100%;
  }
}

/* Release 3.5: Tambah test on Hari ini (its card and its sheet), the marks of a test started through it, the day score's
   count of tests outside the plan, the coordinator's QR buttons on Regu, the report's added cell and the Aktivitas page.
   Plain and working: colours come from the theme's variables, the one fixed text colour sits on a card that is dark in
   both themes, and every new tap target is 44 px or more. */
.day-score { flex-wrap: wrap; }
.day-score small { flex-basis: 100%; margin-top: 0.2rem; color: var(--ink-2); font-size: 0.85rem; font-weight: 800; text-align: right; white-space: nowrap; }
.added-hint { margin: 0; color: var(--muted); font-weight: 750; }
.plan-body .plan-marks { margin-top: 0.35rem; }
.added-test { display: grid; gap: 0.75rem; border-style: dashed; border-color: var(--line-strong); }
.added-test-copy { display: grid; gap: 0.25rem; }
.added-test-copy > * { margin: 0; }
.added-test-copy > p:not(.eyebrow) { color: var(--muted); }
.added-wait { margin: 0; padding: 0.65rem 0.8rem; border-left: 4px solid var(--warn); border-radius: 10px; background: var(--warn-pale); color: var(--ink); font-weight: 750; overflow-wrap: anywhere; }
.added-sheet-body { align-content: start; }
.added-result { min-width: 0; }
.added-result:empty { display: none; }
.added-result .message a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }
.added-section { display: grid; gap: 0.6rem; min-width: 0; padding: 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--paper); }
.added-section h3, .added-section p { margin: 0; }
.added-note { color: var(--muted); }
.added-window-line { font-weight: 750; }
.added-plan-list { display: grid; margin: 0; padding: 0; list-style: none; }
.added-plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.added-plan-list > li:last-child .added-plan { border-bottom: 0; }
.added-plan-text { min-width: 0; font-weight: 750; overflow-wrap: anywhere; }
.added-sheet .form-grid { grid-template-columns: minmax(0, 1fr); }
.dialog-foot { padding: 0 1.1rem 1.1rem; }
.to-complete-copy .tag-row { margin-top: 0.25rem; }
.lead-plan-copy .tag-row { margin-top: 0.2rem; }
.admin-attendance-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; margin: 0 0 0.75rem; }
.admin-attendance-actions .button { justify-content: center; min-height: 52px; }
.week-score > div:first-child > p:not(.eyebrow) { margin: 0; color: #bfd0dc; }
.week-score > div:first-child > p.week-added { margin-top: 0.3rem; font-weight: 750; }
body[data-active-view="admin_activity"] .app-main { width: min(100%, 1200px); }
.activity-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 0.8rem; }
.activity-filter .field { flex: 1 1 12rem; min-width: 0; }
.activity-filter-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.activity-grid { display: grid; gap: 0.8rem; }
.activity-category { display: grid; align-content: start; gap: 0.6rem; min-width: 0; }
.activity-category h2, .activity-category p { margin: 0; }
.activity-category h2 { font-size: 1.2rem; }
.activity-category-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.activity-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.activity-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-line { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.activity-open, .activity-back { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; font-weight: 800; }
.activity-back { text-decoration: none; }
.activity-day, .activity-none { color: var(--muted); }
.activity-version { padding: 0.55rem 0.75rem; border-radius: 10px; background: var(--blue-pale); font-weight: 750; overflow-wrap: anywhere; }
.activity-pages { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.activity-pages a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }
.activity-pages a[data-page-older] { justify-self: end; }
.activity-page-count { color: var(--muted); font-size: 0.92rem; text-align: center; }
@media (min-width: 700px) {
  .report-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .added-plan { grid-template-columns: minmax(0, 1fr); }
  .added-plan .button { width: 100%; }
  .admin-attendance-actions { grid-template-columns: 1fr; }
}
/* Release 3.5: the screen tile is shown only as a warning; without it the facts row has two columns. */
.tracking-facts--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* LAPANGAN v2: a light red visual language on a warm white canvas; the tester flow uses the same system
   without inheriting the v1 card hierarchy. */
html[data-color-mode="light"] { color-scheme: only light; background: #fff9f8; }
body[data-active-view="v2"], body[data-user-role="coordinator"], body[data-user-role="lead"] {
  --v2-ink: #42373a;
  --v2-muted: #716568;
  --v2-paper: #ffffff;
  --v2-canvas: #fff9f8;
  --v2-line: #f0dedf;
  --v2-blue: #d62828;
  --v2-blue-dark: #c82333;
  --v2-coral: #e24b4b;
  --v2-mint: #d9f4e8;
  --v2-yellow: #fff3c4;
  --ink: var(--v2-ink);
  --ink-2: var(--v2-ink);
  --muted: var(--v2-muted);
  --paper: var(--v2-paper);
  --canvas: var(--v2-canvas);
  --line: var(--v2-line);
  --blue-pale: #fff0ef;
  --teal: #d62828;
  --teal-dark: #d62828;
  color-scheme: only light;
  background: var(--v2-canvas);
  color: var(--v2-ink);
}
body[data-active-view="v2"] .app-main { width: min(100%, 1400px); padding-top: 1.8rem; }
.v2-shell { display: grid; gap: 1.15rem; width: min(100%, 1240px); margin: 0 auto; }
.v2-shell { align-content: start; }
.v2-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; padding: clamp(1.5rem, 3vw, 2.6rem); border: 1px solid var(--v2-line); border-radius: 34px; background: linear-gradient(120deg, #fff0ee, #fffafa); color: var(--v2-ink); }
.v2-hero--monitor { background: linear-gradient(120deg, #fff0ee, #ffffff); }
.v2-kicker { margin: 0 0 0.45rem; color: var(--v2-coral); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.v2-hero .v2-kicker { color: var(--v2-blue); }
.v2-hero h1 { max-width: 19ch; margin: 0; color: inherit; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.02; letter-spacing: -0.04em; }
.v2-hero-copy { max-width: 54ch; margin: 0.85rem 0 0; color: var(--v2-muted); font-size: 1rem; line-height: 1.55; }
.v2-hero-mark { display: grid; flex: 0 0 84px; height: 84px; place-items: center; border-radius: 30px 30px 30px 10px; background: #ffe1de; color: var(--v2-blue); font-size: 3rem; font-weight: 900; transform: rotate(-7deg); }
.v2-hero-mark--monitor { background: #ffe1de; }
.v2-card { display: grid; gap: 1.25rem; padding: clamp(1.1rem, 2.6vw, 1.8rem); border: 1px solid var(--v2-line); border-radius: 28px; background: var(--v2-paper); }
.v2-card--accent { border-top: 5px solid var(--v2-coral); }
.v2-card--target { border-left: 5px solid var(--v2-blue); }
.v2-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.v2-section-head h2 { margin: 0; color: var(--v2-ink); font-size: clamp(1.2rem, 2.5vw, 1.55rem); letter-spacing: -0.02em; }
.v2-required, .v2-muted { color: var(--v2-muted); font-size: 0.8rem; font-weight: 800; }
.v2-required { padding: 0.35rem 0.55rem; border-radius: 999px; background: var(--v2-yellow); color: #6b4f00; }
.v2-form, .v2-target-form { display: grid; gap: 0.9rem; }
.v2-field { display: grid; gap: 0.4rem; color: var(--v2-ink); font-size: 0.86rem; font-weight: 850; }
.v2-field em { color: var(--v2-muted); font-style: normal; font-weight: 650; }
.v2-field small { color: var(--v2-muted); font-size: 0.78rem; font-weight: 650; line-height: 1.45; }
.v2-field input, .v2-field select { min-height: 52px; border: 1px solid var(--v2-line); border-radius: 16px; background: var(--v2-paper); color: var(--v2-ink); font: inherit; }
.v2-field textarea { min-height: 82px; resize: vertical; border: 1px solid var(--v2-line); border-radius: 16px; background: var(--v2-paper); color: var(--v2-ink); font: inherit; padding: 0.75rem; }
.v2-field input:focus, .v2-field select:focus, .v2-field textarea:focus { outline: 3px solid rgba(214, 40, 40, 0.18); border-color: var(--v2-blue); }
.v2-input-suffix { display: flex; align-items: center; border: 1px solid var(--v2-line); border-radius: 16px; background: var(--v2-paper); overflow: hidden; }
.v2-input-suffix input { flex: 1; min-width: 0; border: 0; border-radius: 0; }
.v2-input-suffix b { padding: 0 0.9rem; color: var(--v2-muted); }
.v2-upload { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.8rem; min-height: 100px; padding: 1rem; border: 2px dashed #d5bebe; border-radius: 20px; background: #fff8f7; cursor: pointer; }
.v2-upload:focus-within { border-color: var(--v2-blue); outline: 3px solid rgba(214, 40, 40, 0.14); }
.v2-upload-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #ffe1de; color: var(--v2-blue); font-size: 0.68rem; font-weight: 900; }
.v2-upload > span:nth-child(2) { display: grid; gap: 0.2rem; }
.v2-upload small { color: var(--v2-muted); font-weight: 650; }
.v2-upload input { grid-column: 1 / -1; width: 100%; color: var(--v2-muted); font: inherit; }
.v2-evidence-note { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 0.6rem; padding: 0.9rem 1rem; border-radius: 18px; background: #fbf1f0; color: var(--v2-muted); }
.v2-evidence-note > span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--v2-blue); color: #fff; font-size: 0.8rem; font-weight: 900; }
.v2-evidence-note p { margin: 0; font-size: 0.8rem; font-weight: 650; line-height: 1.5; }
.v2-evidence-note--warn { background: var(--v2-yellow); color: #6b4f00; }
.v2-evidence-note--warn > span { background: #b7791f; }
.v2-button { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.7rem 1rem; border: 0; border-radius: 18px; font: inherit; font-weight: 900; cursor: pointer; }
.v2-button--primary { background: var(--v2-blue); color: #fff; }
.v2-button--primary:hover { background: var(--v2-blue-dark); }
.v2-submission-list { display: grid; min-width: 0; gap: 0.55rem; }
.v2-submission-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem; border: 1px solid var(--v2-line); border-radius: 14px; }
.v2-submission-row > div:first-child { display: grid; gap: 0.2rem; min-width: 0; }
.v2-submission-row span { color: var(--v2-muted); font-size: 0.78rem; font-weight: 650; }
.v2-submission-meta { display: grid; justify-items: end; gap: 0.35rem; white-space: nowrap; }
.v2-submission-meta > span { color: var(--v2-ink); font-weight: 850; }
.v2-state { padding: 0.28rem 0.45rem; border-radius: 999px; font-size: 0.72rem; }
.v2-state--warn { background: var(--v2-yellow); color: #6b4f00; }
.v2-state--good { background: var(--v2-mint); color: #0d6245; }
.v2-state--bad { background: #fee2e2; color: #a51d1d; }
.v2-empty { display: grid; justify-items: center; gap: 0.35rem; padding: 1.4rem; color: var(--v2-muted); text-align: center; }
.v2-empty span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: #f3f4f8; color: var(--v2-blue); font-size: 1.4rem; font-weight: 900; }
.v2-empty p { margin: 0; font-weight: 700; }
.v2-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.v2-metric-grid article { display: grid; min-height: 126px; align-content: center; gap: 0.25rem; padding: 1.1rem; border: 0; border-radius: 22px; background: var(--v2-paper); }
.v2-metric-grid span { color: var(--v2-muted); font-size: 0.78rem; font-weight: 850; }
.v2-metric-grid strong { color: var(--v2-ink); font-size: 2rem; letter-spacing: -0.04em; }
.v2-metric-grid small { color: var(--v2-muted); font-weight: 650; }
.v2-metric-good { border-top: 5px solid #36a979 !important; }
.v2-metric-warn { border-top: 5px solid var(--v2-coral) !important; }
.v2-metric-grid.v2-metric-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-metric-grid.v2-metric-grid--compact article { min-height: 78px; padding: 0.7rem 0.85rem; }
.v2-metric-grid.v2-metric-grid--compact strong { font-size: 1.45rem; }
.v2-target-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-target-form .v2-button { align-self: end; }
.v2-tester-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.v2-tester-grid article { display: grid; gap: 0.4rem; padding: 1rem; border: 0; border-radius: 18px; background: #fff8f7; }
.v2-tester-grid article > span, .v2-tester-grid small { color: var(--v2-muted); font-size: 0.78rem; font-weight: 700; }
.v2-tester-grid progress { width: 100%; height: 9px; accent-color: var(--v2-blue); }
.v2-cell-grid { display: grid; gap: 0.7rem; }
.v2-cell-card { display: grid; gap: 0.85rem; padding: 1.1rem; border: 0; border-radius: 24px; background: #fffaf9; }
.v2-cell-head { display: flex; justify-content: space-between; gap: 0.7rem; }
.v2-cell-head > div { display: grid; gap: 0.2rem; min-width: 0; }
.v2-cell-head span { color: var(--v2-blue); font-size: 0.75rem; font-weight: 900; text-transform: uppercase; }
.v2-cell-head b { color: var(--v2-blue); font-size: 1.2rem; white-space: nowrap; }
.v2-cell-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.v2-cell-facts span { display: grid; gap: 0.15rem; padding: 0.55rem; border-radius: 10px; background: #eef0f5; }
.v2-cell-facts small { color: var(--v2-muted); font-size: 0.68rem; font-weight: 750; }
.v2-cell-facts strong { font-size: 1.05rem; }
.v2-band-list { display: grid; gap: 0.25rem; }
.v2-band-list > div { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid #e7eaf0; font-size: 0.78rem; }
.v2-band-list > div:last-child { border-bottom: 0; }
.v2-band-list small { display: block; color: var(--v2-muted); font-size: 0.68rem; font-weight: 650; }
.v2-band-list b { color: var(--v2-blue); white-space: nowrap; }
.v2-footnote { margin: 0; color: var(--v2-muted); font-size: 0.78rem; font-weight: 650; line-height: 1.5; }
body[data-active-view="v2"] .brand-mark, body[data-user-role="coordinator"] .brand-mark, body[data-user-role="lead"] .brand-mark { background: #ffe1de; color: var(--v2-blue); }
body[data-active-view="v2"] .brand, body[data-user-role="coordinator"] .brand, body[data-user-role="lead"] .brand { color: var(--v2-blue); }
body:is([data-user-role="coordinator"], [data-user-role="lead"]) .bottom-nav a[aria-current="page"] { background: #fff0ef; color: var(--v2-blue); }
body:is([data-user-role="coordinator"], [data-user-role="lead"]) .admin-head .eyebrow,
body:is([data-user-role="coordinator"], [data-user-role="lead"]) .next-action-card .eyebrow,
body:is([data-user-role="coordinator"], [data-user-role="lead"]) .admin-person-info > summary,
body:is([data-user-role="coordinator"], [data-user-role="lead"]) .admin-person-more > summary { color: var(--v2-blue); }
body:is([data-user-role="coordinator"], [data-user-role="lead"]) :is(.setup-roadmap, .next-action-card, .admin-reporting, .lead-reports) { border-color: var(--v2-line); background: #fff5f4; }
body:is([data-user-role="coordinator"], [data-user-role="lead"]) :is(.admin-team-rail, .admin-team-workbench, .admin-member-group, .admin-roster-section, .admin-person-card) { border-color: var(--v2-line); background: #ffffff; }
body:is([data-user-role="coordinator"], [data-user-role="lead"]) .admin-row.is-selected { border-color: var(--v2-coral); background: #fff0ef; }
body:is([data-user-role="coordinator"], [data-user-role="lead"]) :is(.setup-roadmap-step > span, .admin-person-facts > div, .admin-report-item, .lead-report) { background: #fff0ef; color: var(--v2-ink); }
body:is([data-user-role="coordinator"], [data-user-role="lead"]) .admin-person-card--lead { border-left-color: var(--v2-coral); }
body[data-user-role="coordinator"][data-active-view="admin_phones"] .admin-workspace > .card:first-child { border-color: var(--v2-line); background: #fff5f4; }
.v2-pagebar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; min-height: 3.2rem; }
.v2-pagebar > div { display: grid; gap: 0.15rem; }
.v2-band-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.7rem; color: var(--v2-muted); font-size: 0.7rem; }
.v2-band-legend > span { padding: 0.3rem 0.5rem; border-radius: 8px; background: #fff0ef; white-space: nowrap; }
.v2-band-legend b { color: var(--v2-blue); }
.v2-band-legend small { font-size: 0.65rem; }
.v2-term-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.55rem; color: var(--v2-muted); font-size: 0.68rem; line-height: 1.4; }
.v2-term-legend > strong { color: var(--v2-ink); font-size: 0.7rem; }
.v2-term-legend > span { padding: 0.22rem 0.42rem; border: 1px solid var(--v2-line); border-radius: 999px; background: #fff; }
.v2-term-legend b { color: var(--v2-blue); }
.v2-page-title { color: var(--v2-ink); font-size: 1.35rem; letter-spacing: -0.03em; }
.v2-page-nav { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.25rem; border: 1px solid var(--v2-line); border-radius: 999px; background: var(--v2-paper); }
.v2-page-nav a { padding: 0.5rem 0.85rem; border-radius: 999px; color: var(--v2-muted); font-size: 0.78rem; font-weight: 850; text-decoration: none; }
.v2-page-nav a[aria-current="page"] { background: var(--v2-blue); color: #fff; }
.v2-hero--compact { min-height: 170px; padding-block: 1.35rem; }
.v2-hero--compact h1 { max-width: 28ch; font-size: clamp(1.55rem, 3vw, 2.35rem); }
.v2-card--overview { gap: 0.85rem; }
.v2-inline-link { color: var(--v2-blue); font-size: 0.82rem; font-weight: 900; text-decoration: none; white-space: nowrap; }
.v2-page-copy { max-width: 70ch; margin: 0; color: var(--v2-muted); font-weight: 650; line-height: 1.55; }
.v2-card--desk-page { gap: 0.85rem; }
.v2-monitor-page { gap: 0.7rem; padding: 1rem 1.15rem; }
.v2-monitor-picker { display: flex; align-items: center; gap: 0.65rem; }
.v2-monitor-caption { color: var(--v2-muted); font-size: 0.8rem; font-weight: 800; }
.v2-monitor-picker select { min-height: 42px; min-width: 12rem; padding: 0.45rem 0.7rem; border: 1px solid var(--v2-line); border-radius: 12px; background: #fff; }
.v2-monitor-picker .v2-button { min-height: 42px; padding: 0.45rem 0.9rem; border-radius: 12px; font-size: 0.78rem; }
.v2-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.v2-detail-platform { min-width: 0; padding: 0.8rem; border: 1px solid var(--v2-line); border-radius: 18px; background: #fff; }
.v2-detail-platform > header { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.65rem; }
.v2-detail-platform h2 { margin: 0; font-size: 1rem; }
.v2-detail-platform header > div > span { color: var(--v2-blue); font-size: 0.8rem; font-weight: 800; }
.v2-detail-platform .v2-required { background: #fff0ef; color: var(--v2-blue); font-size: 0.68rem; }
.v2-detail-totals { display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; padding-bottom: 0.55rem; color: var(--v2-muted); font-size: 0.75rem; }
.v2-detail-totals b { color: var(--v2-ink); }
.v2-detail-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.7rem; }
.v2-detail-table th, .v2-detail-table td { padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--v2-line); text-align: center; overflow-wrap: anywhere; }
.v2-detail-table thead th { background: #fff5f4; color: var(--v2-muted); font-size: 0.65rem; }
.v2-detail-table th:first-child { width: 22%; text-align: left; }
.v2-detail-table small { display: block; color: var(--v2-muted); font-size: 0.6rem; line-height: 1.3; }
.v2-detail-unbanded { background: #fff8ee; }
.v2-monitor-page h1 { margin: 0; color: var(--v2-ink); font-size: clamp(1.25rem, 2vw, 1.65rem); letter-spacing: -0.03em; }
.v2-monitor-grid { display: grid; gap: 0.45rem; }
.v2-monitor-pair { display: grid; grid-template-columns: minmax(11rem, 0.8fr) repeat(2, minmax(0, 1fr)); align-items: center; gap: 0.65rem; padding: 0.58rem 0.7rem; border-radius: 18px; background: #fff8f7; }
.v2-monitor-pair-name { display: grid; gap: 0.2rem; min-width: 0; }
.v2-monitor-pair-name strong { overflow-wrap: anywhere; }
.v2-monitor-pair-name small { color: var(--v2-muted); font-size: 0.68rem; font-weight: 750; }
.v2-monitor-platform { display: grid; gap: 0.28rem; min-width: 0; padding-left: 0.65rem; border-left: 1px solid var(--v2-line); }
.v2-monitor-platform-head { display: flex; justify-content: space-between; gap: 0.5rem; }
.v2-monitor-platform-head b { color: var(--v2-blue); font-size: 0.7rem; text-transform: uppercase; }
.v2-monitor-platform-head strong { color: var(--v2-blue); font-size: 0.85rem; }
.v2-monitor-facts { display: flex; flex-wrap: wrap; gap: 0.3rem 0.55rem; color: var(--v2-muted); font-size: 0.66rem; font-weight: 700; }
.v2-monitor-facts b { color: var(--v2-ink); }
.v2-monitor-bands { display: flex; flex-wrap: wrap; gap: 0.2rem 0.35rem; color: var(--v2-muted); font-size: 0.62rem; font-weight: 750; }
.v2-monitor-bands span { white-space: nowrap; }
.v2-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--v2-line); color: var(--v2-muted); font-size: 0.75rem; font-weight: 800; text-align: center; }
.v2-page-button { justify-self: start; padding: 0.45rem 0.7rem; border-radius: 999px; background: #fff0ef; color: var(--v2-blue); font-weight: 900; text-decoration: none; }
.v2-pagination .v2-page-button:last-child { justify-self: end; }
.v2-findings-page { gap: 0.75rem; }
.v2-findings-list { display: grid; gap: 0.45rem; }
.v2-finding-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.8rem; padding: 0.7rem 0.8rem; border-radius: 16px; background: #fff8f7; }
.v2-finding-head { display: grid; gap: 0.15rem; min-width: 0; }
.v2-finding-head span { color: var(--v2-muted); font-size: 0.72rem; font-weight: 750; }
.v2-finding-row p { grid-column: 1 / -1; margin: 0.15rem 0 0; color: var(--v2-ink); font-weight: 650; overflow-wrap: anywhere; }
.v2-finding-row > .v2-state { align-self: start; white-space: nowrap; }
.v2-e2e-page { gap: 0.7rem; }
.v2-e2e-list { display: grid; gap: 0.45rem; }
.v2-e2e-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.8fr); gap: 0.45rem 0.8rem; align-items: start; padding: 0.7rem 0.8rem; border-radius: 16px; background: #fff8f7; }
.v2-e2e-row > div { display: grid; gap: 0.2rem; min-width: 0; }
.v2-e2e-row span, .v2-e2e-row small { color: var(--v2-muted); font-size: 0.72rem; font-weight: 750; overflow-wrap: anywhere; }
.v2-e2e-row .v2-state { justify-self: start; }
.v2-metric-grid.v2-metric-grid--baseline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-baseline-list { display: grid; gap: 0.45rem; }
.v2-baseline-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem 0.8rem; padding: 0.7rem 0.8rem; border-radius: 16px; background: #fff8f7; }
.v2-baseline-source { display: grid; gap: 0.18rem; min-width: 0; }
.v2-baseline-source span, .v2-baseline-source small, .v2-baseline-band span { color: var(--v2-muted); font-size: 0.72rem; font-weight: 750; overflow-wrap: anywhere; }
.v2-baseline-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 0.45rem; }
.v2-baseline-form .v2-field { min-width: 0; }
.v2-baseline-band { display: grid; gap: 0.2rem; min-width: 0; padding-bottom: 0.35rem; }
.v2-baseline-band strong { font-size: 0.82rem; overflow-wrap: anywhere; }
@media (min-width: 700px) {
  .v2-metric-grid.v2-metric-grid--baseline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1050px) {
  .v2-baseline-row { grid-template-columns: minmax(19rem, 0.9fr) minmax(25rem, 1.1fr); align-items: end; }
}
/* Team Lead allocation cards. The base rules come before the 900px and 520px queries below, which override them. */
.v2-allocation-grid { display: grid; gap: 0.45rem; }
.v2-allocation-card { display: grid; grid-template-areas: "copy actions" "metrics actions" "confirmation actions"; grid-template-columns: minmax(0, 1fr) auto; gap: 0.22rem 0.7rem; align-items: center; padding: 0.55rem 0.65rem; border: 1px solid var(--v2-line); border-radius: 14px; background: #fff; }
.v2-allocation-copy { grid-area: copy; min-width: 0; }
.v2-allocation-copy h3 { margin: 0; color: var(--v2-ink); font-size: 0.88rem; }
.v2-allocation-copy p { margin: 0.08rem 0 0; color: var(--v2-muted); font-size: 0.7rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.v2-allocation-metrics { display: flex; grid-area: metrics; flex-wrap: wrap; gap: 0.2rem 0.55rem; margin: 0; }
.v2-allocation-metrics > div { display: flex; align-items: baseline; gap: 0.18rem; }
.v2-allocation-metrics dt, .v2-allocation-confirmation span { color: var(--v2-muted); font-size: 0.64rem; font-weight: 800; text-transform: uppercase; }
.v2-allocation-metrics dd { margin: 0; color: var(--v2-ink); font-size: 0.8rem; font-weight: 900; }
.v2-allocation-confirmation { display: flex; grid-area: confirmation; align-items: center; gap: 0.3rem; min-width: 0; }
.v2-allocation-state { color: #9b2c2c; font-size: 0.68rem; font-weight: 850; }
.v2-allocation-state--confirmed { color: #0d6245; }
.v2-allocation-actions { display: flex; grid-area: actions; align-items: center; gap: 0.35rem; }
.v2-allocation-actions form { margin: 0; }
.v2-allocation-actions .v2-button { min-height: 34px; padding: 0.32rem 0.55rem; border-radius: 10px; font-size: 0.72rem; line-height: 1.15; white-space: nowrap; }
.v2-allocation-empty { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .v2-allocation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(10, auto); grid-auto-flow: column; column-gap: 0.55rem; row-gap: 0.45rem; }
  body[data-active-view="v2"][data-user-role="lead"], body[data-active-view="v2"][data-user-role="coordinator"] { overflow: hidden; }
  body[data-active-view="v2"][data-user-role="lead"] .app-main, body[data-active-view="v2"][data-user-role="coordinator"] .app-main { height: calc(100vh - 70px); box-sizing: border-box; overflow: hidden; }
  body[data-active-view="v2"][data-user-role="lead"] .v2-shell, body[data-active-view="v2"][data-user-role="coordinator"] .v2-shell { gap: 0.7rem; height: 100%; }
}
@media (min-width: 700px) {
  .v2-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-upload, .v2-evidence-note, .v2-form .v2-button { grid-column: 1 / -1; }
  .v2-cell-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1050px) {
  .v2-cell-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-metric-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .v2-hero { align-items: flex-start; }
  .v2-hero-mark { display: none; }
  .v2-target-form, .v2-tester-grid { grid-template-columns: 1fr; }
  .v2-submission-row { align-items: flex-start; flex-direction: column; }
  .v2-submission-meta { justify-items: start; max-width: 100%; white-space: normal; }
  .v2-submission-meta small { overflow-wrap: anywhere; }
  .v2-e2e-row { grid-template-columns: 1fr; }
  .v2-baseline-form { grid-template-columns: 1fr; }
  .v2-allocation-card { grid-template-areas: "copy" "metrics" "confirmation" "actions"; grid-template-columns: 1fr; gap: 0.3rem; padding: 0.65rem; }
  .v2-allocation-actions { justify-content: stretch; }
  .v2-allocation-actions > *, .v2-allocation-actions .v2-button { flex: 1; }
}

/* V2 dashboard density: keep the decision surface compact and remove empty states from the monitor. */
.v2-overview-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--v2-line);
  border-left: 4px solid var(--v2-blue);
  border-radius: 20px;
  background: #fff;
}
.v2-overview-intro h1 { margin: 0; color: var(--v2-ink); font-size: clamp(1.45rem, 2.8vw, 2.15rem); line-height: 1.08; letter-spacing: -0.04em; }
.v2-overview-intro .v2-page-copy { margin-top: 0.4rem; font-size: 0.82rem; }
.v2-overview-snapshot { display: grid; min-width: 190px; gap: 0.12rem; padding: 0.8rem 0.95rem; border-radius: 15px; background: #fff3f1; }
.v2-overview-snapshot span, .v2-overview-snapshot small { color: var(--v2-muted); font-size: 0.72rem; font-weight: 800; }
.v2-overview-snapshot strong { color: var(--v2-blue); font-size: 2rem; line-height: 1; letter-spacing: -0.05em; }
.v2-metric-grid.v2-metric-grid--summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.v2-metric-grid--summary article { min-height: 90px; padding: 0.85rem 0.95rem; border: 1px solid var(--v2-line); border-radius: 16px; }
.v2-metric-grid--summary strong { font-size: 1.7rem; }
.v2-metric-grid--summary small { font-size: 0.7rem; line-height: 1.3; }
.v2-status-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.v2-status-strip > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.12rem 0.65rem; padding: 0.7rem 0.85rem; border: 1px solid var(--v2-line); border-radius: 14px; background: #fff; }
.v2-status-strip span, .v2-status-strip small { color: var(--v2-muted); font-size: 0.72rem; font-weight: 800; }
.v2-status-strip strong { grid-row: span 2; align-self: center; color: var(--v2-ink); font-size: 1.4rem; }
.v2-status-strip small { font-weight: 650; }
.v2-summary-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.78rem; }
.v2-summary-table th, .v2-summary-table td { padding: 0.55rem 0.45rem; border-bottom: 1px solid var(--v2-line); text-align: left; }
.v2-summary-table thead th { color: var(--v2-muted); font-size: 0.68rem; text-transform: uppercase; }
.v2-summary-table tbody tr:last-child th, .v2-summary-table tbody tr:last-child td { border-bottom: 0; }
.v2-number-good { color: #138a5b; }
.v2-number-bad { color: #b42318; }
.v2-detail-platform { padding: 0.65rem; border-radius: 14px; }
.v2-detail-platform > header { margin-bottom: 0.4rem; }
.v2-detail-table th, .v2-detail-table td { padding: 0.36rem 0.15rem; }
.v2-monitor-page { padding: 0.85rem 1rem; }

@media (min-width: 900px) {
  body[data-active-view="v2"][data-user-role="lead"], body[data-active-view="v2"][data-user-role="coordinator"] { overflow: auto; }
  body[data-active-view="v2"][data-user-role="lead"] .app-main, body[data-active-view="v2"][data-user-role="coordinator"] .app-main { height: auto; min-height: calc(100vh - 70px); overflow: visible; }
  body[data-active-view="v2"][data-user-role="lead"] .v2-shell, body[data-active-view="v2"][data-user-role="coordinator"] .v2-shell { height: auto; }
}
@media (max-width: 700px) {
  .v2-overview-intro { grid-template-columns: 1fr; }
  .v2-overview-snapshot { min-width: 0; }
  .v2-metric-grid.v2-metric-grid--summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-status-strip { grid-template-columns: 1fr; }
}

/* Operations views use the desktop canvas and retain natural content height. */
body[data-active-view="admin_squads"] .admin-head { margin-bottom: 14px; }
body[data-active-view="admin_squads"] .admin-head h1 { font-size: 1.65rem; margin-bottom: 6px; }
body[data-active-view="admin_squads"] .admin-head p { max-width: 90ch; font-size: .9rem; }
body[data-active-view="admin_squads"] .admin-workspace { gap: 12px; }
body[data-active-view="admin_squads"] .metric-card { min-height: 76px; padding: 12px 16px; }
body[data-active-view="admin_squads"] .metric-card strong { font-size: 1.6rem; }
body[data-active-view="admin_squads"] .setup-roadmap { padding: 10px 14px; }
body[data-active-view="admin_squads"] .setup-roadmap .section-heading { margin-bottom: 8px; }
body[data-active-view="admin_squads"] .setup-roadmap h2 { font-size: 1.05rem; }
body[data-active-view="admin_squads"] .setup-roadmap .muted-copy { display: none; }
body[data-active-view="admin_squads"] .setup-roadmap-step { min-height: 46px; padding: 6px 10px; }
body[data-active-view="admin_squads"] :is(.admin-team-rail,.admin-team-workbench,.admin-member-group,.admin-roster-section) { padding: 14px; border-radius: 14px; }
body[data-active-view="admin_squads"] .next-action-card { padding: 12px; margin-block: 10px; }
body[data-active-view="admin_squads"] .next-action-card h3 { font-size: 1rem; }
body[data-active-view="admin_squads"] .next-action-card p { margin-block: 4px; }
body[data-active-view="admin_squads"] .admin-person-grid { max-height: 430px; overflow-y: auto; align-content: start; padding: 2px; }
body[data-active-view="admin_squads"] .admin-person-card { padding: 10px 12px; gap: 6px; border-radius: 12px; }
body[data-active-view="admin_squads"] .admin-person-card h3 { font-size: 1rem; }
body[data-active-view="admin_squads"] .admin-person-card p { font-size: .78rem; margin-block: 4px; }
body[data-active-view="admin_squads"] .admin-roster-list { max-height: 260px; overflow-y: auto; }
body[data-active-view="admin_squads"] .admin-reporting { margin-top: 12px; padding: 14px; }
body[data-active-view="admin_squads"] .admin-reporting h3 { font-size: 1.05rem; }
.admin-secondary-box { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.admin-secondary-box > summary { cursor: pointer; font-size: .85rem; font-weight: 750; }
.admin-secondary-box--report { order: 8; }
body[data-active-view="admin_squads"] .admin-roster-filter { padding-top: 8px; }
body[data-active-view="v2"] .v2-card { align-content: start; padding: 16px; border-radius: 16px; gap: 10px; }
body[data-active-view="v2"] .v2-card { min-width: 0; }
body[data-active-view="v2"] .v2-page-copy { font-size: .85rem; }
.v2-summary-table th:first-child, .v2-summary-table td[data-caption="Tim"] { white-space: nowrap; }
body[data-active-view="v2"] .v2-section-head h1 { font-size: 1.5rem; }
body[data-active-view="v2"] .v2-section-head h2 { font-size: 1.1rem; }
.v2-legend-details { border-bottom: 1px solid var(--v2-line); padding-bottom: 8px; }
.v2-legend-details summary { cursor: pointer; font-size: .8rem; color: var(--v2-muted); font-weight: 750; }
.v2-legend-details[open] summary { margin-bottom: 8px; }
.v2-legend-details .v2-term-legend { margin-top: 6px; }
.v2-source-note { padding: 8px 12px; border-radius: 8px; background: #fff3f1; font-size: .75rem; color: var(--v2-muted); }
/* Tim & petugas: a tester's phone state, then its set-up QR button and Lepas dari tim side by side, wrapping on a phone. */
.v2-team-phone { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.v2-team-phone small { color: var(--v2-muted); font-weight: 650; }
.v2-team-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .45rem; }
.v2-team-actions form { margin: 0; }
.v2-team-actions .v2-button { min-height: 44px; padding: .45rem .85rem; border-radius: 12px; font-size: .8rem; }
@media (min-width: 700px) { .v2-team-actions { justify-content: flex-start; } }
.v2-evidence-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.v2-evidence-card { overflow: hidden; border: 1px solid var(--v2-line); border-radius: 12px; min-width: 0; }
.v2-evidence-card > a { display: block; background: #f4f1f1; }
.v2-evidence-card img { display: block; object-fit: contain; width: 100%; height: 200px; }
.v2-evidence-pdf { display: grid; place-items: center; width: 100%; height: 200px; color: var(--v2-ink); background: linear-gradient(135deg,#f7eeee,#eee7e7); font-size: 1.1rem; letter-spacing: .08em; }
.v2-evidence-card > div { display: grid; gap: 3px; padding: 9px 10px; font-size: .78rem; }
.v2-evidence-card small { color: var(--v2-muted); overflow-wrap: anywhere; }
.v2-evidence-card span { color: var(--v2-ink); font-weight: 750; }
.v2-image-dialog { width: min(95vw,1000px); max-height: 94vh; border: 1px solid var(--v2-line); border-radius: 16px; padding: 12px; }
.v2-image-dialog::backdrop { background: #231a22bb; }
.v2-image-dialog > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.v2-image-dialog button { border: 0; background: #fff0ef; border-radius: 8px; min-width: 44px; min-height: 44px; font-size: 1.4rem; cursor: pointer; }
.v2-image-dialog > img { display: block; width: 100%; height: auto; max-height: calc(90vh - 80px); object-fit: contain; }
@media (min-width: 1100px) { .v2-evidence-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (min-width: 1000px) {
  body:is([data-active-view="v2"],[data-active-view="admin_squads"]) { --v2-sidebar-width: 88px; }
  body[data-user-role="coordinator"]:is([data-active-view="v2"],[data-active-view="admin_squads"]) { --v2-sidebar-width: 220px; }
  body:is([data-active-view="v2"],[data-active-view="admin_squads"]) .app-main { width: calc(100% - var(--v2-sidebar-width)); max-width: none; margin-left: var(--v2-sidebar-width); padding: 18px 24px 32px; }
  .v2-shell, body[data-active-view="admin_squads"] .app-main > * { width: min(100%,1560px); margin-inline: auto; }
  .v2-shell { gap: 12px; }
  .v2-metric-grid.v2-metric-grid--summary { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .v2-shell:has(.v2-overview-intro) { grid-template-columns: 1fr 1fr; }
  .v2-shell:has(.v2-overview-intro) > * { grid-column: 1 / -1; }
  .v2-shell:has(.v2-overview-intro) > .v2-card--overview { grid-column: auto; }
  .v2-shell:has(.v2-overview-intro) > .v2-card--overview:last-of-type { grid-column: 1 / -1; }
  .v2-summary-table { min-width: 0; font-size: .8rem; }
  body[data-active-view="admin_squads"] .admin-member-groups { grid-template-columns: minmax(0,1fr); }
  body[data-active-view="admin_squads"] .admin-person-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 699px) {
  .v2-pagebar { align-items: start; flex-direction: column; }
  .v2-page-nav { border-radius: 14px; }
  .v2-monitor-picker { flex-wrap: wrap; }
  .v2-monitor-picker select { min-width: 0; max-width: 100%; }
  .v2-section-head { flex-wrap: wrap; }
  .v2-summary-table { min-width: 0; }
}

.apk-digest { overflow-wrap: anywhere; }
.support-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.v2-ocr-progress {
  display: block;
  width: 100%;
  height: 0.75rem;
  margin-top: 1rem;
  accent-color: var(--accent, #1f7a5a);
}
/* A delegated Coordinator keeps one explicit TL scope per browser. */
.delegate-team-selector { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:14px; margin:0 0 18px; border:1px solid #d7e3de; border-radius:14px; background:#f1f7f3; }
.delegate-team-selector small { flex-basis:100%; color:#425f56; }
body:has(.delegate-picker) { background:#f3f7f5; }
.app-main.delegate-picker { max-width:760px; width:auto; margin:0 auto; padding:32px 20px; }
.delegate-picker .v2-card { background:#fff; color:#193a3e; border:1px solid #d7e3de; border-radius:20px; padding:28px; }
.delegate-picker .eyebrow { color:#315e53; }
.delegate-picker .delegate-team-selector button { min-height:44px; border:1px solid #b7cec5; background:#fff; color:#173c34; border-radius:10px; }
@media print { .delegate-team-selector { display:none; } }
