:root {
  --brand: #0052b8;
  --brand-600: #064a9c;
  --brand-700: #083d7d;
  --brand-soft: #eaf3ff;
  --navy: #0f2038;
  --ink: #172033;
  --muted: #66758a;
  --muted-2: #8a97a8;
  --line: #dbe4ef;
  --line-strong: #c5d2e3;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eef3f8;
  --success: #12804a;
  --success-soft: #ddf7e9;
  --warning: #9a650d;
  --warning-soft: #fff1c4;
  --danger: #c5213f;
  --danger-soft: #ffe3e8;
  --info: #0759bd;
  --info-soft: #dbeafe;
  --shadow-sm: 0 1px 2px rgba(15, 32, 56, 0.06), 0 10px 24px rgba(15, 32, 56, 0.06);
  --shadow-md: 0 18px 45px rgba(15, 32, 56, 0.11);
  --shadow-lg: 0 28px 75px rgba(15, 32, 56, 0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --page: min(1560px, calc(100% - 56px));
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfcfe;
  font-size: 15px;
  line-height: 1.5;
}

body.app-page {
  background:
    linear-gradient(180deg, rgba(234, 243, 255, 0.72), rgba(247, 249, 252, 0) 320px),
    var(--surface-2);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 18px;
  color: var(--navy);
  font-size: clamp(42px, 5vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.2;
}

p {
  margin-bottom: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  min-height: 94px;
  padding: 12px max(28px, calc((100vw - 1560px) / 2 + 28px));
  border-bottom: 1px solid rgba(197, 210, 227, 0.78);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 35px rgba(15, 32, 56, 0.06);
  backdrop-filter: blur(18px);
}

.brand,
.mobile-header > img {
  display: inline-flex;
  align-items: center;
}

.brand {
  min-width: 278px;
  gap: 12px;
  text-decoration: none;
}

.brand img,
.mobile-header img {
  width: auto;
  height: 78px;
  max-width: 246px;
  object-fit: contain;
}

.brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-text strong,
.brand-text small {
  display: block;
  line-height: 1.05;
  white-space: nowrap;
}

.brand-text strong {
  color: var(--navy);
  font-size: 20px;
  font-weight: 950;
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-nav,
.mobile-links,
.hero-actions,
.portal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav {
  justify-content: center;
  min-width: 0;
}

.top-nav a,
.mobile-links a,
.primary-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 14px;
  color: #25364f;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a.is-active,
.mobile-links a:hover,
.primary-link:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.top-nav a.is-active {
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.14);
}

.header-action,
.primary-btn,
.ghost-btn,
.row-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 17px;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.header-action,
.primary-btn {
  color: var(--surface);
  background: linear-gradient(180deg, var(--brand), var(--brand-600));
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.22);
  text-decoration: none;
}

.header-action:hover,
.primary-btn:hover {
  background: linear-gradient(180deg, #0962d1, var(--brand-700));
  transform: translateY(-1px);
}

.header-action:active,
.primary-btn:active,
.ghost-btn:active,
.row-action:active {
  transform: translateY(0);
}

.ghost-btn,
.row-action {
  border: 1px solid var(--line-strong);
  color: var(--navy);
  background: var(--surface);
  box-shadow: none;
}

.ghost-btn:hover,
.row-action:hover {
  border-color: rgba(79, 70, 229, 0.55);
  color: var(--brand);
  background: var(--brand-soft);
}

.link-btn {
  text-decoration: none;
}

.section-shell,
.auth-shell,
.mobile-app-shell {
  width: var(--page);
  margin: 0 auto;
}

.section-shell {
  padding: 82px 0;
}

.workspace-shell,
.auth-shell,
.mobile-app-shell {
  min-height: calc(100vh - 94px);
  padding: 42px 0 72px;
}

.section-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.light-band {
  background: linear-gradient(180deg, #f8fafc, #f3f7fb);
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 44%, rgba(234, 243, 255, 0.72) 100%),
    url("./assets/cc-kurier-logo.png") right 8% center / min(44vw, 620px) auto no-repeat,
    #ffffff;
}

.hero .section-shell {
  padding-top: 88px;
  padding-bottom: 92px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.55fr);
  gap: 40px;
  align-items: end;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin-top: 34px;
}

.hero-metrics div {
  min-height: 92px;
  border: 1px solid rgba(197, 210, 227, 0.8);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.hero-metrics span,
.quote-card span,
.result-grid span,
.database-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-metrics strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: 26px;
  line-height: 1;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-kicker::before {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  content: "";
}

.lead,
.section-heading p,
.feature-item p,
.muted-copy,
.quote-card p {
  color: var(--muted);
  line-height: 1.7;
}

.lead {
  max-width: 820px;
  font-size: 19px;
}

.section-heading {
  max-width: 880px;
  margin-bottom: 32px;
}

.workspace-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  max-width: none;
}

.workspace-heading h1 {
  margin-bottom: 10px;
  font-size: clamp(36px, 4vw, 58px);
}

.quote-card,
.tool-panel,
.feature-item,
.console-panel,
.mobile-card,
.auth-panel,
.mini-card,
.table-panel {
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
  box-shadow: var(--shadow-sm);
}

.tool-panel,
.feature-item,
.console-panel,
.mobile-card,
.auth-panel,
.kpi-card,
.review-card,
.transport-card,
.marketplace-card,
.assigned-transport-card,
.selected-order-card,
.order-row {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.tool-panel:hover,
.feature-item:hover,
.console-panel:hover,
.auth-panel:hover,
.kpi-card:hover,
.transport-card:hover,
.marketplace-card:hover,
.assigned-transport-card:hover {
  border-color: rgba(79, 70, 229, 0.22);
  box-shadow: var(--shadow-md);
}

.quote-card {
  align-self: stretch;
  display: grid;
  align-content: end;
  min-height: 340px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.96)),
    var(--surface);
  box-shadow: var(--shadow-lg);
}

.quote-card strong {
  display: block;
  margin: 12px 0;
  color: var(--brand);
  font-size: clamp(40px, 4.8vw, 62px);
  line-height: 1;
}

.calculator-layout,
.console-grid,
.feature-grid,
.auth-layout {
  display: grid;
  gap: 22px;
}

.calculator-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.console-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.console-grid > .console-panel,
.console-grid > .mobile-card {
  grid-column: span 6;
}

/* Panels flagged panel-full/wide-panel span the whole 12-col grid. Without
   this the bid queue and orders sit at half width (span 6), which squeezes
   the 5-column order rows below their breakpoint into a cramped vertical
   stack. Placed after the span-6 rule so it wins at equal specificity. */
.console-grid > .panel-full,
.console-grid > .wide-panel {
  grid-column: 1 / -1;
}

/* Bid queue: flow bid cards as responsive columns across the full width
   instead of a single stacked list. */
.bid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  align-items: start;
}

.auth-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.tool-panel,
.feature-item,
.console-panel,
.mobile-card,
.auth-panel {
  padding: 24px;
}

.tool-panel,
.console-panel,
.mobile-card,
.auth-panel {
  position: relative;
  overflow: hidden;
}

.tool-panel::before,
.console-panel::before,
.mobile-card::before,
.auth-panel::before {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), #2a9d8f, #f5b642);
  content: "";
}

.feature-item {
  min-height: 206px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
}

.feature-item::before,
.metric-card::before {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 950;
  content: attr(data-icon);
}

.tool-header,
.console-panel-header,
.site-footer,
.mobile-header,
.portal-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.console-panel-header {
  margin-bottom: 18px;
}

.console-panel-header h3,
.tool-header h3 {
  margin-bottom: 0;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  color: var(--info);
  background: var(--info-soft);
  border: 1px solid rgba(79, 70, 229, 0.12);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag.secondary {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(154, 101, 13, 0.16);
}

.tag.success,
.status-success,
.status-done {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(18, 128, 74, 0.14);
}

.tag.warning,
.status-warning,
.status-open {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(154, 101, 13, 0.16);
}

.tag.danger,
.status-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(197, 33, 63, 0.14);
}

.status-info {
  color: var(--info);
  background: var(--info-soft);
  border-color: rgba(79, 70, 229, 0.12);
}

.status-active {
  color: #14606a;
  background: #daf7f4;
  border-color: rgba(20, 96, 106, 0.14);
}

.status-neutral {
  color: #49566a;
  background: #edf1f5;
  border-color: rgba(73, 86, 106, 0.12);
}

.calc-grid,
.ops-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.calc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-form.single-col,
.auth-panel {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 8px;
  color: #2c3c54;
  font-size: 13px;
  font-weight: 850;
}

.helper-text,
.field-error {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.field-error {
  color: var(--danger);
}

.form-error-banner {
  grid-column: 1 / -1;
  border: 1px solid rgba(197, 33, 63, 0.25);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
  font-weight: 850;
}

label.has-error input,
label.has-error select,
label.has-error textarea {
  border-color: rgba(197, 33, 63, 0.7);
  box-shadow: 0 0 0 4px rgba(197, 33, 63, 0.08);
}

.form-sections {
  align-items: start;
}

.form-section {
  min-width: 0;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: #fbfdff;
}

.form-section legend {
  padding: 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.section-fields.one-col,
.date-time-grid {
  grid-template-columns: 1fr;
}

.date-time-grid {
  display: grid;
  gap: 15px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 13px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  min-height: 104px;
  padding: 12px 13px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aebdd0;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.2);
  outline-offset: 2px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(79, 70, 229, 0.66);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.check-row {
  min-height: 46px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fbfdff;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--brand);
}

.result-grid,
.database-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.database-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 22px;
}

.result-grid div,
.database-stats div {
  min-height: 96px;
  border: 1px solid rgba(197, 210, 227, 0.75);
  border-radius: var(--radius);
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.database-stats div {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 128px;
  box-shadow: var(--shadow-sm);
}

.result-grid strong,
.database-stats strong {
  display: block;
  margin-top: 10px;
  color: var(--navy);
  font-size: 26px;
  line-height: 1;
}

.database-stats strong {
  font-size: 42px;
}

.result-note {
  min-height: 50px;
  margin: 16px 0 0;
  border: 1px solid rgba(79, 70, 229, 0.14);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 13px 15px;
  color: #526174;
  background: #f7fbff;
  line-height: 1.55;
}

.auth-status {
  margin-top: 22px;
}

.mini-list,
.order-list {
  display: grid;
  gap: 12px;
}

.mini-list {
  margin-top: 14px;
}

.mini-card {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 15px;
  box-shadow: none;
}

.mini-card:hover {
  border-color: rgba(79, 70, 229, 0.28);
  background: #fcfdff;
}

.mini-card b,
.mini-card span,
.mini-card small {
  display: block;
}

.mini-card span,
.mini-card small {
  color: var(--muted);
  line-height: 1.45;
}

.mini-card .status-pill {
  margin-top: 2px;
}

.row-action {
  width: fit-content;
  min-height: 36px;
  margin-top: 6px;
  padding: 0 13px;
  font-size: 13px;
}

.order-list {
  overflow-x: auto;
  padding-bottom: 2px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(210px, 1fr) minmax(210px, 1fr) minmax(150px, 0.65fr) auto;
  gap: 18px;
  align-items: center;
  min-width: 920px;
  min-height: 92px;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.order-row b,
.order-row span,
.order-row small {
  display: block;
}

.order-row small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.wide-panel,
.full-row {
  grid-column: 1 / -1;
}

.file-drop {
  min-height: 104px;
  align-content: center;
  border: 1px dashed #8eaccf;
  border-radius: var(--radius);
  padding: 15px;
  background: #f7fbff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.file-drop:hover,
.file-drop:focus-within {
  border-color: rgba(79, 70, 229, 0.55);
  background: #f1f7ff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.file-drop input {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.file-drop span {
  color: var(--muted);
  font-size: 12px;
}

.portal-strip {
  align-items: flex-start;
  gap: 30px;
}

.portal-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 720px;
}

.auth-heading {
  padding-top: 8px;
}

.auth-panel h2,
.mobile-card h2 {
  font-size: 24px;
}

.mobile-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.mobile-summary span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-summary h1 {
  margin-bottom: 0;
  font-size: clamp(36px, 4vw, 58px);
}

.full-width {
  width: 100%;
}

.compact-link {
  width: fit-content;
  margin-top: 10px;
}

.site-footer {
  min-height: 92px;
  border-top: 1px solid var(--line);
  padding: 18px max(28px, calc((100vw - 1560px) / 2 + 28px));
  background: #ffffff;
}

.site-footer div {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-weight: 850;
}

.site-footer img {
  width: 132px;
  object-fit: contain;
}

.site-footer a {
  color: var(--brand);
  font-weight: 950;
  text-decoration: none;
}

.admin-dashboard {
  padding-top: 54px;
}

.admin-status {
  margin-bottom: 22px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  min-height: 146px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: var(--shadow-sm);
}

.kpi-card span:not(.kpi-icon) {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 950;
}

.kpi-card[data-tone="warning"] .kpi-icon {
  color: var(--warning);
  background: var(--warning-soft);
}

.kpi-card[data-tone="success"] .kpi-icon {
  color: var(--success);
  background: var(--success-soft);
}

.kpi-card[data-tone="danger"] .kpi-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.kpi-card[data-tone="neutral"] .kpi-icon {
  color: #49566a;
  background: #edf1f5;
}

.admin-ops-grid {
  gap: 24px;
}

.dashboard-widget {
  min-height: 380px;
}

.review-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius);
  padding: 16px;
  background: #ffffff;
  box-shadow: none;
}

.review-card:hover {
  border-color: rgba(79, 70, 229, 0.3);
  background: #fcfdff;
}

.review-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.review-card b {
  display: block;
  color: var(--navy);
  line-height: 1.35;
}

.review-card span:not(.status-pill),
.review-card small {
  color: var(--muted);
  line-height: 1.45;
}

.review-meta,
.bid-offer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-meta span,
.bid-offer div {
  border: 1px solid rgba(197, 210, 227, 0.7);
  border-radius: var(--radius);
  padding: 10px;
  background: #f8fbff;
}

.bid-offer span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bid-offer b {
  margin-top: 4px;
  font-size: 18px;
}

.review-action-note {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 12px;
  font-weight: 900;
}

.empty-state {
  min-height: 210px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed rgba(79, 70, 229, 0.34);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(241, 247, 255, 0.88)),
    #f8fbff;
  text-align: center;
}

.empty-state b {
  color: var(--navy);
  font-size: 18px;
}

.empty-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(79, 70, 229, 0.12);
  font-size: 13px;
  font-weight: 950;
}

.status-pending {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(154, 101, 13, 0.16);
}

.status-pill.status-pending {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(154, 101, 13, 0.16);
}

.status-approved,
.status-accepted {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(18, 128, 74, 0.14);
}

.status-pill.status-approved,
.status-pill.status-accepted {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(18, 128, 74, 0.14);
}

.status-assigned {
  color: #14606a;
  background: #daf7f4;
  border-color: rgba(20, 96, 106, 0.14);
}

.status-pill.status-assigned {
  color: #14606a;
  background: #daf7f4;
  border-color: rgba(20, 96, 106, 0.14);
}

.status-rejected {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(197, 33, 63, 0.14);
}

.status-pill.status-rejected {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(197, 33, 63, 0.14);
}

.admin-order-row {
  grid-template-columns: minmax(170px, 0.9fr) minmax(210px, 1fr) minmax(210px, 1fr) minmax(140px, 0.6fr) minmax(160px, 0.65fr) minmax(120px, auto);
  min-width: 1180px;
}

.admin-order-row > div > span:not(.status-pill) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-order-row > div > b {
  margin-top: 4px;
  color: var(--navy);
  font-weight: 650;
}

.admin-order-row > div > small {
  color: var(--muted);
}

.order-route b {
  color: var(--brand);
}

.order-status-cell {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.company-portal {
  padding-top: 54px;
}

.company-status {
  margin-bottom: 22px;
}

.approval-hero {
  min-width: 220px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: var(--shadow-sm);
}

.approval-hero span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.approval-status-text {
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 24px;
  line-height: 1;
  text-transform: capitalize;
}

.approval-approved {
  color: var(--success);
  background: var(--success-soft);
}

.approval-pending {
  color: var(--warning);
  background: var(--warning-soft);
}

.approval-rejected,
.approval-blocked {
  color: var(--danger);
  background: var(--danger-soft);
}

.portal-tabs {
  position: sticky;
  top: 96px;
  z-index: 9;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius-lg);
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.portal-tabs a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.portal-tabs a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.portal-section {
  scroll-margin-top: 170px;
  margin-top: 28px;
}

.company-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.company-overview-grid,
.company-documents-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.portal-overview-card {
  min-height: 270px;
}

.overview-facts,
.billing-grid,
.transport-facts {
  display: grid;
  gap: 12px;
}

.overview-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-facts div,
.billing-grid div,
.transport-facts div {
  border: 1px solid rgba(197, 210, 227, 0.74);
  border-radius: var(--radius);
  padding: 14px;
  background: #f8fbff;
}

.overview-facts span,
.billing-grid span,
.transport-facts span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overview-facts b,
.billing-grid b,
.transport-facts b {
  display: block;
  margin-top: 6px;
  color: var(--navy);
  line-height: 1.35;
}

.timeline-list {
  display: grid;
  gap: 16px;
}

.timeline-list div {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 5px;
  background: var(--brand);
  box-shadow: 0 0 0 5px var(--brand-soft);
}

.timeline-list p {
  color: var(--muted);
  line-height: 1.65;
}

.portal-section-heading {
  max-width: 900px;
}

.company-profile-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-span-2 {
  grid-column: span 2;
}

.document-drop {
  min-height: 136px;
}

.transport-card-list {
  display: grid;
  gap: 14px;
}

.transport-card {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-sm);
}

.transport-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.transport-code {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 950;
}

.transport-card h3 {
  margin: 10px 0 6px;
  font-size: 24px;
}

.transport-card p {
  color: var(--muted);
}

.transport-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.billing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.carrier-workspace {
  padding-top: 54px;
}

.carrier-status {
  margin-bottom: 22px;
}

.carrier-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.55fr);
  gap: 24px;
  align-items: start;
}

.marketplace-panel,
.assigned-panel {
  grid-column: 1;
}

.bid-panel,
.invoice-panel {
  grid-column: 2;
}

.marketplace-card-list,
.assigned-card-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.marketplace-card,
.assigned-transport-card,
.selected-order-card {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-sm);
}

.marketplace-card.is-selected {
  border-color: rgba(79, 70, 229, 0.58);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1), var(--shadow-sm);
}

.marketplace-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.marketplace-card h3,
.selected-order-card b {
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 23px;
  line-height: 1.18;
}

.marketplace-card p,
.selected-order-card p {
  color: var(--muted);
  line-height: 1.6;
}

.marketplace-facts,
.assigned-detail-grid {
  display: grid;
  gap: 12px;
}

.marketplace-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.assigned-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.marketplace-facts div,
.assigned-detail-grid div {
  border: 1px solid rgba(197, 210, 227, 0.74);
  border-radius: var(--radius);
  padding: 13px;
  background: #ffffff;
}

.marketplace-facts span,
.assigned-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.marketplace-facts b,
.assigned-detail-grid b {
  display: block;
  margin-top: 6px;
  color: var(--navy);
  line-height: 1.32;
}

.assigned-detail-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.assigned-transport-card .transport-card-main h3 {
  margin: 10px 0 6px;
}

.document-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.document-chip-list span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #49566a;
  background: #edf1f5;
  font-size: 12px;
  font-weight: 850;
}

.selected-order-card {
  min-height: 170px;
  align-content: center;
  margin-bottom: 18px;
  background: #f8fbff;
}

.landing-hero {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 48%, rgba(234, 243, 255, 0.78) 100%),
    url("./assets/cc-kurier-logo.png") right 5% center / min(42vw, 600px) auto no-repeat,
    #ffffff;
}

.hero-copy h1 {
  max-width: 1080px;
}

.secondary-cta {
  background: linear-gradient(180deg, #12804a, #0f663d);
  box-shadow: 0 12px 24px rgba(18, 128, 74, 0.22);
}

.secondary-cta:hover {
  background: linear-gradient(180deg, #15985a, #0b5934);
}

.platform-preview {
  align-content: stretch;
  gap: 18px;
}

.platform-preview p {
  margin-bottom: 4px;
}

.preview-list {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.preview-row {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(197, 210, 227, 0.76);
  border-radius: var(--radius);
  padding: 13px;
  background: rgba(255, 255, 255, 0.82);
}

.preview-row b {
  color: var(--navy);
}

.preview-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.calculator-section {
  padding-top: 94px;
  padding-bottom: 98px;
}

.landing-section-heading {
  max-width: 1040px;
}

.landing-section-heading p {
  max-width: 820px;
  font-size: 17px;
}

.landing-calculators {
  gap: 26px;
}

.landing-calculators .tool-panel {
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.landing-calculators .tool-header {
  align-items: flex-start;
  margin-bottom: 20px;
}

.landing-calculators .tool-header .section-kicker {
  margin-bottom: 8px;
}

.landing-calculators .result-grid div {
  background: linear-gradient(180deg, #ffffff, #eef6ff);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.step-card {
  position: relative;
  min-height: 250px;
  display: grid;
  align-content: start;
  gap: 16px;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.step-card::after {
  position: absolute;
  right: 22px;
  top: 22px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: var(--brand-soft);
  content: "";
}

.step-number {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--surface);
  background: linear-gradient(180deg, var(--brand), var(--brand-700));
  font-weight: 950;
  box-shadow: 0 14px 26px rgba(79, 70, 229, 0.22);
}

.step-card h3 {
  margin-bottom: 0;
  font-size: 23px;
}

.step-card p {
  color: var(--muted);
  line-height: 1.68;
}

.trust-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.trust-grid .feature-item {
  min-height: 240px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.trust-grid .feature-item:nth-child(2)::before {
  color: #14606a;
  background: #daf7f4;
}

.trust-grid .feature-item:nth-child(3)::before {
  color: var(--warning);
  background: var(--warning-soft);
}

.trust-grid .feature-item:nth-child(4)::before {
  color: var(--danger);
  background: var(--danger-soft);
}

.trust-grid .feature-item:nth-child(5)::before {
  color: var(--success);
  background: var(--success-soft);
}

.landing-portal {
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  :root {
    --page: min(100% - 40px, 1560px);
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .header-action {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .top-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .brand {
    min-width: 0;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    font-size: 10px;
  }

  .hero-grid,
  .calculator-layout,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .quote-card {
    min-height: auto;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-grid,
  .trust-grid,
  .step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-kpi-grid,
  .company-profile-form,
  .overview-facts,
  .transport-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-overview-grid,
  .company-documents-grid,
  .carrier-grid {
    grid-template-columns: 1fr;
  }

  .marketplace-panel,
  .assigned-panel,
  .bid-panel,
  .invoice-panel {
    grid-column: 1;
  }

  .marketplace-facts,
  .assigned-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console-grid > .console-panel,
  .console-grid > .mobile-card {
    grid-column: 1 / -1;
  }

  .workspace-heading {
    grid-template-columns: 1fr;
  }

  .database-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --page: min(100% - 24px, 1560px);
  }

  .site-header {
    gap: 10px;
    min-height: 74px;
    padding: 8px 12px;
  }

  .brand img,
  .mobile-header img {
    width: auto;
    height: 54px;
    max-width: 180px;
  }

  .brand {
    gap: 9px;
  }

  .brand-text small {
    display: none;
  }

  .header-action,
  .primary-btn,
  .ghost-btn {
    min-height: 42px;
    padding: 0 13px;
  }

  .header-action {
    min-height: 40px;
  }

  .section-shell,
  .workspace-shell,
  .auth-shell,
  .mobile-app-shell {
    padding-top: 42px;
    padding-bottom: 52px;
  }

  .hero .section-shell {
    padding-top: 54px;
    padding-bottom: 56px;
  }

  h1 {
    font-size: clamp(36px, 12vw, 48px);
  }

  .lead {
    font-size: 17px;
  }

  .hero-metrics,
  .step-grid,
  .kpi-grid,
  .company-kpi-grid,
  .company-profile-form,
  .overview-facts,
  .billing-grid,
  .transport-facts,
  .company-overview-grid,
  .company-documents-grid,
  .carrier-grid,
  .marketplace-facts,
  .assigned-detail-grid,
  .section-fields,
  .review-meta,
  .bid-offer,
  .calc-grid,
  .ops-form,
  .result-grid,
  .database-stats,
  .feature-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .portal-strip,
  .tool-header,
  .console-panel-header,
  .site-footer,
  .mobile-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-actions,
  .hero-actions,
  .mobile-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .top-nav a,
  .mobile-links a {
    min-height: 34px;
    padding: 0 10px;
  }

  .tool-panel,
  .feature-item,
  .console-panel,
  .mobile-card,
  .auth-panel,
  .quote-card {
    padding: 18px;
  }

  .order-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .admin-order-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .review-card-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-tabs {
    top: 75px;
    margin-left: -2px;
    margin-right: -2px;
  }

  .form-span-2 {
    grid-column: 1;
  }

  .transport-card-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .marketplace-card-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .approval-hero {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .brand-text {
    display: none;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* Premium product polish */
:root {
  --brand: #0759c9;
  --brand-600: #064ba8;
  --brand-700: #083d86;
  --brand-soft: #eef5ff;
  --navy: #0b1220;
  --ink: #172033;
  --muted: #647083;
  --muted-2: #94a0af;
  --line: #e5eaf1;
  --line-strong: #d3dbe7;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #f1f4f8;
  --success: #14784d;
  --success-soft: #eaf8f1;
  --warning: #95620d;
  --warning-soft: #fff7df;
  --danger: #b4233a;
  --danger-soft: #fff0f3;
  --info: #0759c9;
  --info-soft: #eef5ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.045);
  --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 30px 72px rgba(15, 23, 42, 0.11);
  --radius: 8px;
  --radius-lg: 8px;
  --page: min(1540px, calc(100% - 64px));
}

html {
  text-rendering: optimizeLegibility;
}

body {
  background: #f7f8fb;
  -webkit-font-smoothing: antialiased;
}

body.app-page {
  background:
    linear-gradient(180deg, #fbfcff 0, #f7f8fb 420px),
    #f7f8fb;
}

h1 {
  max-width: 1060px;
  margin-bottom: 20px;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1.01;
}

h2 {
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.12;
}

h3 {
  font-size: 19px;
  letter-spacing: 0;
}

.site-header {
  min-height: 82px;
  gap: 24px;
  padding: 9px max(32px, calc((100vw - 1540px) / 2 + 32px));
  border-bottom: 1px solid rgba(229, 234, 241, 0.92);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.brand {
  min-width: 252px;
  gap: 11px;
}

.brand img {
  height: 64px;
  max-width: 212px;
}

.brand-text strong {
  color: #101828;
  font-size: 18px;
  font-weight: 850;
}

.brand-text small {
  color: #6b7482;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.top-nav {
  gap: 4px;
}

.top-nav a,
.mobile-links a,
.primary-link {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 12px;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.top-nav a:hover,
.mobile-links a:hover,
.primary-link:hover {
  border-color: #e5eaf1;
  color: #0b1220;
  background: #f8fafc;
}

.top-nav a.is-active {
  border-color: rgba(79, 70, 229, 0.16);
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: none;
}

.header-action,
.primary-btn,
.ghost-btn,
.row-action {
  border-radius: 7px;
  font-weight: 780;
  letter-spacing: 0;
}

.header-action,
.primary-btn {
  background: linear-gradient(180deg, #1167dc, var(--brand-600));
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.18);
}

.header-action:hover,
.primary-btn:hover {
  background: linear-gradient(180deg, #1a72e8, var(--brand-700));
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
  transform: translateY(-1px);
}

.ghost-btn,
.row-action {
  border-color: #d8e0eb;
  color: #263447;
  background: #ffffff;
}

.ghost-btn:hover,
.row-action:hover {
  border-color: rgba(79, 70, 229, 0.28);
  color: var(--brand);
  background: #f6faff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.055);
}

button:disabled,
.primary-btn:disabled {
  box-shadow: none;
  transform: none;
}

.section-shell {
  padding: 76px 0;
}

.workspace-shell,
.auth-shell,
.mobile-app-shell {
  min-height: calc(100vh - 82px);
}

.admin-dashboard,
.company-portal,
.carrier-workspace {
  padding-top: 48px;
}

.hero {
  border-bottom-color: #e8edf4;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.96) 48%, rgba(247, 250, 255, 0.9) 100%),
    url("./assets/cc-kurier-logo.png") right 7% center / min(34vw, 500px) auto no-repeat,
    #ffffff;
}

.hero .section-shell {
  padding-top: 92px;
  padding-bottom: 96px;
}

.hero-grid {
  gap: 56px;
}

.lead,
.section-heading p,
.feature-item p,
.muted-copy,
.quote-card p {
  color: #667085;
  line-height: 1.72;
}

.lead {
  max-width: 860px;
  font-size: 18px;
}

.section-heading {
  margin-bottom: 36px;
}

.workspace-heading {
  gap: 28px;
}

.workspace-heading h1 {
  max-width: 920px;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.04;
}

.section-kicker {
  gap: 10px;
  margin-bottom: 10px;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.section-kicker::before {
  width: 18px;
  height: 1px;
  border-radius: 999px;
  background: var(--brand);
}

.quote-card,
.tool-panel,
.feature-item,
.console-panel,
.mobile-card,
.auth-panel,
.mini-card,
.table-panel,
.kpi-card,
.review-card,
.transport-card,
.marketplace-card,
.assigned-transport-card,
.selected-order-card,
.order-row,
.step-card,
.approval-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.tool-panel,
.feature-item,
.console-panel,
.mobile-card,
.auth-panel {
  padding: 28px;
}

.tool-panel::before,
.console-panel::before,
.mobile-card::before,
.auth-panel::before {
  display: none;
}

.tool-panel:hover,
.console-panel:hover,
.auth-panel:hover,
.kpi-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.feature-item:hover,
.transport-card:hover,
.marketplace-card:hover,
.assigned-transport-card:hover,
.review-card:hover,
.mini-card:hover,
.step-card:hover {
  border-color: #d7e1ee;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.quote-card {
  padding: 30px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.quote-card strong {
  color: var(--brand);
  font-size: clamp(38px, 4.2vw, 56px);
}

.hero-metrics {
  gap: 14px;
}

.hero-metrics div,
.result-grid div,
.database-stats div,
.overview-facts div,
.billing-grid div,
.transport-facts div,
.marketplace-facts div,
.assigned-detail-grid div,
.review-meta span,
.bid-offer div,
.preview-row {
  border-color: var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  box-shadow: none;
}

.hero-metrics span,
.quote-card span,
.result-grid span,
.database-stats span,
.overview-facts span,
.billing-grid span,
.transport-facts span,
.marketplace-facts span,
.assigned-detail-grid span,
.bid-offer span,
.admin-order-row > div > span:not(.status-pill),
.kpi-card span:not(.kpi-icon) {
  color: #7a8594;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.075em;
}

.hero-metrics strong {
  font-size: 22px;
}

.calculator-layout,
.console-grid,
.feature-grid,
.auth-layout {
  gap: 24px;
}

.tool-header,
.console-panel-header {
  gap: 16px;
  margin-bottom: 22px;
  align-items: flex-start;
}

.console-panel-header h3,
.tool-header h3 {
  color: #101828;
  font-size: 19px;
  font-weight: 760;
}

.feature-item {
  position: relative;
  min-height: 218px;
  gap: 14px;
  padding: 26px;
}

.feature-item::before,
.metric-card::before {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(79, 70, 229, 0.14);
  border-radius: 8px;
  color: var(--brand);
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
    var(--brand-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  content: "";
}

.trust-grid .feature-item::before {
  color: var(--brand);
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
    var(--brand-soft);
}

.trust-grid .feature-item:nth-child(2)::before {
  color: #147864;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
    #e9f8f5;
}

.trust-grid .feature-item:nth-child(3)::before {
  color: #95620d;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
    #fff7df;
}

.trust-grid .feature-item:nth-child(4)::before {
  color: #b4233a;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
    #fff0f3;
}

.trust-grid .feature-item:nth-child(5)::before {
  color: #14784d;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
    #eaf8f1;
}

.tag,
.status-pill,
.transport-code,
.document-chip-list span,
.review-action-note {
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.01em;
}

.status-open,
.status-pill.status-pending,
.status-pending {
  color: #8a5a0a;
  background: #fff8e8;
  border-color: #f2ddae;
}

.status-pill.status-approved,
.status-pill.status-accepted,
.status-approved,
.status-accepted,
.status-success,
.status-done,
.tag.success {
  color: #126b45;
  background: #eef9f3;
  border-color: #cfeada;
}

.status-pill.status-assigned,
.status-assigned,
.status-active {
  color: #0f6674;
  background: #ecf9fb;
  border-color: #cbe9ee;
}

.status-pill.status-rejected,
.status-rejected,
.tag.danger,
.status-danger {
  color: #a41f35;
  background: #fff2f4;
  border-color: #f1cbd2;
}

.status-neutral {
  color: #596579;
  background: #f3f5f8;
  border-color: #e1e7ef;
}

.status-info,
.tag {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #d7e7ff;
}

.tag.secondary,
.tag.warning,
.status-warning {
  color: #8a5a0a;
  background: #fff8e8;
  border-color: #f2ddae;
}

label {
  color: #344054;
  font-size: 13px;
  font-weight: 720;
}

.helper-text,
.field-error {
  font-size: 12px;
  font-weight: 620;
}

input,
select,
textarea {
  min-height: 44px;
  border-color: #d8e0eb;
  border-radius: 7px;
  color: #101828;
  background: #ffffff;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c7d1df;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(79, 70, 229, 0.66);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.form-section {
  border-color: var(--line);
  padding: 22px;
  background: #ffffff;
}

.form-section legend {
  color: #475467;
  font-size: 11px;
  font-weight: 800;
}

.section-fields,
.ops-form,
.calc-grid {
  gap: 16px;
}

.check-row,
.file-drop {
  border-color: #d8e0eb;
  background: #fbfcfe;
}

.check-row:hover,
.file-drop:hover,
.file-drop:focus-within {
  border-color: rgba(79, 70, 229, 0.34);
  background: #f7fbff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.06);
}

.result-note {
  min-height: 44px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #d9e7fb;
  border-left: 1px solid #d9e7fb;
  border-radius: 8px;
  padding: 12px 14px;
  color: #526174;
  background: #f7fbff;
  font-size: 13px;
}

.result-note::before {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 6px;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
  content: "";
}

.kpi-grid {
  gap: 14px;
  margin-bottom: 26px;
}

.kpi-card {
  min-height: 136px;
  padding: 20px;
  background: #ffffff;
}

.kpi-card[data-tone="brand"] {
  --tone: var(--brand);
}

.kpi-card[data-tone="info"] {
  --tone: var(--info);
}

.kpi-card[data-tone="warning"] {
  --tone: var(--warning);
}

.kpi-card[data-tone="success"] {
  --tone: var(--success);
}

.kpi-card[data-tone="danger"] {
  --tone: var(--danger);
}

.kpi-card[data-tone="neutral"] {
  --tone: #647083;
}

.kpi-card strong {
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 780;
}

.kpi-icon {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--tone, var(--brand)) 20%, transparent);
  border-radius: 8px;
  color: var(--tone, var(--brand));
  background: color-mix(in srgb, var(--tone, var(--brand)) 9%, white);
  font-size: 0;
}

.kpi-icon::before {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 5px;
  content: "";
}

.review-card,
.mini-card,
.transport-card,
.marketplace-card,
.assigned-transport-card,
.selected-order-card,
.order-row {
  padding: 18px;
  background: #ffffff;
}

.empty-state {
  min-height: 220px;
  border-color: #d8e4f2;
  background: #fbfcfe;
}

.empty-state b {
  font-size: 17px;
  font-weight: 760;
}

.empty-icon {
  position: relative;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid rgba(79, 70, 229, 0.12);
  color: var(--brand);
  background: var(--brand-soft);
}

/* Empty-state icons are supplied as inline SVG via api.icon(); the
   previous ::before/::after glyph overlapped that SVG, so it is
   neutralized here. */
.empty-icon::before,
.empty-icon::after {
  content: none;
}

.empty-icon .icon {
  width: 24px;
  height: 24px;
}

.approval-hero {
  padding: 18px 20px;
}

.approval-status-text {
  font-size: 20px;
  font-weight: 760;
}

.portal-tabs {
  top: 84px;
  gap: 4px;
  border-color: var(--line);
  padding: 6px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.portal-tabs a {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #475467;
  font-size: 13px;
  font-weight: 760;
}

.portal-tabs a:hover {
  border-color: #e5eaf1;
  color: var(--brand);
  background: #f8fbff;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.transport-card h3,
.marketplace-card h3,
.selected-order-card b {
  color: #101828;
  font-size: 22px;
  font-weight: 760;
}

.marketplace-card.is-selected {
  border-color: rgba(79, 70, 229, 0.42);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08), var(--shadow-sm);
}

.selected-order-card {
  background: #fbfcfe;
}

.secondary-cta {
  background: linear-gradient(180deg, #17865a, #116d48);
  box-shadow: 0 10px 22px rgba(20, 120, 77, 0.17);
}

.secondary-cta:hover {
  background: linear-gradient(180deg, #1a9665, #0f5f3f);
  box-shadow: 0 14px 28px rgba(20, 120, 77, 0.2);
}

.landing-calculators .tool-panel {
  box-shadow: var(--shadow-sm);
}

.landing-calculators .tool-panel:hover {
  box-shadow: var(--shadow-md);
}

.step-card {
  min-height: 238px;
  padding: 28px;
}

.step-card::after {
  display: none;
}

.step-number {
  width: fit-content;
  height: 34px;
  border: 1px solid #d7e7ff;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: none;
  font-size: 12px;
}

.site-footer {
  border-top-color: var(--line);
  background: #ffffff;
}

@media (max-width: 1180px) {
  :root {
    --page: min(100% - 40px, 1540px);
  }

  .site-header {
    min-height: 78px;
  }

  .brand img {
    height: 58px;
  }
}

@media (max-width: 760px) {
  :root {
    --page: min(100% - 24px, 1540px);
  }

  .site-header {
    gap: 8px;
    min-height: 70px;
    padding: 8px 12px;
  }

  .brand img {
    height: 50px;
  }

  .header-action,
  .primary-btn,
  .ghost-btn {
    min-height: 40px;
  }

  .top-nav a,
  .mobile-links a {
    min-height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }

  .section-shell,
  .workspace-shell,
  .auth-shell,
  .mobile-app-shell {
    padding-top: 38px;
    padding-bottom: 50px;
  }

  .hero .section-shell {
    padding-top: 50px;
    padding-bottom: 54px;
  }

  h1 {
    font-size: clamp(34px, 11vw, 46px);
  }

  .tool-panel,
  .feature-item,
  .console-panel,
  .mobile-card,
  .auth-panel,
  .quote-card,
  .step-card {
    padding: 20px;
  }

  .portal-tabs {
    top: 118px;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .brand,
  .header-action,
  .top-nav {
    grid-column: auto;
    grid-row: auto;
  }

  .top-nav {
    justify-content: center;
    overflow-x: visible;
  }
}

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

/* ============================================================
   v4 - Operations workspace (carrier app + company workspace)
   Sidebar-driven, dense-table layout inspired by dispatch tools
   ============================================================ */

.workspace-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  width: var(--page);
  margin: 0 auto 60px;
  gap: 26px;
  align-items: start;
  padding-top: 22px;
}

.workspace-nav {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 4px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.workspace-nav h2 {
  margin: 2px 10px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.wnav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.wnav-item:hover { background: var(--surface-3); }

.wnav-item.is-active {
  background: var(--brand-soft);
  color: var(--brand-700);
  font-weight: 650;
}

.wnav-item .count {
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.wnav-item.is-active .count { background: var(--brand); color: #fff; }
.wnav-divider { height: 1px; margin: 8px 6px; background: var(--line); }

.workspace-main { display: grid; gap: 18px; min-width: 0; }

.workspace-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.workspace-topline h1 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.1;
}

.workspace-topline p { color: var(--muted); }

/* Dense data table */
.table-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-scroll { overflow-x: auto; }

.data-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr.row-click { cursor: pointer; }
.data-table tbody tr.row-click:hover td { background: #f4f8fd; }
.data-table td b { color: var(--navy); font-weight: 650; }
.data-table td small { display: block; color: var(--muted); }

.table-empty {
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}
.table-empty b { display: block; margin-bottom: 4px; color: var(--navy); }

/* Expanded job detail row */
.detail-row td {
  padding: 0;
  background: var(--surface-2);
  white-space: normal;
}

.job-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 18px;
}

.job-detail .facts { display: grid; gap: 3px; align-content: start; font-size: 13.5px; }
.job-detail .facts span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.job-detail .facts b { color: var(--navy); }
.job-detail .facts small { color: var(--muted); }

.job-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}

.job-actions select { max-width: 220px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--navy); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-700); }
.btn-danger-outline { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 32, 56, 0.45);
}
.modal-overlay.is-open { display: flex; }

.modal {
  width: min(620px, 100%);
  max-height: min(86vh, 780px);
  overflow-y: auto;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-head h3 { margin: 0; }
.modal-close {
  padding: 4px 10px;
  border-radius: var(--radius);
  background: var(--surface-3);
  font-size: 16px;
  cursor: pointer;
}

.modal form { display: grid; gap: 12px; }
.modal form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--navy); }
.modal form input, .modal form select, .modal form textarea {
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 14px;
}
.modal .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Wide modal (Create shipment): the default .modal caps at 620px, which
   crushes the 3-column ops-form to ~75px inputs. Give it real width, three
   comfortable columns (Pickup / Delivery / Goods), and stack the fields
   within each column so every box is full-width and no label truncates. */
.modal-wide { width: min(1140px, calc(100% - 32px)); }
.modal-wide .ops-form {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
/* Full-width, readable fields inside each section (short date|time stays paired) */
.modal-wide .section-fields { grid-template-columns: 1fr; gap: 14px; }
.modal-wide .date-time-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-wide form input,
.modal-wide form select {
  padding: 12px 14px;
  font-size: 15px;
  min-height: 46px;
}
.modal-wide .form-section { padding: 20px; }
@media (max-width: 760px) {
  .modal-wide { width: min(100%, calc(100% - 24px)); }
  .modal-wide .ops-form { grid-template-columns: 1fr; }
}

/* Vehicle type picker */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.type-card {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.type-card b { display: block; color: var(--navy); }
.type-card small { color: var(--muted); }
.type-card.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.type-group-label {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Verification checklist */
.check-list { display: grid; gap: 8px; }
.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
}
.check-item.is-done { color: var(--success); }
.check-item.is-done b { text-decoration: line-through; color: var(--success); }

.settings-block { display: grid; gap: 12px; max-width: 560px; }
.settings-block .check-row { display: flex; gap: 8px; align-items: center; font-size: 14px; }

/* Toolbar over tables */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.table-toolbar h2 { margin: 0; font-size: 20px; }

/* Admin order list overflow fix */
.order-list { overflow-x: auto; }
.order-list .order-row { min-width: 1040px; }

@media (max-width: 1000px) {
  .workspace-shell { grid-template-columns: 1fr; }
  .workspace-nav {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }
  .workspace-nav h2, .wnav-divider { display: none; }
}

/* ============================================================
   v5 - Operational dashboards
   Action-first command surfaces for admin, company and carrier
   ============================================================ */

.ops-command-center {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.9fr);
  gap: 18px;
  margin-bottom: 24px;
}

.admin-command-center {
  margin-top: 18px;
}

.command-primary {
  min-height: 100%;
}

.command-side-grid,
.ops-metric-grid,
.ops-schedule-grid,
.ops-dashboard-grid {
  display: grid;
  gap: 14px;
}

.command-side-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-tile,
.ops-metric {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 253, 0.96)),
    var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.action-tile:hover,
.ops-metric:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.24);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 32, 56, 0.1);
}

.action-tile:focus-visible,
.ops-metric:focus-visible,
.action-item button:focus-visible,
.quick-bid-card button:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.18);
  outline-offset: 3px;
}

.action-tile span,
.ops-metric span,
.action-item span {
  color: #667085;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.action-tile strong,
.ops-metric strong {
  margin: 8px 0 2px;
  color: #101828;
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 800;
  line-height: 1;
}

.action-tile small,
.ops-metric small,
.action-item small,
.quick-bid-card p {
  color: var(--muted);
}

.ops-schedule-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.workspace-view-panel {
  overflow: visible;
}

.ops-dashboard {
  display: grid;
  gap: 18px;
}

.ops-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-metric {
  cursor: pointer;
}

.ops-dashboard-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: start;
}

.ops-dashboard-grid .command-primary {
  grid-row: span 2;
}

.operations-widget {
  min-width: 0;
}

.action-feed {
  display: grid;
  gap: 10px;
}

.compact-feed {
  gap: 8px;
}

.action-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 14px;
  border: 1px solid #e4ebf4;
  border-radius: var(--radius);
  background: #fbfcfe;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.action-item:hover {
  border-color: #d3deec;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 32, 56, 0.06);
}

.action-item-strong {
  border-color: rgba(79, 70, 229, 0.2);
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.action-item > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.action-item b {
  overflow: hidden;
  color: #101828;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.action-item small {
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.action-item .status-pill,
.action-item .btn,
.action-item .row-action {
  justify-self: end;
  white-space: nowrap;
}

.compact-empty {
  min-height: 132px;
  padding: 22px;
  align-content: center;
}

.compact-empty::before {
  width: 34px;
  height: 34px;
}

.quick-bid-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(234, 243, 255, 0.74), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.quick-bid-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.quick-bid-card .btn {
  justify-self: start;
}

@media (max-width: 1180px) {
  .ops-command-center,
  .ops-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .ops-schedule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ops-command-center,
  .ops-dashboard,
  .ops-dashboard-grid {
    gap: 14px;
  }

  .command-side-grid,
  .ops-schedule-grid,
  .ops-metric-grid {
    grid-template-columns: 1fr;
  }

  .action-tile,
  .ops-metric {
    min-height: 112px;
  }

  .action-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .action-item .status-pill,
  .action-item .btn,
  .action-item .row-action {
    justify-self: start;
  }
}

/* ============================================================
   v6 - Transport object workspace
   One shipment, one scrolling operational page
   ============================================================ */

.transport-shell {
  width: var(--page);
  margin: 0 auto;
  padding: 34px 0 72px;
}

.transport-status-line {
  margin-bottom: 18px;
}

.transport-empty {
  min-height: 460px;
}

.transport-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.transport-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 30px;
  border: 1px solid rgba(197, 210, 227, 0.92);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 18%, rgba(234, 243, 255, 0.9), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-sm);
}

.transport-hero-main {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.transport-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.transport-breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}

.transport-hero-panel h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(38px, 4vw, 64px);
  line-height: 1;
}

.transport-hero-panel p {
  max-width: 900px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 22px);
}

.transport-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.transport-hero-meta > span:not(.status-pill) {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: #475467;
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
}

.transport-hero-card,
.transport-side-card,
.transport-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.transport-hero-card {
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 22px;
  background: #fbfcfe;
}

.transport-hero-card strong {
  color: var(--navy);
  font-size: 30px;
  line-height: 1;
  text-transform: capitalize;
}

.transport-hero-card small {
  color: var(--muted);
}

.transport-object-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.transport-main-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.transport-side-column {
  position: sticky;
  top: 116px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.transport-section {
  padding: 24px;
}

.transport-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.transport-section-head h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
}

.transport-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.transport-step {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 15px;
  border: 1px solid #e4ebf4;
  border-radius: var(--radius);
  background: #fbfcfe;
}

.transport-step span {
  width: 14px;
  height: 14px;
  border: 2px solid #cbd7e6;
  border-radius: 999px;
  background: #ffffff;
}

.transport-step b {
  color: var(--navy);
  text-transform: capitalize;
}

.transport-step small {
  color: var(--muted);
}

.transport-step.is-done {
  border-color: #cfeada;
  background: #f4fbf7;
}

.transport-step.is-done span {
  border-color: var(--success);
  background: var(--success);
}

.transport-step.is-current {
  border-color: rgba(79, 70, 229, 0.34);
  background: #f7fbff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.06);
}

.transport-step.is-current span {
  border-color: var(--brand);
  box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.12);
}

.transport-step.is-muted {
  opacity: 0.56;
}

.transport-route-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.85fr) minmax(0, 1fr);
  gap: 14px;
}

.transport-stop-card,
.transport-map-placeholder,
.transport-resource-card,
.transport-bid-card,
.transport-document-summary,
.transport-document-row,
.transport-note,
.transport-activity-item,
.transport-upload-card,
.transport-cmr-preview {
  border: 1px solid #e4ebf4;
  border-radius: var(--radius);
  background: #fbfcfe;
}

.transport-stop-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.transport-stop-card > span,
.transport-resource-card > span,
.transport-bid-card span,
.transport-document-summary > span,
.transport-document-row span,
.transport-activity-item span,
.transport-note small,
.payment-lines span,
.transport-check-row span {
  color: #667085;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.transport-stop-card h3 {
  margin: 0;
  font-size: 20px;
}

.transport-stop-card p {
  color: #475467;
}

.transport-stop-meta {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}

.transport-stop-meta small {
  color: var(--muted);
}

.transport-map-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 260px;
  padding: 20px;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(219, 228, 239, 0.58) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(0deg, rgba(219, 228, 239, 0.58) 1px, transparent 1px) 0 0 / 34px 34px,
    #f8fbff;
}

.transport-map-placeholder b {
  position: relative;
  z-index: 1;
  color: var(--navy);
}

.transport-map-placeholder small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 700;
}

.map-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: min(220px, 80%);
}

.map-line span {
  width: 18px;
  height: 18px;
  border: 4px solid #ffffff;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.25);
}

.map-line i {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--success));
}

.transport-resource-grid,
.transport-document-grid,
.transport-history-grid {
  display: grid;
  gap: 14px;
}

.transport-resource-grid,
.transport-document-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.transport-history-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(280px, 0.8fr);
  align-items: start;
}

.transport-resource-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.transport-resource-card b {
  color: var(--navy);
  font-size: 18px;
}

.transport-resource-card small {
  color: var(--muted);
}

.status-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #98a2b3;
}

.status-dot.status-approved {
  background: var(--success);
}

.status-dot.status-pending {
  background: var(--warning);
}

.transport-list {
  display: grid;
  gap: 10px;
}

.transport-bid-card,
.transport-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.transport-bid-card b {
  display: block;
  margin: 4px 0;
  color: var(--navy);
  font-size: 22px;
}

.transport-bid-card small,
.transport-document-row small {
  color: var(--muted);
}

.transport-bid-side,
.transport-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.transport-document-summary {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.transport-document-summary b,
.transport-document-row b {
  color: var(--navy);
}

.transport-cmr-preview {
  margin-top: 14px;
  padding: 18px;
  background: #ffffff;
}

.cmr-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.cmr-mini-grid div,
.payment-lines div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.cmr-mini-grid span {
  color: #667085;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.cmr-mini-grid b,
.payment-lines b {
  color: var(--navy);
}

.transport-upload-card {
  margin: 14px 0;
  padding: 16px;
}

.transport-upload-card form {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.transport-notes-panel,
.transport-activity-panel {
  display: grid;
  gap: 12px;
}

.transport-notes-panel form {
  display: grid;
  gap: 10px;
}

.transport-notes-panel textarea {
  min-height: 120px;
}

.transport-note {
  padding: 14px;
  background: #ffffff;
}

.transport-note p {
  color: var(--ink);
}

.transport-activity-panel h3 {
  margin: 0;
  font-size: 18px;
}

.transport-activity-list {
  display: grid;
  gap: 8px;
}

.transport-activity-item {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 13px 13px 13px 34px;
  background: #ffffff;
}

.transport-activity-item::before {
  position: absolute;
  top: 18px;
  left: 14px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  content: "";
}

.transport-activity-item b {
  color: var(--navy);
  font-size: 13.5px;
}

.transport-activity-item small {
  color: var(--muted);
}

.transport-side-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.transport-side-card h3 {
  margin: 0;
  font-size: 28px;
  text-transform: capitalize;
}

.transport-side-card p {
  color: var(--muted);
}

.payment-lines {
  display: grid;
  gap: 8px;
}

.transport-check-list,
.transport-action-stack,
.action-stack {
  display: grid;
  gap: 8px;
}

.transport-check-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.transport-check-row:last-child {
  border-bottom: 0;
}

.transport-check-row b {
  color: var(--warning);
}

.transport-check-row.is-done b {
  color: var(--success);
}

.transport-inline-link {
  color: var(--brand);
  font-weight: 760;
  text-decoration: none;
}

.transport-inline-link:hover {
  text-decoration: underline;
}

.action-stack {
  justify-items: end;
}

.action-stack .row-action {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.shipment-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}
.shipment-card > div:first-child {
  min-width: 0;
  display: grid;
  gap: 10px;
}
.shipment-card b,
.shipment-card small {
  max-width: none;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}
.shipment-card .logistics-route-visual {
  margin-top: 2px;
}
.shipment-card .route-visual-metrics {
  justify-content: flex-start;
}
.shipment-card .data-note {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .transport-hero-panel,
  .transport-object-layout,
  .transport-route-grid,
  .transport-history-grid {
    grid-template-columns: 1fr;
  }

  .transport-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transport-timeline,
  .transport-resource-grid,
  .transport-document-grid,
  .cmr-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .transport-shell {
    padding-top: 22px;
    padding-bottom: 48px;
  }

  .transport-hero-panel,
  .transport-section {
    padding: 20px;
  }

  .transport-side-column,
  .transport-timeline,
  .transport-resource-grid,
  .transport-document-grid,
  .cmr-mini-grid,
  .transport-upload-card form {
    grid-template-columns: 1fr;
  }

  .transport-bid-card,
  .transport-document-row {
    grid-template-columns: 1fr;
  }

  .transport-bid-side,
  .transport-document-actions,
  .action-stack {
    justify-content: flex-start;
    justify-items: start;
  }
}

/* ============================================================
   v7 - Carrier app, driver-first marketplace
   Mobile-first Uber Driver style cards scoped to app.html
   ============================================================ */

.carrier-driver-page {
  background:
    linear-gradient(180deg, #eef6ff 0, #f7f9fc 310px),
    #f7f9fc;
}

.carrier-driver-page .site-header {
  min-height: 78px;
}

.carrier-driver-page .brand img {
  height: 58px;
}

/* Specificity note: the Pass B ".workspace-shell" rule is appended at
   end-of-file and would otherwise override the single-column carrier
   layout (same specificity, later in source). Qualifying with the page
   class raises specificity so the horizontal pill nav keeps its full
   width instead of being crushed into a 232px column. */
.carrier-driver-page .carrier-shell {
  grid-template-columns: 1fr;
  width: min(1180px, calc(100% - 28px));
  gap: 16px;
  padding-top: 16px;
}

.carrier-driver-page .workspace-nav {
  position: sticky;
  top: 86px;
  z-index: 12;
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.carrier-driver-page .workspace-nav h2,
.carrier-driver-page .wnav-divider {
  display: none;
}

.carrier-driver-page .wnav-item {
  flex: 0 0 auto;
  min-height: 38px;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 740;
  white-space: nowrap;
}

.carrier-driver-page .wnav-item.is-active {
  color: #ffffff;
  background: #111827;
}

.carrier-driver-page .wnav-item.is-active .count {
  color: #111827;
  background: #ffffff;
}

.carrier-driver-page .workspace-main {
  gap: 14px;
}

.carrier-driver-page .workspace-topline {
  align-items: flex-start;
}

.carrier-driver-page .workspace-topline h1 {
  font-size: clamp(30px, 5vw, 48px);
}

.carrier-driver-page .workspace-topline p {
  align-self: center;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  padding: 0 11px;
  color: #40506a;
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 740;
}

.carrier-view-panel {
  overflow: visible;
}

.driver-home,
.driver-card-stack,
.marketplace-card-grid,
.driver-section {
  display: grid;
  gap: 14px;
}

.driver-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 24px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 14%, rgba(48, 211, 144, 0.42), transparent 30%),
    linear-gradient(145deg, #0f172a, #111827 62%, #10243f);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.driver-kicker {
  color: #667085;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.driver-hero-card .driver-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.driver-hero-card h2 {
  margin: 8px 0 6px;
  color: #ffffff;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 0.95;
}

.driver-hero-card p {
  color: rgba(255, 255, 255, 0.72);
}

.driver-hero-action,
.driver-bid-button {
  min-height: 52px;
  border-radius: 999px;
  padding: 0 24px;
  color: #ffffff;
  background: #0f8f5f;
  font-weight: 820;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(15, 143, 95, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.driver-hero-action:hover,
.driver-bid-button:hover {
  transform: translateY(-1px);
  background: #0c7e53;
  box-shadow: 0 20px 42px rgba(15, 143, 95, 0.28);
}

.driver-bid-button:disabled {
  color: #475467;
  background: #eef3f8;
  box-shadow: none;
  cursor: default;
}

.driver-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.driver-stat {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid #e1e9f3;
  border-radius: 18px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 32, 56, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.driver-stat:hover,
.marketplace-load-card:hover,
.assigned-workspace-card:hover,
.driver-bid-history-card:hover,
.driver-invoice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.22);
  box-shadow: 0 18px 42px rgba(15, 32, 56, 0.11);
}

.driver-stat span {
  color: #667085;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.driver-stat strong {
  color: #101828;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
}

.driver-stat small {
  color: var(--muted);
}

.driver-stat.is-green strong { color: #0f8f5f; }
.driver-stat.is-blue strong { color: var(--brand); }
.driver-stat.is-warning strong { color: var(--warning); }

.driver-section {
  padding: 18px;
  border: 1px solid #e1e9f3;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.driver-section-full {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.driver-section-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.driver-section-head h3 {
  margin: 2px 0 0;
  font-size: clamp(20px, 2vw, 28px);
}

.marketplace-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketplace-card-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.marketplace-load-card,
.assigned-workspace-card,
.driver-bid-history-card,
.driver-invoice-card {
  border: 1px solid #e1e9f3;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.marketplace-load-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.load-card-top,
.assigned-card-head,
.driver-bid-history-card,
.driver-invoice-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.load-card-top h3,
.assigned-card-head h3,
.driver-bid-history-card h3,
.driver-invoice-card h3 {
  margin: 3px 0 0;
  color: #101828;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.08;
}

.load-card-top h3 span,
.assigned-card-head h3 span {
  color: #98a2b3;
  font-size: 0.72em;
  font-weight: 650;
}

.load-route-line,
.assigned-map-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.load-route-line i,
.assigned-map-strip i {
  flex: 1;
  min-width: 42px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f8f5f, var(--brand));
}

.load-facts-grid,
.assigned-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.load-facts-grid div,
.assigned-detail-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #f8fbff;
}

.load-facts-grid span,
.assigned-detail-grid span {
  color: #667085;
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.load-facts-grid b,
.assigned-detail-grid b {
  color: #101828;
  font-size: 13.5px;
}

.assigned-detail-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
}

.assigned-workspace-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.assigned-workspace-card.is-compact {
  border-color: rgba(15, 143, 95, 0.22);
}

.assigned-card-head p,
.driver-bid-history-card p,
.driver-invoice-card p {
  color: var(--muted);
}

.crew-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #cbd7e6;
  border-radius: 16px;
  background: #fbfcfe;
}

.assigned-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.driver-bid-history-card,
.driver-invoice-card {
  padding: 16px;
}

.bid-history-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.bid-history-side strong {
  color: #101828;
  font-size: 24px;
}

.driver-invoice-card .btn {
  align-self: center;
}

.carrier-driver-page .modal {
  border-radius: 22px;
}

.carrier-driver-page .modal .btn-primary {
  min-height: 48px;
  border-radius: 999px;
}

@media (max-width: 900px) {
  .carrier-shell {
    width: min(100% - 20px, 720px);
  }

  .carrier-driver-page .workspace-nav {
    top: 78px;
  }

  .driver-stats,
  .marketplace-card-grid,
  .marketplace-card-grid-wide,
  .load-facts-grid,
  .assigned-detail-grid,
  .crew-control-grid {
    grid-template-columns: 1fr 1fr;
  }

  .driver-hero-card,
  .load-card-top,
  .assigned-card-head,
  .driver-bid-history-card,
  .driver-invoice-card {
    grid-template-columns: 1fr;
  }

  .bid-history-side {
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .carrier-driver-page .top-nav {
    display: none;
  }

  .carrier-driver-page .site-header {
    grid-template-columns: 1fr auto;
  }

  .carrier-driver-page .brand img {
    height: 48px;
  }

  .carrier-driver-page .workspace-topline {
    display: grid;
  }

  .driver-hero-card,
  .driver-section,
  .marketplace-load-card,
  .assigned-workspace-card,
  .driver-bid-history-card,
  .driver-invoice-card {
    border-radius: 18px;
  }

  .driver-stats,
  .load-facts-grid,
  .assigned-detail-grid,
  .crew-control-grid {
    grid-template-columns: 1fr;
  }

  .driver-section-head,
  .assigned-card-actions {
    align-items: stretch;
  }

  .driver-section-head {
    display: grid;
  }

  .assigned-card-actions .btn,
  .driver-invoice-card .btn,
  .driver-bid-button,
  .driver-hero-action {
    width: 100%;
  }
}

/* ============================================================
   v8 - Visual logistics language
   Route movement, map placeholders and mini timelines
   ============================================================ */

.logistics-route-visual {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-width: 520px;
}

.logistics-route-visual.is-compact {
  max-width: 420px;
}

.route-node {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid #e3ebf5;
  border-radius: 12px;
  background: #ffffff;
}

.route-node span {
  color: #667085;
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.route-node b {
  color: #101828;
  font-size: 13.5px;
  line-height: 1.2;
}

.route-node.pickup {
  border-left: 3px solid var(--brand);
}

.route-node.delivery {
  border-left: 3px solid var(--success);
}

.route-connector {
  position: relative;
  display: grid;
  justify-items: start;
  height: 24px;
  padding-left: 18px;
}

.route-connector i {
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--success));
}

.route-connector em {
  position: absolute;
  left: 13px;
  bottom: -1px;
  width: 0;
  height: 0;
  border-top: 7px solid var(--success);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.route-visual-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.route-visual-metrics span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dfe8f4;
  border-radius: 999px;
  padding: 0 9px;
  color: #475467;
  background: #f8fbff;
  font-size: 11.5px;
  font-weight: 760;
}

.mini-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(16px, 1fr));
  gap: 5px;
  width: min(220px, 100%);
  margin-top: 10px;
}

.mini-timeline span {
  height: 5px;
  border-radius: 999px;
  background: #d9e3ef;
}

.mini-timeline span.is-done {
  background: var(--success);
}

.mini-timeline span.is-current {
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.logistics-map-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 138px;
  overflow: hidden;
  border: 1px solid #dfe8f4;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(219, 228, 239, 0.62) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(0deg, rgba(219, 228, 239, 0.62) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, #f9fcff, #f2f7fc);
}

.logistics-map-placeholder::after {
  position: absolute;
  right: 12px;
  bottom: 10px;
  content: "Maps ready";
  color: #667085;
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.logistics-map-placeholder b,
.logistics-map-placeholder small,
.map-route-pins {
  position: relative;
  z-index: 1;
}

.logistics-map-placeholder b {
  color: #101828;
  font-size: 15px;
}

.logistics-map-placeholder small {
  color: var(--muted);
  font-weight: 700;
}

.map-route-pins {
  display: flex;
  align-items: center;
  width: min(260px, 82%);
}

.map-route-pins span {
  width: 18px;
  height: 18px;
  border: 4px solid #ffffff;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.22);
}

.map-route-pins span:last-child {
  background: var(--success);
  box-shadow: 0 0 0 1px rgba(18, 128, 74, 0.22);
}

.map-route-pins i {
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--success));
}

.transport-section > .route-visual-metrics {
  margin: -4px 0 16px;
}

.action-item .logistics-route-visual,
.driver-bid-history-card .logistics-route-visual {
  margin-top: 8px;
}

.action-item .route-node {
  padding: 7px 9px;
}

.action-item .route-connector {
  height: 18px;
}

.action-item .route-connector i {
  height: 18px;
}

.marketplace-load-card .logistics-route-visual,
.assigned-workspace-card .logistics-route-visual {
  margin-top: 0;
}

.marketplace-load-card .mini-timeline,
.assigned-workspace-card .mini-timeline {
  width: 100%;
}

@media (max-width: 760px) {
  .shipment-card {
    grid-template-columns: 1fr;
  }
  .shipment-card .action-stack {
    justify-items: start;
  }

  .route-visual-metrics {
    gap: 5px;
  }

  .logistics-map-placeholder {
    min-height: 126px;
  }
}

/* ============================================================
   v9 - AI assistant layer
   Quiet Copilot-style recommendations and validation previews
   ============================================================ */

.ai-metric span,
.ai-point-list span,
.ai-doc-item span {
  color: #667085;
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.company-ai-card,
.carrier-ai-coach,
.transport-ai-overview {
  margin-bottom: 4px;
}

.transport-ai-overview {
  margin-bottom: 22px;
  padding: 20px;
}

.transport-ai-docs {
  margin: 16px 0 18px;
}

.ai-doc-item.is-ok {
  border-color: rgba(18, 128, 74, 0.2);
  background: #f6fbf8;
}

.ai-doc-item.is-warn {
  border-color: rgba(154, 101, 13, 0.22);
  background: #fffaf0;
}

.marketplace-load-card .ai-card {
  box-shadow: none;
}

.action-feed > .ai-card {
  min-height: 0;
}

@media (max-width: 560px) {
  .ai-card,
  .ai-card-compact,
  .transport-ai-overview {
    border-radius: 16px;
    padding: 14px;
  }

  
  }

/* ============================================================
   v6.3 - Marketplace controls, pagination, review fixes
   ============================================================ */
.marketplace-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.marketplace-toolbar label {
  display: grid;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.marketplace-toolbar input,
.marketplace-toolbar select {
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--surface);
}
.marketplace-search { flex: 1 1 240px; }
.marketplace-search input { width: 100%; }
.marketplace-toolbar > .tag { margin-left: auto; align-self: center; }

.marketplace-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13.5px;
}

@media (max-width: 760px) {
  .marketplace-toolbar { flex-direction: column; align-items: stretch; }
  .marketplace-toolbar > .tag { margin-left: 0; }
}

/* --- v6.3: driver detail + danger link styling --- */
.driver-detail-block,
.driver-notes-block {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
}
.driver-notes-block textarea {
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.row-action.danger-link {
  color: var(--danger);
}
.row-action.danger-link:hover {
  color: #a01631;
  text-decoration: underline;
}

/* ============================================================
   Restored: skeletons, toasts, icons (backbone helpers)
   ============================================================ */
.icon { display: block; }

/* Skeleton loaders */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: var(--radius);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
  animation: skeleton-sweep 1.25s ease infinite;
}
.skeleton-row { height: 44px; margin: 0 0 10px; border-radius: 10px; }
.skeleton-line { height: 12px; margin: 8px 0; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-stack { display: grid; gap: 10px; padding: 18px; }
@keyframes skeleton-sweep { 100% { transform: translateX(100%); } }

/* Toasts */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 40px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--navy, #10233f);
  color: #fff;
  box-shadow: 0 12px 32px rgba(15,32,56,0.28);
  animation: toast-in 0.26s ease;
  font-size: 14px;
  line-height: 1.4;
}
.toast.is-leaving { animation: toast-out 0.18s ease forwards; }
.toast-icon {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
}
.toast-success { background: #0c2f22; }
.toast-success .toast-icon { background: var(--success, #1c9c5f); color: #fff; }
.toast-error { background: #33121c; }
.toast-error .toast-icon { background: var(--danger, #c5213f); color: #fff; }
.toast-info .toast-icon { background: var(--brand, #4f46e5); color: #fff; }
.toast-body { flex: 1; min-width: 0; }
.toast-body b { display: block; font-weight: 650; }
.toast-body span { color: rgba(255,255,255,0.82); font-size: 13px; }
.toast-close {
  flex: none;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.toast-close:hover { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.98);} to { opacity:1; transform: translateY(0) scale(1);} }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px);} }

@media (prefers-reduced-motion: reduce) {
  .skeleton::after { display: none; }
  .toast { animation: none; }
}
@media (max-width: 640px) {
  .toast-stack { right: 12px; bottom: 12px; left: 12px; width: auto; }
}

/* ===== Reclaimed from v6 (command palette, quick-create, etc.) ===== */
/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}
.skip-link:focus {
  left: 12px;
  box-shadow: var(--focus-ring);
}
.feature-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--brand);
  background: var(--brand-soft);
}
.feature-item:has(.feature-icon)::before {
  display: none;
}
.kpi-icon::before {
  display: none;
}
.kpi-icon svg,
.feature-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
}
/* --- v5: auth page refinements --- */
.auth-help {
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.auth-help summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-700);
  list-style: none;
}
.auth-help summary::-webkit-details-marker { display: none; }
.auth-help summary::before { content: "+ "; font-weight: 700; }
.auth-help[open] summary::before { content: "\2212 "; }
.auth-help[open] { display: grid; gap: 10px; }
.auth-help label { margin-top: 4px; }
/* ============================================================
   v6 - Next-gen operator UX
   Quick-create, command palette, inline assignment
   ============================================================ */

/* --- Quick create order bar --- */
.quick-create {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--brand-soft), var(--surface));
}
.qc-leg {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex: 1 1 260px;
  min-width: 0;
}
.qc-leg-label {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quick-create input,
.quick-create select {
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--surface);
  min-width: 0;
}
.qc-leg input:first-of-type { flex: 0 0 92px; }
.qc-leg input:last-of-type { flex: 1 1 auto; }
.qc-arrow {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}
.quick-create select { flex: 0 0 auto; }
.qc-price { flex: 0 0 96px; }
.quick-create .btn { flex: 0 0 auto; white-space: nowrap; }
.qc-hint {
  margin: 8px 2px 0;
  font-size: 12.5px;
  color: var(--muted);
}
.qc-details {
  margin-top: 12px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 12px;
}
.qc-details > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: var(--brand-700);
  list-style: none;
  padding: 6px 0;
  user-select: none;
}
.qc-details > summary::-webkit-details-marker { display: none; }
.qc-details > summary::before { content: "+ "; font-weight: 800; }
.qc-details[open] > summary::before { content: "\2212 "; }
.qc-details[open] > summary { margin-bottom: 10px; }
.quick-create { flex-direction: column; }
.qc-arrow { display: none; }
.qc-leg, .quick-create select, .qc-price, .quick-create .btn { flex: 1 1 auto; }
/* --- Command palette (Cmd/Ctrl-K) --- */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
  background: rgba(15, 32, 56, 0.4);
  backdrop-filter: blur(2px);
}
.cmdk-overlay.is-open { display: flex; animation: overlay-in var(--dur-2) var(--ease); }
.cmdk {
  width: min(620px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-in var(--dur-3) var(--ease);
}
.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.cmdk-input-row .icon { color: var(--muted); flex: none; }
.cmdk-input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 16px;
  background: transparent;
  color: var(--ink);
}
.cmdk-hintkey {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 2px 6px;
}
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.cmdk-group-label {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
}
.cmdk-item .icon { color: var(--brand); flex: none; }
.cmdk-item small { color: var(--muted); margin-left: auto; font-size: 12px; }
.cmdk-item.is-active,
.cmdk-item:hover { background: var(--brand-soft); }
.cmdk-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
/* --- Inline best-bid accept in order list --- */
.inline-bid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: var(--st-open-soft);
  color: #0a4794;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.inline-bid b { font-weight: 700; }
.inline-bid .btn { padding: 3px 10px; font-size: 12px; }
/* --- Command palette trigger in header --- */
.cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.cmdk-trigger:hover { border-color: var(--brand); color: var(--brand-700); }
.cmdk-trigger .icon { color: var(--brand); }
.cmdk-trigger kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-3);
  border-radius: 5px;
  padding: 1px 6px;
}
.cmdk-trigger span, .cmdk-trigger kbd { display: none; }
.cmdk-trigger { padding: 8px; }
/* --- Carrier one-click quick-bid --- */
.load-card-actions { display: flex; gap: 8px; }
.driver-bid-quick { flex: 1; }
.driver-bid-custom {
  flex: 0 0 auto;
  background: var(--surface);
  color: var(--brand-700);
  border: 1px solid var(--line-strong);
}
.driver-bid-custom:hover { border-color: var(--brand); }
/* ============================================================
   New-feature styles: driver profiles, verification, compact
   marketplace, revenue widget, review rows (sync fix)
   ============================================================ */

/* --- Compact marketplace card (collapsed) --- */
.marketplace-compact-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.marketplace-compact-card:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(79, 70, 229,0.09); }
.marketplace-compact-card:focus-visible { outline: none; box-shadow: var(--focus-ring, 0 0 0 3px rgba(79, 70, 229,0.28)); }
.marketplace-compact-route {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.marketplace-compact-route h3 { margin: 2px 0 0; font-size: 18px; }
.marketplace-compact-route h3 span { color: var(--muted); font-weight: 500; font-size: 14px; }
.marketplace-compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.marketplace-compact-meta span { display: grid; gap: 2px; font-size: 14px; color: var(--navy); font-weight: 600; }
.marketplace-compact-meta b {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.marketplace-compact-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.marketplace-compact-foot i { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }

/* --- Marketplace bid buttons + quick/custom --- */
.load-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.driver-bid-quick { flex: 1; }
.driver-bid-custom {
  flex: 0 0 auto;
  background: var(--surface);
  color: var(--brand-700);
  border: 1px solid var(--line-strong);
}
.driver-bid-custom:hover { border-color: var(--brand); }

/* --- Driver profile management --- */
.driver-profile-list { display: grid; gap: 14px; }
.driver-profile-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.driver-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.driver-profile-head h3 { margin: 0; font-size: 17px; }
.driver-profile-grid,
.driver-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.driver-current-transport {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--st-assigned-soft, #dbe9fb);
  color: var(--brand-700);
  font-size: 12.5px;
  font-weight: 600;
}
.driver-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.driver-documents-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.driver-documents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.driver-documents-head h4 { margin: 0; font-size: 14px; }
.driver-document-stack,
.document-status-stack { display: grid; gap: 8px; }
.driver-document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13.5px;
}
.driver-upload-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.driver-upload-inline input[type="file"] { font-size: 13px; }
.rejection-copy,
.review-reason {
  margin-top: 6px;
  padding: 8px 11px;
  border-radius: 8px;
  background: var(--st-rejected-soft, #fbe0e6);
  color: #a01631;
  font-size: 12.5px;
}

/* --- Verification onboarding (company) --- */
.verification-onboarding { display: grid; gap: 18px; }
.verification-hero {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--brand-soft, #e8f0fc), var(--surface));
  padding: 30px;
}
.verification-hero h1 { margin: 10px 0 8px; font-size: 24px; }
.verification-hero p { color: var(--muted); max-width: 56ch; line-height: 1.55; }
.verification-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/* --- Verification card (admin queue) --- */
.verification-card .verification-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.verification-progress > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* --- Review action row (admin doc/bid) --- */
.review-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

/* --- Revenue analytics widget (admin) --- */
.revenue-widget { display: grid; gap: 14px; min-height: 0; }
.revenue-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
/* Each metric: label / big value / caption stacked (was running together
   because span+strong+small were inline with no layout). */
.revenue-analytics-grid > div {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.revenue-analytics-grid > div > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.revenue-analytics-grid > div > strong {
  font-size: 24px;
  font-weight: 780;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.revenue-analytics-grid > div > small {
  font-size: 12px;
  color: var(--muted);
}

/* --- Transport page body hook --- */
.transport-page { }

@media (max-width: 760px) {
  .revenue-analytics-grid {
    grid-template-columns: 1fr;
  }

  .marketplace-compact-meta { gap: 14px; }
  .driver-profile-head { flex-direction: column; }
}

/* ============================================================
   PASS B - Visual identity redesign
   A calm, precise operator aesthetic (Linear / Stripe / Apple).
   Appended last: authoritative. Owns tokens, type, surfaces,
   shadows, and component refinement. Does not alter markup.
   ============================================================ */

/* --- Web font: Inter (variable), loaded async-safe --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;550;600;650;700&display=swap');

:root {
  /* ---- Palette: cooler, quieter, more contrast where it counts ---- */
  --brand:        #4f46e5;   /* indigo - modern, less "corporate blue" */
  --brand-600:    #4338ca;
  --brand-700:    #3730a3;
  --brand-soft:   #eef0fe;
  --brand-tint:   #f6f7ff;

  --navy:         #0d1424;   /* near-black ink for headings */
  --ink:          #1c2333;   /* body text */
  --muted:        #5b6577;   /* secondary text */
  --muted-2:      #8b95a6;   /* tertiary / hints */

  --line:         #ebedf2;   /* hairlines - lighter, calmer */
  --line-strong:  #dce0e8;
  --surface:      #ffffff;
  --surface-2:    #fafbfc;   /* page background - barely-there gray */
  --surface-3:    #f2f4f7;

  --success:      #14794a;
  --success-soft: #e7f6ee;
  --warning:      #8a5a00;
  --warning-soft: #fdf1d8;
  --danger:       #c0203b;
  --danger-soft:  #fdeaed;
  --info:         #4f46e5;
  --info-soft:    #eef0fe;

  /* ---- Shadows: tighter, more physical, less "blurry cloud" ---- */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.06), 0 2px 6px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.10), 0 4px 12px rgba(16, 24, 40, 0.05);
  --shadow-pop: 0 16px 48px rgba(16, 24, 40, 0.14);

  /* ---- Radius: softer, consistent scale ---- */
  --radius-xs: 6px;
  --radius:    9px;
  --radius-lg: 13px;
  --radius-xl: 18px;

  /* ---- Focus ring ---- */
  --focus-ring: 0 0 0 3px rgba(79, 70, 229, 0.30);

  /* ---- Status re-map to new palette ---- */
  --st-pending-soft: var(--warning-soft);
  --st-open-soft:    #e7eefe;
  --st-assigned-soft:var(--brand-soft);
  --st-done-soft:    var(--success-soft);
  --st-rejected-soft:var(--danger-soft);

  /* ---- Type ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --page: min(1400px, calc(100% - 56px));

  font-family: var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Base surfaces --- */
body,
.app-page {
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: -0.006em;
}

/* --- Typography scale: tight tracking, real hierarchy --- */
h1, h2, h3, h4 { color: var(--navy); letter-spacing: -0.02em; font-weight: 650; }
h1 { line-height: 1.08; }
h2 { line-height: 1.15; }
h3 { line-height: 1.25; }
p, span, small, div, td, th, label, li, a, button, input, select, textarea { font-family: var(--font-sans); }
small { letter-spacing: 0; }

/* Section kickers - the little eyebrow labels - refined */
.section-kicker,
.driver-kicker {
  font-size: 11px !important;
  font-weight: 650 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase;
  color: var(--muted-2) !important;
}

/* --- Header: crisp, minimal, sticky --- */
.site-header {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.brand-text strong { color: var(--navy); font-weight: 650; letter-spacing: -0.02em; }
.brand-text small { color: var(--muted-2); font-weight: 500; }

/* Top nav: pill-tab feel */
.top-nav a {
  color: var(--muted);
  font-weight: 550;
  border-radius: var(--radius);
  transition: color 0.15s ease, background 0.15s ease;
}
.top-nav a:hover { color: var(--navy); background: var(--surface-3); }
.top-nav a.is-active { color: var(--brand-700); background: var(--brand-soft); font-weight: 600; }

/* --- Buttons: solid, physical, restrained --- */
.primary-btn,
.btn-primary,
.driver-hero-action {
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(16,24,40,0.06);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}
.primary-btn:hover,
.btn-primary:hover,
.driver-hero-action:hover { background: var(--brand-600); box-shadow: 0 3px 8px rgba(79,70,229,0.25); }
.primary-btn:active,
.btn-primary:active { transform: translateY(0.5px); }

.ghost-btn,
.btn-outline,
.header-action {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 550;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ghost-btn:hover,
.btn-outline:hover,
.header-action:hover { border-color: var(--muted-2); background: var(--surface-2); }

.header-action {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.header-action:hover { background: var(--brand-600); border-color: var(--brand-600); }

/* --- Panels & cards: hairline borders, soft shadow, generous radius --- */
.console-panel,
.table-panel,
.review-card,
.action-item,
.kpi-card,
.marketplace-compact-card,
.marketplace-load-card,
.driver-profile-card,
.driver-stat,
.tool-panel,
.auth-panel,
.mini-card,
.quote-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.console-panel { padding: 22px; }

/* Panel headers: quieter */
.console-panel-header { border: 0; padding: 0 0 4px; }
.console-panel-header h3 { font-size: 17px; margin: 2px 0 0; }

/* --- KPI cards: the dashboard's signature - make them crisp --- */
.kpi-card,
.kpi-card-link {
  padding: 18px;
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.kpi-card strong,
.kpi-card-link strong {
  font-size: 30px;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: var(--navy);
}
.kpi-card span:not(.kpi-icon),
.kpi-card-link span:not(.kpi-icon):not(.kpi-go) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.01em;
  text-transform: none;
}
.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}
.kpi-card-link:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* --- Action tiles (the mini nav shortcuts) --- */
.action-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.action-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.action-tile strong { color: var(--navy); font-weight: 680; letter-spacing: -0.02em; }

/* --- Status pills: refined, dot + tight --- */
.status-pill,
.tag {
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 3px 9px;
}

/* --- Data tables --- */
.data-table th {
  background: var(--surface-2);
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}
.data-table td { border-bottom: 1px solid var(--line); }
.data-table tbody tr.row-click:hover td { background: var(--brand-tint); }

/* --- Workspace sidebar nav --- */
.workspace-nav {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 10px 8px;
}
.wnav-item {
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 550;
  transition: background 0.13s ease, color 0.13s ease;
}
.wnav-item:hover { background: var(--surface-3); color: var(--navy); }
.wnav-item.is-active { background: var(--brand-soft); color: var(--brand-700); font-weight: 600; }
.wnav-item.is-active .count { background: var(--brand); }
.wnav-item .count {
  background: var(--surface-3);
  color: var(--muted);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}

/* --- Carrier hero card: keep the dark gradient but refine it --- */
.driver-hero-card {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(20, 121, 74, 0.55) 0%, rgba(20, 121, 74, 0) 55%),
    linear-gradient(120deg, #0d1424 0%, #1a2540 100%);
  border: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  gap: 24px;
}
.driver-hero-card h2 { color: #fff; font-size: 42px; font-weight: 700; letter-spacing: -0.035em; margin: 6px 0 8px; }
.driver-hero-card .driver-kicker { color: rgba(255,255,255,0.65) !important; }
.driver-hero-card p { color: rgba(255,255,255,0.7); }
.driver-hero-action {
  flex: none;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  backdrop-filter: blur(4px);
}
.driver-hero-action:hover { background: rgba(255,255,255,0.22); box-shadow: none; }

/* --- Driver stat cards --- */
.driver-stat { padding: 16px 18px; border-radius: var(--radius-lg); transition: border-color 0.15s ease, transform 0.1s ease; }
.driver-stat:hover { border-color: var(--brand); transform: translateY(-1px); }
.driver-stat strong { font-size: 26px; font-weight: 680; letter-spacing: -0.03em; color: var(--navy); }

/* --- Compact marketplace card refinement --- */
.marketplace-compact-card { border-radius: var(--radius-lg); padding: 16px 18px; }
.marketplace-compact-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* --- Route summary box (replaces map placeholder from Codex prompt 5) --- */
.route-summary-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}
.route-summary-box .rsb-arrow { color: var(--brand); font-size: 18px; }
.route-summary-box .rsb-city { color: var(--navy); }
.route-summary-box .rsb-sub { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }

/* --- Pass B fix: admin order list horizontal scroll (was clipped by
   .console-panel overflow:hidden). Scope scroll to the list itself and
   let this one panel show its scrollbar without spilling its rounded
   corners. Coordinated with Codex (markup unchanged). --- */
#adminOrders {
  /* allow the inner scroll container to show its scrollbar; the
     decorative ::before bar is at the top so vertical clip is unaffected */
  overflow: visible;
}
#adminOrders::before {
  /* keep the top accent bar clipped to the panel's rounded top corners */
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
#adminOrderList {
  max-width: 100%;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
}
#adminOrderList > .admin-order-row {
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.admin-order-header {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 14px;
  align-items: center;
  border: 0;
  padding: 16px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.admin-order-header::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}
.admin-order-row.is-expanded .admin-order-header::after {
  transform: rotate(225deg);
}
.admin-order-header:hover {
  background: var(--surface-2);
}
.admin-order-header .order-route {
  min-width: 0;
}
.admin-order-header .order-route small {
  white-space: normal;
  overflow-wrap: anywhere;
}
.order-header-status {
  justify-self: end;
}
.admin-order-body {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(180px, auto);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), #ffffff);
}
.admin-order-row.is-expanded .admin-order-body {
  display: grid;
}
.admin-order-body > div {
  min-width: 0;
}
.admin-order-body > div > small,
.admin-order-body > div > b {
  overflow-wrap: anywhere;
}
.admin-order-body .order-status-cell {
  justify-items: start;
}
.admin-order-body .inline-bid {
  max-width: 100%;
  flex-wrap: wrap;
  border-radius: 12px;
  white-space: normal;
}
@media (max-width: 900px) {
  .admin-order-header {
    grid-template-columns: minmax(0, 1fr) 18px;
  }
  .admin-order-header .order-header-status {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .admin-order-body {
    grid-template-columns: 1fr;
  }
}
/* Thin, unobtrusive scrollbar for the order list */
#adminOrderList::-webkit-scrollbar { height: 8px; }
#adminOrderList::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
#adminOrderList::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   PASS B - Transport detail page (the "object" view)
   Elevated header, clean progress tracker, calm sections.
   ============================================================ */

.transport-shell { max-width: 1180px; }

/* --- Hero: an object header, not just a panel --- */
.transport-hero-panel {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.transport-hero-main { padding: 26px 28px; }
.transport-breadcrumb { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.transport-breadcrumb a { color: var(--muted); text-decoration: none; font-weight: 550; }
.transport-breadcrumb a:hover { color: var(--brand-700); }
.transport-breadcrumb strong { color: var(--navy); font-weight: 600; }
.transport-hero-main h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 10px 0 4px;
}
.transport-hero-main > p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.transport-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.transport-hero-meta > span:not(.status-pill) {
  font-size: 12.5px;
  color: var(--muted);
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--surface-3);
  font-weight: 550;
}

/* Right rail of the hero: the status summary, set apart */
.transport-hero-card {
  padding: 24px 26px;
  background: linear-gradient(180deg, var(--brand-tint), var(--surface));
  border-left: 1px solid var(--line);
  align-content: start;
  gap: 6px;
}
.transport-hero-card strong {
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.transport-hero-card small { color: var(--muted); font-size: 12.5px; }

/* --- Two-column object layout --- */
.transport-object-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
.transport-main-column { display: grid; gap: 20px; min-width: 0; }
.transport-side-column { display: grid; gap: 16px; position: sticky; top: 96px; }

/* --- Sections --- */
.transport-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.transport-section-head { margin-bottom: 16px; }
.transport-section-head h3 { font-size: 17px; margin: 2px 0 0; }

/* --- Progress timeline: horizontal tracker --- */
.transport-timeline {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  position: relative;
}
.transport-step {
  display: grid;
  gap: 5px;
  padding: 0 8px;
  position: relative;
  text-align: left;
}
.transport-step > span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--line-strong);
  position: relative;
  z-index: 1;
}
/* connector line */
.transport-step::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.transport-step:last-child::before { display: none; }
.transport-step b { font-size: 13.5px; color: var(--navy); font-weight: 600; }
.transport-step small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.transport-step.is-done > span { background: var(--success); border-color: var(--success); }
.transport-step.is-done::before { background: var(--success); }
.transport-step.is-current > span {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.transport-step.is-current b { color: var(--brand-700); }
.transport-step.is-muted > span { background: var(--surface-3); border-color: var(--line); }

/* --- Side cards --- */
.transport-side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.transport-side-card h3 { font-size: 16px; margin: 4px 0 6px; }
.transport-side-card > p { color: var(--muted); font-size: 14px; }

/* --- Stop cards (pickup/delivery detail) --- */
.transport-stop-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 16px;
}
.transport-stop-card b { color: var(--navy); font-weight: 600; }

/* --- Resource cards (driver/vehicle) --- */
.transport-resource-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
}

/* --- Activity / notes --- */
.transport-activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.transport-activity-item:last-child { border-bottom: 0; }
.transport-note {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink);
}

@media (max-width: 980px) {
  .transport-hero-panel,
  .transport-object-layout { grid-template-columns: 1fr; }
  .transport-hero-card { border-left: 0; border-top: 1px solid var(--line); }
  .transport-side-column { position: static; }
  .transport-timeline { grid-auto-flow: row; grid-auto-columns: auto; gap: 14px; }
  .transport-step::before { display: none; }
}

/* ============================================================
   PASS B - Auth page + Company workspace + final sweep
   Append at the very end of styles.css. CSS-only, no markup.
   ============================================================ */

/* ---------- Sign-in / Register page ---------- */
.auth-shell { max-width: 960px; margin: 0 auto; padding-top: 8px; }
.auth-heading { text-align: center; margin-bottom: 28px; }
.auth-heading h1 { font-size: 30px; letter-spacing: -0.03em; margin: 8px 0 6px; }
.auth-heading p { color: var(--muted); font-size: 15px; max-width: 52ch; margin: 0 auto; }

.auth-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.auth-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  display: grid;
  gap: 12px;
}
.auth-panel h2 { font-size: 19px; letter-spacing: -0.02em; margin: 2px 0 4px; }
.auth-panel label { display: grid; gap: 5px; font-size: 13px; font-weight: 550; color: var(--navy); }
.auth-panel input,
.auth-panel select {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-panel input:focus,
.auth-panel select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}
.auth-panel .primary-btn { margin-top: 4px; width: 100%; justify-content: center; }
.helper-text { font-size: 12px; color: var(--muted-2); font-weight: 500; }

.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px 14px;
  display: grid;
  gap: 2px;
}
.mini-card b { color: var(--navy); font-size: 13.5px; }
.mini-card span { color: var(--muted); font-size: 12.5px; }

.auth-help {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px 14px;
}
.auth-help summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-700);
  list-style: none;
}
.auth-help summary::-webkit-details-marker { display: none; }
.auth-help summary::before { content: "+ "; font-weight: 800; }
.auth-help[open] summary::before { content: "\2212 "; }
.auth-help[open] { display: grid; gap: 10px; }
.auth-status { text-align: center; color: var(--muted); font-size: 13px; margin-top: 20px; }

/* ---------- Company workspace ---------- */
.workspace-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  width: var(--page);
  margin: 0 auto;
  padding-top: 22px;
}
.workspace-nav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 3px;
  align-content: start;
}
.wnav-divider { height: 1px; background: var(--line); margin: 8px 6px; }
.workspace-topline { margin-bottom: 18px; }
.workspace-topline h1 { font-size: 26px; letter-spacing: -0.03em; }
.workspace-main { min-width: 0; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .workspace-shell { grid-template-columns: 1fr; }
  .workspace-nav {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 6px;
  }
  .wnav-divider { display: none; }
}

/* ---------- Final consistency sweep ---------- */
/* Inputs everywhere share one focus treatment */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}
/* Any lingering pure-black text softened to the ink token */
body { color: var(--ink); }
/* Links use the brand indigo consistently */
a { color: var(--brand-700); }
a:hover { color: var(--brand-600); }

/* ============================================================
   Plain data chips/notes — replace the removed .ai-* card styling.
   Used by the de-AI'd blocks (recommended bid, next-step, doc status,
   bid-vs-target). Real derived data, no assistant framing.
   ============================================================ */
.data-note {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px 14px;
}
.data-note > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.data-note b { font-size: 14px; color: var(--navy); }
.data-note small { font-size: 12.5px; color: var(--muted); }

.data-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.data-chip {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 8px 12px;
}
.data-chip > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.data-chip strong { font-size: 14px; color: var(--navy); }

/* ============================================================
   C&C Kurier V2 Design System
   Backward-compatible foundation: new --v2-* tokens + .v2-* classes.
   NOT applied to any existing page (new namespace only) — appending this
   changes nothing visually. "Extend, don't fork": color tokens ALIAS the
   existing system so values have one source of truth; V2-specific values
   (pale-blue canvas, larger radii, spacing scale, softer shadows) are new.
   Reference language: docs/design-references/v2-*-target.png
   ============================================================ */
:root {
  /* --- Surfaces --- */
  --v2-canvas: #eef3fb;              /* pale blue workspace canvas */
  --v2-surface: #ffffff;            /* card surface */
  --v2-surface-elevated: #ffffff;   /* elevated card (same fill, stronger shadow) */
  --v2-surface-sunken: #f4f7fc;     /* nested / inset fills */

  /* --- Text --- */
  --v2-text: var(--navy);           /* primary text */
  --v2-text-secondary: var(--muted);/* secondary text */
  --v2-text-muted: var(--muted-2);  /* labels / captions */

  /* --- Lines --- */
  --v2-line: var(--line);
  --v2-line-strong: var(--line-strong);

  /* --- Primary blue --- */
  --v2-primary: var(--brand);
  --v2-primary-hover: var(--brand-600);
  --v2-primary-active: var(--brand-700);
  --v2-primary-soft: var(--brand-soft);
  --v2-primary-contrast: #ffffff;

  /* --- Semantic (alias existing so values stay single-source) --- */
  --v2-success: var(--success);       --v2-success-soft: var(--success-soft);
  --v2-warning: var(--warning);       --v2-warning-soft: var(--warning-soft);
  --v2-danger: var(--danger);         --v2-danger-soft: var(--danger-soft);
  --v2-info: var(--info);             --v2-info-soft: var(--info-soft);
  --v2-neutral: #5b6b81;              --v2-neutral-soft: #eef2f7;

  /* --- Shadows (softer, premium) --- */
  --v2-shadow-soft: 0 1px 2px rgba(15, 32, 56, 0.05), 0 8px 20px rgba(15, 32, 56, 0.05);
  --v2-shadow-medium: 0 12px 32px rgba(15, 32, 56, 0.10);
  --v2-shadow-strong: 0 24px 60px rgba(15, 32, 56, 0.16);

  /* --- Radius --- */
  --v2-radius-sm: 10px;
  --v2-radius: 12px;
  --v2-radius-lg: 16px;
  --v2-radius-xl: 24px;

  /* --- Spacing scale --- */
  --v2-space-1: 4px;
  --v2-space-2: 8px;
  --v2-space-3: 12px;
  --v2-space-4: 16px;
  --v2-space-6: 24px;
  --v2-space-8: 32px;
  --v2-space-12: 48px;
  --v2-space-16: 64px;

  /* --- Layout --- */
  --v2-sidebar-width: 248px;
  --v2-topbar-height: 64px;
  --v2-workspace-max: 1600px;
}

/* ---------- App shell: sidebar + workspace ---------- */
.v2-app-shell {
  display: grid;
  grid-template-columns: var(--v2-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--v2-canvas);
  color: var(--v2-text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Sidebar ---------- */
.v2-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-4);
  min-height: 100vh;
  position: sticky;
  top: 0;
  padding: var(--v2-space-4);
  background: var(--v2-surface);
  border-right: 1px solid var(--v2-line);
}
.v2-sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--v2-space-3);
  padding: var(--v2-space-2);
}
.v2-sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--v2-space-3);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--v2-text);
  text-decoration: none;
}
.v2-sidebar-brand img { width: 32px; height: 32px; }
.v2-sidebar-section {
  display: grid;
  gap: 2px;
  align-content: start;
}
.v2-sidebar-section > .v2-sidebar-section-label {
  padding: var(--v2-space-3) var(--v2-space-3) var(--v2-space-1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-text-muted);
}
.v2-sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--v2-space-3);
  width: 100%;
  padding: 10px var(--v2-space-3);
  border: 0;
  border-radius: var(--v2-radius);
  background: transparent;
  color: var(--v2-text-secondary);
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.v2-sidebar-item:hover { background: var(--v2-surface-sunken); color: var(--v2-text); }
.v2-sidebar-item.is-active { background: var(--v2-primary-soft); color: var(--v2-primary-active); font-weight: 650; }
.v2-sidebar-item svg { width: 18px; height: 18px; flex: none; }
.v2-sidebar-item .v2-sidebar-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--v2-text-muted);
}
.v2-sidebar-footer { margin-top: auto; display: grid; gap: var(--v2-space-3); }

/* ---------- Workspace + topbar ---------- */
.v2-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.v2-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-space-4);
  height: var(--v2-topbar-height);
  padding: 0 var(--v2-space-8);
  background: color-mix(in srgb, var(--v2-canvas) 82%, #ffffff);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--v2-line);
}
.v2-topbar-left { display: flex; align-items: center; gap: var(--v2-space-4); flex: 1; min-width: 0; }
.v2-topbar-right { display: flex; align-items: center; gap: var(--v2-space-4); }

.v2-page-header { padding: var(--v2-space-8) var(--v2-space-8) 0; }
.v2-page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; color: var(--v2-text); }
.v2-page-subtitle { margin-top: 4px; font-size: 14.5px; color: var(--v2-text-secondary); }

/* Workspace body padding wrapper (optional convenience) */
.v2-workspace > .v2-page-body,
.v2-page-body { padding: var(--v2-space-6) var(--v2-space-8) var(--v2-space-12); display: grid; gap: var(--v2-space-6); }

/* ---------- KPI cards ---------- */
.v2-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--v2-space-4);
}
.v2-kpi-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--v2-space-4);
  align-items: center;
  padding: var(--v2-space-6);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-soft);
}
.v2-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--v2-radius);
  background: var(--v2-primary);
  color: #ffffff;
}
.v2-kpi-icon svg { width: 22px; height: 22px; }
.v2-kpi-icon.is-success { background: var(--v2-success); }
.v2-kpi-icon.is-warning { background: var(--v2-warning); }
.v2-kpi-icon.is-danger { background: var(--v2-danger); }
.v2-kpi-icon.is-info { background: var(--v2-info); }
.v2-kpi-icon.is-neutral { background: var(--v2-neutral); }
.v2-kpi-body { min-width: 0; display: grid; gap: 2px; }
.v2-kpi-label { font-size: 12.5px; color: var(--v2-text-secondary); }
.v2-kpi-value { font-size: 26px; font-weight: 760; letter-spacing: -0.02em; color: var(--v2-text); line-height: 1.1; }
.v2-kpi-meta { font-size: 12px; color: var(--v2-text-muted); }
.v2-kpi-meta.is-up { color: var(--v2-success); }
.v2-kpi-meta.is-down { color: var(--v2-danger); }

/* ---------- Panels ---------- */
.v2-panel {
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-soft);
  padding: var(--v2-space-6);
}
.v2-panel.is-elevated { box-shadow: var(--v2-shadow-medium); }
.v2-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-space-4);
  margin-bottom: var(--v2-space-4);
}
.v2-panel-title { font-size: 17px; font-weight: 680; letter-spacing: -0.01em; color: var(--v2-text); }
.v2-panel-actions { display: flex; align-items: center; gap: var(--v2-space-3); }

/* ---------- Generic grids ---------- */
.v2-grid { display: grid; gap: var(--v2-space-6); }
.v2-grid-2 { display: grid; gap: var(--v2-space-6); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-grid-3 { display: grid; gap: var(--v2-space-6); grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* asymmetric dashboard split (primary + rail), matches the target layouts */
.v2-grid-main-rail { display: grid; gap: var(--v2-space-6); grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); align-items: start; }

/* ---------- Tables ---------- */
.v2-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.v2-table thead th,
.v2-table .v2-table-head .v2-table-cell {
  padding: 10px var(--v2-space-3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--v2-text-muted);
  text-align: left;
  border-bottom: 1px solid var(--v2-line);
}
.v2-table-row { border-bottom: 1px solid var(--v2-line); }
.v2-table-row:last-child { border-bottom: 0; }
.v2-table-row:hover { background: var(--v2-surface-sunken); }
.v2-table-cell { padding: 14px var(--v2-space-3); color: var(--v2-text); vertical-align: middle; }
.v2-table-cell.is-numeric { text-align: right; font-variant-numeric: tabular-nums; }
.v2-table-cell.is-actions { text-align: right; width: 1%; white-space: nowrap; }

/* ---------- Status badges ---------- */
.v2-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}
.v2-status-info { background: var(--v2-info-soft); color: var(--v2-info); }
.v2-status-success { background: var(--v2-success-soft); color: var(--v2-success); }
.v2-status-warning { background: var(--v2-warning-soft); color: var(--v2-warning); }
.v2-status-danger { background: var(--v2-danger-soft); color: var(--v2-danger); }
.v2-status-neutral { background: var(--v2-neutral-soft); color: var(--v2-neutral); }

/* ---------- Action row ---------- */
.v2-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-space-4);
  flex-wrap: wrap;
}

/* ---------- Map + operations panels ---------- */
.v2-map-panel {
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-soft);
  overflow: hidden;
}
.v2-map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  color: var(--v2-text-muted);
  font-size: 13px;
  background:
    linear-gradient(0deg, rgba(15,32,56,0.02), rgba(15,32,56,0.02)),
    repeating-linear-gradient(0deg, transparent 0 23px, var(--v2-line) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, var(--v2-line) 23px 24px),
    var(--v2-surface-sunken);
}

/* ---------- Timeline ---------- */
.v2-timeline { display: grid; gap: var(--v2-space-4); position: relative; }
.v2-timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--v2-space-4);
  align-items: start;
  position: relative;
}
.v2-timeline-item::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  border: 2px solid var(--v2-primary);
  background: var(--v2-surface);
}
.v2-timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: -18px;
  width: 2px;
  background: var(--v2-line);
}

/* ---------- Empty state ---------- */
.v2-empty-state {
  display: grid;
  justify-items: center;
  gap: var(--v2-space-3);
  padding: var(--v2-space-12) var(--v2-space-6);
  text-align: center;
  border: 1px dashed var(--v2-line-strong);
  border-radius: var(--v2-radius-lg);
  background: var(--v2-surface-sunken);
  color: var(--v2-text-secondary);
}
.v2-empty-state b { color: var(--v2-text); font-size: 15px; }

/* ---------- Search + filter bar ---------- */
.v2-search {
  display: flex;
  align-items: center;
  gap: var(--v2-space-3);
  width: 100%;
  max-width: 460px;
  padding: 9px var(--v2-space-4);
  border: 1px solid var(--v2-line-strong);
  border-radius: var(--v2-radius);
  background: var(--v2-surface);
  color: var(--v2-text-secondary);
}
.v2-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--v2-text);
}
.v2-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--v2-space-3);
  flex-wrap: wrap;
  padding: var(--v2-space-3);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius);
}

/* ---------- Buttons ---------- */
.v2-button-primary,
.v2-button-secondary,
.v2-button-ghost,
.v2-button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-2);
  padding: 10px var(--v2-space-4);
  border-radius: var(--v2-radius);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  text-decoration: none;
}
.v2-button-primary { background: var(--v2-primary); color: var(--v2-primary-contrast); }
.v2-button-primary:hover { background: var(--v2-primary-hover); }
.v2-button-secondary { background: var(--v2-surface); color: var(--v2-text); border-color: var(--v2-line-strong); }
.v2-button-secondary:hover { border-color: var(--v2-primary); }
.v2-button-ghost { background: transparent; color: var(--v2-primary-active); }
.v2-button-ghost:hover { background: var(--v2-primary-soft); }
.v2-button-danger { background: var(--v2-danger); color: #ffffff; }
.v2-button-danger:hover { background: color-mix(in srgb, var(--v2-danger) 88%, #000); }
.v2-button-primary:disabled,
.v2-button-secondary:disabled,
.v2-button-ghost:disabled,
.v2-button-danger:disabled { opacity: 0.55; cursor: not-allowed; }

/* ============================================================
   V2 responsive behavior
   ============================================================ */
/* Tablet: collapse the sidebar to a top strip, stack the split layouts */
@media (max-width: 1024px) {
  .v2-app-shell { grid-template-columns: 1fr; }
  .v2-sidebar {
    position: static;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: var(--v2-space-4);
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }
  .v2-sidebar-section { grid-auto-flow: column; grid-auto-columns: max-content; align-items: center; }
  .v2-sidebar-section > .v2-sidebar-section-label { display: none; }
  .v2-sidebar-footer { display: none; }
  .v2-grid-main-rail,
  .v2-grid-2,
  .v2-grid-3 { grid-template-columns: 1fr; }
  .v2-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Mobile: single-column everything, tables scroll horizontally */
@media (max-width: 768px) {
  .v2-topbar { padding: 0 var(--v2-space-4); }
  .v2-page-header { padding: var(--v2-space-6) var(--v2-space-4) 0; }
  .v2-page-body { padding: var(--v2-space-4) var(--v2-space-4) var(--v2-space-8); }
  .v2-kpi-grid { grid-template-columns: 1fr; }
  .v2-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .v2-table { min-width: 640px; }
  .v2-search { max-width: none; }
}

/* ============================================================
   Dispatch V2 — minimal adjustments (TASK 003A)
   Only what the V2 foundation doesn't already cover. No page-specific
   redesign beyond header padding for the overflow-hidden map panel.
   ============================================================ */
.v2-map-panel .v2-panel-header {
  margin: 0;
  padding: var(--v2-space-6) var(--v2-space-6) var(--v2-space-3);
}

/* ============================================================
   Transport Workspace V2 (TASK 005) — minimal surface refinement.
   Scoped to .transport-v2; touches only surface tokens (radius /
   shadow / border), never layout, so transport.js's rendered
   structure (hero grid, timeline, route grid, sections) is preserved.
   These transport-* classes are used only on the transport page, so
   this cannot affect Dispatch V2 or Marketplace V2.
   ============================================================ */
.transport-v2 .transport-hero-panel,
.transport-v2 .transport-section,
.transport-v2 .transport-side-card,
.transport-v2 .transport-stop-card,
.transport-v2 .transport-upload-card,
.transport-v2 .transport-activity-panel,
.transport-v2 .transport-notes-panel,
.transport-v2 .transport-resource-card {
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-soft);
}
.transport-v2 .transport-hero-panel { box-shadow: var(--v2-shadow-medium); }
.transport-v2 .empty-state,
.transport-v2 .transport-empty {
  background: var(--v2-surface-sunken);
  border: 1px dashed var(--v2-line-strong);
  border-radius: var(--v2-radius-lg);
}

/* ============================================================
   Landing + Auth V2 (TASK 007) — public pages.
   New .v2-landing / .v2-auth namespaces; uses V2 tokens only.
   Scoped to these body classes, so it cannot affect Dispatch,
   Marketplace, Transport or Company V2.
   ============================================================ */
.v2-landing,
.v2-auth {
  background: var(--v2-canvas);
  color: var(--v2-text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

/* --- Landing header --- */
.v2-landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-space-6);
  padding: var(--v2-space-4) var(--v2-space-8);
  background: color-mix(in srgb, var(--v2-canvas) 80%, #ffffff);
  border-bottom: 1px solid var(--v2-line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: saturate(1.1) blur(6px);
}
.v2-landing-nav { display: flex; gap: var(--v2-space-6); }
.v2-landing-nav a { color: var(--v2-text-secondary); text-decoration: none; font-weight: 550; font-size: 14px; }
.v2-landing-nav a:hover { color: var(--v2-text); }
.v2-landing-actions { display: flex; align-items: center; gap: var(--v2-space-3); }

/* --- Hero --- */
.v2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--v2-space-12);
  align-items: center;
  max-width: var(--v2-workspace-max);
  margin: 0 auto;
  padding: var(--v2-space-16) var(--v2-space-8);
}
.v2-hero-copy h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: var(--v2-space-3) 0;
  color: var(--v2-text);
}
.v2-hero-copy > p {
  font-size: 17px;
  color: var(--v2-text-secondary);
  max-width: 46ch;
}
.v2-hero-actions { display: flex; flex-wrap: wrap; gap: var(--v2-space-3); margin-top: var(--v2-space-6); }
.v2-hero-note { margin-top: var(--v2-space-4); font-size: 13px; color: var(--v2-text-muted); }

.v2-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--v2-space-3); }
.v2-flow li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "dot title" "dot sub";
  column-gap: var(--v2-space-3);
  align-items: center;
  position: relative;
  padding-bottom: var(--v2-space-2);
}
.v2-flow-dot { grid-area: dot; width: 10px; height: 10px; border-radius: 999px; border: 2px solid var(--v2-primary); background: var(--v2-surface); align-self: start; margin-top: 4px; }
.v2-flow li b { grid-area: title; font-size: 14.5px; color: var(--v2-text); }
.v2-flow li small { grid-area: sub; font-size: 12.5px; color: var(--v2-text-muted); }

/* --- Sections --- */
.v2-landing-section {
  max-width: var(--v2-workspace-max);
  margin: 0 auto;
  padding: var(--v2-space-12) var(--v2-space-8);
}
.v2-section-head { max-width: 62ch; margin-bottom: var(--v2-space-8); }
.v2-section-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 720; letter-spacing: -0.02em; margin: var(--v2-space-2) 0; }
.v2-section-head p { color: var(--v2-text-secondary); font-size: 15.5px; }

.v2-feature { display: grid; gap: var(--v2-space-3); align-content: start; }
.v2-feature h3 { font-size: 17px; font-weight: 680; }
.v2-feature p { color: var(--v2-text-secondary); font-size: 14.5px; }

/* --- Workflow steps --- */
.v2-workflow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--v2-space-4);
}
.v2-workflow-step {
  display: grid;
  gap: 4px;
  padding: var(--v2-space-6);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-soft);
}
.v2-workflow-step b { font-size: 15px; }
.v2-workflow-step small { color: var(--v2-text-muted); font-size: 12.5px; }
.v2-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--v2-primary-soft); color: var(--v2-primary-active);
  font-weight: 800; font-size: 13px;
}

/* --- CTA band --- */
.v2-cta-band { padding: var(--v2-space-12) var(--v2-space-8); }
.v2-cta-inner {
  max-width: var(--v2-workspace-max);
  margin: 0 auto;
  display: grid;
  gap: var(--v2-space-6);
  padding: var(--v2-space-12);
  border-radius: var(--v2-radius-xl);
  background: linear-gradient(135deg, var(--v2-primary), var(--v2-primary-active));
  color: #ffffff;
  text-align: center;
  justify-items: center;
}
.v2-cta-inner h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 740; letter-spacing: -0.02em; max-width: 40ch; }
.v2-cta-inner .v2-button-secondary { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.4); }
.v2-cta-inner .v2-button-secondary:hover { background: rgba(255,255,255,0.2); }

/* --- Footer --- */
.v2-landing-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: var(--v2-space-4);
  max-width: var(--v2-workspace-max); margin: 0 auto;
  padding: var(--v2-space-8);
  border-top: 1px solid var(--v2-line);
}
.v2-footer-note { color: var(--v2-text-muted); font-size: 13px; }

/* --- Auth --- */
.v2-auth-shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--v2-space-12) var(--v2-space-6);
  display: grid;
  gap: var(--v2-space-8);
}
.v2-auth-intro { text-align: center; justify-items: center; max-width: 60ch; margin: 0 auto; }
.v2-auth-intro h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 760; letter-spacing: -0.02em; margin: var(--v2-space-2) 0; }
.v2-auth-intro p { color: var(--v2-text-secondary); }
.v2-auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-6); align-items: start; }
.v2-auth-card { display: grid; gap: var(--v2-space-4); }
.v2-auth-card h2 { font-size: 20px; font-weight: 700; margin: 0; }
.v2-auth-card label { display: grid; gap: 6px; font-size: 13px; color: var(--v2-text-secondary); font-weight: 550; }
.v2-auth-card input,
.v2-auth-card select {
  padding: 11px 13px; font-size: 15px;
  border: 1px solid var(--v2-line-strong); border-radius: var(--v2-radius);
  background: var(--v2-surface); color: var(--v2-text);
}
.v2-auth-card input:focus,
.v2-auth-card select:focus { outline: none; border-color: var(--v2-primary); box-shadow: 0 0 0 4px var(--v2-primary-soft); }

/* --- Landing/auth responsive --- */
@media (max-width: 900px) {
  .v2-hero { grid-template-columns: 1fr; gap: var(--v2-space-8); padding: var(--v2-space-12) var(--v2-space-6); }
  .v2-auth-grid { grid-template-columns: 1fr; }
  .v2-landing-nav { display: none; }
}

/* ============================================================
   Marketplace + Completed polish (TASK 008) — CSS-first.
   Scoped to .marketplace-v2 (carrier app only). Fixes card
   alignment (issues 4/5) and collapses completed deliveries to
   compact summaries (issue 3). No layout logic beyond surface +
   grid alignment; preserves all actions.
   ============================================================ */
/* Available (compact) marketplace cards — even alignment + premium surface */
.marketplace-v2 .marketplace-compact-card {
  display: grid;
  gap: var(--v2-space-3);
  padding: var(--v2-space-4) var(--v2-space-6);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-lg);
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow-soft);
}
.marketplace-v2 .marketplace-compact-card:hover { box-shadow: var(--v2-shadow-medium); }
.marketplace-v2 .marketplace-compact-route {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--v2-space-4);
}
.marketplace-v2 .marketplace-compact-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--v2-space-4);
}
.marketplace-v2 .marketplace-compact-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--v2-space-4);
  color: var(--v2-text-muted); font-size: 13px;
}
/* Expanded load card facts — align as an even grid */
.marketplace-v2 .load-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--v2-space-4);
}

/* Completed deliveries collapse to a compact summary (issue 3).
   The transport detail page (Open transport) is the expanded view.
   Heavy/active-only sections are hidden; summary + actions remain. */
.marketplace-v2 .assigned-workspace-card.is-compact .assigned-map-strip,
.marketplace-v2 .assigned-workspace-card.is-compact .assigned-detail-grid,
.marketplace-v2 .assigned-workspace-card.is-compact .crew-control-grid {
  display: none;
}
.marketplace-v2 .assigned-workspace-card.is-compact {
  padding: var(--v2-space-4) var(--v2-space-6);
  border-radius: var(--v2-radius-lg);
}

/* To-be-paid cards (TASK 008B) */
.to-be-paid-card { display: flex; align-items: center; justify-content: space-between; gap: var(--v2-space-4); flex-wrap: wrap; }
.to-be-paid-main { display: grid; gap: 2px; min-width: 0; }
.to-be-paid-actions { display: flex; align-items: center; gap: var(--v2-space-3); }

/* ============================================================
   Marketplace inner card polish (TASK 009) — CSS-only.
   Scoped to .marketplace-v2 (carrier app). Polishes marketplace,
   bid, assigned and completed cards + empty states to the V2
   language. No markup/logic changes; all actions/hooks preserved.
   ============================================================ */

/* --- Status pills: obvious semantic states --- */
.marketplace-v2 .status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 650; line-height: 1.2; white-space: nowrap;
}
.marketplace-v2 .status-open,
.marketplace-v2 .status-assigned { background: var(--v2-info-soft); color: var(--v2-info); }
.marketplace-v2 .status-accepted,
.marketplace-v2 .status-done { background: var(--v2-success-soft); color: var(--v2-success); }
.marketplace-v2 .status-pending { background: var(--v2-warning-soft); color: var(--v2-warning); }
.marketplace-v2 .status-rejected { background: var(--v2-danger-soft); color: var(--v2-danger); }
.marketplace-v2 .status-neutral { background: var(--v2-neutral-soft); color: var(--v2-neutral); }

/* --- Marketplace available cards: route is the strongest element --- */
.marketplace-v2 .marketplace-compact-route h3,
.marketplace-v2 .load-card-top h3 {
  font-size: 19px; font-weight: 720; letter-spacing: -0.01em; color: var(--v2-text); margin: 2px 0 0;
}
.marketplace-v2 .marketplace-compact-route h3 span,
.marketplace-v2 .load-card-top h3 span { color: var(--v2-text-muted); font-weight: 500; }
.marketplace-v2 .marketplace-compact-meta span,
.marketplace-v2 .load-facts-grid div { display: grid; gap: 2px; }
.marketplace-v2 .marketplace-compact-meta b,
.marketplace-v2 .load-facts-grid span {
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--v2-text-muted);
}
.marketplace-v2 .load-facts-grid b { font-size: 14px; color: var(--v2-text); font-weight: 640; }
.marketplace-v2 .marketplace-load-card {
  border: 1px solid var(--v2-line); border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-soft); background: var(--v2-surface);
}
.marketplace-v2 .load-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--v2-space-4); }
/* action area alignment */
.marketplace-v2 .load-card-actions,
.marketplace-v2 .marketplace-compact-foot { align-items: center; }
.marketplace-v2 .driver-bid-button {
  border-radius: var(--v2-radius); font-weight: 620; padding: 9px 14px;
}
.marketplace-v2 .driver-bid-quick { background: var(--v2-primary); color: #fff; border: 0; }
.marketplace-v2 .driver-bid-quick:hover { background: var(--v2-primary-hover); }
.marketplace-v2 .driver-bid-custom { background: var(--v2-surface); border: 1px solid var(--v2-line-strong); color: var(--v2-text); }

/* --- Your bids cards: clear amount + obvious state --- */
.marketplace-v2 .driver-bid-history-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--v2-space-4); align-items: center;
  padding: var(--v2-space-4) var(--v2-space-6);
  border: 1px solid var(--v2-line); border-radius: var(--v2-radius-lg);
  background: var(--v2-surface); box-shadow: var(--v2-shadow-soft);
}
.marketplace-v2 .bid-history-side { display: grid; justify-items: end; gap: 6px; text-align: right; }
.marketplace-v2 .bid-history-side strong { font-size: 18px; font-weight: 760; color: var(--v2-text); font-variant-numeric: tabular-nums; }
.marketplace-v2 .rejection-copy {
  margin-top: 6px; font-size: 12.5px; color: var(--v2-danger);
  background: var(--v2-danger-soft); border-radius: var(--v2-radius); padding: 6px 10px;
}

/* --- Assigned cards: clean hierarchy, grouped actions --- */
.marketplace-v2 .assigned-workspace-card {
  border: 1px solid var(--v2-line); border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-soft); background: var(--v2-surface);
}
.marketplace-v2 .assigned-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--v2-space-4); }
.marketplace-v2 .assigned-card-actions {
  display: flex; flex-wrap: wrap; gap: var(--v2-space-3); align-items: center;
  padding-top: var(--v2-space-3); border-top: 1px solid var(--v2-line); margin-top: var(--v2-space-3);
}

/* --- Empty states: consistent V2 --- */
.marketplace-v2 .empty-state,
.marketplace-v2 .empty-state.compact-empty {
  display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: var(--v2-space-8) var(--v2-space-6);
  border: 1px dashed var(--v2-line-strong); border-radius: var(--v2-radius-lg);
  background: var(--v2-surface-sunken); color: var(--v2-text-secondary);
}
.marketplace-v2 .empty-state b { color: var(--v2-text); font-size: 15px; }
.marketplace-v2 .empty-state span { font-size: 13px; }

/* --- Filter toolbar: align inputs consistently --- */
.marketplace-v2 .marketplace-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--v2-space-3);
  padding: var(--v2-space-4); background: var(--v2-surface);
  border: 1px solid var(--v2-line); border-radius: var(--v2-radius-lg); box-shadow: var(--v2-shadow-soft);
}
.marketplace-v2 .marketplace-toolbar label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--v2-text-secondary); }
.marketplace-v2 .marketplace-toolbar input,
.marketplace-v2 .marketplace-toolbar select {
  padding: 9px 11px; border: 1px solid var(--v2-line-strong); border-radius: var(--v2-radius); background: var(--v2-surface); font-size: 14px;
}
.marketplace-v2 .marketplace-toolbar select:disabled { opacity: 0.55; cursor: not-allowed; }

/* ============================================================
   BUGFIX-01 — admin access gate + inline company doc review
   ============================================================ */
/* Bug 1: the Dispatch shell stays hidden until admin.js confirms an
   admin role (fail-closed). Non-admins never see the Dispatch UI. */
.dispatch-v2 .v2-app-shell { display: none; }
.dispatch-v2.is-admin .v2-app-shell { display: grid; }

/* Full-page access-denied screen (rendered by denyAccess) */
.access-denied-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--v2-space-8);
  background: var(--v2-canvas);
}
.access-denied-card {
  max-width: 460px;
  width: 100%;
  display: grid;
  gap: var(--v2-space-3);
  text-align: center;
  padding: var(--v2-space-12);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-soft);
}
.access-denied-card h1 { font-size: 24px; font-weight: 740; letter-spacing: -0.02em; }
.access-denied-card p { color: var(--v2-text-secondary); }
.access-denied-actions { display: flex; gap: var(--v2-space-3); justify-content: center; margin-top: var(--v2-space-3); flex-wrap: wrap; }

/* Bug 4: inline company document review panel on company-approvals */
.company-doc-review {
  display: grid;
  gap: var(--v2-space-3);
  margin-top: var(--v2-space-3);
  padding-top: var(--v2-space-3);
  border-top: 1px solid var(--v2-line);
}
.company-doc-empty { color: var(--v2-text-muted); }
