:root {
  --bg: #081018;
  --bg-elevated: #0c1420;
  --surface: #101a28;
  --surface-hover: #152030;
  --border: rgba(0, 212, 255, 0.1);
  --border-focus: rgba(0, 212, 255, 0.45);
  --text: #e8f4ff;
  --text-secondary: #8ba3bc;
  --text-muted: #5a7894;
  --arc: #00d4ff;
  --accent: #00d4ff;
  --accent-strong: #00b8e6;
  --accent-soft: rgba(0, 212, 255, 0.1);
  --accent-glow: 0 0 40px rgba(0, 212, 255, 0.18);
  --gold: #f5b942;
  --gold-soft: rgba(245, 185, 66, 0.12);
  --success: #00ff9d;
  --success-soft: rgba(0, 255, 157, 0.1);
  --warn: #f5b942;
  --warn-soft: rgba(245, 185, 66, 0.12);
  --danger: #ff6b7a;
  --danger-soft: rgba(255, 107, 122, 0.1);
  --reflector: linear-gradient(180deg, #f5b942 0%, #00d4ff 100%);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --header-h: 68px;
  --footer-h: 92px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  --max: 1180px;
  --max-narrow: 960px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(0, 212, 255, 0.07), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

img:not(.listing-photo):not(.listing-gallery-photo):not(.listing-gallery-thumb-img) { display: block; max-width: 100%; height: auto; }

/* Gallery base — must work even if gallery.css is cached/missing */
.listing-gallery { margin: 0; min-width: 0; }
.listing-gallery-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1e2733;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.listing-gallery-photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  margin: 0;
  background: #141b24;
}
.listing-gallery-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button, input, select { font: inherit; }

/* Lightweight hero accent (hero only — no full-page fixed animation) */
.hero-deck {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 36px;
}

.hero-road-accent {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  pointer-events: none;
  opacity: 0.35;
  background: linear-gradient(180deg, transparent, rgba(13, 28, 44, 0.55));
  z-index: 0;
}

body.page-home .hero-copy,
body.page-home .hero-deck-panel {
  position: relative;
  z-index: 1;
}

body.page-home .hero-copy {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 212, 255, 0.12);
  background: rgba(16, 26, 40, 0.88);
}

body.page-home .hero-deck-panel,
body.page-home .pipeline,
body.page-home .quick-actions,
body.page-home .content-section {
  background: rgba(16, 26, 40, 0.88);
}

body.page-home .pipeline,
body.page-home .quick-actions,
body.page-home .content-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

body.animations-paused .deck-scan {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .deck-scan {
    animation: none !important;
  }
}

.app-bg {
  display: none;
}

body.page-home .app-bg,
body.page-lead .app-bg,
body.page-lead .app-bg-static {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}

body.page-lead .app-bg-static .road-scene,
body.page-lead .app-bg-static .road-truck {
  display: none;
}

.road-horizon {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 70% at 50% 100%, rgba(0, 212, 255, 0.14), transparent 58%),
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(0, 212, 255, 0.1), transparent 55%);
}

.road-scene {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--footer-h);
  height: min(28vh, 260px);
  min-height: 140px;
  overflow: hidden;
}

.road-trees {
  position: absolute;
  left: 50%;
  bottom: 42%;
  width: min(1400px, 160vw);
  height: auto;
  transform: translateX(-50%);
  opacity: 0.65;
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.08));
  pointer-events: none;
}

.road-lanes {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -4%;
  height: 72%;
  opacity: 0.78;
  background:
    linear-gradient(180deg, transparent 0%, rgba(8, 16, 24, 0.2) 22%, rgba(8, 16, 24, 0.95) 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 47px,
      rgba(245, 185, 66, 0.16) 47px,
      rgba(245, 185, 66, 0.16) 49px
    );
  transform: perspective(900px) rotateX(62deg);
  transform-origin: center bottom;
  box-shadow:
    inset 0 0 80px rgba(0, 212, 255, 0.06),
    0 -20px 60px rgba(0, 0, 0, 0.35);
}

.road-dash {
  position: absolute;
  left: 50%;
  top: -50%;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  background: repeating-linear-gradient(
    180deg,
    rgba(245, 185, 66, 0.55) 0 18px,
    transparent 18px 36px
  );
  opacity: 0.45;
  animation: road-dash-flow 2.4s linear infinite;
}

.road-truck {
  position: absolute;
  bottom: 10%;
  left: 0;
  width: min(300px, 36vw);
  height: auto;
  opacity: 0.32;
  filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.18));
  animation: road-truck-drive 55s linear infinite;
  will-change: transform;
}

@keyframes road-dash-flow {
  from { transform: translateY(0); }
  to { transform: translateY(36px); }
}

@keyframes road-truck-drive {
  from { transform: translateX(-110%); }
  to { transform: translateX(115vw); }
}

body.animations-paused .road-truck,
body.animations-paused .road-dash {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .road-truck,
  .road-dash {
    animation: none !important;
  }

  .road-truck {
    transform: translateX(20vw);
    opacity: 0.2;
  }
}

body.page-home .road-scene {
  height: min(24vh, 220px);
  min-height: 120px;
  opacity: 0.9;
}

body.page-home .main,
body.page-lead .main-narrow {
  background: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 16, 24, 0.98);
  border-bottom: 1px solid var(--border);
}

.topbar-lane {
  height: 3px;
  background: var(--reflector);
  opacity: 0.85;
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-mark {
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.45));
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-a { color: var(--gold); }
.brand-b { color: var(--arc); }

.brand-tag {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.topnav-link {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.topnav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.topnav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.topnav-current {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.topbar-end { margin-left: auto; flex-shrink: 0; }

/* Main */
.main {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 48px;
  background: var(--bg);
}

.main-narrow { max-width: var(--max-narrow); }

/* Hero — command deck */
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--arc);
  margin-bottom: 14px;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hero-deck h1,
.hero-copy h1 {
  font-size: clamp(1.65rem, 3.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-deck-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), var(--accent-glow);
}

.deck-art {
  position: relative;
  height: 140px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0a1628 0%, #081018 100%);
}

.deck-art-truck {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

.deck-truck-box {
  width: min(92%, 360px);
  height: auto;
  object-fit: contain;
  opacity: 0.92;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
}

.deck-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.1) 0%, transparent 45%);
  pointer-events: none;
}

.hero-deck-panel .hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.hero-deck-panel .metric-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: var(--surface);
}

.hero-deck-panel .metric-card.metric-hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, var(--surface) 55%);
}

.metric-hero .metric-value {
  font-size: 2.5rem;
  color: var(--arc);
  font-family: var(--mono);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

.hero-lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 24px;
}

.hero-actions { margin-bottom: 12px; }

.hero-secondary {
  margin-top: 10px;
}

.hero-form-inline {
  display: inline;
}

.hero-form-inline button {
  padding-left: 0;
}

.hero-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.hero-search-btn {
  flex-shrink: 0;
}

.status-chips, .lead-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.metric-card.metric-primary {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, var(--surface) 60%);
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: var(--shadow), var(--accent-glow);
}

.metric-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.metric-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.metric-primary .metric-value {
  font-size: 2.75rem;
  color: var(--accent);
}

.metric-note {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 40px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pipeline-step {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  align-content: start;
  min-height: 100%;
}

.pipeline-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pipeline-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--arc);
  background: var(--accent-soft);
  border: 1px solid rgba(0, 212, 255, 0.22);
}

.pipeline-icon svg {
  width: 22px;
  height: 22px;
}

.pipeline-icon-gold {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: rgba(245, 185, 66, 0.25);
}

.pipeline-icon-green {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(0, 255, 157, 0.25);
}

.pipeline-arrow svg {
  width: 28px;
  height: 14px;
  color: var(--text-muted);
  opacity: 0.6;
}

.pipeline-step h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
}

.pipeline-copy {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
  min-height: 3.75em;
}

.pipeline-stat {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-top: auto;
  padding-top: 4px;
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  align-self: center;
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 0 4px;
}

/* Quick actions */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.quick-actions { margin-bottom: 40px; }

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: stretch;
}

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

.action-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s;
}

.action-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.action-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 18px;
  gap: 10px;
  min-height: 100%;
}

.action-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
}

.action-card p {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.action-card .field-select-sm {
  margin-top: auto;
}

.action-card .btn-block {
  flex-shrink: 0;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-text-fill-color: currentColor;
  text-align: center;
  justify-content: center;
}

.action-card .btn-block.btn-ghost {
  color: var(--accent);
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.25);
}

.action-card .btn-block:hover {
  background: rgba(255, 255, 255, 0.16);
}

.action-card .btn-block.btn-ghost:hover {
  background: rgba(0, 212, 255, 0.16);
}

.action-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Content section */
.content-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-loadboard {
  position: relative;
  background: var(--surface);
}

#listings {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.tabs-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs-wrap::-webkit-scrollbar { display: none; }

.loadboard-tabs-head {
  padding: 16px 20px 14px;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.08) 0%, rgba(0, 212, 255, 0.03) 100%);
  border-top: 1px solid rgba(0, 212, 255, 0.18);
  border-bottom: 2px solid rgba(0, 212, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.loadboard-tabs-label {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: min-content;
}

.tab {
  flex-shrink: 0;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(8, 16, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.tab em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 6px;
  margin-left: 6px;
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.4;
  color: #041018;
  background: var(--accent);
  border-radius: 999px;
}

.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.25);
}

.tab.active {
  color: #041018;
  background: linear-gradient(180deg, #7aebff 0%, var(--accent-strong) 100%);
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.35), 0 4px 16px rgba(0, 212, 255, 0.25);
}

.tab.active em {
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.92);
}

.tab-panel {
  display: none;
  padding: 20px 24px 24px;
}

.tab-panel.active {
  display: block;
  background: var(--surface);
}

#listings.active {
  padding-top: 8px;
}

.action-card-scan { border-top: 3px solid var(--arc); }
.action-card-radio { border-top: 3px solid var(--gold); }
.action-card-dispatch { border-top: 3px solid var(--success); }
.action-card-export { border-top: 3px solid var(--text-muted); }

.content-loadboard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--reflector);
  pointer-events: none;
  z-index: 2;
}

.loadboard-head {
  padding: 20px 24px 0;
}

.loadboard-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.loadboard-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* Listing grid */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.listing-grid-jim {
  gap: 22px;
}

@media (max-width: 960px) {
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .listing-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Lead cards */
.listing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(16, 26, 40, 0.98) 0%, rgba(8, 16, 24, 0.98) 100%);
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-radius: calc(var(--radius) + 2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 32px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.listing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
  background: radial-gradient(120% 80% at 50% 0%, rgba(0, 212, 255, 0.08), transparent 55%);
}

.listing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 212, 255, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 18px 40px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(0, 212, 255, 0.06);
}

.listing-card:hover::before { opacity: 1; }

.unit-card {
  border-left: 3px solid rgba(0, 212, 255, 0.18);
}

.listing-card.status-new { border-left-color: rgba(0, 212, 255, 0.55); }
.listing-card.status-qualifying { border-left-color: rgba(245, 185, 66, 0.65); }
.listing-card.status-dead,
.listing-card.status-rejected { border-left-color: rgba(255, 107, 122, 0.55); }

/* Jim-ready highlight */
.listing-card-jim-ready {
  border-color: rgba(0, 255, 157, 0.35);
  border-left-color: var(--success);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 12px 36px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(0, 255, 157, 0.12),
    0 0 28px rgba(0, 255, 157, 0.12);
}

.listing-card-jim-ready::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(0, 255, 157, 0.22);
  box-shadow: inset 0 0 24px rgba(0, 255, 157, 0.06);
}

.listing-card-jim-ready:hover {
  border-color: rgba(0, 255, 157, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 20px 44px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(0, 255, 157, 0.18),
    0 0 36px rgba(0, 255, 157, 0.18);
}

.jim-ready-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #042818;
  background: linear-gradient(90deg, #00ff9d 0%, #5dffc0 55%, #00d4ff 100%);
  border-bottom: 1px solid rgba(0, 255, 157, 0.35);
}

.jim-ready-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #042818;
  box-shadow: 0 0 0 2px rgba(4, 40, 24, 0.25);
  animation: jim-ready-pulse 1.8s ease-in-out infinite;
}

.jim-ready-score {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  color: #042818;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

@keyframes jim-ready-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

.listing-media {
  position: relative;
  height: 200px;
  background: #070b12;
  isolation: isolate;
}

.listing-photo-link {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
  overflow: hidden;
}

.listing-photo {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  background: #070b12;
  transition: transform 0.35s ease;
}

.listing-card:hover .listing-photo {
  transform: scale(1.04);
}

.listing-media-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 8, 14, 0.15) 0%, transparent 38%),
    linear-gradient(0deg, rgba(4, 8, 14, 0.82) 0%, transparent 52%);
}

.listing-media-meta {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  pointer-events: none;
  box-sizing: border-box;
}

.listing-price {
  align-self: flex-end;
  max-width: calc(100% - 24px);
  padding: 6px 11px;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffe08a;
  background: rgba(4, 8, 14, 0.88);
  border: 1px solid rgba(245, 185, 66, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.listing-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 14px;
  background: transparent;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.unit-id {
  font-size: 0.6875rem;
  font-family: var(--mono);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.source-truckpaper {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: rgba(245, 185, 66, 0.35);
}

.source-craigslist {
  color: #8fd4ff;
  background: rgba(80, 170, 220, 0.12);
  border-color: rgba(80, 170, 220, 0.35);
}

.source-ebay {
  color: #ffd27a;
  background: rgba(230, 80, 50, 0.12);
  border-color: rgba(230, 80, 50, 0.35);
}

.listing-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-name a {
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s ease;
}

.listing-name a:hover { color: var(--accent); }

.listing-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.listing-spec {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.listing-spec dt {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.listing-spec dd {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}

.listing-card-jim-ready .listing-spec {
  background: rgba(0, 255, 157, 0.05);
  border-color: rgba(0, 255, 157, 0.12);
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.listing-source-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.listing-cta {
  flex-shrink: 0;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.18);
}

.listing-card-jim-ready .listing-cta {
  background: linear-gradient(135deg, #00ff9d 0%, #00d4ff 100%);
  color: #041018;
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(0, 255, 157, 0.28);
}

.listing-card-jim-ready .listing-cta:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 22px rgba(0, 255, 157, 0.34);
}

.link-muted {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
}

.link-muted:hover { color: var(--accent); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
}

.pagination-status {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.pagination-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Queue */
.queue { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.queue-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--success);
}

.queue-img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.queue-main { flex: 1; min-width: 0; }

.queue-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.queue-head h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.queue-head a { text-decoration: none; color: var(--text); }
.queue-head a:hover { color: var(--accent); }

.score-pill {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--success);
  padding: 4px 10px;
  background: var(--success-soft);
  border-radius: 999px;
}

.queue-sub, .queue-detail {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.queue-detail { margin-top: 4px; color: var(--text-muted); }

/* Tables */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

.table-img {
  width: 44px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
}

.table-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

/* Badges & chips */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
}

.listing-media .badge:not(.badge-qualified) {
  background: rgba(7, 11, 18, 0.92);
}

.badge-new { color: var(--accent); border-color: rgba(56, 189, 248, 0.3); background: var(--accent-soft); }
.badge-qualifying { color: var(--gold); border-color: rgba(251, 191, 36, 0.3); background: var(--gold-soft); }
.badge-qualified {
  color: #042818;
  border-color: rgba(0, 255, 157, 0.45);
  background: linear-gradient(135deg, #00ff9d 0%, #5dffc0 100%);
  font-weight: 700;
}

.listing-card-jim-ready .listing-media .badge-qualified {
  box-shadow: 0 4px 14px rgba(0, 255, 157, 0.35);
}
.badge-dead, .badge-rejected { color: var(--danger); border-color: rgba(248, 113, 113, 0.3); background: var(--danger-soft); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.chip-ok { color: var(--success); border-color: rgba(52, 211, 153, 0.25); background: var(--success-soft); }
.chip-warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.25); background: var(--warn-soft); }
.chip-live { color: var(--success); border-color: rgba(52, 211, 153, 0.25); background: var(--success-soft); }

/* Buttons & fields */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:hover:not(.btn-accent):not(.btn-review-add):not(.btn-review-reject):not(.btn-review-skip) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn:active { transform: scale(0.98); }

.btn-accent {
  color: #041018;
  background: linear-gradient(180deg, #5dd4ff 0%, var(--accent-strong) 100%);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(56, 189, 248, 0.35);
}

.btn-accent:hover {
  background: linear-gradient(180deg, #7aebff 0%, var(--arc) 100%);
  border-color: transparent;
  box-shadow: 0 4px 24px rgba(0, 212, 255, 0.4);
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: none;
}

.btn-ghost:hover { background: var(--accent-soft); }

.btn-lg { min-height: 46px; padding: 0 22px; font-size: 0.9375rem; }

.btn-sm { min-height: 34px; padding: 0 12px; font-size: 0.8125rem; }

.btn-block { width: 100%; border-radius: 0; }

.btn.is-loading { opacity: 0.7; pointer-events: none; }

.field-select {
  min-height: 40px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
}

.field-select-sm { width: 100%; min-height: 36px; font-size: 0.8125rem; }

.field-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-select option {
  color: var(--text);
  background: #0c1420;
}

/* Custom select */
.select-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.select-field-hero {
  flex: 1 1 220px;
  max-width: 280px;
}

.select-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.select-control {
  position: relative;
}

.select-field.is-enhanced .field-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(180deg, rgba(16, 26, 40, 0.98) 0%, rgba(8, 16, 24, 0.98) 100%);
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: var(--radius-sm);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 8px 20px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.select-trigger:hover {
  border-color: rgba(0, 212, 255, 0.32);
}

.select-trigger:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 8px 20px rgba(0, 0, 0, 0.22);
}

.select-field.is-open .select-trigger {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.select-field.is-open .select-chevron {
  transform: rotate(180deg);
}

.select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(10, 18, 28, 0.98);
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: calc(var(--radius-sm) + 2px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  backdrop-filter: blur(10px);
  max-height: 240px;
  overflow-y: auto;
}

.select-menu[hidden] {
  display: none;
}

.select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.select-option:hover,
.select-option.is-focused {
  color: var(--text);
  background: rgba(0, 212, 255, 0.1);
}

.select-option.is-selected {
  color: #041018;
  font-weight: 700;
  background: linear-gradient(135deg, #00d4ff 0%, #5de4ff 100%);
  box-shadow: 0 4px 14px rgba(0, 212, 255, 0.22);
}

.select-option-check {
  width: 14px;
  font-size: 0.75rem;
  opacity: 0;
}

.select-option.is-selected .select-option-check {
  opacity: 1;
}

/* Empty states */
.empty {
  text-align: center;
  padding: 48px 24px;
}

.empty-inline { padding: 24px; }

.empty-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 360px;
  margin: 0 auto 20px;
}

/* Lead detail page */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

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

.breadcrumb a:hover { color: var(--accent); }

.lead-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 28px;
  margin-bottom: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lead-hero-media {
  min-width: 0;
  border-radius: var(--radius);
}

.lead-hero-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.lead-hero-info h1 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.lead-hero-meta {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.lead-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag {
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.tag-gold {
  color: var(--gold);
  border-color: rgba(251, 191, 36, 0.25);
  background: var(--gold-soft);
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.card-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.card-hint strong { color: var(--gold); }

.card-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.card-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.spec-grid {
  display: grid;
  gap: 10px;
}

.spec-grid div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  font-size: 0.875rem;
}

.spec-grid dt { color: var(--text-muted); font-weight: 500; }
.spec-grid dd a {
  color: var(--accent);
  word-break: break-all;
}

/* Checklist */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.check-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.check-item:last-child { border-bottom: none; }

.check-dot {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.check-done .check-dot {
  border-color: var(--success);
  background: var(--success);
}

.check-done .check-dot::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-waiting .check-dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.check-failed .check-dot {
  border-color: var(--danger);
  background: var(--danger);
}

.check-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.check-answer { font-size: 0.8125rem; color: var(--text-secondary); }
.check-waiting { color: var(--accent); font-weight: 500; }
.check-failed { color: var(--danger); }
.check-muted { color: var(--text-muted); }

/* Chat */
.card-chat { margin-bottom: 24px; }

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 60px;
}

.chat-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.chat-bubble p { margin: 0; }

.chat-outbound {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-bottom-right-radius: 4px;
}

.chat-inbound {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-who {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.chat-input {
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  min-height: 44px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.chat-input input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.fine-print {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.fine-print code {
  font-size: 0.75rem;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  color: var(--accent);
}

/* Footer */
.footer {
  position: relative;
  z-index: 5;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

body.page-home .footer,
body.page-lead .footer {
  z-index: 5;
  background: var(--bg);
  box-shadow: 0 -12px 32px rgba(8, 16, 24, 0.92);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

.footer-branded {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-brand strong { color: var(--gold); }

.footer-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tag-odo { font-family: var(--mono); font-size: 0.78rem; }

.lead-hero-media { position: relative; }

.dossier-stamp {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--arc);
  background: rgba(8, 16, 24, 0.88);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.empty-truck .empty-illustration {
  width: min(280px, 80%);
  margin: 0 auto 20px;
  opacity: 0.65;
  border-radius: var(--radius);
}

.card-spec { border-top: 3px solid var(--gold); }
.card-radio-check { border-top: 3px solid var(--arc); }
.card-chat { border-top: 3px solid var(--success); }

.metric-value {
  font-family: var(--mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Toasts */
.toast-root {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(17, 24, 32, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast-in { opacity: 1; transform: translateY(0); }
.toast-out { opacity: 0; transform: translateY(-8px); }

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.toast-info .toast-icon { background: var(--accent-soft); color: var(--accent); }
.toast-success .toast-icon { background: var(--success-soft); color: var(--success); }
.toast-warn .toast-icon { background: var(--warn-soft); color: var(--warn); }
.toast-error .toast-icon { background: var(--danger-soft); color: var(--danger); }

.toast-info { border-left: 3px solid var(--accent); }
.toast-success { border-left: 3px solid var(--success); }
.toast-warn { border-left: 3px solid var(--warn); }
.toast-error { border-left: 3px solid var(--danger); }

.toast-text { margin: 0; font-size: 0.875rem; line-height: 1.45; }

.toast-notify {
  cursor: default;
}

.toast-notify.toast-clickable {
  cursor: pointer;
}

.toast-notify.toast-clickable:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(20, 30, 42, 0.98);
}

.toast-notify .toast-copy {
  min-width: 0;
}

.toast-notify .toast-title {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.toast-notify.toast-success .toast-title {
  color: var(--success);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

/* Loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 11, 18, 0.75);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.page-loader-visible { opacity: 1; pointer-events: auto; }

.page-loader-panel {
  text-align: center;
  padding: 28px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-loader-text {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
  .action-grid,
  .action-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr; gap: 16px; }
  .pipeline-arrow { display: none; }
  .pipeline-copy { min-height: 0; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .brand-tag { display: none; }

  .nav-toggle { display: flex; }

  .topbar-inner { padding: 0 16px; }

  .hero-deck {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-deck h1 br { display: none; }

  .deck-art { height: 120px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }

  .topnav {
    position: fixed;
    top: calc(var(--header-h) + 3px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 20px;
    background: rgba(7, 11, 18, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
  }

  .topnav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .topnav-link, .topnav-current {
    padding: 14px 12px;
    border-radius: var(--radius-sm);
  }

  .topbar-end {
    margin-left: 0;
    order: 3;
  }

  .page-lead .topbar-end {
    display: flex;
    margin-left: auto;
    margin-right: 8px;
  }

  .main { padding: 24px 16px 40px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }

  .hero-form { flex-direction: column; align-items: stretch; }
  .hero-form .select-field,
  .hero-form .select-field-hero,
  .hero-form .field-select,
  .hero-form .select-trigger,
  .hero-form .btn,
  .hero-search-btn { width: 100%; max-width: none; }

  .hero-stats { grid-template-columns: 1fr 1fr; }

  .metric-hero .metric-value,
  .metric-primary .metric-value { font-size: 2rem; }

  .action-grid { grid-template-columns: 1fr; }

  .tab-panel { padding: 16px; }

  .listing-grid { grid-template-columns: 1fr; }

  .queue-row {
    flex-wrap: wrap;
  }

  .queue-row .btn { width: 100%; margin-top: 8px; }

  .lead-hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .lead-grid { grid-template-columns: 1fr; }

  .lead-hero-actions { flex-direction: column; }
  .lead-hero-actions .btn,
  .lead-hero-actions form { width: 100%; }
  .lead-hero-actions form .btn { width: 100%; }

  .chat-input { flex-direction: column; }
  .chat-input .btn { width: 100%; min-height: 44px; }

  .toast-root {
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    max-width: none;
  }

  /* Stack table as cards on mobile */
  .table thead { display: none; }

  .table tbody tr {
    display: block;
    padding: 14px;
    margin-bottom: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .table tbody tr:hover td { background: transparent; }

  .table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border: none;
    text-align: right;
  }

  .table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    text-align: left;
    flex-shrink: 0;
  }

  .table td:first-child {
    display: block;
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }

  .table td:first-child::before { display: none; }

  .table td:last-child {
    justify-content: flex-end;
    padding-top: 10px;
  }

  .table td:last-child::before { display: none; }

  .table-empty { display: block; text-align: center; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }

  .metric-card.metric-primary { grid-column: auto; }

  .listing-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .listing-footer .btn { width: 100%; text-align: center; }

  .spec-grid div { grid-template-columns: 1fr; gap: 2px; }
}

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