/* ==========================================================================
   HAULFORCE — CONSOLIDATED STYLESHEET
   Design tokens: Navy / Amber / Cream "waybill manifest" system
   Fonts: Space Grotesk (display), Inter (body), IBM Plex Mono (mono/tracking)
   Consolidated from per-page inline <style> blocks — duplicates removed,
   see accompanying notes for the one selector collision that was resolved.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --navy: #12203D;
  --navy-2: #1B2E52;
  --cream: #F6F1E4;
  --amber: #F5A300;
  --amber-ink: #7a4d00;
  --rust: #C2410C;
  --green: #157A4A;
  --ink: #1A1D29;
  --paper: #FFFDF8;
  --line: rgba(18,32,61,.14);
  --radius-lg: 18px;
  --radius-sm: 10px;
}

/* ---------- Base & typography ---------- */
html, body {
  height: 100%;
}
body {
  background: var(--cream);
  font-family: "Inter",system-ui,sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* {
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, h5, .display-font {
  font-family: "Space Grotesk",system-ui,sans-serif;
  letter-spacing: -0.01em;
}
.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
a {
  text-decoration: none;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn-amber {
  background: var(--amber);
  border-color: var(--amber);
  color: #241400;
  font-weight: 600;
}
.btn-amber:hover {
  background: #e29400;
  border-color: #e29400;
  color: #241400;
}
.btn-navy {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--paper);
  font-weight: 700;
}
.btn-navy:hover {
  background: var(--navy-2);
  border-color: var(--navy-2);
  color: var(--paper);
}
.btn-outline-navy {
  border-color: var(--navy);
  color: var(--navy);
  font-weight: 600;
}
.btn-outline-navy:hover {
  background: var(--navy);
  color: var(--paper);
}
.btn-outline-rust {
  border-color: var(--rust);
  color: var(--rust);
  font-weight: 600;
}
.btn-outline-rust:hover {
  background: var(--rust);
  color: #fff2e8;
}
.btn-outline-cream {
  border-color: rgba(246,241,228,.4);
  color: var(--paper);
  font-weight: 500;
}
.btn-outline-cream:hover {
  background: rgba(246,241,228,.1);
  color: var(--paper);
  border-color: rgba(246,241,228,.6);
}

/* ---------- Form controls ---------- */
.form-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  color: #5b5138;
}
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--line);
  padding: .6rem .8rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 .2rem rgba(245,163,0,.25);
}
.form-control-lg {
  padding: .7rem .9rem;
}
.input-group-text {
  background: #fff;
  border-color: var(--line);
  color: #7a725a;
}
.form-check-input:checked {
  background-color: var(--amber);
  border-color: var(--amber);
}
.toggle-password {
  border-color: var(--line);
  background: var(--paper);
  color: #7a725a;
}
.toggle-password:hover {
  background: var(--cream);
  color: var(--navy);
}
.strength-meter {
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
  margin-top: .4rem;
}
.strength-meter .bar {
  height: 100%;
  width: 0%;
  background: var(--rust);
  transition: width .25s ease, background-color .25s ease;
}

/* ---------- Manifest / waybill motifs ---------- */
.manifest-tag {
  display: inline-block;
  border: 2px dashed rgba(18,32,61,.28);
  border-radius: var(--radius-sm);
  padding: .4rem .9rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: .7rem;
  letter-spacing: .06em;
  color: #5b5138;
  background: var(--paper);
}
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
}
.eyebrow.on-light {
  color: #946200;
}
.ticket {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(18,32,61,.28);
  padding: 1.1rem 1.25rem;
  color: var(--ink);
}
.ticket::before, .ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--punch, var(--cream));
}
.ticket::before {
  left: -12px;
}
.ticket::after {
  right: -12px;
}
.ticket.on-navy {
  --punch: var(--navy-2);
}
.ticket .stamp {
  position: absolute;
  top: .7rem;
  right: 1.15rem;
  transform: rotate(-9deg);
  border: 2px solid var(--rust);
  color: var(--rust);
  font-family: "IBM Plex Mono", monospace;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .08em;
  padding: .1rem .4rem;
  border-radius: 5px;
}
.ticket .route-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: .78rem;
  color: #5b5138;
  letter-spacing: .03em;
}
.ticket .route-price {
  font-family: "Space Grotesk",sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--navy);
}
.ticket-stack {
  position: relative;
}
.ticket-stack .ticket:nth-child(2) {
  margin-top: -.4rem;
  transform: rotate(-1.4deg);
}
.ticket-stack .ticket:nth-child(3) {
  margin-top: -.4rem;
  transform: rotate(1.2deg);
}
.route-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: .8rem;
  color: #5b5138;
}

/* ---------- App shell: topbar, sidebar, offcanvas ---------- */
.topbar {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar .brand {
  font-family: "Space Grotesk",sans-serif;
  font-weight: 700;
  color: var(--paper);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.topbar .brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,163,0,.25);
}
.topbar .btn-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(246,241,228,.08);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(246,241,228,.12);
}
.topbar .btn-icon:hover {
  background: rgba(246,241,228,.16);
  color: var(--paper);
}
.avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--amber);
  color: #241400;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex: none;
}
.avatar.navy-bg {
  background: var(--navy);
  color: var(--paper);
}
.avatar.sm {
  width: 2rem;
  height: 2rem;
  font-size: .72rem;
}
.avatar-lg {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-weight: 700;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  min-height: calc(100vh - 64px);
}
.sidebar .nav-link {
  color: #4b4636;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.sidebar .nav-link i {
  width: 1.1rem;
  text-align: center;
  color: #8a8266;
}
.sidebar .nav-link.active {
  background: var(--navy);
  color: var(--paper);
}
.sidebar .nav-link.active i {
  color: var(--amber);
}
.sidebar .nav-link:hover:not(.active) {
  background: var(--cream);
}
.offcanvas-haul .offcanvas-header {
  background: var(--navy);
  color: var(--paper);
}
.offcanvas-haul .btn-close {
  filter: invert(1);
}
.role-switch .btn {
  font-weight: 600;
  font-size: .82rem;
  padding: .4rem .9rem;
  border-color: rgba(246,241,228,.25);
  color: rgba(246,241,228,.75);
}
.role-switch .btn-check:checked + .btn {
  background: var(--amber);
  border-color: var(--amber);
  color: #241400;
}

/* ---------- Marketing navbar (landing page) ---------- */
.navbar-haul {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.navbar-haul .navbar-brand {
  font-family: "Space Grotesk",sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.navbar-haul .navbar-brand .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,163,0,.25);
}
.navbar-haul .nav-link {
  color: rgba(246,241,228,.78);
  font-weight: 500;
  font-size: .95rem;
}
.navbar-haul .nav-link:hover {
  color: var(--paper);
}
.navbar-haul .navbar-toggler {
  border-color: rgba(255,255,255,.25);
}

/* ---------- Cards & stats ---------- */
.card-haul {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
}
.stat-card .stat-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}
.stat-card .stat-value {
  font-family: "Space Grotesk",sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--navy);
}
.reg-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px -22px rgba(18,32,61,.35);
}
.danger-card {
  border: 1px solid rgba(194, 65, 12, .3);
  background: rgba(194, 65, 12, .03);
  border-radius: var(--radius-lg);
}

/* ---------- Status pills, badges & tables ---------- */
.status-pills {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: .3rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: .25rem;
}
.status-pills .nav-link {
  color: var(--navy);
  font-weight: 600;
  font-size: .82rem;
  border-radius: calc(var(--radius-sm) - 4px);
  padding: .45rem .85rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}
.status-pills .nav-link.active {
  background: var(--navy);
  color: var(--paper);
}
.status-pills .nav-link .count {
  background: rgba(18, 32, 61, .1);
  color: var(--navy);
  border-radius: 999px;
  padding: 0 .4rem;
  font-size: .7rem;
  font-family: "IBM Plex Mono", monospace;
}
.status-pills .nav-link.active .count {
  background: rgba(246, 241, 228, .2);
  color: var(--paper);
}
.badge-verified {
  background: rgba(21,122,74,.12);
  color: var(--green);
  font-weight: 600;
}
.badge-review {
  background: rgba(245,163,0,.16);
  color: var(--amber-ink);
  font-weight: 600;
}
.badge-required {
  background: rgba(194,65,12,.12);
  color: var(--rust);
  font-weight: 600;
}
.badge-neutral {
  background: rgba(90, 90, 90, .1);
  color: #5a5a5a;
  font-weight: 600;
}
.badge-transit {
  background: rgba(18,32,61,.1);
  color: var(--navy);
  font-weight: 600;
}
.badge-transship {
  background: rgba(194,65,12,.12);
  color: var(--rust);
  font-weight: 600;
}
.badge-cancelled {
  background: rgba(90,90,90,.12);
  color: #5a5a5a;
  font-weight: 600;
}
.amt-credit {
  color: var(--green);
  font-weight: 600;
}
.amt-debit {
  color: var(--ink);
  font-weight: 600;
}
.table-haul thead th {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7a725a;
  border-bottom-width: 1px;
  border-color: var(--line);
  font-weight: 700;
}
.table-haul td, .table-haul th {
  vertical-align: middle;
  border-color: var(--line);
}
.table-haul tbody tr {
  cursor: pointer;
}
.table-haul tbody tr:hover {
  background: var(--cream);
}
.notif-table th, .notif-table td {
  text-align: center;
  vertical-align: middle;
}
.notif-table th:first-child, .notif-table td:first-child {
  text-align: left;
}
.notif-table thead th {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7a725a;
  border-bottom-width: 1px;
  border-color: var(--line);
  font-weight: 700;
}
.notif-table td, .notif-table th {
  border-color: var(--line);
}

/* ---------- Progress & checklists ---------- */
.progress-haul {
  height: 10px;
  border-radius: 6px;
  background: var(--line);
}
.progress-haul .progress-bar {
  background: var(--amber);
}
.check-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line);
}
.check-item:last-child {
  border-bottom: none;
}
.check-item .status-icon {
  width: 1.4rem;
  text-align: center;
}
.check-item .status-icon.done {
  color: var(--green);
}
.check-item .status-icon.pending {
  color: var(--amber-ink);
}
.check-item .status-icon.required {
  color: var(--rust);
}

/* ---------- Tracking timeline (My Shipments) ---------- */
.timeline {
  position: relative;
  padding-left: 2.1rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: .85rem;
  top: .4rem;
  bottom: .4rem;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding-bottom: 1.35rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item .t-dot {
  position: absolute;
  left: -2.1rem;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  background: var(--paper);
  border: 2px solid var(--line);
  color: #8a8266;
}
.timeline-item.done .t-dot {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.timeline-item.active .t-dot {
  background: var(--amber);
  border-color: var(--amber);
  color: #241400;
}
.timeline-item.issue .t-dot {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.map-placeholder {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: var(--radius-sm);
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(246, 241, 228, .7);
  position: relative;
  overflow: hidden;
}
.map-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 24px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 24px);
}
.map-placeholder span {
  position: relative;
  z-index: 1;
  text-align: center;
}
.cargo-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--cream);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
}

/* ---------- Dashboard: activity feed & quick actions ---------- */
.activity-item {
  display: flex;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px dashed var(--line);
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: .8rem;
}
.quick-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  height: 100%;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.quick-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -16px rgba(18,32,61,.35);
  color: var(--ink);
}
.quick-tile .qi {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--cream);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .5rem;
  font-size: 1.1rem;
}

/* ---------- Wallet: balance, payment cards & mini chart ---------- */
.balance-hero {
  background: radial-gradient(700px 260px at 90% -20%, rgba(245, 163, 0, .16), transparent 60%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}
.balance-hero .route-rule {
  height: 2px;
  margin: 1rem 0;
  background: repeating-linear-gradient(90deg, rgba(246, 241, 228, .3) 0 10px, transparent 10px 18px);
}
.balance-hero .bal-figure {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
}
.pm-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
  color: var(--paper);
  position: relative;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pm-card.alt {
  background: linear-gradient(135deg, #2b2412 0%, #4a3a12 100%);
}
.pm-card .pm-number {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: .08em;
  font-size: 1.05rem;
}
.pm-card .pm-default {
  position: absolute;
  top: .8rem;
  right: .9rem;
  background: var(--amber);
  color: #241400;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: .15rem .5rem;
  border-radius: 5px;
}
.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: .6rem;
  height: 110px;
}
.mini-bars .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.mini-bars .bar {
  width: 100%;
  max-width: 26px;
  border-radius: 5px 5px 2px 2px;
  background: var(--cream);
  position: relative;
}
.mini-bars .bar.filled {
  background: var(--amber);
}
.mini-bars .bar-label {
  font-size: .62rem;
  color: #8a8266;
  margin-top: .4rem;
  font-family: "IBM Plex Mono", monospace;
}

/* ---------- Messages: conversation list & thread ---------- */
.msg-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  height: calc(100vh - 155px);
  min-height: 480px;
  display: flex;
  overflow: hidden;
}
.conv-pane {
  width: 340px;
  flex: none;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.conv-search {
  padding: .9rem;
  border-bottom: 1px solid var(--line);
}
.conv-tabs {
  padding: 0 .9rem .7rem;
}
.conv-tabs .nav-pills {
  gap: .35rem;
}
.conv-tabs .nav-link {
  font-size: .76rem;
  font-weight: 600;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--navy);
}
.conv-tabs .nav-link.active {
  background: var(--navy);
  color: var(--paper);
}
.conv-list {
  overflow-y: auto;
  flex: 1;
}
.conv-item {
  display: flex;
  gap: .7rem;
  padding: .8rem .9rem;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
  align-items: flex-start;
}
.conv-item:hover, .conv-item.active {
  background: var(--cream);
}
.conv-item.active {
  box-shadow: inset 3px 0 0 var(--amber);
}
.conv-item .c-name {
  font-weight: 600;
  font-size: .88rem;
}
.conv-item .c-preview {
  font-size: .8rem;
  color: #7a725a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 15rem;
}
.conv-item .c-time {
  font-size: .68rem;
  color: #a39d84;
  font-family: "IBM Plex Mono", monospace;
}
.conv-item .unread-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--amber);
  display: inline-block;
}
.conv-item .route-chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: .64rem;
  color: #5b5138;
  background: var(--cream);
  border: 1px dashed var(--line);
  border-radius: 5px;
  padding: 0 .35rem;
  display: inline-block;
  margin-top: .15rem;
}
.thread-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.thread-header {
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.thread-header .th-info {
  flex: 1;
  min-width: 0;
}
.thread-header .th-name {
  font-weight: 700;
  font-size: .95rem;
}
.thread-header .th-meta {
  font-size: .74rem;
  color: #7a725a;
}
.thread-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem;
  background: radial-gradient(circle at 10% 10%, rgba(18, 32, 61, .03) 0, transparent 40%), var(--cream);
}
.day-divider {
  text-align: center;
  margin: 1rem 0;
}
.day-divider span {
  background: var(--paper);
  border: 1px solid var(--line);
  color: #8a8266;
  font-size: .68rem;
  padding: .2rem .7rem;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
}
.bubble-row {
  display: flex;
  margin-bottom: .6rem;
}
.bubble-row.me {
  justify-content: flex-end;
}
.bubble {
  max-width: 75%;
  padding: .6rem .85rem;
  border-radius: 14px;
  font-size: .88rem;
  line-height: 1.4;
  position: relative;
}
.bubble.them {
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.bubble.me {
  background: var(--navy);
  color: var(--paper);
  border-bottom-right-radius: 4px;
}
.bubble .b-time {
  display: block;
  margin-top: .25rem;
  font-size: .65rem;
  font-family: "IBM Plex Mono", monospace;
  opacity: .65;
}
.bubble.me .b-time {
  text-align: right;
}
.bubble.system {
  background: rgba(245, 163, 0, .14);
  color: var(--amber-ink);
  border: 1px dashed rgba(245, 163, 0, .4);
  font-size: .8rem;
  margin: 0 auto .8rem;
  text-align: center;
  max-width: 85%;
  border-radius: 10px;
}
.thread-context {
  margin: .5rem 1.1rem 0;
  padding: .55rem .8rem;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8rem;
}
.compose-bar {
  border-top: 1px solid var(--line);
  padding: .75rem 1rem;
  background: var(--paper);
}
.compose-bar .form-control {
  border-radius: 999px;
  border-color: var(--line);
}
.compose-bar .form-control:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 .2rem rgba(245, 163, 0, .25);
}
.send-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--amber);
  color: #241400;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  flex: none;
}
.send-btn:hover {
  background: #e29400;
}
.attach-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--cream);
  color: #7a725a;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  flex: none;
}

/* ---------- Settings: nav, sessions & role tabs ---------- */
.settings-nav {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: .6rem;
}
.settings-nav .nav-link {
  color: #4b4636;
  font-weight: 600;
  font-size: .88rem;
  border-radius: var(--radius-sm);
  padding: .65rem .8rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  text-align: left;
}
.settings-nav .nav-link i {
  width: 1.1rem;
  text-align: center;
  color: #8a8266;
}
.settings-nav .nav-link.active {
  background: var(--navy);
  color: var(--paper);
}
.settings-nav .nav-link.active i {
  color: var(--amber);
}
.settings-nav .nav-link:hover:not(.active) {
  background: var(--cream);
}
.settings-nav .nav-link.text-danger:hover {
  background: rgba(194, 65, 12, .08);
}
.session-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 0;
  border-bottom: 1px dashed var(--line);
}
.session-item:last-child {
  border-bottom: none;
}
.session-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.role-tabs {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: .3rem;
}
.role-tabs .nav-link {
  color: var(--navy);
  font-weight: 600;
  font-size: .92rem;
  border-radius: calc(var(--radius-sm) - 4px) !important;
}
.role-tabs .nav-link.active {
  background: var(--navy) !important;
  color: var(--paper) !important;
}
.step-pill {
  background: rgba(245,163,0,.14);
  color: var(--amber-ink);
  border-radius: 999px;
  padding: .3rem .8rem;
  font-size: .72rem;
  font-weight: 700;
}
.verify-note {
  background: rgba(21,122,74,.08);
  border: 1px solid rgba(21,122,74,.25);
  color: var(--green);
  border-radius: var(--radius-sm);
}
a.link-amber {
  color: var(--amber-ink);
  font-weight: 600;
  text-decoration: none;
}
a.link-amber:hover {
  color: var(--rust);
}
.form-check-label a {
  color: var(--navy);
  text-decoration: underline;
}

/* ---------- Documents: verification cards & uploads ---------- */
.doc-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.doc-card.state-required {
  border-color: rgba(194, 65, 12, .35);
}
.doc-card.state-review {
  border-color: rgba(245, 163, 0, .4);
}
.doc-preview {
  height: 110px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a39d84;
  font-size: 1.6rem;
  border-bottom: 1px dashed var(--line);
  position: relative;
}
.doc-preview.has-file {
  color: var(--navy);
  background: linear-gradient(135deg, rgba(18, 32, 61, .06), rgba(245, 163, 0, .08));
}
.doc-card .doc-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.doc-card .doc-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--navy);
}
.doc-card .doc-meta {
  font-size: .72rem;
  color: #8a8266;
  font-family: "IBM Plex Mono", monospace;
}
.doc-card .doc-note {
  font-size: .76rem;
  background: rgba(194, 65, 12, .08);
  color: var(--rust);
  border-radius: 8px;
  padding: .4rem .6rem;
  margin-top: .5rem;
}
.doc-card .doc-note.warn {
  background: rgba(245, 163, 0, .1);
  color: var(--amber-ink);
}
.optional-tag {
  font-size: .65rem;
  color: #a39d84;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.dropzone {
  border: 2px dashed rgba(18, 32, 61, .28);
  border-radius: var(--radius-sm);
  background: var(--cream);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.dropzone:hover, .dropzone.dragover {
  background: rgba(245, 163, 0, .1);
  border-color: var(--amber);
}
.dropzone i {
  font-size: 1.8rem;
  color: var(--amber-ink);
}
.hist-item {
  display: flex;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px dashed var(--line);
}
.hist-item:last-child {
  border-bottom: none;
}
.hist-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: .8rem;
}

/* ---------- Landing page: hero, trust strip & quote form ---------- */
.section {
  padding: 3.25rem 0;
}
.hero {
  background: radial-gradient(1100px 480px at 88% -10%, rgba(245,163,0,.16), transparent 60%), linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  padding-top: 2.75rem;
  padding-bottom: 3rem;
}
.hero .route-rule {
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(246,241,228,.35) 0 10px, transparent 10px 18px);
  margin: 1.5rem 0;
}
.hero h1 {
  font-size: 2.1rem;
  line-height: 1.12;
  font-weight: 700;
}
.hero .lead-copy {
  color: rgba(246,241,228,.82);
  font-size: 1.05rem;
  max-width: 34rem;
}
.quote-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: 0 20px 45px -18px rgba(0,0,0,.55);
}
.quote-card .form-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: #5b5138;
  margin-bottom: .25rem;
}
.quote-card .form-select, .quote-card .form-control {
  border-radius: var(--radius-sm);
  border-color: var(--line);
  padding: .6rem .75rem;
}
.quote-card .form-select:focus, .quote-card .form-control:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 .2rem rgba(245,163,0,.25);
}
.swap-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}
.trust-strip {
  background: var(--navy-2);
  color: rgba(246,241,228,.85);
  font-family: "IBM Plex Mono", monospace;
  font-size: .8rem;
  letter-spacing: .02em;
}
.trust-strip .bi {
  color: var(--amber);
}

/* ---------- Landing page: steps, differentiators & testimonials ---------- */
.step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.4rem;
  height: 100%;
}
.step-num {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  color: var(--amber-ink);
  background: rgba(245,163,0,.15);
  border-radius: 999px;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  margin-bottom: 1rem;
}
.diff-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex: none;
}
.diff-icon.rust {
  background: var(--rust);
  color: #fff2e8;
}
.diff-icon.green {
  background: var(--green);
  color: #eafff2;
}
.quote-block {
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 2.2rem 1.75rem;
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}
.quote-block .bi-quote {
  color: var(--amber);
  font-size: 1.6rem;
}
.carousel-control-prev, .carousel-control-next {
  width: 3rem;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
  filter: invert(1) grayscale(1) brightness(0.3);
}
.carousel-indicators [data-bs-target] {
  background: var(--navy);
}
.accordion-haul .accordion-button {
  font-weight: 600;
  background: var(--paper);
  color: var(--navy);
}
.accordion-haul .accordion-button:not(.collapsed) {
  background: var(--paper);
  color: var(--navy);
  box-shadow: inset 0 -1px 0 var(--line);
}
.accordion-haul .accordion-button:focus {
  box-shadow: 0 0 0 .2rem rgba(245,163,0,.25);
}
.accordion-haul .accordion-item {
  border-color: var(--line);
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
  margin-bottom: .6rem;
}
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--paper);
  border-radius: var(--radius-lg);
}
.footer-haul {
  background: var(--navy);
  color: rgba(246,241,228,.7);
}
.footer-haul h6 {
  color: var(--paper);
  font-family: "Space Grotesk",sans-serif;
}
.footer-haul a {
  color: rgba(246,241,228,.7);
}
.footer-haul a:hover {
  color: var(--amber);
}
.footer-haul .bi {
  color: var(--amber);
}

/* ---------- Modals ---------- */
.modal-haul .modal-content {
  border-radius: var(--radius-lg);
  border: none;
}
.modal-haul .modal-header {
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-haul .btn-close {
  filter: invert(1);
}

/* ---------- Waybill / printable receipt (separate component) ---------- */
.timeline-simple {
  border-left: 3px solid var(--bs-border-color);
  margin-left: .75rem;
  padding-left: 1rem;
}
.timeline-simple .timeline-item::before {
  content: "";
  position: absolute;
  left: -1.35rem;
  top: .2rem;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--bs-success);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--bs-success);
}
.sticky-summary {
  position: sticky;
  top: 1rem;
}
.waybill-print-area .list-group-item {
  border-left: 0;
  border-right: 0;
}

/* ---------- Role-preview toggle helper ---------- */
[data-role-view="carrier"] {
  display: none;
}

/* ==========================================================================
   Responsive overrides
   ========================================================================== */

@media (max-width: 991.98px) { /* Below lg (mobile / tablet) */
  .msg-shell {
    height: calc(100vh - 190px);
  }
  .conv-pane {
    width: 100%;
  }
  .thread-pane {
    display: none;
  }
  .thread-pane.mobile-active {
    display: flex;
  }
  .conv-pane.mobile-hidden {
    display: none;
  }
  .settings-nav {
    display: flex;
    overflow-x: auto;
    gap: .35rem;
    padding: .5rem;
  }
  .settings-nav .nav-link {
    white-space: nowrap;
  }
}

@media (min-width: 992px) { /* lg and up (desktop) */
  .section {
    padding: 5.5rem 0;
  }
}

@media (min-width: 768px) { /* md and up */
  .hero h1 {
    font-size: 3.1rem;
  }
}

@media (prefers-reduced-motion: no-preference) { /* Motion (skipped for reduced-motion users) */
  .hero-fade {
    animation: fadeUp .7s ease both;
  }
  .hero-fade.d1 {
    animation-delay: .08s;
  }
  .hero-fade.d2 {
    animation-delay: .16s;
  }
  .hero-fade.d3 {
    animation-delay: .24s;
  }
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media print { /* Print (waybill / receipt view) */
  body * {
    visibility: hidden;
  }
  #waybillModal, #waybillModal * {
    visibility: visible;
  }
  #waybillModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #fff;
  }
  .modal-footer, .btn-close {
    display: none !important;
  }
}