/* Truck On · Fuel & IFTA — matches HOS logger tokens */

:root {
  --navy: #0B355C;
  --navy-2: #0A2B49;
  --sky: #3E9EE0;
  --sky-2: #5FB3EE;
  --cream: #FBFAF6;
  --cream-2: #F3EFE5;
  --line: #E4DFD1;
  --line-2: #D9D2BE;
  --ink: #16233A;
  --ink-2: #4C5A70;
  --ink-3: #7B8798;
  --white: #FFFFFF;
  --danger: #B42318;
  --warn: #B45309;
  --good: #157F3A;
  --shadow-sm: 0 1px 2px rgba(11,53,92,0.06);
  --shadow-md: 0 4px 14px rgba(11,53,92,0.10);
  --shadow-lg: 0 12px 28px rgba(11,53,92,0.16);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, #F0EDDF 0%, #E7E0CB 100%);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2') format('woff2'); }

.phone-shell {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-lg);
}

/* Top bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 12px;
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 20;
}
.icon-btn {
  background: transparent;
  border: none;
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 120ms;
}
.icon-btn:hover, .icon-btn:focus-visible {
  background: rgba(255,255,255,0.15);
  outline: none;
}
.icon-btn[hidden] { display: none; }
.top-bar-title {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.top-bar-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--sky-2);
}
.top-bar-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Screen */
.screen {
  flex: 1;
  padding: 16px 14px 24px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Action bar */
.action-bar {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--cream);
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  box-shadow: 0 -2px 10px rgba(11,53,92,0.06);
}
.action-bar[hidden] { display: none; }
.action-bar .btn { flex: 1; }
.action-bar .btn[hidden] { display: none; }
#action-primary[hidden], #action-secondary[hidden] { display: none; }

/* Buttons */
.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 100ms, box-shadow 120ms, background 120ms, color 120ms;
  letter-spacing: 0.01em;
  min-height: 46px;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--navy-2);
  box-shadow: var(--shadow-md);
  outline: none;
}
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line-2);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--cream-2);
  outline: none;
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid rgba(180,35,24,0.35);
}
.btn-danger:hover { background: rgba(180,35,24,0.06); }
.btn-sm { padding: 8px 12px; font-size: 13px; min-height: 34px; border-radius: 8px; }
.btn-block { display: block; width: 100%; }

/* Hero card (quarter picker + KPIs) */
.hero-card {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}
.hero-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sky-2);
  margin-bottom: 8px;
}
.quarter-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.quarter-nav-btn {
  background: rgba(255,255,255,0.10);
  border: none;
  color: var(--white);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
  transition: background 120ms;
}
.quarter-nav-btn:hover:not(:disabled) { background: rgba(255,255,255,0.20); }
.quarter-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.quarter-nav-label {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.quarter-nav-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--sky-2);
  margin-top: 2px;
  opacity: 0.85;
}
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kpi {
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.10);
}
.kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--sky-2);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 4px;
}
.kpi-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.kpi-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}
.kpi-owed .kpi-value.negative { color: var(--sky-2); }
.kpi-owed .kpi-value.positive { color: #FFB3AB; }

/* CTA card row */
.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.cta-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  transition: transform 120ms, box-shadow 120ms, border-color 120ms;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  font-family: inherit;
}
.cta-card:hover, .cta-card:focus-visible {
  border-color: var(--sky);
  box-shadow: var(--shadow-md);
  outline: none;
  transform: translateY(-1px);
}
.cta-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--cream-2);
  display: grid;
  place-items: center;
  color: var(--navy);
}
.cta-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.cta-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.35;
}

.cta-block {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  transition: transform 120ms, box-shadow 120ms, border-color 120ms;
  color: var(--ink);
  font-family: inherit;
  width: 100%;
  margin-bottom: 10px;
}
.cta-block:hover { border-color: var(--sky); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.cta-block .cta-icon { flex: none; }
.cta-block .cta-body { flex: 1; }
.cta-block .cta-arrow { flex: none; color: var(--ink-3); }

/* Section headings */
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin: 18px 4px 8px;
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
.card-sub {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.45;
  margin-bottom: 10px;
}
.card p {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.card p:last-child { margin-bottom: 0; }
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.field-row .field { margin-bottom: 0; }
.field-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.field-label .req { color: var(--danger); margin-left: 2px; }
input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="tel"],
textarea,
select {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 12px;
  border: 1.5px solid var(--line-2);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  min-height: 44px;
  min-width: 0;
  width: 100%;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}
input[type="date"],
input[type="datetime-local"] {
  font-size: 14px;
  padding: 12px 10px;
}
textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.4;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(62,158,224,0.18);
}
.field-hint {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.35;
  margin-top: 2px;
}
.field-error {
  font-size: 11.5px;
  color: var(--danger);
  margin-top: 2px;
}

/* File upload zone */
.file-drop {
  border: 1.5px dashed var(--line-2);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
  background: var(--cream);
}
.file-drop:hover {
  border-color: var(--sky);
  background: var(--cream-2);
}
.file-drop.has-file {
  padding: 10px;
  border-style: solid;
  background: var(--white);
}
.file-drop-icon {
  color: var(--navy);
  margin-bottom: 6px;
}
.file-drop-text {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.4;
}
.file-drop-hint {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}
.file-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}
.file-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  cursor: pointer;
}
.file-info { flex: 1; min-width: 0; }
.file-info-name { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-info-status { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.file-remove {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--danger);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* OCR status */
.ocr-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(62,158,224,0.10);
  border: 1px solid rgba(62,158,224,0.30);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--navy);
  margin-bottom: 12px;
}
.ocr-status .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--sky);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}
.ocr-status .checkmark {
  color: var(--good);
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ocr-hint {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.4;
  margin-top: 4px;
  padding: 6px 10px;
  background: rgba(62,158,224,0.06);
  border-radius: 6px;
}
.ocr-hint strong { color: var(--navy); }

/* Log list */
.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: border-color 120ms, box-shadow 120ms;
}
.log-item:hover {
  border-color: var(--sky);
  box-shadow: var(--shadow-sm);
}
.log-item-state {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.log-item-state.non-ifta { background: var(--ink-3); }
.log-item-state.surcharge { background: var(--warn); }
.log-item-body { min-width: 0; }
.log-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.log-item-sub {
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.log-item-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  font-feature-settings: 'tnum' 1;
  text-align: right;
}
.log-item-amount-sub {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}
.log-item .paperclip {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 4px;
  color: var(--sky);
}

/* Empty state */
.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-3);
}
.empty-icon { color: var(--line-2); margin-bottom: 8px; }
.empty-title { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.empty-sub { font-size: 12.5px; line-height: 1.45; margin-bottom: 12px; }

/* Report table */
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}
.report-table thead {
  background: var(--cream-2);
}
.report-table th {
  text-align: left;
  padding: 8px 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
}
.report-table th.num, .report-table td.num { text-align: right; }
.report-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.report-table tr.surcharge-row {
  background: rgba(180,83,9,0.04);
}
.report-table tr.surcharge-row td {
  font-style: italic;
  color: var(--warn);
  font-size: 11.5px;
}
.report-table tfoot td {
  padding: 10px 6px;
  font-weight: 700;
  border-top: 2px solid var(--navy);
  border-bottom: none;
  color: var(--navy);
  font-size: 13px;
}
.report-table td.pos { color: var(--danger); font-weight: 600; }
.report-table td.neg { color: var(--good); font-weight: 600; }
.report-table td.zero { color: var(--ink-3); }
.report-table .state-name { font-weight: 500; }
.report-table .state-code { color: var(--ink-3); font-size: 11px; margin-left: 2px; }

.table-wrap { overflow-x: auto; margin: 0 -14px 12px; padding: 0 14px; }

/* Miles input modes */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--cream-2);
  border-radius: 10px;
  margin-bottom: 14px;
}
.mode-tab {
  background: transparent;
  border: none;
  padding: 9px 4px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: 7px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
  text-align: center;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.mode-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.mode-hint {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--cream);
  border-radius: 8px;
  margin-bottom: 14px;
}

/* State miles list */
.state-miles-list {
  display: grid;
  gap: 8px;
}
.state-miles-row {
  display: grid;
  grid-template-columns: 46px 1fr 100px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.state-miles-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.state-miles-name {
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.state-miles-row input {
  padding: 8px 10px;
  min-height: 36px;
  font-size: 14px;
  text-align: right;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,53,92,0.55);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 150ms ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--cream);
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--navy); }
.modal-close {
  background: transparent;
  border: none;
  color: var(--ink-3);
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
}
.modal-close:hover { background: var(--cream-2); color: var(--ink); }
.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}
.modal-body pre {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-family: 'SF Mono', Consolas, 'Courier New', monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  background: var(--white);
}
.modal-footer .btn { flex: 1; }

/* Image lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11,35,58,0.95);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  max-width: 90%;
  text-align: center;
  animation: toast-in 200ms ease;
}
@keyframes toast-in { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Chips / badges */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--cream-2);
  color: var(--ink-2);
}
.chip.warn { background: rgba(180,83,9,0.12); color: var(--warn); }
.chip.good { background: rgba(21,127,58,0.10); color: var(--good); }
.chip.info { background: rgba(62,158,224,0.14); color: var(--navy); }

/* Callout */
.callout {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(62,158,224,0.08);
  border-left: 3px solid var(--sky);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.45;
}
.callout.warn { background: rgba(180,83,9,0.08); border-left-color: var(--warn); }
.callout.danger { background: rgba(180,35,24,0.08); border-left-color: var(--danger); }
.callout-icon { flex: none; color: var(--sky); }
.callout.warn .callout-icon { color: var(--warn); }
.callout.danger .callout-icon { color: var(--danger); }

/* Divider */
.divider {
  height: 1px;
  background: var(--line);
  margin: 14px -14px;
}

/* Print styles */
@media print {
  body { background: white; margin: 0; }
  .phone-shell { max-width: 100%; box-shadow: none; }
  .top-bar, .action-bar, #settings-btn, #back-btn, .cta-row, .card-actions, .modal-overlay { display: none !important; }
  .screen { overflow: visible; padding: 24px 32px; }
  .hero-card { background: white; color: var(--navy); border: 2px solid var(--navy); }
  .hero-card * { color: var(--navy) !important; }
  .kpi { background: white; border-color: var(--line); }
  .card { box-shadow: none; border-color: var(--line); page-break-inside: avoid; }
  .report-table { font-size: 11px; }
  .report-table thead { background: var(--cream-2); }
}

/* Filing due banner (inside hero card) */
.filing-due {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-block;
  color: white;
}
.filing-due.due-overdue { background: rgba(220, 90, 90, 0.35); border: 1px solid rgba(255,180,180,0.45); }
.filing-due.due-soon { background: rgba(240, 180, 60, 0.32); border: 1px solid rgba(255,220,140,0.5); }
.filing-due.due-upcoming { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); }
.filing-due.due-far { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.75); }

/* Cross-tool sanity card */
.cross-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 8px;
}
.cross-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.cross-row:last-child { border-bottom: none; }
.cross-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(62,158,224,0.12);
  color: var(--sky);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.cross-body { flex: 1; min-width: 0; }
.cross-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cross-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.cross-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  flex: none;
}
.cross-badge.match { background: rgba(34,139,34,0.12); color: var(--good); }
.cross-badge.close { background: rgba(240,180,40,0.15); color: var(--warn); }
.cross-badge.diff { background: rgba(180,35,24,0.10); color: var(--danger); }

/* Additions for Rate load allocation modal */
.modal-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; margin-bottom: 4px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

/* ==== Expenses & Receipts additions ==== */

/* Hero variant with no big metric (used by view screen) */
.hero-plain { }

/* Cross-tool sync card */
.crosstool-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 0;
  margin-bottom: 12px;
}
.crosstool-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.crosstool-row:last-child { border-bottom: none; }
.crosstool-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream-2);
  border-radius: 8px;
  color: var(--ink);
}
.crosstool-body { flex: 1; min-width: 0; }
.crosstool-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.crosstool-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.sync-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}
.sync-badge.sync-on { background: rgba(21, 127, 58, 0.14); color: var(--good); }
.sync-badge.sync-off { background: var(--cream-2); color: var(--ink-3); }
.sync-badge.sync-partial { background: rgba(180, 83, 9, 0.14); color: var(--warn); }
.sync-badge.sync-info { background: rgba(62, 158, 224, 0.14); color: var(--sky); }

/* OCR preview */
.ocr-preview {
  background: var(--cream-2);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 14px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ocr-preview.empty { min-height: 200px; }
.ocr-preview-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--ink-3);
  font-size: 13px;
}
.ocr-preview-img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
}
.ocr-status {
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
  padding: 10px 4px 14px;
}
.ocr-text {
  background: var(--cream-2);
  padding: 12px;
  border-radius: 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
  margin: 0 0 14px;
}

/* Form stacks */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.field { display: block; }
.field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  box-sizing: border-box;
}
.input:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 2px rgba(62, 158, 224, 0.2);
}
.input-slim { padding: 9px 12px; font-size: 13.5px; }

/* Calc card - shows live derived values */
.calc-card {
  background: var(--cream-2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}
.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: 14px;
  color: var(--ink);
}
.calc-row.calc-sub {
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.calc-row strong.positive { color: var(--good); }
.calc-row strong { font-weight: 700; }

/* Toggle row */
.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}
.toggle-input {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  accent-color: var(--sky);
  flex-shrink: 0;
}
.toggle-body { flex: 1; }
.toggle-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.toggle-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.4; }

/* Wide CTA variant for danger */
.wide-cta-danger {
  border-color: rgba(180, 35, 24, 0.3);
  background: rgba(180, 35, 24, 0.04);
  color: var(--danger);
}
.wide-cta-danger .wide-cta-title { color: var(--danger); }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  background: var(--cream-2);
  border: 1px solid transparent;
  color: var(--ink-3);
  padding: 6px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.chip:hover { color: var(--ink); }
.chip.chip-on {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* Summary strip */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--cream-2);
  border-radius: 12px;
  padding: 12px 8px;
  margin-bottom: 12px;
}
.summary-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-align: center;
}
.summary-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Report table */
.report-table {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.report-row:last-child { border-bottom: none; }
.report-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.report-row-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 3px;
  line-height: 1.3;
}
.report-row-amt {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.report-row-amt-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 2px;
}
.report-row-total {
  background: var(--cream-2);
  font-weight: 800;
}
.report-row-total .report-row-title { font-weight: 800; color: var(--navy); }
.report-row-flex { display: flex; align-items: center; gap: 10px; }
.cat-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Detail list */
.detail-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.detail-row:last-child { border-bottom: none; }
.detail-k { font-size: 13px; color: var(--ink-3); }
.detail-v { font-size: 13.5px; color: var(--ink); font-weight: 600; text-align: right; }

/* Log item amount (right rail) */
.log-item-amt {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.log-item-amt-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 2px;
}

/* Btn danger */
.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover { background: #8B1B12; }
.btn-danger-outline {
  border-color: rgba(180, 35, 24, 0.4);
  color: var(--danger);
}

/* Link-style button */
.btn-link {
  background: transparent;
  border: none;
  color: var(--sky);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* Data ops row */
.sync-ops {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

/* Expenses: two-column CTA grid (alias for cta-row) */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.cta-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.cta-primary .cta-title, .cta-primary .cta-sub { color: var(--white); }
.cta-primary .cta-sub { color: rgba(255,255,255,0.72); }
.cta-primary .cta-icon {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.cta-primary:hover, .cta-primary:focus-visible {
  border-color: var(--sky);
  box-shadow: 0 4px 14px rgba(11, 27, 61, 0.35);
}

/* Empty state (alias for .empty with modern name) */
.empty-state {
  padding: 24px 12px 8px;
  text-align: center;
  color: var(--ink-3);
}
.empty-state .empty-icon {
  color: var(--line-2);
  margin: 0 auto 10px;
  display: inline-flex;
}
.empty-state .empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.empty-state .empty-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 320px;
  margin: 0 auto 14px;
}

/* ==== Per Diem Tracker additions ==== */

/* Active trip banner */
.active-trip {
  width: 100%;
  display: block;
  text-align: left;
  background: linear-gradient(135deg, rgba(21,127,58,0.10), rgba(1,105,111,0.10));
  border: 1px solid rgba(21,127,58,0.25);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: transform 120ms, box-shadow 120ms;
}
.active-trip:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.active-trip-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--good);
  margin-bottom: 6px;
}
.active-trip-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(21,127,58,0.18);
  display: inline-block;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(21,127,58,0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(21,127,58,0.05); }
}
.active-trip-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.active-trip-sub {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 3px;
  line-height: 1.4;
}

/* Trip title inside hero */
.trip-title-hero {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
  margin: 2px 0 2px;
}

/* KPI mini pair inside/below hero */
.kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.kpi-mini {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 10px 12px;
}
.kpi-mini-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.7);
}
.kpi-mini-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.kpi-mini-sub {
  font-size: 11.5px;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

/* ============================================================
   Maintenance Log — additional design tokens
   ============================================================ */

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin: 18px 0 8px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 18px 0 8px;
}
.section-header .section-label { margin: 0; }
.section-block {
  margin-bottom: 8px;
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--sky);
  font-weight: 600;
  font-size: 12.5px;
  padding: 4px 6px;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn-block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  margin-top: 8px;
  background: var(--cream-2);
  border-radius: var(--radius-sm);
}

/* Form controls */
.form-field { display: block; margin-bottom: 12px; }
.form-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.form-hint {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 5px;
  line-height: 1.4;
}
.form-input,
select.form-input,
textarea.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.form-input:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(62,158,224,0.15); }
.form-input-inline {
  display: inline-block;
  width: 110px;
  padding: 6px 10px;
  font-size: 13.5px;
  text-align: right;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.form-row .form-field { margin-bottom: 0; }
textarea.form-input { resize: vertical; min-height: 76px; }

/* Chip row (form) */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-row .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--cream-2);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.chip-row .chip:hover { color: var(--ink); }
.chip-row .chip.chip-active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.chip-row .chip.chip-active svg { color: var(--white); }

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex: none;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--line);
  border-radius: 999px;
  transition: 0.2s;
}
.switch-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch input:checked + .switch-slider { background: var(--sky); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

/* Sync card */
.sync-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.sync-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
}
.sync-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.sync-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
  padding-left: 24px;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 999px;
  text-transform: uppercase;
}
.pill-teal { background: rgba(1,105,111,0.14); color: #016B71; }
.pill-teal-outline {
  background: transparent;
  color: #016B71;
  border: 1px solid rgba(1,105,111,0.35);
}
.pill-muted { background: var(--cream-2); color: var(--ink-3); }

/* Category badge (icon in circle) */
.cat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: none;
}

/* Detail row (clickable list item) */
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.detail-list .detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.12s, transform 0.12s, border-color 0.12s;
}
.detail-row-clickable {
  cursor: pointer;
}
.detail-row-clickable:hover {
  border-color: var(--sky);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.detail-row-body {
  flex: 1;
  min-width: 0;
}
.detail-row-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  word-wrap: break-word;
}
.detail-row-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
  line-height: 1.4;
}
.detail-row-right {
  text-align: right;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.detail-row-amount {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
}

/* KV rows (label/value pair) */
.kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.kv-label {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
}
.kv-value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  word-wrap: break-word;
  max-width: 60%;
}

/* Alert banner */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow 0.12s, transform 0.12s;
  margin-bottom: 4px;
}
.alert-banner:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.alert-banner-overdue {
  background: rgba(180,35,24,0.08);
  border: 1px solid rgba(180,35,24,0.25);
}
.alert-banner-warn {
  background: rgba(180,83,9,0.10);
  border: 1px solid rgba(180,83,9,0.28);
}
.alert-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  position: relative;
  animation: pulseDot 2.4s ease-in-out infinite;
}
.alert-dot-red { background: var(--danger); }
.alert-dot-amber { background: var(--warn); }
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180,35,24,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(180,35,24,0); }
}
.alert-text { flex: 1; min-width: 0; }
.alert-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.alert-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
}
.alert-banner svg { color: var(--ink-3); flex: none; }

/* Progress bar */
.progress {
  height: 6px;
  background: var(--cream-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  background: var(--sky);
  border-radius: 999px;
  transition: width 0.3s;
}

/* Muted note */
.muted-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: var(--cream-2);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.muted-note svg { flex: none; color: var(--sky); margin-top: 2px; }
.muted-note strong { color: var(--ink); font-weight: 700; }
.muted-note a { color: var(--sky); text-decoration: underline; }
.muted-note + .muted-note { margin-top: 8px; }

/* Summary strip (list header) */
.summary-strip {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: var(--cream-2);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.summary-block {
  flex: 1;
  min-width: 0;
}
.summary-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.summary-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
  font-variant-numeric: tabular-nums lining-nums;
}

/* Search input */
.search-input {
  margin-bottom: 8px;
}

/* Danger outline btn */
.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(180,35,24,0.25);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
}
.btn-danger-outline:hover {
  background: rgba(180,35,24,0.06);
}

/* Preview card (in service form) */
.preview-card {
  margin-top: 16px;
  padding: 14px;
  background: var(--white);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}
.preview-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.preview-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink);
}
.preview-line strong { font-weight: 700; color: var(--navy); }
.preview-line-muted {
  color: var(--ink-3);
  font-size: 12.5px;
  padding-top: 6px;
  border-top: 1px dashed var(--line-2);
  margin-top: 4px;
}
.preview-line-muted strong { color: var(--ink); }

/* CTA grid override to allow more items */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cta-card {
  cursor: pointer;
}
.cta-body { flex: 1; min-width: 0; }
.cta-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.cta-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.35; }
.cta-primary .cta-title,
.cta-primary .cta-sub { color: var(--white); }
.cta-primary .cta-sub { color: rgba(255,255,255,0.72); }

/* Empty state */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  background: var(--cream-2);
  border-radius: var(--radius);
}
.empty .empty-icon {
  color: var(--line-2);
  margin-bottom: 12px;
}
.empty .empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.empty .empty-sub {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
  max-width: 240px;
  margin: 0 auto 16px;
}

/* ============ Cashflow-specific ============ */
.cf-spark-wrap {
  margin-top: 12px;
  margin-bottom: 4px;
  padding: 0;
}
.cf-spark {
  display: block;
  overflow: visible;
}
.cf-chart-wrap {
  padding: 8px 4px 4px;
  background: var(--surface, #fbfaf6);
  border: 1px solid var(--border, #e4dfd1);
  border-radius: 12px;
}
.cf-chart {
  display: block;
  overflow: visible;
}
.cf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  padding: 0 4px;
  font-size: 11px;
  color: #7b8798;
}
.cf-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cf-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 2px;
  border-radius: 1px;
}
.cf-legend-line { background: #0B355C; }
.cf-legend-threshold {
  background: transparent;
  border-top: 2px dashed #B45309;
  height: 0;
}
.cf-day-chip {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(180, 176, 162, 0.14);
  color: #28251d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1;
}
.cf-day-chip-mon {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7b8798;
  margin-bottom: 2px;
}
.cf-day-chip-num {
  font-size: 18px;
  font-weight: 700;
  color: #0B355C;
  font-variant-numeric: tabular-nums;
}
.cf-day-chip-neg {
  background: rgba(180, 35, 24, 0.12);
}
.cf-day-chip-neg .cf-day-chip-num { color: #B42318; }
.cf-day-chip-neg .cf-day-chip-mon { color: #B42318; }
.cf-day-chip-warn {
  background: rgba(180, 83, 9, 0.14);
}
.cf-day-chip-warn .cf-day-chip-num { color: #B45309; }
.cf-day-chip-warn .cf-day-chip-mon { color: #B45309; }
.cf-amt-in { color: #157f3a; font-variant-numeric: tabular-nums; font-weight: 700; }
.cf-amt-out { color: #B42318; font-variant-numeric: tabular-nums; font-weight: 700; }
.cf-bal-neg { color: #B42318; }
.cf-bal-low { color: #B45309; }
.cf-trend-icon, .cf-alert-icon {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 2px;
}
.kpi-mini-negative { color: #B42318; }
.kpi-mini-warn { color: #B45309; }

/* Cashflow: 3-up KPI row */
.hero-card .kpi-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.hero-card .kpi-mini {
  padding: 8px 10px;
}
.hero-card .kpi-mini-label {
  font-size: 8.5px;
  letter-spacing: 0.1em;
}
.hero-card .kpi-mini-value {
  font-size: 16px;
  margin-top: 2px;
}
.hero-card .kpi-mini-sub {
  font-size: 10.5px;
}

/* ============ Settlement-specific ============ */

/* Mode picker (first-run: driver vs fleet) */
.mode-hero {
  padding: 24px 20px 12px;
  text-align: center;
}
.mode-hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted, #7A7974);
  font-weight: 600;
  margin-bottom: 8px;
}
.mode-hero-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink, #28251D);
  margin-bottom: 8px;
}
.mode-hero-sub {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted, #7A7974);
  max-width: 320px;
  margin: 0 auto;
}
.mode-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 24px;
}
.mode-card {
  background: var(--surface, #F9F8F5);
  border: 1px solid var(--border, #D4D1CA);
  border-radius: 16px;
  padding: 20px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-align: left;
  width: 100%;
  display: block;
  font-family: inherit;
}
.mode-card:hover, .mode-card:focus-visible {
  border-color: var(--brand, #01696F);
  box-shadow: 0 4px 12px rgba(1, 105, 111, 0.08);
  transform: translateY(-1px);
  outline: none;
}
.mode-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(1, 105, 111, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand, #01696F);
  margin-bottom: 12px;
}
.mode-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink, #28251D);
  margin-bottom: 4px;
}
.mode-card-sub {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #7A7974);
  margin-bottom: 10px;
}
.mode-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted, #7A7974);
}
.mode-card-bullets li {
  padding: 3px 0 3px 16px;
  position: relative;
}
.mode-card-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand, #01696F);
  font-weight: 700;
}

/* Forms */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.chip-row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Settlement list items */
.stl-avatar-text {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(1, 105, 111, 0.12);
  color: var(--brand, #01696F);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.stl-load-badge, .stl-ded-badge, .stl-rmb-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stl-load-badge { background: rgba(1, 105, 111, 0.1); color: var(--brand, #01696F); }
.stl-ded-badge { background: rgba(161, 53, 68, 0.1); color: #A13544; }
.stl-rmb-badge { background: rgba(67, 122, 34, 0.1); color: #437A22; }

/* Settlement detail header */
.stl-detail-header {
  padding: 20px 20px 12px;
  text-align: center;
}
.stl-detail-week {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #7A7974);
  font-weight: 600;
  margin-bottom: 6px;
}

/* Inline input rows (carrier pay entry, etc.) */
.stl-inline-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface, #F9F8F5);
  border: 1px solid var(--border, #D4D1CA);
  border-radius: 12px;
  margin-bottom: 10px;
}
.stl-inline-input-label {
  flex: 1;
  font-size: 14px;
  color: var(--ink, #28251D);
  font-weight: 500;
}

/* KV right-aligned value */
.stl-kv-right {
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  color: var(--ink, #28251D);
}

/* Add-icon button */
.stl-add-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand, #01696F);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.stl-add-icon:hover { background: var(--brand-hover, #0C4E54); }

/* Template action row */
.stl-template-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Link-style danger button */
.link-btn-danger {
  background: none;
  border: none;
  color: #A13544;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  font-family: inherit;
}
.link-btn-danger:hover { text-decoration: underline; }

/* Colored pills */
.pill-red {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(161, 53, 68, 0.12);
  color: #A13544;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill-amber {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(150, 66, 25, 0.12);
  color: #964219;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Clickable sync/action row */
.sync-row-clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}
.sync-row-clickable:hover, .sync-row-clickable:focus-visible {
  background: rgba(1, 105, 111, 0.04);
  outline: none;
}

/* Alert banners */
.alert-banner-good, .alert-banner-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin: 0 16px 12px;
  font-size: 13px;
  font-weight: 500;
}
.alert-banner-good {
  background: rgba(67, 122, 34, 0.1);
  color: #2F5518;
  border: 1px solid rgba(67, 122, 34, 0.2);
}
.alert-banner-info {
  background: rgba(1, 105, 111, 0.08);
  color: var(--brand, #01696F);
  border: 1px solid rgba(1, 105, 111, 0.18);
}
.alert-dot-green, .alert-dot-muted {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.alert-dot-green { background: #437A22; }
.alert-dot-muted { background: var(--muted, #7A7974); }

/* ============ Statement overlay (print/PDF) ============ */
.stmt-overlay {
  position: fixed;
  inset: 0;
  background: #4a5568;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stmt-toolbar {
  flex: 0 0 auto;
  background: #0B355C;
  color: white;
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.stmt-close-btn, .stmt-print-btn {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}
.stmt-close-btn:hover, .stmt-print-btn:hover {
  background: rgba(255,255,255,0.25);
}
.stmt-print-btn {
  background: white;
  color: #0B355C;
  border-color: white;
}
.stmt-print-btn:hover {
  background: #E6EEF7;
}
.stmt-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
}
.stmt-page {
  max-width: 8.5in;
  margin: 0 auto;
  background: white;
  padding: 0.5in;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  min-height: 11in;
}

/* Statement content styles (scoped to .stmt-page) */
.stmt-page * { box-sizing: border-box; }
.stmt-page .brand { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #0B355C; padding-bottom: 12px; margin-bottom: 20px; }
.stmt-page .company { flex: 1; }
.stmt-page .company-name { font-size: 18px; font-weight: 800; color: #0B355C; letter-spacing: -0.01em; }
.stmt-page .company-meta { font-size: 11px; color: #4a5560; margin-top: 4px; line-height: 1.5; }
.stmt-page .title-block { text-align: right; }
.stmt-page .title { font-size: 22px; font-weight: 800; color: #0B355C; letter-spacing: -0.01em; }
.stmt-page .subtitle { font-size: 11px; color: #4a5560; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.stmt-page .summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 16px 0 20px; }
.stmt-page .summary-block h4 { margin: 0 0 6px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #4a5560; font-weight: 700; }
.stmt-page .summary-block .row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; }
.stmt-page .summary-block .row .k { color: #4a5560; }
.stmt-page .summary-block .row .v { font-weight: 600; }
.stmt-page .section-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #0B355C; margin: 20px 0 6px; border-bottom: 1px solid #ccc; padding-bottom: 4px; }
.stmt-page table { width: 100%; border-collapse: collapse; font-size: 11px; }
.stmt-page th, .stmt-page td { padding: 6px 8px; text-align: left; border-bottom: 1px solid #e5e5e5; }
.stmt-page th { background: #f5f7fa; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #4a5560; }
.stmt-page td.num, .stmt-page th.num { text-align: right; font-variant-numeric: tabular-nums; }
.stmt-page td.empty { text-align: center; color: #9ca3af; font-style: italic; padding: 12px 0; }
.stmt-page .note { color: #6b7280; font-size: 10px; }
.stmt-page .totals { margin-top: 20px; margin-left: auto; width: 55%; }
.stmt-page .totals .row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 12px; }
.stmt-page .totals .row.subtotal { border-top: 1px solid #ccc; margin-top: 4px; padding-top: 8px; font-weight: 600; }
.stmt-page .totals .row.net { border-top: 2px solid #0B355C; margin-top: 8px; padding-top: 10px; font-size: 16px; font-weight: 800; color: #0B355C; }
.stmt-page .footer { margin-top: 32px; padding-top: 12px; border-top: 1px solid #ccc; font-size: 10px; color: #6b7280; display: flex; justify-content: space-between; }
.stmt-page .sig-block { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.stmt-page .sig-line { border-top: 1px solid #333; padding-top: 4px; font-size: 10px; color: #4a5560; }

/* Print: hide everything except the statement page */
@media print {
  @page { size: letter; margin: 0.5in; }
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }
  /* Hide EVERYTHING by default */
  body > *:not(#stmt-overlay) { display: none !important; }
  /* Reveal only the statement overlay's page */
  .stmt-overlay {
    position: static !important;
    background: white !important;
    display: block !important;
    overflow: visible !important;
  }
  .stmt-toolbar { display: none !important; }
  .stmt-scroll {
    overflow: visible !important;
    padding: 0 !important;
  }
  .stmt-page {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
  }
}

/* ============================================================
   Warranty Financing — screens & components
   ============================================================ */

/* Form error state */
.form-error {
  color: #8B1B12;
  font-size: 12.5px;
  margin-top: 6px;
  font-weight: 500;
}
.form-field.has-error .form-input,
.form-field.has-error select.form-input {
  border-color: #B42318;
  background: #FFF5F4;
}

/* Progress bar */
.wf-progress {
  padding: 4px 4px 14px 4px;
  margin-bottom: 8px;
}
.wf-progress-track {
  height: 6px;
  border-radius: 6px;
  background: #E5EAF0;
  overflow: hidden;
}
.wf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0B355C 0%, #1E62A6 100%);
  border-radius: 6px;
  transition: width 220ms ease-out;
}
.wf-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12.5px;
  color: #465468;
}
.wf-progress-step { font-weight: 600; color: #0B355C; }
.wf-progress-pct { font-weight: 700; color: #0B355C; font-variant-numeric: tabular-nums; }

/* Hero */
.wf-hero { padding: 8px 4px 4px 4px; margin-bottom: 12px; }
.wf-hero-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6B7A8F;
  margin-bottom: 6px;
}
.wf-hero-title {
  font-size: 24px;
  font-weight: 700;
  color: #0B355C;
  margin: 0 0 6px 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.wf-hero-sub {
  font-size: 14.5px;
  color: #465468;
  margin: 0;
  line-height: 1.45;
}

/* Draft card */
.wf-draft-card {
  background: linear-gradient(135deg, #F4F8FC 0%, #E9F1F9 100%);
  border: 1px solid #D3E0EE;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
.wf-draft-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1E62A6;
  margin-bottom: 4px;
}
.wf-draft-title { font-size: 17px; font-weight: 700; color: #0B355C; margin-bottom: 4px; }
.wf-draft-sub { font-size: 13px; color: #465468; margin-bottom: 10px; }
.wf-draft-bar {
  height: 6px;
  background: #DDE7F1;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}
.wf-draft-fill {
  height: 100%;
  background: #0B355C;
  border-radius: 6px;
}
.wf-draft-actions { display: flex; flex-direction: column; gap: 8px; }

/* Start button spacing */
.wf-start-btn { margin: 8px 0 16px 0; }

/* Info cards on home */
.wf-info-card {
  background: #F7F9FC;
  border: 1px solid #E4EAF1;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.wf-info-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0B355C;
  margin: 0 0 10px 0;
}
.wf-info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.wf-info-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
}
.wf-info-item-t { font-weight: 600; color: #0B355C; }
.wf-info-item-s { color: #465468; }

/* Privacy pill */
.wf-privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: #F0F7F1;
  border: 1px solid #CFE3D2;
  border-radius: 12px;
  margin-bottom: 12px;
  color: #2A5432;
}
.wf-privacy-t { font-weight: 700; font-size: 13.5px; }
.wf-privacy-s { font-size: 12.5px; margin-top: 2px; color: #46704E; }

.wf-warn {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: #FEF7EE;
  border: 1px solid #F5D9A8;
  border-radius: 12px;
  margin-bottom: 12px;
  color: #6E4400;
  cursor: pointer;
}
.wf-warn-t { font-weight: 700; font-size: 13.5px; }
.wf-warn-s { font-size: 12.5px; margin-top: 2px; }

.wf-section { margin-bottom: 14px; }
.wf-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #6B7A8F;
  text-transform: uppercase;
  margin: 8px 0;
}
.wf-sub-row {
  padding: 10px 12px;
  border: 1px solid #E4EAF1;
  border-radius: 10px;
  margin-bottom: 6px;
  background: #fff;
}
.wf-sub-name { font-weight: 600; color: #0B355C; font-size: 14px; }
.wf-sub-meta { font-size: 12px; color: #6B7A8F; margin-top: 2px; }

/* Form section headers */
.wf-form-section {
  margin-bottom: 20px;
}
.wf-form-title {
  font-size: 20px;
  font-weight: 700;
  color: #0B355C;
  margin: 4px 0 6px 0;
  letter-spacing: -0.01em;
}
.wf-form-sub {
  font-size: 14px;
  color: #465468;
  margin: 0 0 16px 0;
}
.wf-form-sub-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #6B7A8F;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 18px 0 10px 0;
}
.wf-form-sub-title.wf-danger { color: #8B1B12; }

/* Driver-type picker grid */
.wf-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.wf-pick {
  border: 1.5px solid #D6DEE7;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 120ms ease;
  min-height: 68px;
}
.wf-pick:hover, .wf-pick:focus-visible { border-color: #1E62A6; }
.wf-pick.active {
  border-color: #0B355C;
  background: #E9F1F9;
  box-shadow: 0 0 0 2px rgba(11,53,92,0.10);
}
.wf-pick-t {
  font-weight: 700;
  color: #0B355C;
  font-size: 14px;
  margin-bottom: 3px;
}
.wf-pick-s { font-size: 12px; color: #6B7A8F; }

/* Term pill grid (warranty step) */
.wf-term-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0 4px 0;
}
.wf-term-pill {
  padding: 10px 4px;
  border: 1.5px solid #D6DEE7;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 120ms ease;
}
.wf-term-pill.active {
  border-color: #0B355C;
  background: #E9F1F9;
  box-shadow: 0 0 0 2px rgba(11,53,92,0.10);
}
.wf-term-mo { font-weight: 700; color: #0B355C; font-size: 13.5px; }
.wf-term-est { font-size: 11.5px; color: #6B7A8F; margin-top: 2px; font-variant-numeric: tabular-nums; }

.wf-suggest {
  display: inline-block;
  margin: -6px 0 12px 0;
  padding: 6px 10px;
  border: 1px dashed #C4D0DD;
  background: transparent;
  color: #1E62A6;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
}
.wf-suggest:hover { border-color: #1E62A6; background: #F1F6FB; }

/* Estimate card (warranty step) */
.wf-estimate-card {
  background: linear-gradient(135deg, #0B355C 0%, #164680 100%);
  color: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  margin: 12px 0 16px 0;
  box-shadow: 0 4px 16px -6px rgba(11,53,92,0.35);
}
.wf-estimate-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: #C4D9EE;
  margin-bottom: 4px;
}
.wf-estimate-big {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0;
}
.wf-estimate-meta {
  font-size: 12.5px;
  color: #D4E4F2;
  margin: 2px 0 8px 0;
}
.wf-estimate-total {
  font-size: 12.5px;
  color: #D4E4F2;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.wf-estimate-fine {
  font-size: 11px;
  color: #B4C7DE;
  margin-top: 6px;
  line-height: 1.4;
}

/* Info note (banking) */
.wf-info-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #F2F6FB;
  border-radius: 10px;
  color: #465468;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 10px;
}

/* Checkbox row */
.wf-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #E4EAF1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  margin-bottom: 10px;
}
.wf-check input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: #0B355C;
}
.wf-check-text { flex: 1; }
.wf-check-label { font-weight: 600; color: #0B355C; font-size: 14px; }
.wf-check-hint { font-size: 12.5px; color: #6B7A8F; margin-top: 2px; }

/* Radio group */
.wf-radio-group {
  display: flex;
  gap: 10px;
  margin: 6px 0 12px 0;
  flex-wrap: wrap;
}
.wf-radio {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px;
  border: 1px solid #D6DEE7;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13.5px;
  color: #0B355C;
  font-weight: 500;
}
.wf-radio input[type="radio"] {
  accent-color: #0B355C;
  width: 16px; height: 16px;
}

/* Document upload cards */
.wf-doc-card {
  border: 1.5px dashed #C4D0DD;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  background: #FAFBFD;
}
.wf-doc-card.has-file {
  border-style: solid;
  border-color: #2A7A4E;
  background: #F0F8F3;
}
.wf-doc-top { display: flex; gap: 10px; align-items: flex-start; }
.wf-doc-label {
  font-weight: 700;
  color: #0B355C;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wf-doc-req {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: #FEF3F2;
  color: #B42318;
  padding: 2px 6px;
  border-radius: 5px;
}
.wf-doc-hint { font-size: 12px; color: #6B7A8F; margin-top: 3px; }
.wf-doc-file {
  display: flex; gap: 6px; align-items: center;
  font-size: 12px; color: #2A7A4E; font-weight: 600;
  margin-top: 6px;
}
.wf-doc-actions {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.wf-doc-actions .btn { flex: 1; min-width: 100px; }

/* Review blocks */
.wf-review-highlight {
  background: linear-gradient(135deg, #0B355C 0%, #164680 100%);
  color: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px -6px rgba(11,53,92,0.35);
}
.wf-review-hi-eye {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: #C4D9EE;
  margin-bottom: 4px;
}
.wf-review-hi-big {
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.wf-review-hi-sub { font-size: 13px; color: #D4E4F2; margin-top: 4px; }

.wf-review-block {
  border: 1px solid #E4EAF1;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.wf-review-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.wf-review-title {
  font-size: 13px;
  font-weight: 700;
  color: #6B7A8F;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wf-review-edit {
  background: transparent;
  border: none;
  color: #1E62A6;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
}
.wf-review-edit:hover { background: #F1F6FB; }
.wf-review-table { display: grid; gap: 4px; }
.wf-review-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
  border-top: 1px solid #F0F3F7;
}
.wf-review-row:first-child { border-top: none; }
.wf-review-k { color: #6B7A8F; font-weight: 500; }
.wf-review-v { color: #0B355C; font-weight: 600; word-break: break-word; }

/* Doc summary in review */
.wf-doc-summary { display: grid; gap: 4px; }
.wf-doc-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 3px 0;
}
.wf-doc-ok { color: #2A7A4E; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.wf-doc-missing { color: #6B7A8F; display: inline-flex; align-items: center; gap: 6px; }
.wf-doc-status { font-size: 11.5px; color: #6B7A8F; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Consent boxes */
.wf-consent {
  border: 1px solid #E4EAF1;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.wf-consent.has-error { border-color: #B42318; background: #FFF5F4; }
.wf-consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.wf-consent-label input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 18px; height: 18px;
  accent-color: #0B355C;
}
.wf-consent-text { flex: 1; }
.wf-consent-t { font-weight: 700; color: #0B355C; font-size: 14px; }
.wf-consent-body { font-size: 12.5px; color: #465468; margin-top: 4px; line-height: 1.45; }
.wf-sig-note { font-size: 11.5px; color: #6B7A8F; margin-top: 6px; padding-left: 2px; line-height: 1.45; }

/* Export screen */
.wf-export-hero {
  text-align: center;
  padding: 20px 12px 8px 12px;
}
.wf-export-check { color: #2A7A4E; margin: 0 auto 8px auto; display: block; }
.wf-export-t {
  font-size: 22px;
  font-weight: 700;
  color: #0B355C;
  margin: 4px 0 6px 0;
}
.wf-export-s { color: #465468; font-size: 14px; margin: 0 12px; }

.wf-export-actions { display: grid; gap: 10px; margin-top: 16px; }
.wf-export-btn {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #D6DEE7;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 120ms ease;
}
.wf-export-btn:hover { border-color: #0B355C; background: #F4F8FC; }
.wf-export-icon { color: #0B355C; flex: 0 0 auto; }
.wf-export-btn-text { flex: 1; }
.wf-export-btn-t { font-weight: 700; color: #0B355C; font-size: 15px; }
.wf-export-btn-s { font-size: 12.5px; color: #6B7A8F; margin-top: 2px; }

/* Confirm modal */
.wf-modal-back {
  position: fixed; inset: 0;
  background: rgba(11, 30, 55, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 200;
}
.wf-modal-card {
  background: #fff; border-radius: 14px;
  padding: 20px; max-width: 360px; width: 100%;
  box-shadow: 0 20px 60px -12px rgba(0,0,0,0.35);
}
.wf-modal-msg { font-size: 14.5px; color: #0B355C; line-height: 1.5; }
.wf-modal-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }
.wf-modal-actions .btn { flex: 1; }

/* ============================================================
   Print packet overlay & print CSS
   ============================================================ */
.pkt-overlay {
  position: fixed; inset: 0;
  background: #495867;
  z-index: 300;
  display: flex; flex-direction: column;
}
.pkt-toolbar {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 16px;
  background: #0B355C;
  color: #fff;
}
.pkt-close-btn, .pkt-print-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  font-size: 13.5px;
}
.pkt-close-btn { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.pkt-close-btn:hover { background: rgba(255,255,255,0.10); }
.pkt-print-btn { background: #fff; color: #0B355C; }
.pkt-print-btn:hover { background: #F0F3F7; }
.pkt-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.pkt-page {
  background: #fff;
  color: #101923;
  max-width: 8.5in;
  min-height: 11in;
  margin: 0 auto;
  padding: 0.6in 0.55in;
  box-shadow: 0 4px 20px -6px rgba(0,0,0,0.35);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.45;
}
.pkt-page .pkt-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 2.5px solid #0B355C;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.pkt-brand-title { font-size: 18pt; font-weight: 700; color: #0B355C; }
.pkt-brand-sub { font-size: 10.5pt; color: #465468; margin-top: 2px; }
.pkt-meta { text-align: right; font-size: 9.5pt; color: #465468; }
.pkt-meta-strong { font-weight: 700; color: #0B355C; font-size: 10.5pt; }

.pkt-request {
  background: #F1F6FB;
  border: 1px solid #C4D0DD;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.pkt-request-eye { font-size: 9pt; font-weight: 700; letter-spacing: 0.08em; color: #1E62A6; }
.pkt-request-big { font-size: 22pt; font-weight: 700; color: #0B355C; margin: 2px 0; letter-spacing: -0.01em; }
.pkt-request-sub { font-size: 10pt; color: #465468; }

.pkt-h {
  font-size: 12pt;
  font-weight: 700;
  color: #0B355C;
  margin: 18px 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #C4D0DD;
}
.pkt-table { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.pkt-table td {
  padding: 5px 8px;
  border-top: 1px solid #ECF0F5;
  font-size: 10.5pt;
  vertical-align: top;
}
.pkt-table td:first-child {
  width: 38%;
  color: #465468;
  font-weight: 500;
}
.pkt-table td:last-child {
  color: #101923;
  font-weight: 600;
  word-break: break-word;
}
.pkt-mono { font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 10pt; letter-spacing: 0.02em; }

.pkt-attest {
  margin-top: 18px;
  padding: 12px 14px;
  background: #FAFBFD;
  border-left: 3px solid #0B355C;
  font-size: 9.5pt;
  color: #465468;
  line-height: 1.5;
}
.pkt-footer {
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px solid #ECF0F5;
  display: flex; justify-content: space-between;
  font-size: 8.5pt;
  color: #6B7A8F;
}

/* Print CSS: only show the packet page when printing */
@media print {
  @page { size: letter; margin: 0.35in; }
  body > *:not(#pkt-overlay) { display: none !important; }
  #pkt-overlay { position: static; background: #fff !important; }
  #pkt-overlay .pkt-toolbar { display: none !important; }
  #pkt-overlay .pkt-scroll { overflow: visible !important; padding: 0 !important; }
  #pkt-overlay .pkt-page {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
  }
}
