:root {
  --bg: #121719;
  --bg-soft: #1f2729;
  --panel: rgba(16, 22, 24, 0.82);
  --panel-strong: rgba(15, 21, 23, 0.94);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f7f2e9;
  --muted: #c5bbac;
  --accent: #ff8f3f;
  --accent-strong: #ff6231;
  --accent-soft: rgba(255, 143, 63, 0.18);
  --teal: #76e1d3;
  --lime: #b0e46f;
  --danger: #ff5c5c;
  --warning: #ffcf5a;
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.36);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-display: "Bahnschrift", "Gill Sans", "Trebuchet MS", sans-serif;
  --font-body: "Segoe UI", "Trebuchet MS", sans-serif;
}

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

::selection {
  background: rgba(255, 143, 63, 0.32);
  color: #fff;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 143, 63, 0.22), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(118, 225, 211, 0.15), transparent 28%),
    linear-gradient(180deg, #1b2021 0%, #121719 100%);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 0;
}

.backdrop {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 143, 63, 0.07), transparent 42%),
    linear-gradient(315deg, rgba(118, 225, 211, 0.08), transparent 50%);
  pointer-events: none;
}

.topbar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 6;
  margin: 0;
  padding: 14px 18px;
  max-width: none;
  background: rgba(7, 11, 13, 0.76);
  border: 1px solid rgba(255, 215, 106, 0.16);
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(22px);
}

.topbar.hidden {
  display: none;
}

.topbar-row,
.topbar-kpis,
.nav-strip,
.screen-header,
.hero-actions,
.summary-row,
.contract-meta,
.route-metrics,
.trip-controls,
.trip-stats,
.driver-rows,
.progress-grid,
.settings-grid,
.garage-actions,
.results-breakdown,
.fleet-overview,
.market-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-row {
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 16px 28px rgba(255, 98, 49, 0.18);
  position: relative;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-mark::before {
  display: none;
}

.brand-mark::after {
  display: none;
}

.brand h1,
.screen-title,
.hero-title,
.card-title,
.menu-title,
.stat-value,
.results-value {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.brand p,
.screen-subtitle,
.card-subtitle,
.muted,
.badge-strip,
.contract-note {
  margin: 0;
  color: var(--muted);
}

.topbar-kpis {
  justify-content: flex-end;
}

.kpi-chip,
.nav-button,
.chip,
.badge,
.list-pill,
.toast,
.metric-card,
.status-card,
.card,
.hero-card,
.menu-card,
.trip-panel,
.results-card,
.settings-card {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.kpi-chip {
  min-width: 122px;
  padding: 10px 14px;
}

.kpi-label {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.kpi-value {
  display: block;
  margin-top: 6px;
  font-size: 1.26rem;
  font-weight: 700;
}

.nav-strip {
  margin-top: 16px;
}

.nav-button,
.button {
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    opacity 140ms ease;
}

.nav-button {
  padding: 10px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.nav-button:hover,
.button:hover,
.list-item:hover,
.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.22);
}

.nav-button.active,
.button.primary,
.route-card.selected,
.list-item.selected {
  background:
    linear-gradient(180deg, rgba(255, 143, 63, 0.26), rgba(255, 98, 49, 0.16)),
    var(--panel-strong);
  border-color: rgba(255, 143, 63, 0.46);
}

.nav-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.button {
  padding: 12px 16px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button.primary {
  box-shadow: 0 18px 32px rgba(255, 98, 49, 0.18);
}

.button.secondary {
  border-color: rgba(118, 225, 211, 0.22);
  background: rgba(118, 225, 211, 0.08);
}

.button.warn {
  border-color: rgba(255, 92, 92, 0.3);
  background: rgba(255, 92, 92, 0.09);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.main-layout {
  position: relative;
  min-height: 100vh;
}

.content-panel,
.scene-panel {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.content-panel {
  position: fixed;
  top: 116px;
  left: 16px;
  bottom: 16px;
  width: min(560px, calc(100vw - 32px));
  padding: 22px;
  z-index: 4;
  overflow: auto;
  border-radius: 30px;
  border: 1px solid rgba(255, 215, 106, 0.14);
  background:
    linear-gradient(180deg, rgba(14, 19, 21, 0.86), rgba(5, 9, 10, 0.72)),
    rgba(11, 15, 17, 0.78);
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(26px);
}

.scene-panel {
  position: fixed;
  inset: 0;
  z-index: 1;
  border-radius: 0;
  border: 0;
  background: #050608;
  box-shadow: none;
}

.screen-root {
  min-height: 100%;
  padding-right: 4px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.screen-root.transitioning {
  opacity: 0.16;
  transform: translateY(12px);
}

.scene-frame {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  border-radius: 0;
  border: 0;
  background:
    radial-gradient(circle at top center, rgba(255, 214, 98, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(8, 12, 14, 0.92), rgba(2, 4, 5, 0.96));
  overflow: hidden;
}

.scene-frame::before,
.scene-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-frame::before {
  background:
    radial-gradient(circle at 24% 36%, rgba(255, 183, 68, 0.08), transparent 30%),
    radial-gradient(circle at 74% 22%, rgba(255, 214, 98, 0.05), transparent 34%),
    url("assets/maps/europe-atlas-base.svg") center / 100% 100% no-repeat;
  opacity: 1;
  transition: opacity 180ms ease;
}

.scene-frame::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.34)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent 18%, transparent 78%, rgba(0, 0, 0, 0.42));
}

.scene-frame.trip-mode::before {
  opacity: 0;
}

.scene-frame.map-mode::before {
  opacity: 0;
}

.scene-frame.map-mode::after {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

#scene-canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 1;
}

/* Leaflet map container */
.game-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  background: #060a0c;
}

.scene-frame.map-mode .game-map {
  display: block;
}

.scene-frame.map-mode #scene-canvas {
  display: none;
}

.scene-frame.trip-mode .game-map {
  display: none;
}

.scene-frame.trip-mode #scene-canvas {
  display: block;
}

/* Leaflet UI overrides */
.game-map .leaflet-control-attribution {
  display: none;
}

.game-map .leaflet-control-zoom a {
  background: rgba(10, 20, 30, 0.85) !important;
  color: #8ad !important;
  border-color: #2a4a5a !important;
  transition: background 0.15s;
}

.game-map .leaflet-control-zoom a:hover {
  background: rgba(20, 40, 60, 0.95) !important;
  color: #adf !important;
}

/* City label tooltip */
.city-label {
  background: rgba(8, 16, 24, 0.88) !important;
  border: 1px solid rgba(74, 173, 216, 0.35) !important;
  color: #abd !important;
  font-size: 11px !important;
  font-family: inherit !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  box-shadow: 0 0 8px rgba(0, 160, 255, 0.12) !important;
  white-space: nowrap !important;
}

.city-label.locked {
  color: #556 !important;
  border-color: rgba(60, 70, 80, 0.3) !important;
  box-shadow: none !important;
}

.city-label::before {
  border-top-color: rgba(74, 173, 216, 0.35) !important;
}

/* Truck markers on real map */
.truck-map-icon {
  background: transparent !important;
  border: none !important;
}

.truck-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f0a030;
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(240, 160, 48, 0.6);
  animation: truckPulse 2s ease-in-out infinite;
}

.truck-dot.trip-active {
  width: 16px;
  height: 16px;
  background: #00eeff;
  border: 2px solid #fff;
  box-shadow: 0 0 16px rgba(0, 238, 255, 0.8);
  animation: tripTruckPulse 1s ease-in-out infinite;
}

@keyframes tripTruckPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 238, 255, 0.6); transform: scale(1); }
  50% { box-shadow: 0 0 24px rgba(0, 238, 255, 1); transform: scale(1.2); }
}

@keyframes truckPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(240, 160, 48, 0.5); }
  50% { box-shadow: 0 0 18px rgba(240, 160, 48, 1); }
}

.city-label.locked {
  opacity: 0.25 !important;
  font-size: 10px !important;
}

.leaflet-popup-content-wrapper {
  background: rgba(16, 22, 28, 0.95) !important;
  color: #f7f2e9 !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 238, 255, 0.3) !important;
}
.leaflet-popup-tip {
  background: rgba(16, 22, 28, 0.95) !important;
}
.leaflet-popup-content {
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.scene-caption {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  max-width: min(470px, calc(100vw - 32px));
  min-height: 0;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.94rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 106, 0.14);
  background: rgba(6, 9, 11, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
}

.truck-model-dock {
  position: fixed;
  top: 118px;
  right: 18px;
  z-index: 3;
  width: min(360px, calc(100vw - 44px));
  border-radius: 24px;
  border: 1px solid rgba(255, 215, 106, 0.16);
  background:
    linear-gradient(180deg, rgba(12, 18, 20, 0.9), rgba(7, 11, 13, 0.76)),
    rgba(5, 9, 10, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.truck-model-meta {
  display: grid;
  gap: 6px;
  padding: 14px 16px 10px;
}

.truck-model-meta strong {
  font-size: 1.08rem;
}

.truck-model-meta span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
}

.truck-model-frame {
  display: block;
  width: 100%;
  height: 252px;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.menu-screen,
.dashboard-screen,
.contracts-screen,
.garage-screen,
.drivers-screen,
.route-screen,
.trip-screen,
.results-screen,
.progress-screen,
.settings-screen {
  display: grid;
  gap: 18px;
}

.hero-card,
.menu-card {
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.hero-card::before,
.menu-card::before {
  content: "";
  position: absolute;
  inset: auto -12% -42% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 143, 63, 0.2), transparent 68%);
}

.hero-grid,
.dashboard-grid,
.contracts-grid,
.garage-grid,
.drivers-grid,
.route-grid,
.results-grid,
.settings-grid {
  display: grid;
  gap: 18px;
}

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

.contracts-grid,
.garage-grid,
.drivers-grid,
.route-grid,
.results-grid {
  grid-template-columns: 1fr;
}

.garage-grid,
.drivers-grid {
  grid-template-columns: 1fr;
}

.route-grid .wide,
.results-grid .wide {
  grid-column: 1 / -1;
}

.screen-header {
  justify-content: space-between;
  align-items: flex-start;
}

.screen-title {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.content-panel::-webkit-scrollbar {
  width: 10px;
}

.content-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 214, 98, 0.24);
}

.content-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.hero-title,
.menu-title {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

.hero-text,
.menu-text {
  max-width: 760px;
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.6;
}

.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.badge,
.list-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.86rem;
  color: var(--text);
}

.chip strong {
  color: var(--teal);
}

.badge {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.badge.common {
  background: rgba(255, 255, 255, 0.06);
}

.badge.rare {
  background: rgba(118, 225, 211, 0.12);
  color: var(--teal);
}

.badge.epic {
  background: rgba(255, 207, 90, 0.12);
  color: var(--warning);
}

.badge.black {
  background: rgba(255, 92, 92, 0.14);
  color: #ffc3c3;
}

.metric-grid,
.cards-grid,
.fleet-grid,
.drivers-market,
.licenses-grid,
.settings-grid,
.menu-grid {
  display: grid;
  gap: 16px;
}

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

.cards-grid,
.fleet-grid,
.drivers-market,
.licenses-grid,
.menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-card,
.status-card,
.card,
.trip-panel,
.results-card,
.settings-card {
  padding: 18px;
}

.metric-card {
  background:
    linear-gradient(180deg, rgba(255, 143, 63, 0.08), rgba(255, 255, 255, 0.02)),
    var(--panel);
}

.metric-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: var(--muted);
}

.stat-value {
  margin-top: 8px;
  font-size: 2rem;
}

.mini-stat {
  color: var(--muted);
  font-size: 0.92rem;
}

.card-title {
  font-size: 1.18rem;
}

.card-header,
.list-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-copy,
.contract-copy,
.driver-copy,
.route-copy {
  display: grid;
  gap: 8px;
}

.card,
.list-item,
.route-card,
.crew-card {
  display: grid;
  gap: 14px;
}

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

.list-item,
.route-card,
.crew-card {
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.route-card {
  cursor: pointer;
}

.contract-meta,
.route-metrics,
.list-row {
  align-items: center;
  gap: 10px;
}

.contract-meta span,
.route-metrics span,
.list-row span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
}

.money-positive {
  color: var(--lime);
}

.money-negative,
.danger {
  color: #ffb0b0;
}

.warning {
  color: var(--warning);
}

.teal {
  color: var(--teal);
}

.progress-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}

.progress-fill.warn {
  background: linear-gradient(90deg, var(--warning), var(--danger));
}

.progress-fill.good {
  background: linear-gradient(90deg, #70d3a4, var(--lime));
}

.summary-row {
  justify-content: space-between;
}

.trip-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(280px, 0.42fr);
  gap: 18px;
}

.route-dispatch-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 106, 0.16);
  background:
    linear-gradient(180deg, rgba(14, 20, 22, 0.94), rgba(9, 14, 16, 0.86)),
    rgba(7, 11, 13, 0.84);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.route-dispatch-copy {
  display: grid;
  gap: 4px;
}

.route-dispatch-copy strong {
  font-size: 0.98rem;
}

.route-dispatch-copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

.trip-panel strong,
.results-card strong {
  font-size: 1.15rem;
}

.trip-progress-hero {
  display: grid;
  gap: 10px;
  padding: 14px 0 8px;
}

.trip-progress-hero .progress-bar {
  height: 18px;
}

.trip-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.trip-mode-button.active {
  border-color: rgba(255, 143, 63, 0.46);
  background: rgba(255, 143, 63, 0.16);
}

.event-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 143, 63, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 143, 63, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(21, 28, 29, 0.95);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.event-timer {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 106, 0.22);
  background: rgba(255, 215, 106, 0.08);
  color: var(--warning);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.menu-shell,
.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

.menu-copy,
.hero-copy,
.menu-visual,
.hero-visual,
.visual-panel,
.contract-ticket,
.vehicle-card,
.dealer-card,
.driver-card,
.depot-card,
.cargo-seal,
.contract-visual-copy {
  display: grid;
  gap: 14px;
}

.menu-copy,
.hero-copy {
  align-content: start;
}

.menu-visual,
.hero-visual {
  align-content: stretch;
}

.hero-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.signal-card,
.visual-panel,
.depot-card,
.contract-ticket,
.vehicle-card,
.dealer-card,
.driver-card,
.cargo-seal {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(17, 23, 25, 0.82);
}

.signal-card {
  padding: 16px 18px;
  min-height: 120px;
}

.signal-card::before,
.visual-panel::before,
.contract-ticket::before,
.vehicle-card::before,
.dealer-card::before,
.driver-card::before,
.cargo-seal::before {
  content: "";
  position: absolute;
  inset: -12% auto auto -10%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 143, 63, 0.16), transparent 68%);
  pointer-events: none;
}

.visual-panel {
  padding: 16px;
  min-height: 220px;
}

.visual-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.visual-panel-header strong {
  font-size: 1.02rem;
}

.visual-panel-header span {
  color: var(--muted);
  font-size: 0.88rem;
}

.convoy-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}

.truck-illustration {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.24));
}

.truck-illustration.compact {
  max-width: 250px;
}

.trailer-illustration {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.22));
}

.trailer-illustration.compact {
  max-width: 250px;
}

.network-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
  background:
    radial-gradient(circle at top center, rgba(255, 214, 98, 0.08), transparent 34%),
    #050709;
}

.network-bg {
  fill: rgba(5, 7, 9, 0.92);
}

.network-land {
  fill: rgba(247, 220, 128, 0.05);
  stroke: rgba(247, 220, 128, 0.12);
  stroke-width: 1.5;
}

.network-border {
  fill: none;
  stroke: rgba(199, 185, 137, 0.3);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.network-road {
  stroke: rgba(147, 133, 88, 0.32);
  stroke-width: 3;
}

.network-road.live {
  stroke: rgba(246, 205, 94, 0.72);
  stroke-width: 4;
  filter: drop-shadow(0 0 4px rgba(246, 205, 94, 0.28));
}

.network-route-highlight {
  fill: none;
  stroke: url(#networkGlow);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 174, 82, 0.38));
}

.network-mover circle {
  fill: #ffd86d;
}

.network-mover rect {
  fill: rgba(255, 216, 109, 0.94);
  rx: 3px;
}

.network-node-core {
  fill: #f6cf5d;
  stroke: rgba(8, 12, 15, 0.92);
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(255, 206, 92, 0.3));
}

.network-city.locked .network-node-core {
  fill: rgba(185, 171, 124, 0.48);
}

.network-city.active .network-depot-base,
.network-city.active .network-depot-block {
  fill: rgba(255, 216, 109, 0.3);
}

.network-city.locked .network-depot-base,
.network-city.locked .network-depot-block {
  fill: rgba(255, 255, 255, 0.08);
}

.network-city.focused .network-depot-base,
.network-city.focused .network-depot-block {
  fill: rgba(255, 143, 63, 0.3);
}

.network-depot-base.garage,
.network-depot-block.garage {
  fill: rgba(255, 153, 76, 0.42);
}

.network-focus-ring {
  fill: none;
  stroke: rgba(255, 161, 90, 0.76);
  stroke-width: 3;
}

.network-label {
  fill: rgba(250, 223, 128, 0.94);
  font-size: 13px;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.network-sub {
  fill: rgba(226, 206, 150, 0.76);
  font-size: 10px;
  font-family: var(--font-body);
}

.depot-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.depot-card {
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(118, 225, 211, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(16, 22, 24, 0.82);
}

.depot-card-icon {
  width: 38px;
  height: 38px;
}

.depot-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.cargo-seal-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.cargo-seal {
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  padding: 12px;
  background:
    linear-gradient(180deg, var(--cargo-soft, rgba(118, 225, 211, 0.18)), rgba(255, 255, 255, 0.02)),
    rgba(17, 23, 25, 0.82);
}

.cargo-seal-icon {
  width: 66px;
  height: 66px;
}

.cargo-seal-copy strong {
  font-size: 1rem;
}

.contract-ticket {
  padding: 18px;
  background:
    linear-gradient(180deg, var(--cargo-soft, rgba(255, 143, 63, 0.14)), rgba(255, 255, 255, 0.02)),
    rgba(17, 23, 25, 0.86);
}

.contract-ticket-top {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 16px;
  align-items: start;
}

.contract-visual-copy {
  margin-top: 6px;
}

.route-strip {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, var(--route-soft, rgba(118, 225, 211, 0.14)), rgba(255, 255, 255, 0.02)),
    rgba(12, 17, 20, 0.74);
}

.route-strip-track {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.route-dot,
.route-line {
  display: block;
}

.route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--route-accent, var(--teal));
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.04);
}

.route-dot.mid {
  width: 10px;
  height: 10px;
  background: rgba(247, 242, 233, 0.72);
}

.route-line {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--route-accent, var(--teal)), rgba(247, 242, 233, 0.2));
}

.route-strip-labels {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.route-strip-labels strong {
  color: var(--text);
}

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

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

.vehicle-card,
.dealer-card {
  padding: 18px;
}

.vehicle-showcase {
  padding: 8px 0 2px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 60%),
    rgba(10, 15, 18, 0.74);
}

.compact-showcase {
  padding: 10px;
}

.vehicle-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vehicle-meta-strip span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.8rem;
}

.trip-asset-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.garage-location-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.garage-location-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 143, 63, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(15, 21, 23, 0.82);
}

.garage-location-icon {
  width: 42px;
  height: 42px;
}

.garage-location-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.driver-card {
  padding: 18px;
  background:
    linear-gradient(180deg, var(--driver-soft, rgba(118, 225, 211, 0.18)), rgba(255, 255, 255, 0.02)),
    rgba(17, 23, 25, 0.84);
}

.driver-shell {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.driver-shell-copy {
  display: grid;
  gap: 10px;
}

.driver-shell-copy p,
.driver-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.portrait-shell {
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.1), transparent 48%),
    var(--portrait-soft, rgba(118, 225, 211, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.driver-portrait {
  width: 100%;
  height: auto;
}

.trait-bars {
  display: grid;
  gap: 10px;
}

.trait-row {
  display: grid;
  gap: 6px;
}

.trait-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.trait-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--driver-accent, var(--teal)), rgba(255, 255, 255, 0.95));
}

.archetype-preview .portrait-shell {
  min-height: 108px;
}

.results-card {
  background:
    linear-gradient(180deg, rgba(118, 225, 211, 0.12), rgba(255, 255, 255, 0.02)),
    var(--panel);
}

.results-value {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.confirm-modal {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 20px;
  padding: 28px 32px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.confirm-modal h3 {
  color: var(--text);
  margin-bottom: 8px;
}
.confirm-modal p {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 0.95rem;
}
.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
.help-panel {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 20px;
  padding: 28px 32px;
  max-width: 540px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.help-panel h3 {
  color: var(--text);
  margin-bottom: 12px;
}
.help-panel table {
  width: 100%;
  border-collapse: collapse;
}
.help-panel td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--edge);
  font-size: 0.9rem;
}
.help-panel td:first-child {
  color: var(--accent);
  font-weight: 600;
  width: 80px;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.toast-layer {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 220px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  animation: toast-in 240ms ease, toast-out 240ms ease 3.3s forwards;
}

.toast strong {
  display: block;
  margin-bottom: 4px;
}

.legend-grid,
.overview-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.city-list,
.bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.city-list li,
.bullet-list li {
  margin-bottom: 8px;
}

.value-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.value-line strong {
  color: var(--text);
}

.settings-card p,
.card p,
.trip-panel p {
  line-height: 1.5;
}

.footer-note {
  font-size: 0.84rem;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (max-width: 1120px) {
  .dashboard-grid,
  .contracts-grid,
  .garage-grid,
  .drivers-grid,
  .route-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .content-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: min(58vh, 860px);
  }

  .scene-caption {
    top: 104px;
    right: 12px;
    bottom: auto;
    max-width: min(360px, calc(100vw - 24px));
  }

  .truck-model-dock {
    top: 104px;
    right: 12px;
    width: min(300px, calc(100vw - 24px));
  }

  .truck-model-frame {
    height: 214px;
  }

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

  .menu-shell,
  .hero-shell,
  .contract-ticket-top,
  .driver-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .content-panel {
    padding: 18px;
    max-height: min(62vh, 860px);
  }

  .topbar {
    padding: 14px;
    top: 8px;
    left: 8px;
    right: 8px;
  }

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

  .brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .scene-caption {
    display: none;
  }

  .truck-model-dock {
    display: none;
  }

  .compact-metric-grid,
  .operations-metric-grid,
  .hero-signal-grid,
  .depot-ribbon {
    grid-template-columns: 1fr;
  }

  .route-strip-labels {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-height: 820px) {
  .menu-card {
    padding: 20px;
  }

  .menu-shell {
    grid-template-columns: 1fr;
  }

  .menu-title {
    font-size: clamp(1.8rem, 6vh, 2.8rem);
  }

  .menu-text {
    font-size: 0.96rem;
  }

  .menu-grid,
  .menu-visual,
  .hero-signal-grid,
  .network-visual-card {
    display: none;
  }

  .signal-card,
  .visual-panel {
    min-height: 0;
  }

  .truck-model-dock {
    top: 96px;
    width: min(280px, calc(100vw - 24px));
  }

  .truck-model-frame {
    height: 190px;
  }
}

/* ─── Card entrance animations ─── */
@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card,
.hero-card,
.menu-card,
.contract-ticket,
.vehicle-card,
.dealer-card,
.driver-card,
.results-card,
.settings-card,
.metric-card,
.garage-location-card,
.signal-card {
  animation: card-enter 420ms cubic-bezier(0.19, 1, 0.22, 1) backwards;
}

.card:nth-child(1),
.metric-card:nth-child(1),
.contract-ticket:nth-child(1) { animation-delay: 40ms; }
.card:nth-child(2),
.metric-card:nth-child(2),
.contract-ticket:nth-child(2) { animation-delay: 100ms; }
.card:nth-child(3),
.metric-card:nth-child(3),
.contract-ticket:nth-child(3) { animation-delay: 160ms; }
.card:nth-child(4),
.metric-card:nth-child(4),
.contract-ticket:nth-child(4) { animation-delay: 220ms; }
.card:nth-child(5) { animation-delay: 280ms; }
.card:nth-child(6) { animation-delay: 340ms; }

/* ─── Interactive card hover glow ─── */
.card,
.contract-ticket,
.vehicle-card,
.dealer-card,
.driver-card,
.depot-card,
.garage-location-card,
.signal-card,
.crew-card {
  transition:
    transform 220ms cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.card:hover,
.contract-ticket:hover,
.vehicle-card:hover,
.dealer-card:hover,
.driver-card:hover {
  border-color: rgba(255, 143, 63, 0.18);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 143, 63, 0.06);
}

.depot-card:hover,
.garage-location-card:hover,
.signal-card:hover,
.crew-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

/* ─── Animated progress bars ─── */
.progress-fill {
  transition: width 700ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.trait-fill {
  transition: width 500ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ─── Active nav button pulse ─── */
.nav-button.active {
  animation: nav-glow 2.8s ease-in-out infinite;
}

@keyframes nav-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 143, 63, 0.2); }
  50% { box-shadow: 0 0 20px 2px rgba(255, 143, 63, 0.14); }
}

/* ─── Brand mark breathing glow ─── */
.brand-mark {
  animation: brand-breathe 3.6s ease-in-out infinite;
}

@keyframes brand-breathe {
  0%, 100% { box-shadow: 0 16px 28px rgba(255, 98, 49, 0.18); }
  50% { box-shadow: 0 16px 40px rgba(255, 98, 49, 0.34), 0 0 16px rgba(255, 143, 63, 0.15); }
}

/* ─── Improved event card pulse ─── */
.event-card {
  animation: event-alert 2s ease-in-out infinite;
}

@keyframes event-alert {
  0%, 100% {
    border-color: rgba(255, 143, 63, 0.34);
    box-shadow: 0 0 0 0 rgba(255, 143, 63, 0);
  }
  50% {
    border-color: rgba(255, 143, 63, 0.7);
    box-shadow: 0 0 28px 0 rgba(255, 143, 63, 0.12);
  }
}

/* ─── Better toast animations ─── */
.toast {
  animation: toast-slide-in 360ms cubic-bezier(0.34, 1.56, 0.64, 1), toast-out 300ms ease 3.1s forwards;
  border-left: 3px solid var(--accent);
}

/* ─── Filter strip ─── */
.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  align-items: center;
}
.filter-strip .filter-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}
.filter-strip .chip-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-strip .chip-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.filter-strip .chip-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* ─── Difficulty buttons ─── */
.difficulty-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ─── Bulk actions ─── */
.bulk-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

/* ─── Help panel styling ─── */
.help-panel kbd {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: monospace;
  font-size: 0.85rem;
  min-width: 28px;
  text-align: center;
}
.help-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.help-panel table td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}
.help-panel ul {
  padding-left: 20px;
  margin: 12px 0;
  line-height: 1.7;
}
.help-panel h2 {
  margin: 16px 0 8px;
  font-size: 1rem;
  color: var(--accent);
}

/* ─── D26: Contract rarity glow ─── */
.list-item:has(.badge.epic) {
  border-color: rgba(176, 100, 255, 0.35);
  box-shadow: 0 0 12px rgba(176, 100, 255, 0.08);
}
.list-item:has(.badge.black) {
  border-color: rgba(255, 200, 50, 0.4);
  box-shadow: 0 0 18px rgba(255, 200, 50, 0.1);
  animation: legendary-pulse 2.5s ease-in-out infinite;
}
@keyframes legendary-pulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(255, 200, 50, 0.08);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 200, 50, 0.18);
  }
}

/* ─── D27: Rep celebration ─── */
.rep-celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent), 0 0 60px rgba(118, 225, 211, 0.3);
  animation: rep-celebrate 1.4s ease-out forwards;
  pointer-events: none;
  z-index: 200;
}
@keyframes rep-celebrate {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(1.5);
  }
}

.toast.good {
  border-left-color: var(--lime);
}

.toast.warn {
  border-left-color: var(--warning);
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(48px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ─── Better screen transition ─── */
.screen-root {
  transition: opacity 250ms ease, transform 250ms ease;
}

.screen-root.transitioning {
  opacity: 0;
  transform: translateY(16px);
}

/* ─── Badge shine effect ─── */
.badge.rare,
.badge.epic {
  position: relative;
  overflow: hidden;
}

.badge.rare::after,
.badge.epic::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.08) 48%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.08) 52%,
    transparent 62%
  );
  animation: badge-shimmer 5s ease-in-out infinite;
}

@keyframes badge-shimmer {
  0%, 100% { transform: translateX(-80%); }
  50% { transform: translateX(80%); }
}

/* ─── KPI chip counter transition ─── */
.kpi-value {
  transition: color 300ms ease;
  font-variant-numeric: tabular-nums;
}

.stat-value {
  font-variant-numeric: tabular-nums;
}

/* ─── Network SVG mover animation ─── */
.network-mover {
  animation: mover-pulse 1.2s ease-in-out infinite;
}

.network-mover circle {
  filter: drop-shadow(0 0 6px rgba(255, 216, 109, 0.5));
}

@keyframes mover-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

/* ─── Active route highlight shimmer ─── */
.network-route-highlight {
  animation: route-glow 2s ease-in-out infinite;
}

@keyframes route-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 174, 82, 0.38)); opacity: 0.85; }
  50% { filter: drop-shadow(0 0 16px rgba(255, 174, 82, 0.6)); opacity: 1; }
}

/* ─── Live road pulse on map ─── */
.network-road.live {
  animation: road-live-pulse 3s ease-in-out infinite;
}

@keyframes road-live-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(246, 205, 94, 0.28)); }
  50% { filter: drop-shadow(0 0 8px rgba(246, 205, 94, 0.48)); }
}

/* ─── Better button click feedback ─── */
.button:active:not(:disabled),
.nav-button:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  transition-duration: 60ms;
}

/* ─── Lane button active glow ─── */
.lane-button.primary {
  box-shadow: 0 0 18px rgba(255, 143, 63, 0.22);
}

/* ─── Trip mode button transition ─── */
.trip-mode-button {
  transition: all 180ms ease;
}

.trip-mode-button.active {
  box-shadow: 0 0 14px rgba(255, 143, 63, 0.18);
}

/* ─── Improved content panel scrolling ─── */
.content-panel {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

/* ─── Fullscreen button ─── */
.fullscreen-toggle {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 8;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(7, 11, 13, 0.6);
  backdrop-filter: blur(12px);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 180ms ease, color 180ms ease;
}

.fullscreen-toggle:hover {
  background: rgba(255, 143, 63, 0.14);
  color: var(--text);
}

/* ─── Smooth vehicle showcase hover ─── */
.vehicle-showcase {
  transition: transform 320ms ease;
  overflow: hidden;
}

.vehicle-card:hover .vehicle-showcase,
.dealer-card:hover .vehicle-showcase {
  transform: scale(1.03);
}

/* ─── Truck illustration hover ─── */
.truck-illustration,
.trailer-illustration {
  transition: transform 360ms cubic-bezier(0.19, 1, 0.22, 1), filter 360ms ease;
}

.vehicle-card:hover .truck-illustration,
.dealer-card:hover .truck-illustration,
.vehicle-card:hover .trailer-illustration,
.dealer-card:hover .trailer-illustration {
  transform: translateX(4px);
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.32)) brightness(1.06);
}

/* ─── Portrait hover effect ─── */
.portrait-shell {
  transition: transform 280ms ease;
}

.driver-card:hover .portrait-shell {
  transform: scale(1.04);
}

/* ─── Improved route card selection ─── */
.route-card {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.route-card.selected {
  box-shadow: 0 0 0 2px rgba(255, 143, 63, 0.3), 0 16px 36px rgba(0, 0, 0, 0.2);
}

/* ─── Cargo seal hover ─── */
.cargo-seal {
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.cargo-seal:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* ─── Hero title gradient text ─── */
.hero-title,
.menu-title {
  background: linear-gradient(135deg, #f7f2e9 20%, #ffd76a 50%, #ff9654 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Money positive flash ─── */
.results-value.money-positive {
  text-shadow: 0 0 32px rgba(176, 228, 111, 0.3);
}

.results-value.money-negative {
  text-shadow: 0 0 32px rgba(255, 92, 92, 0.3);
}

/* ─── Metric card hover accent ─── */
.metric-card {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 143, 63, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

/* ─── Convoy panel truck animation ─── */
.convoy-row .truck-illustration:first-child {
  animation: convoy-drift 4s ease-in-out infinite;
}

.convoy-row .truck-illustration:nth-child(2) {
  animation: convoy-drift 4s ease-in-out infinite 0.6s;
}

.convoy-row .trailer-illustration {
  animation: convoy-drift 4s ease-in-out infinite 1.2s;
}

@keyframes convoy-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

/* ─── Smoother content panel backdrop ─── */
.content-panel {
  transition: box-shadow 320ms ease;
}

/* ─── Results screen celebration ─── */
.results-screen .results-card:first-child {
  position: relative;
  overflow: hidden;
}

.results-screen .results-card:first-child::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(255, 143, 63, 0.05),
    transparent,
    rgba(118, 225, 211, 0.04),
    transparent
  );
  animation: celebrate-spin 8s linear infinite;
  pointer-events: none;
}

@keyframes celebrate-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Tutorial / Onboarding ── */

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem;
  pointer-events: none;
}

.tutorial-overlay.tutorial-has-highlight {
  background: rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.tutorial-bubble {
  position: relative;
  background: linear-gradient(135deg, #1a2830 0%, #0f1a20 100%);
  border: 2px solid rgba(118, 225, 211, 0.5);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  max-width: 420px;
  width: 100%;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 60px rgba(118, 225, 211, 0.08);
  animation: tutorial-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tutorial-pop {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.tutorial-progress {
  font-size: 0.75rem;
  color: rgba(118, 225, 211, 0.7);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.tutorial-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f7f2e9;
  margin: 0 0 0.5rem;
}

.tutorial-body {
  font-size: 0.92rem;
  color: rgba(247, 242, 233, 0.82);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.tutorial-body kbd {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.1em 0.45em;
  font-size: 0.85em;
  font-family: inherit;
  color: #76e1d3;
}

.tutorial-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tutorial-hint {
  font-size: 0.82rem;
  color: rgba(255, 214, 98, 0.8);
  flex: 1;
}

.tutorial-skip {
  font-size: 0.78rem !important;
  padding: 0.35em 0.8em !important;
  opacity: 0.6;
}

.tutorial-skip:hover {
  opacity: 1;
}

.tutorial-target {
  position: relative;
  z-index: 9001;
  animation: tutorial-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(118, 225, 211, 0.5), 0 0 20px rgba(118, 225, 211, 0.3) !important;
  border-radius: 8px;
}

@keyframes tutorial-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(118, 225, 211, 0.5), 0 0 20px rgba(118, 225, 211, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(118, 225, 211, 0.3), 0 0 40px rgba(118, 225, 211, 0.2); }
}

/* ── Guidance Banner ── */

.guidance-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(90deg, rgba(118, 225, 211, 0.12) 0%, rgba(255, 214, 98, 0.08) 100%);
  border: 1px solid rgba(118, 225, 211, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  color: rgba(247, 242, 233, 0.9);
  line-height: 1.4;
  animation: guidance-fade 0.5s ease;
}

.guidance-banner strong {
  color: #76e1d3;
}

.guidance-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

@keyframes guidance-fade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Empty State ── */

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: #f7f2e9;
  margin: 0;
}

.empty-state p {
  font-size: 0.88rem;
  color: rgba(247, 242, 233, 0.6);
  margin: 0;
  max-width: 320px;
}
