/* ─────────────────────────────────────────────────────────────────────────────
   Titan Dispatch v2.0 — app.css
   Clean, modern, mobile-aware dispatch board styling
───────────────────────────────────────────────────────────────────────────── */

:root {
  --brand:      #1a6fa8;
  --brand-dark: #145a87;
  --bg:         #f0f2f5;
  --surface:    #ffffff;
  --border:     #dde2e8;
  --text:       #1c2330;
  --muted:      #6b7685;
  --danger:     #d93025;
  --success:    #1e7e34;
  --radius:     6px;
  --shadow:     0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --nav-h:      52px;
  --font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--font); }

/* ── Topnav ────────────────────────────────────────────────────────────────── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--brand);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.nav-brand a { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-links a, .nav-dropbtn {
  color: rgba(255,255,255,.85); padding: 6px 11px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; border: none; background: none;
  transition: background .15s;
}
.nav-links a:hover, .nav-links a.active, .nav-dropbtn:hover {
  background: rgba(255,255,255,.2); color: #fff; text-decoration: none;
}
.nav-links a.active { background: rgba(255,255,255,.25); }
.nav-dropdown { position: relative; }
.nav-dropdown-content {
  display: none; position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 160px; z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-content { display: block; }
.nav-dropdown-content a { display: block; padding: 8px 14px; color: var(--text); font-size: 13px; }
.nav-dropdown-content a:hover { background: var(--bg); text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.8); font-size: 13px; }
.btn-logout {
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3);
  padding: 4px 10px; border-radius: var(--radius); font-size: 12px;
}
.btn-logout:hover { background: rgba(255,255,255,.25); }

/* ── Main content offset ───────────────────────────────────────────────────── */
main { margin-top: var(--nav-h); }

/* ── Flash messages ────────────────────────────────────────────────────────── */
.flash {
  padding: 10px 18px; font-size: 13px; font-weight: 500;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 90;
  text-align: center;
}
.flash-success { background: #d4edda; color: #155724; border-bottom: 1px solid #c3e6cb; }
.flash-error   { background: #f8d7da; color: #721c24; border-bottom: 1px solid #f5c6cb; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--radius); font-size: 13px;
  font-weight: 500; border: 1px solid transparent; cursor: pointer;
  transition: filter .1s, box-shadow .1s;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn-primary   { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-outline   { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-sm        { padding: 4px 10px; font-size: 12px; }
.btn-block     { width: 100%; justify-content: center; }
.btn-icon      { padding: 5px 8px; }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 7px; border-radius: 12px;
  font-size: 11px; font-weight: 600; line-height: 1.5;
}
.badge-neutral { background: #e2e6ea; color: var(--muted); }
.badge-today   { background: #fff3cd; color: #856404; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.form-control, input[type=text], input[type=date], input[type=time], input[type=email],
input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px; font-family: var(--font);
  background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,111,168,.12);
}
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-section { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.form-section h3 { font-size: 14px; font-weight: 700; color: var(--brand); margin-bottom: 14px; }

/* ── Page layout ───────────────────────────────────────────────────────────── */
.page { max-width: 1400px; margin: 0 auto; padding: 20px 16px; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.page-header h1 { font-size: 20px; font-weight: 700; }
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }

/* ── Card ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 14px; }

/* ── Table ─────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--bg); padding: 9px 12px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--muted); border-bottom: 2px solid var(--border);
}
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: #f7f9fb; }
tbody tr:last-child td { border-bottom: none; }

/* ── ════════════════════════════════════════════════════════════
   DISPATCH BOARD
   ════════════════════════════════════════════════════════════ */
.board-container { padding: 0; }

.board-header {
  position: sticky; top: var(--nav-h); z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  box-shadow: 0 2px 4px rgba(0,0,0,.06);
}
.board-nav { display: flex; align-items: center; gap: 8px; }
.date-input-nav {
  padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; background: #fff;
}
.board-title { display: flex; align-items: center; gap: 10px; }
.board-title h2 { font-size: 16px; font-weight: 700; }
.board-actions { display: flex; align-items: center; gap: 8px; }

.board-scroll { overflow-x: auto; padding: 12px; min-height: calc(100vh - 120px); }

.board-grid {
  display: grid; gap: 8px;
  min-width: max-content;
}

/* ── Driver Column ──────────────────────────────────────────────────────────── */
.driver-column {
  background: #f7f9fb; border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 185px;
}
.driver-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  background: var(--brand); color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 12px; font-weight: 700;
  position: sticky; top: 96px;
}
.driver-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.driver-orders { padding: 6px; display: flex; flex-direction: column; gap: 6px; min-height: 60px; }
.empty-lane { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 0; }

/* ── Order Card ─────────────────────────────────────────────────────────────── */
.order-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 9px;
  box-shadow: var(--shadow);
  font-size: 12px; line-height: 1.4;
  transition: box-shadow .15s;
  cursor: default;
}
.order-card:hover { box-shadow: 0 3px 8px rgba(0,0,0,.15); }

.order-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.order-invoice { font-weight: 700; font-size: 12px; color: var(--brand); }
.order-status-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.1);
}
.order-vehicle { font-weight: 600; font-size: 12px; margin-bottom: 1px; }
.order-color   { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.order-property {
  font-size: 11px; color: var(--text); margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-meta {
  display: flex; gap: 6px; align-items: center;
  font-size: 11px; color: var(--muted); margin-bottom: 4px;
}
.order-status-label {
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  padding: 2px 6px; border-radius: 3px; margin-bottom: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-transform: uppercase;
}
.order-actions {
  display: flex; gap: 3px; flex-wrap: wrap; border-top: 1px solid var(--border);
  padding-top: 5px; margin-top: 2px;
}
.action-btn {
  background: none; border: 1px solid var(--border); padding: 2px 5px;
  border-radius: 3px; font-size: 12px; cursor: pointer;
  transition: background .1s;
  text-decoration: none; color: inherit;
}
.action-btn:hover { background: var(--bg); text-decoration: none; }

/* ── Modals ─────────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.modal-box {
  position: relative; background: var(--surface);
  border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.2);
  padding: 22px 24px; min-width: 340px; max-width: 480px; width: 90%;
}
.modal-box h3 { margin-bottom: 12px; font-size: 16px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}

/* ── Order Detail ────────────────────────────────────────────────────────────── */
.order-detail-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 16px;
}
.detail-section { margin-bottom: 18px; }
.detail-section h3 { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.detail-row { display: flex; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.detail-row:last-child { border: none; }
.detail-label { font-weight: 600; min-width: 130px; color: var(--muted); }
.detail-value { flex: 1; }

.status-chip {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
}

/* ── History timeline ────────────────────────────────────────────────────────── */
.history-list { list-style: none; position: relative; }
.history-list::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.history-item {
  position: relative; padding: 6px 0 6px 30px; font-size: 12px;
}
.history-item::before {
  content: ''; position: absolute; left: 5px; top: 11px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand);
}
.history-when { color: var(--muted); font-size: 11px; }
.history-who  { font-weight: 600; }

/* ── Orders list ─────────────────────────────────────────────────────────────── */
.search-bar {
  display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap;
  background: var(--surface); padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 14px;
}
.search-bar .form-group { margin: 0; }

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; padding: 16px 0; }
.pagination a, .pagination span {
  padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 12px;
}
.pagination a:hover { background: var(--bg); text-decoration: none; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── Print receipt ───────────────────────────────────────────────────────────── */
@media print {
  .topnav, .board-header, .no-print, nav, .btn { display: none !important; }
  main { margin-top: 0; }
  .receipt { max-width: 500px; margin: 0 auto; font-size: 12px; }
}
.receipt { max-width: 520px; margin: 30px auto; padding: 24px; border: 1px solid #ccc; }
.receipt-header { text-align: center; margin-bottom: 18px; }
.receipt-header h1 { font-size: 20px; font-weight: 700; }
.receipt-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.receipt-table td { padding: 5px 0; vertical-align: top; }
.receipt-table .label { font-weight: 600; width: 40%; color: #555; }
.receipt-divider { border: none; border-top: 1px dashed #999; margin: 12px 0; }

/* ── Login ───────────────────────────────────────────────────────────────────── */
.login-body { background: var(--brand); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box {
  background: #fff; border-radius: 10px; padding: 36px 32px;
  width: 340px; box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.login-logo { text-align: center; font-size: 40px; margin-bottom: 8px; }
.login-box h1 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.login-subtitle { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.login-box .flash { position: static; margin-bottom: 12px; border-radius: var(--radius); }

/* ── Error page ──────────────────────────────────────────────────────────────── */
.error-page { max-width: 480px; margin: 80px auto; text-align: center; }
.error-page h1 { font-size: 48px; color: var(--muted); margin-bottom: 8px; }

/* ── Util ────────────────────────────────────────────────────────────────────── */
.text-muted  { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.align-center { align-items: center; }
.api-status { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.api-card {
  flex: 1; min-width: 200px; padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.api-card.stub { border-left: 4px solid #ffc107; background: #fffbe6; }
.api-card.active { border-left: 4px solid var(--success); background: #f0fff4; }
.api-card h4 { font-size: 13px; margin-bottom: 4px; }
.api-card p  { font-size: 12px; color: var(--muted); }

/* ── ════════════════════════════════════════════════════════════
   IMPOUND WORKFLOW
   ════════════════════════════════════════════════════════════ */

.workflow-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }

/* Sidebar */
.workflow-sidebar { position: sticky; top: calc(var(--nav-h) + 8px); }
.stage-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stage-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--border); transition: background .12s;
}
.stage-link:hover { background: var(--bg); text-decoration: none; }
.stage-link.active { background: #e8f0fe; color: var(--brand); font-weight: 600; border-left: 3px solid var(--brand); }
.stage-link.urgent { color: #842029; }
.stage-link.overdue { color: var(--danger); font-weight: 600; }
.stage-link.muted   { color: var(--muted); }
.stage-link:last-child { border-bottom: none; }
.stage-divider { padding: 6px 14px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--border); }
.stage-badge { background: #e2e6ea; color: var(--muted); padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.stage-badge.urgent { background: #f8d7da; color: #842029; }
.stage-badge.overdue { background: var(--danger); color: #fff; }

/* Workflow list cards */
.workflow-main { display: flex; flex-direction: column; gap: 10px; }
.wf-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.wf-card-top { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.wf-vehicle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-invoice { font-weight: 700; color: var(--brand); font-size: 14px; }
.wf-color   { color: var(--muted); font-size: 12px; }
.wf-ids     { display: flex; gap: 10px; font-size: 12px; }
.wf-meta    { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.wf-card-bottom { padding: 10px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wf-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.wf-status-chip { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.wf-deadline { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.wf-deadline.overdue { background: #f8d7da; color: #842029; }
.wf-deadline.soon    { background: #fff3cd; color: #664d03; }

/* Step progress row */
.wf-steps { display: flex; align-items: center; gap: 0; flex: 1; min-width: 0; overflow: hidden; }
.wf-step  { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wf-step-dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; border: 2px solid var(--border); background: #fff; color: var(--muted); }
.wf-step.done .wf-step-dot     { background: #198754; border-color: #198754; color: #fff; }
.wf-step.current .wf-step-dot  { background: var(--brand); border-color: var(--brand); color: #fff; animation: pulse 1.5s infinite; }
.wf-step.skipped .wf-step-dot  { background: #e2e6ea; color: #aaa; }
.wf-step-label { font-size: 9px; color: var(--muted); white-space: nowrap; }
.wf-step.done .wf-step-label   { color: #198754; }
.wf-step.current .wf-step-label { color: var(--brand); font-weight: 700; }
.wf-step-connector { flex: 1; height: 2px; background: var(--border); min-width: 8px; max-width: 24px; margin-bottom: 14px; }
.wf-step-connector.done { background: #198754; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(26,111,168,.4)} 50%{box-shadow:0 0 0 4px rgba(26,111,168,0)} }

/* Workflow detail page */
.wf-summary-bar { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; padding: 14px 18px; }
.wf-summary-item { display: flex; flex-direction: column; gap: 2px; }
.wf-summary-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }

.wf-step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  box-shadow: var(--shadow); overflow: hidden;
  transition: opacity .2s;
}
.wf-step-card.step-done    { border-left: 4px solid #198754; }
.wf-step-card.step-current { border-left: 4px solid var(--brand); }
.wf-step-card.step-locked  { opacity: .55; }
.wf-step-card.step-na      { border-left: 4px solid #aaa; }

.wf-step-header {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.wf-step-header h3 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.wf-step-header p  { font-size: 12px; color: var(--muted); margin: 0; }
.wf-step-body { padding: 14px 18px; }

.wf-step-num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  background: var(--border); color: var(--muted);
}
.wf-step-num.done { background: #198754; color: #fff; }
.wf-step-num.na   { background: #aaa; color: #fff; }

.checkbox-group label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.checkbox-group input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand); }

.mono { font-family: monospace; font-size: 12px; }

/* ── ════════════════════════════════════════════════════════════
   AUTORETURN PPI REPORTER
   ════════════════════════════════════════════════════════════ */

.ppi-page { max-width: 1200px; }

/* Instructions banner */
.ppi-instructions {
  background: #e8f0fe; border: 1px solid #c5d5f5; border-radius: var(--radius);
  padding: 12px 18px; margin-bottom: 18px;
}
.ppi-instructions-steps {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ppi-inst-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #1a3a6b;
}
.ppi-inst-num {
  background: var(--brand); color: #fff; width: 20px; height: 20px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.ppi-inst-arrow { color: #7895c8; font-size: 16px; }
.copy-inline {
  cursor: pointer; border-bottom: 1px dashed var(--brand); color: var(--brand);
}
.copy-inline:hover { background: #e8f0fe; }

/* Main layout */
.ppi-layout { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }

/* Fields panel */
.ppi-fields-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ppi-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--brand); color: #fff; }
.ppi-panel-header h2 { font-size: 14px; font-weight: 700; }

.ppi-vehicle-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.ppi-fields { padding: 0; }
.ppi-field-group { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ppi-field-group:last-child { border-bottom: none; }
.ppi-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 10px; }

.ppi-field { margin-bottom: 10px; }
.ppi-field:last-child { margin-bottom: 0; }
.ppi-field-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.ppi-editable-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: #aaa; font-size: 10px; }
.ppi-field-value { display: flex; align-items: center; gap: 8px; }
.ppi-value { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; padding: 6px 0; }
.ppi-editable { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; font-weight: 600; }
.ppi-editable:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,111,168,.12); }
.ppi-copy-btn {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 10px; font-size: 14px; cursor: pointer; flex-shrink: 0;
  transition: background .1s;
}
.ppi-copy-btn:hover { background: #e8f0fe; border-color: var(--brand); }
.ppi-field-note { font-size: 11px; color: #856404; background: #fff3cd; padding: 4px 8px; border-radius: 3px; margin-top: 4px; }
.ppi-field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Confirm panel */
.ppi-confirm-panel { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--nav-h) + 8px); }
.ppi-status-card h3, .ppi-confirm-panel .card h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.ppi-reported-badge { background: #d1e7dd; color: #0a3622; padding: 6px 12px; border-radius: var(--radius); font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.ppi-not-reported   { background: #f8d7da; color: #842029; padding: 6px 12px; border-radius: var(--radius); font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.ppi-status-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.ppi-status-row:last-child { border: none; }

.ppi-ref-card h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.ppi-ref-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.ppi-ref-row:last-child { border: none; }

/* Toast */
.copy-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1c2330; color: #fff; padding: 8px 20px; border-radius: 20px;
  font-size: 13px; font-weight: 600; z-index: 999; transition: opacity .2s;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.copy-toast.hidden { opacity: 0; pointer-events: none; }

/* ── RETRIEVAL ADMIN styles ────────────────────────────────────── */
.retrieval-admin-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start;
}
@media (max-width: 900px) { .retrieval-admin-grid { grid-template-columns: 1fr; } }
