:root {
  --bg: #f4f6f8;
  --rail: #101820;
  --rail-2: #17222e;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --accent: #0f766e;
  --accent-2: #115e59;
  --blue: #2563eb;
  --amber: #b45309;
  --red: #b42318;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: #1d4ed8; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 12px;
  background: linear-gradient(180deg, var(--rail), #0b1220);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.06);
}
.brand-block {
  display: grid;
  gap: 2px;
  padding: 4px 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand {
  width: max-content;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}
.brand:hover { color: #fff; }
.brand-sub { color: rgba(255,255,255,0.56); font-size: 12px; font-weight: 600; }
.nav { display: grid; gap: 3px; }
.nav-primary {
  margin-bottom: 5px;
  border: 1px solid rgba(45,212,191,.24);
  background: rgba(15,118,110,.18);
}
.nav-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-group summary {
  cursor: pointer;
  padding: 8px 10px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: .04em;
  list-style: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 650;
}
.nav a::before {
  content: attr(data-icon);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: rgba(255,255,255,0.62);
  background: rgba(255,255,255,0.07);
  font-size: 10px;
  font-weight: 750;
}
.nav a:hover, .nav a.active { color: #fff; background: var(--rail-2); }
.nav a.nav-primary:hover, .nav a.nav-primary.active { background: var(--accent); }
.nav a.active::before { color: #fff; background: var(--accent); }
.nav a.nav-primary::before { color: white; background: rgba(255,255,255,.16); }
.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 12px 10px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-chip { color: rgba(255,255,255,0.64); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.link-button {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.sidebar .link-button { color: rgba(255,255,255,0.84); }

.workspace { min-width: 0; }
.mobile-topbar { display: none; }
.mobile-dock { display: none; }
.hidden { display: none !important; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(20px, 3vw, 36px);
  border-bottom: 1px solid rgba(229,231,235,0.86);
  background: rgba(246,247,249,0.86);
  backdrop-filter: blur(14px);
}
.topbar-title { display: grid; gap: 1px; }
.topbar-title strong { font-size: 13px; font-weight: 750; }
.topbar-title span { color: var(--muted); font-size: 12px; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar-actions .primary { box-shadow: 0 8px 18px rgba(15,118,110,.18); }
.active-drive-banner {
  position: sticky;
  top: 0;
  z-index: 7;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(18px, 3vw, 36px);
  color: #052e2b;
  border-bottom: 1px solid #99f6e4;
  background: #ccfbf1;
}
.active-drive-banner span {
  min-width: 0;
  color: #0f766e;
  font-weight: 650;
}

.drive-shell {
  display: grid;
  gap: 16px;
}
.drive-hero, .drive-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.drive-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  align-items: end;
  gap: 14px;
  padding: clamp(18px, 3vw, 28px);
}
.drive-hero h1 {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.drive-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.drive-status-grid div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.drive-status-grid span, .drive-active-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}
.drive-status-grid strong { overflow-wrap: anywhere; }
.drive-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: clamp(18px, 3vw, 28px);
}
.drive-active-copy {
  display: grid;
  gap: 6px;
}
.drive-active-copy strong {
  font-size: clamp(42px, 10vw, 84px);
  line-height: .95;
  letter-spacing: 0;
}
.drive-active-copy p { max-width: 620px; color: var(--muted); }
.drive-main-button {
  min-width: 180px;
  min-height: 96px;
  font-size: 18px;
}
.drive-route-card {
  grid-template-columns: minmax(0, .8fr) minmax(260px, 1.2fr);
  box-shadow: none;
}
.drive-route-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, .8fr);
  gap: 10px;
}
.drive-stop-panel {
  border-left: 4px solid var(--accent);
  scroll-margin-top: 86px;
}
.drive-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
  width: 100%;
}
.drive-actions .secondary {
  width: 100%;
}
.drive-preset.active-preset {
  color: white;
  border-color: var(--accent);
  background: var(--accent);
}
.route-confidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.route-confidence-strip .pill.warn {
  color: var(--amber);
  background: #fffbeb;
}
.drive-readiness-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.timeline-list {
  display: grid;
  gap: 8px;
}
.drive-stop-panel .check {
  align-self: end;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.drive-stop-panel .check input {
  width: auto;
}
.drive-stop-panel .mobile-safe-actions {
  align-items: stretch;
}
  .drive-stop-panel .mobile-safe-actions > * {
    flex: 1 1 160px;
  }
button:disabled,
.primary:disabled,
.secondary:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}
.drive-details-panel summary {
  display: none;
}
.compact-form {
  margin-top: 12px;
}

.page {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 24px clamp(18px, 3.2vw, 36px) 64px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.page-head.inline { align-items: center; }
.kicker, .eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 760;
}
h2 { margin: 0 0 10px; font-size: 17px; line-height: 1.2; font-weight: 720; }
h3 { margin: 0 0 8px; font-size: 15px; }
p { line-height: 1.45; }
p.muted { max-width: 760px; }
.muted, .help { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--red); font-weight: 700; }
.notice {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #14532d;
  background: #f0fdf4;
  font-weight: 650;
}

.panel, .form-panel, .list-panel, .auth-panel, .review-card, .location-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.panel, .form-panel, .list-panel { padding: 18px; margin-bottom: 18px; }
.list-panel { box-shadow: var(--shadow); }
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-header p { margin: 4px 0 0; }

.command-center {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}
.command-main {
  min-height: 340px;
  display: grid;
  align-content: space-between;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: white;
  background:
    radial-gradient(circle at top right, rgba(45,212,191,.2), transparent 34%),
    linear-gradient(135deg, #101820, #174151 56%, #0f766e);
  box-shadow: var(--shadow);
}
.command-main .kicker { color: #a7f3d0; }
.command-main .muted { max-width: 640px; color: rgba(255,255,255,0.72); }
.command-main .notice { border-color: rgba(255,255,255,.22); color: white; background: rgba(255,255,255,.10); }
.command-side { display: grid; gap: 12px; }
.summary-strip, .metrics, .stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 0;
}
.executive .summary-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.summary-item, .metric, .stats div, .step-card, .status-chip, .action-card, .review-card {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background-color .12s ease;
}
.command-main .summary-item { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.09); }
.summary-item span, .metric span, .data-row span, .status-line span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}
.command-main .summary-item span { color: rgba(255,255,255,.62); }
.summary-item strong, .metric strong, .stats strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  font-weight: 760;
  letter-spacing: 0;
}
.action-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.action-card {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
}
.summary-item:hover, .step-card:hover, .status-chip:hover, .action-card:hover, .review-card:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}
.command-main .action-card { color: white; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08); }
.action-card strong { font-size: 14px; font-weight: 720; }
.action-card span { color: var(--muted); font-size: 12px; }
.command-main .action-card span { color: rgba(255,255,255,.62); }
.action-card.primary-action, .command-main .action-card.primary-action { color: white; border-color: var(--accent); background: var(--accent); }
.action-card.primary-action span { color: #d1fae5; }
.action-card.primary-action:hover, .command-main .action-card.primary-action:hover {
  border-color: var(--accent-2);
  background: var(--accent-2);
}
.next-action-card {
  border-color: rgba(15,118,110,.20);
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
}
.compact-row {
  padding: 0;
  border: 0;
}
.compact-row strong { display: block; margin-bottom: 4px; }
.compact-row span { display: block; margin: 0; }

.executive .command-main {
  min-height: 360px;
}
.action-rail .action-card {
  min-height: 86px;
  align-content: center;
}
.progress-rail .step-card {
  border-color: transparent;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
}

.mobile-home {
  display: grid;
  gap: 16px;
}
.mobile-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 64%, #e6fffb 100%);
  box-shadow: var(--shadow-sm);
}
.mobile-home-hero h1 {
  max-width: 680px;
  margin-bottom: 8px;
}
.mobile-home-hero .muted {
  max-width: 640px;
}
.mobile-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.start-drive-button {
  min-height: 52px;
  padding-inline: 22px;
  font-size: 16px;
}
.active-trip-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}
.active-trip-card h2 {
  margin: 8px 0 4px;
}
.quick-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.quick-status-card {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.quick-status-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}
.quick-status-card strong {
  font-size: 28px;
  line-height: 1;
}
.quick-status-card small {
  color: var(--muted);
  font-weight: 650;
}
.quick-status-card.needs-attention {
  border-color: #f59e0b;
  background: #fffbeb;
}
.next-drive-panel {
  margin-bottom: 0;
}
.simple-readiness-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.simple-section {
  display: grid;
  gap: 10px;
}
.simple-section-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}
.simple-section-header h2 {
  margin: 0;
}
.simple-card-list {
  display: grid;
  gap: 8px;
}
.trip-lite-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.trip-lite-card div {
  min-width: 0;
}
.trip-lite-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.trip-lite-card > div:last-child {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.trip-lite-card .pill {
  margin: 0;
  color: var(--ink);
}
.mobile-empty-state {
  display: grid;
  gap: 8px;
}
.mobile-empty-state p {
  margin: 0;
}
.dashboard-details {
  padding: 0;
  overflow: hidden;
}
.dashboard-details summary {
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.dashboard-details summary::-webkit-details-marker {
  display: none;
}
.dashboard-details summary span {
  font-weight: 760;
}
.dashboard-details summary small {
  color: var(--muted);
  font-weight: 650;
}
.dashboard-details > :not(summary) {
  margin-inline: 18px;
}
.dashboard-details > :last-child {
  margin-bottom: 18px;
}
.compact-summary-strip {
  margin-top: 0;
}
.mobile-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.review-tools-panel {
  margin-bottom: 14px;
}
.trip-tools-panel,
.trip-log-panel,
.report-tools-panel,
.report-details-panel,
.report-blockers-panel,
.report-activity-panel,
.drive-signals-panel {
  margin-bottom: 14px;
}
.review-tools-panel > section,
.review-tools-panel > div,
.review-tools-panel > p,
.trip-tools-panel > section,
.trip-tools-panel > nav,
.trip-log-panel > form,
.trip-log-panel > div,
.trip-log-panel > nav,
.report-tools-panel > form,
.report-tools-panel > nav,
.report-tools-panel > div,
.report-details-panel > section,
.report-details-panel > div,
.report-blockers-panel > div,
.report-activity-panel > div,
.drive-signals-panel > section {
  margin-inline: 18px;
}
.review-tools-panel > section:last-of-type,
.trip-tools-panel > section:last-of-type,
.trip-log-panel > nav:last-child,
.report-details-panel > section:last-of-type,
.report-blockers-panel > div:last-child,
.report-activity-panel > div:last-child,
.drive-signals-panel > section:last-of-type {
  margin-bottom: 18px;
}
.mobile-export-panel {
  border-color: rgba(15, 118, 110, .18);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.section-tab {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font-size: 13px;
  font-weight: 650;
}
.section-tab.active { color: white; border-color: var(--ink); background: var(--ink); }
.workflow-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #eef6f4);
  box-shadow: var(--shadow-sm);
}
.workflow-hero h2 {
  margin: 0;
  font-size: 22px;
}
.workflow-hero p {
  margin: 8px 0 0;
  color: var(--text);
}
.review-hero {
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}
.report-hero {
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
}
.quick-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.quick-preset-row button {
  min-height: 32px;
  padding: 6px 10px;
}

.panel-grid, .split, .trip-entry-shell, .capture-console, .packet-workbench, .detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.trip-entry-shell, .capture-console { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); align-items: start; }
.simple-capture-console {
  grid-template-columns: minmax(0, 780px);
}
.trip-entry { margin-bottom: 0; }
.trip-inspector { position: sticky; top: 78px; }
.insight-panel {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.wide { grid-column: 1 / -1; }
.route-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
label {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}
input, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 14px;
}
input:focus, select:focus { outline: 3px solid rgba(4,120,87,.13); border-color: var(--accent); }
.check { min-height: 40px; display: flex; align-items: center; gap: 8px; }
.check input { width: auto; min-height: auto; }
.source-list {
  display: grid;
  gap: 10px;
}
.source-row {
  cursor: pointer;
}
.source-row input {
  width: 22px;
  min-height: 22px;
}
.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .18);
  display: inline-block;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(130px, .8fr)) auto auto;
  gap: 9px;
  align-items: end;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.filter-bar button,
.filter-bar .button-link {
  min-width: 82px;
}
.review-command {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 14px;
}
.decision-console {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.review-command .metric { margin: 0; }
.bulk-bar {
  position: sticky;
  top: 72px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}
.select-all-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}
.selection-count {
  min-width: 84px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.data-row, .row, .trip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.data-row:first-of-type, .row:first-of-type, .trip-row:first-of-type { border-top: 0; }
.data-row > *, .row > *, .trip-row > * { min-width: 0; }
.data-row span, .data-row strong, .row span, .row strong, .trip-row span, .trip-row strong { overflow-wrap: anywhere; }
.data-row strong, .row strong, .trip-row strong { font-size: 14px; font-weight: 680; }
.row span { display: block; color: var(--muted); margin-top: 3px; }
.row-actions { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-actions {
  justify-content: flex-end;
  min-width: max-content;
}
.route-line { min-width: 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--muted); overflow-wrap: anywhere; }
.route-arrow { color: #9ca3af; font-weight: 700; }
.detail-link { color: var(--ink); }
.detail-link:hover { color: var(--accent); }

.review-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin-bottom: 9px;
}
.decision-card {
  border-color: #dbe3ea;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}
.decision-actions {
  justify-content: flex-end;
}
.review-card:hover, .trip-row:hover { background: #fbfdff; }
.inbox-row {
  border-left: 3px solid transparent;
}
.inbox-row:hover {
  border-left-color: var(--accent);
}
.select-box {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface-2);
}
.select-box input { width: 15px; min-height: 15px; }
.review-route { display: grid; gap: 5px; }
.review-route strong { color: var(--ink); font-size: 15px; font-weight: 700; }
.review-route p { margin: 0; color: var(--muted); font-size: 13px; }
.trip-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}
.pill.warn { color: var(--amber); background: #fffbeb; }
.pill.muted-pill { color: var(--muted); background: #f3f4f6; }
.pill.red { color: var(--red); background: #fef3f2; }

.primary, .secondary, .danger, .button-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease, color .12s ease, transform .12s ease;
}
.primary { color: white; background: var(--accent); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset; }
.primary:hover { color: white; background: var(--accent-2); transform: translateY(-1px); }
.secondary { color: var(--ink); background: white; border-color: var(--line-2); }
.secondary:hover { color: var(--ink); background: #f9fafb; border-color: #cbd5e1; }
.primary:focus-visible, .secondary:focus-visible, .danger:focus-visible, .button-link:focus-visible, .link-button:focus-visible, .section-tab:focus-visible {
  outline: 3px solid rgba(37,99,235,.18);
  outline-offset: 2px;
}
.disabled, button:disabled, .primary:disabled, .secondary:disabled, .danger:disabled {
  opacity: .56;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}
.danger { color: var(--red); background: #fff; border-color: #fecaca; }
.danger:hover { background: #fef2f2; }
.icon-action { gap: 8px; }
.icon-action span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #ecfeff;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 800;
}
.mobile-safe-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mobile-safe-actions > * {
  min-width: fit-content;
}

.auth-layout { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-panel { width: min(420px, 100%); padding: 28px; }
.stack { display: grid; gap: 12px; }
.compact-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.form-gap { margin-top: 12px; }
.form-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
}
.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
}
.mini-metrics div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.mini-metrics span { color: var(--muted); font-size: 11px; font-weight: 650; }
.mini-metrics strong { font-size: 22px; font-weight: 760; }
.empty-state {
  padding: 16px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
}
.empty-state strong {
  display: block;
  color: var(--ink);
  font-weight: 740;
}
.empty-state p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
}
.compact-empty {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.compact-empty p { margin: 0; }
.modern-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.trip-table {
  border-color: #dbe3ea;
  box-shadow: var(--shadow-sm);
}
.trip-table .table-row {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 0;
}
.trip-table .table-row:first-of-type { border-top: 0; }
.trip-table .table-row:hover { background: #fbfdff; }
.trip-log-row {
  min-height: 66px;
}
.table-head, .table-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1.6fr) 90px 120px 76px;
  gap: 12px;
  align-items: center;
}
.table-head {
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.table-row {
  min-height: 58px;
  padding: 10px 12px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.table-row:last-child { border-bottom: 0; }
.table-row:hover { background: #fbfdff; }
.table-row strong { font-weight: 720; }
.table-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.suggestions { position: relative; }
.suggestion-list { display: grid; gap: 6px; margin-top: 6px; }
.suggestion-button {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  background: white;
  text-align: left;
  cursor: pointer;
}
.suggestion-button:hover { border-color: var(--accent); background: #f0fdf4; }
.location-editor { padding: 14px; margin-bottom: 10px; }
.location-editor form + form { margin-top: 10px; }

.setup-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.step-card strong { display: block; margin-bottom: 4px; font-weight: 700; }
.step-card span { color: var(--muted); font-size: 12px; }
.provider-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.provider-grid { display: grid; gap: 8px; margin: 12px 0; }
.decision-grid, .quick-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.quick-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}
.decision-card-lite, .quick-filter-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.decision-card-lite span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.decision-card-lite p, .quick-filter-card span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.quick-filter-card:hover {
  color: var(--ink);
  border-color: rgba(15,118,110,.35);
  box-shadow: var(--shadow-sm);
}
.provider-status {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.provider-status.selected { border-color: rgba(4,120,87,.45); background: #f0fdf4; }
.provider-status p { margin: 0; color: var(--text); font-size: 12px; }
.provider-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.packet-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(4,120,87,.28);
  border-radius: 8px;
  background: #f0fdf4;
}
.packet-card.flagship {
  min-height: 112px;
  border-color: rgba(15,118,110,.34);
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}
.export-cta-card {
  border-color: rgba(37,99,235,.22);
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}
.export-ready-strip {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.export-ready-strip span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.export-ready-strip strong { font-size: 15px; }
.export-ready-strip small { color: var(--muted); font-size: 12px; }
.export-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.mini-export {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.warn-notice {
  border-color: #fed7aa;
  color: #7c2d12;
  background: #fff7ed;
}
.launch-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.launch-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6f4 100%);
  box-shadow: var(--shadow-sm);
}
.launch-hero-main {
  display: grid;
  align-content: center;
  min-height: 210px;
  padding: 16px;
}
.launch-hero-main h2 {
  max-width: 620px;
  margin: 0;
  font-size: 25px;
}
.launch-hero-main p {
  max-width: 640px;
  margin: 10px 0 0;
  color: var(--text);
}
.launch-action-lane {
  display: grid;
  gap: 9px;
}
.launch-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
}
.launch-action > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: white;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.launch-action.blocked > span { background: var(--amber); }
.launch-action.next > span { background: var(--blue); }
.launch-action strong { display: block; font-weight: 740; }
.launch-action p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.copy-grid, .gate-grid, .setup-helper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.setup-helper-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.smoke-grid, .route-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.route-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.smoke-card, .route-card {
  min-width: 0;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
}
.smoke-card:hover { color: var(--ink); border-color: rgba(15,118,110,.34); }
.smoke-card > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: white;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.smoke-card strong, .route-card strong {
  display: block;
  font-size: 15px;
  font-weight: 740;
  word-break: break-word;
}
.smoke-card p, .route-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.route-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.route-card.ready {
  border-color: rgba(15,118,110,.32);
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}
.copy-card, .gate-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.copy-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.copy-card code, .inline-code {
  display: block;
  max-width: 100%;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  white-space: normal;
  word-break: break-word;
}
.copy-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.inline-code { margin-top: 0; text-align: right; }
.gate-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 130px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.gate-card.ready { border-color: rgba(15,118,110,.32); }
.gate-card strong { font-size: 15px; }
.gate-card p { margin: 0; color: var(--muted); font-size: 12px; }
.gate-card em {
  align-self: end;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.gate-card.ready em { color: var(--accent); }
.launch-check {
  min-height: 142px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.launch-check.ready { border-color: rgba(15,118,110,.32); }
.launch-check div { display: flex; align-items: center; gap: 9px; }
.launch-check p { margin: 0; color: var(--muted); }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber);
}
.launch-check.ready .status-dot { background: var(--accent); }
.launch-step-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
}
.launch-step-list span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: white;
  background: var(--accent);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.launch-check[data-status="not tested"] .status-dot { background: #64748b; }
.launch-check[data-status="missing"] .status-dot { background: var(--red); }
.launch-check[data-status="not tested"] { border-color: #cbd5e1; }
.launch-check[data-status="missing"] { border-color: rgba(220,38,38,.3); }
.launch-step-list p { margin: 3px 0 0; color: var(--text); }
.launch-step-list code {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}
.checklist-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.checklist-strip span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.feedback-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.feedback-row:first-of-type { border-top: 0; }
.feedback-row p { margin: 5px 0; color: var(--text); }
.feedback-row span { color: var(--muted); font-size: 12px; }
.command-list {
  display: grid;
  gap: 8px;
}
.command-list code {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
}
.command-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.command-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.command-card strong { display: block; font-weight: 740; }
.command-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.command-card code {
  display: block;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #e2e8f0;
  background: #0f172a;
  font-size: 12px;
  white-space: normal;
  word-break: break-word;
}
.inline-log-form {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.compact-log-form {
  grid-template-columns: minmax(0, 1fr) auto;
}
.inline-role-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 110px 110px auto;
  gap: 8px;
  align-items: end;
  margin: 0 0 8px;
}
.inline-role-form strong {
  align-self: center;
  font-size: 13px;
}
.beta-tester-grid,
.accountant-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.beta-tester-grid div,
.handoff-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.beta-tester-grid strong,
.handoff-card strong {
  display: block;
  color: var(--text);
  font-weight: 780;
}
.beta-tester-grid span,
.handoff-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.handoff-card.ready {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
}
.handoff-card small {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.field-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important;
}
.code-block {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  white-space: pre-wrap;
  overflow-x: auto;
}
.packet-card strong, .packet-card span { display: block; }
.packet-card span { color: var(--muted); margin-top: 4px; }
.history-group { margin-top: 10px; }
.history-group-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.change-table .table-head, .change-table .table-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 0 0;
}
.report-status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.status-chip {
  min-width: 0;
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.status-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}
.status-chip strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 20px;
  font-weight: 760;
}
.status-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.quick-hint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.quick-handoff-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
}
.quick-handoff-panel strong,
.quick-handoff-panel span {
  display: block;
}
.quick-handoff-panel span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.review-focus-action {
  grid-column: span 2;
}
.attention-action {
  border-color: #fde68a;
  background: #fffbeb;
}
.drive-reminder-row {
  margin: 0 0 18px;
}
.accountant-handoff-panel {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
}
.odometer-hero {
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}
.launch-map {
  position: sticky;
  top: 72px;
  z-index: 3;
  padding: 8px 0;
  background: var(--bg);
}
.quick-hint-row .pill {
  max-width: 100%;
  white-space: normal;
}
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.pagination-bar .button-link {
  min-width: 86px;
}
.pagination-bar > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.dashboard-status-row {
  margin-top: 10px;
}
.action-list {
  display: grid;
  gap: 8px;
}
.action-list a {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.action-list a:first-child { border-top: 0; }
.action-list a:hover strong { color: var(--accent); }
.action-list span {
  color: var(--muted);
  font-size: 12px;
}
.compact-action-list {
  margin-top: 8px;
}
.launch-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.launch-footnote {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.launch-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}
.launch-summary-item {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.launch-summary-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.launch-summary-item strong {
  font-size: 18px;
  font-weight: 780;
}
.launch-summary-item small {
  color: var(--muted);
  font-size: 11px;
}
.cost-command-panel, .feedback-command-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
  gap: 14px;
  align-items: stretch;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #eef6f4);
  box-shadow: var(--shadow-sm);
}
.cost-command-panel h2, .feedback-command-panel h2 {
  margin: 0;
  font-size: 24px;
}
.cost-command-panel p, .feedback-command-panel p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--text);
}
.cost-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.cost-kpi-grid div {
  display: grid;
  align-content: center;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
}
.cost-kpi-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cost-kpi-grid strong {
  margin-top: 5px;
  font-size: 21px;
  font-weight: 780;
}
.quick-cost-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.quick-cost-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: space-between;
  min-height: 148px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.quick-cost-card strong { display: block; font-size: 15px; }
.quick-cost-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.quick-cost-card button { width: 100%; }
.quick-cost-card.tracked {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
}
.quick-cost-card button:disabled {
  cursor: default;
  color: #166534;
  border-color: #bbf7d0;
  background: #dcfce7;
}
.cost-editor-list {
  display: grid;
  gap: 10px;
}
.cost-editor-card {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) repeat(5, minmax(110px, .8fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.cost-editor-card .wide {
  grid-column: 1 / -1;
}

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar, .topbar { display: none; }
  .active-drive-banner {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 14px;
  }
  .mobile-topbar {
    display: grid;
    position: sticky;
    top: 0;
    z-index: 6;
    gap: 9px;
    padding: calc(9px + env(safe-area-inset-top)) 14px 8px;
    border-bottom: 1px solid rgba(15,23,42,.95);
    background: rgba(16,24,32,.98);
    box-shadow: 0 8px 24px rgba(15,23,42,.16);
  }
  .mobile-topbar .brand-block { min-width: 0; border-bottom: 0; padding: 0; }
  .mobile-topbar .brand { font-size: 21px; }
  .mobile-nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 8px;
    color: rgba(255,255,255,.82);
    background: rgba(255,255,255,.055);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
  }
  .mobile-nav a.active {
    color: white;
    border-color: rgba(20,184,166,.55);
    background: rgba(20,184,166,.28);
  }
  .mobile-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 6px;
    border: 1px solid rgba(15,23,42,.18);
    border-radius: 8px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 14px 40px rgba(15,23,42,.18);
    backdrop-filter: blur(14px);
  }
  .mobile-dock a {
    min-width: 0;
    min-height: 50px;
    display: grid;
    place-items: center;
    gap: 2px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 760;
  }
  .mobile-dock a span {
    display: grid;
    place-items: center;
    min-width: 25px;
    min-height: 20px;
    border-radius: 6px;
    background: #f3f4f6;
    color: var(--ink);
    font-size: 10px;
  }
  .mobile-dock a.active {
    color: white;
    background: var(--accent);
  }
  .mobile-dock a.active span { color: white; }
  .mobile-home-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .active-trip-card {
    grid-template-columns: 1fr;
  }
  .mobile-home-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .mobile-home-actions > * {
    width: 100%;
  }
  .drive-card,
  .drive-route-card {
    grid-template-columns: 1fr;
  }
  .drive-main-button {
    width: 100%;
  }
  .drive-more-panel > .drive-card,
  .drive-more-panel > .notice,
  .drive-more-panel > .row-actions {
    margin-inline: 14px;
  }
  .drive-more-panel > :last-child {
    margin-bottom: 14px;
  }
  .command-center { grid-template-columns: 1fr; }
  .page-head, .page-head.inline { display: grid; align-items: start; }
  .page-head .row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
  .page-head .row-actions > * { width: 100%; }
  .command-main { overflow: hidden; }
}
@media (max-width: 860px) {
  body { font-size: 14px; }
  .page { padding: 18px 14px calc(104px + env(safe-area-inset-bottom)); }
  .page-head .row-actions { grid-template-columns: 1fr; }
  h1 { font-size: 27px; }
  .command-center, .panel-header, .row-actions, .launch-footer {
    grid-template-columns: 1fr;
  }
  .data-row .row-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .data-row .row-actions > * { width: 100%; }
  .workflow-hero {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .workflow-hero h2 { font-size: 20px; }
  .workflow-hero .button-link { width: 100%; }
  .drive-shell {
    gap: 12px;
  }
  .drive-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 58%, #ecfeff 100%);
  }
  .drive-hero h1 {
    font-size: 34px;
  }
  .drive-hero p:not(.kicker) {
    margin-bottom: 0;
  }
  .drive-status-grid, .drive-card, .drive-route-card {
    grid-template-columns: 1fr;
  }
  .drive-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .drive-status-grid div {
    min-height: 74px;
    padding: 9px;
  }
  .drive-status-grid span {
    font-size: 10px;
  }
  .drive-status-grid strong {
    font-size: 12px;
  }
  .drive-card {
    padding: 16px;
  }
  .drive-readiness-list {
    justify-content: flex-start;
  }
  .drive-active-copy strong {
    font-size: 68px;
  }
  .drive-main-button {
    width: 100%;
    min-height: 128px;
    font-size: 22px;
  }
  .drive-route-card {
    gap: 12px;
  }
  .drive-route-fields {
    grid-template-columns: 1fr;
  }
  .drive-automation-grid {
    gap: 12px;
  }
  .drive-details-panel {
    padding: 0;
    overflow: hidden;
  }
  .drive-details-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 14px;
    color: var(--ink);
    cursor: pointer;
    font-weight: 760;
    list-style: none;
  }
  .drive-details-panel summary::-webkit-details-marker { display: none; }
  .drive-details-panel summary small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
  }
  .drive-details-panel > :not(summary) {
    margin-inline: 14px;
  }
  .drive-details-panel > :last-child {
    margin-bottom: 14px;
  }
  .mobile-home {
    gap: 14px;
  }
  .mobile-home-hero {
    padding: 16px;
  }
  .mobile-home-hero h1 {
    font-size: 30px;
  }
  .start-drive-button {
    min-height: 58px;
  }
  .quick-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .quick-status-card {
    min-height: 88px;
    padding: 11px;
  }
  .quick-status-card strong {
    font-size: 24px;
  }
  .simple-section-header {
    align-items: start;
  }
  .trip-lite-card {
    grid-template-columns: 1fr;
  }
  .trip-lite-card > div:last-child {
    grid-template-columns: 1fr auto;
    justify-items: start;
    align-items: center;
  }
  .dashboard-details summary {
    padding: 14px;
  }
  .dashboard-details > :not(summary) {
    margin-inline: 14px;
  }
  .mobile-tool-grid {
    grid-template-columns: 1fr 1fr;
    margin-inline: 14px;
  }
  .review-tools-panel > section,
  .review-tools-panel > div,
  .review-tools-panel > p {
    margin-inline: 14px;
  }
  .review-tools-panel .workflow-hero,
  .review-tools-panel .quick-handoff-panel {
    padding: 12px;
  }
  .quick-preset-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .command-center { gap: 14px; }
  .command-main, .command-side { min-width: 0; }
  .action-stack { gap: 8px; }
  .action-card { min-height: 0; }
  .summary-strip { gap: 8px; }
  .summary-item { min-height: 0; padding: 10px; }
  .summary-item strong { font-size: 18px; }
  .panel-header { gap: 4px; }
  .panel, .form-panel, .list-panel {
    padding: 14px;
    margin-bottom: 14px;
  }
  .provider-grid { grid-template-columns: 1fr; }
  .provider-status { padding: 12px; }
  .feedback-row { grid-template-columns: 1fr; gap: 10px; }
  .feedback-row .row-actions { align-items: flex-start; }
  .feedback-row .row-actions form { width: 100%; }
  .feedback-row .row-actions button, .feedback-row .row-actions a { width: 100%; }
  .launch-hero-panel { grid-template-columns: 1fr; padding: 12px; }
  .launch-hero-main { min-height: 0; padding: 6px; }
  .launch-hero-main h2 { font-size: 21px; }
  .copy-grid, .gate-grid, .setup-helper-grid, .smoke-grid, .route-card-grid, .command-card-grid, .launch-summary-strip, .quick-cost-grid, .decision-grid, .quick-filter-grid, .beta-tester-grid, .accountant-check-grid { grid-template-columns: 1fr; }
  .inline-code { width: 100%; text-align: left; }
  .cost-command-panel, .feedback-command-panel {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .cost-command-panel h2, .feedback-command-panel h2 { font-size: 21px; }
  .cost-kpi-grid { grid-template-columns: 1fr 1fr; }
  .inline-log-form, .compact-log-form, .cost-editor-card, .inline-role-form {
    grid-template-columns: 1fr;
  }
  .launch-check { padding: 12px; }
  .launch-board { gap: 10px; }
  .section-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .section-tabs::-webkit-scrollbar { display: none; }
  .section-tab { white-space: nowrap; }
  .filter-bar {
    gap: 10px;
    padding: 12px;
  }
  .filter-bar button,
  .filter-bar .button-link {
    width: 100%;
  }
  .panel-grid, .split, .trip-entry-shell, .capture-console, .packet-workbench, .metrics, .stats, .summary-strip, .action-stack, .grid-form, .setup-steps, .review-command, .filter-bar, .packet-card, .export-grid, .launch-board, .checklist-strip {
    grid-template-columns: 1fr;
  }
  .detail-grid { grid-template-columns: 1fr; }
  .report-status-row, .executive .summary-strip { grid-template-columns: 1fr; }
  .change-table .table-head, .change-table .table-row { grid-template-columns: 1fr; }
  .route-fields { grid-template-columns: 1fr; }
  .launch-step-list { grid-template-columns: 1fr; gap: 6px; }
  .launch-step-list span {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
  }
  .dashboard-status-row .status-chip { min-height: 0; }
  .status-chip strong { font-size: 18px; }
  .modern-table { border: 0; gap: 8px; overflow: visible; }
  .table-head { display: none; }
  .table-row {
    grid-template-columns: 1fr;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  .trip-table .table-row:first-of-type { border-top: 1px solid var(--line); }
  .table-row > span {
    min-width: 0;
  }
  .table-actions {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }
  .table-actions > .button-link,
  .table-actions > button,
  .table-actions > form {
    width: 100%;
  }
  .command-main { min-height: 0; }
  .trip-inspector, .bulk-bar { position: static; }
  .review-card {
    grid-template-columns: auto 1fr;
    align-items: start;
    padding: 12px;
  }
  .review-card .row-actions {
    grid-column: 1 / -1;
  }
  .row, .data-row, .trip-row, .feedback-row { align-items: flex-start; grid-template-columns: 1fr; flex-direction: column; }
  .launch-footer, .row-actions { flex-wrap: wrap; }
  .mobile-safe-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
  .mobile-safe-actions > *,
  .mobile-safe-actions button,
  .mobile-safe-actions a,
  .mobile-safe-actions form {
    width: 100%;
  }
  .packet-card, .export-cta-card {
    grid-template-columns: 1fr;
  }
  .packet-card button,
  .mini-export button {
    width: 100%;
  }
  .bulk-bar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .quick-cost-card { min-height: 0; }
  .quick-hint-row { gap: 6px; }
  .quick-hint-row .pill { font-size: 11px; }
  .pagination-bar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .pagination-bar .row-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
  }
  .pagination-bar .row-actions .pill {
    justify-content: center;
  }
  .review-card { gap: 10px; }
}

@media (max-width: 430px) {
  .mobile-nav a { padding-inline: 9px; }
  .mobile-dock {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
  }
  .mobile-dock a {
    min-height: 48px;
    font-size: 10px;
  }
  .mobile-home-actions {
    grid-template-columns: 1fr;
  }
  .mobile-tool-grid {
    grid-template-columns: 1fr;
  }
  .quick-status-card {
    padding: 10px 8px;
  }
  .quick-status-card span {
    font-size: 10px;
  }
  .quick-status-card strong {
    font-size: 21px;
  }
  .table-actions,
  .pagination-bar .row-actions {
    grid-template-columns: 1fr;
  }
  .mini-metrics,
  .cost-kpi-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .summary-item:hover, .step-card:hover, .status-chip:hover, .action-card:hover, .review-card:hover {
    transform: none !important;
  }
}
