:root {
  color-scheme: light;
  --bg: #f5f6f1;
  --ink: #1e2524;
  --muted: #65716d;
  --line: #d8ded7;
  --panel: #ffffff;
  --accent: #0d766e;
  --accent-2: #b44630;
  --accent-3: #d89b20;
  --good: #1d7a43;
  --warn: #9b4d1f;
  --shadow: 0 1px 2px rgba(31, 43, 39, 0.05);
  --text-xs: 0.75rem;
  --text-sm: 0.85rem;
  --text-md: 0.95rem;
  --text-lg: 1.1rem;
  --text-xl: 1.35rem;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(13, 118, 110, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(13, 118, 110, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
button.is-disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 24px 24px;
}

.sticky-head {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 -24px 16px;
  padding: 16px 24px 10px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(13, 118, 110, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(13, 118, 110, 0.05) 1px, transparent 1px),
    rgba(245, 246, 241, 0.97);
  background-size: 42px 42px;
  box-shadow: 0 12px 28px rgba(31, 43, 39, 0.08);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0;
}

.header-side {
  display: grid;
  justify-items: end;
  gap: 10px;
  width: min(860px, 100%);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 10px;
  width: min(760px, 100%);
}

.status-strip div,
.summary-tile {
  min-height: 62px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.status-strip span,
.summary-tile span,
.meta,
.fine {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.good-text {
  color: var(--good);
}

.warn-text {
  color: var(--warn);
}

.danger-text {
  color: #8e2f20;
}

.status-strip strong,
.summary-tile strong {
  display: block;
  margin-top: 3px;
}

.feedback-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ui-message,
.hint {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f8f4;
  color: var(--ink);
  font-size: 0.86rem;
}

.ui-message--success {
  border-color: rgba(29, 122, 67, 0.28);
  background: #eef7f1;
  color: var(--good);
}

.ui-message--info {
  border-color: rgba(13, 118, 110, 0.24);
  background: #eef5f3;
  color: var(--accent);
}

.ui-message--warning,
.hint--warning {
  border-color: rgba(155, 77, 31, 0.28);
  background: #f8edda;
  color: var(--warn);
}

.ui-message--danger,
.hint--danger {
  border-color: rgba(142, 47, 32, 0.28);
  background: #f5e7e2;
  color: #8e2f20;
}

.top-panel,
.room-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dispatch-board {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.top-panel {
  padding: 16px;
}

.top-panel h2 {
  margin-bottom: 14px;
}

.market-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.market-head h2 {
  margin-bottom: 0;
}

.market-scroll {
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.rooms {
  display: grid;
  gap: 16px;
}

.room-card {
  width: 100%;
  padding: 16px;
}

.room-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  list-style: none;
  cursor: pointer;
}

.room-card summary::-webkit-details-marker {
  display: none;
}

.room-card summary::before {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f4;
  color: var(--ink);
  font-weight: 900;
}

.room-card[open] summary {
  margin-bottom: 14px;
}

.room-card[open] summary::before {
  content: "-";
}

.room-card summary h2 {
  flex: 1;
}

.map-panel {
  position: relative;
  height: 380px;
  min-height: 380px;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 62% 18%, rgba(216, 155, 32, 0.22), transparent 26%),
    linear-gradient(145deg, #e8efe7, #f9fbf8 52%, #dde9e6);
}

.map-panel::before {
  content: "";
  position: absolute;
  inset: 36px 80px 28px 110px;
  border: 2px solid rgba(13, 118, 110, 0.24);
  clip-path: polygon(47% 0, 68% 9%, 76% 26%, 71% 41%, 84% 58%, 70% 77%, 56% 72%, 47% 100%, 32% 83%, 17% 77%, 15% 58%, 2% 42%, 17% 25%, 22% 8%);
  background: rgba(255, 255, 255, 0.45);
}

.city-dot {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #17211f;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.city-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(180, 70, 48, 0.18);
}

.route-lines {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.route-path {
  fill: none;
  stroke: rgba(13, 118, 110, 0.38);
  stroke-width: 1.25;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.route-path--active {
  stroke: #0d766e;
  stroke-width: 2.6;
}

.route-path--complete {
  stroke: rgba(13, 118, 110, 0.22);
}

.route-path--upcoming {
  stroke-dasharray: 4 4;
}

.truck-marker {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 1px;
  max-width: 112px;
  padding: 5px 7px;
  border: 1px solid rgba(23, 33, 31, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(23, 33, 31, 0.16);
  transform: translate(-50%, -115%);
}

.truck-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(23, 33, 31, 0.18);
  border-bottom: 1px solid rgba(23, 33, 31, 0.18);
  background: rgba(255, 255, 255, 0.94);
  transform: translateX(-50%) rotate(45deg);
}

.truck-marker__plate,
.truck-marker__phase {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.truck-marker__plate {
  color: #17211f;
  font-size: 0.72rem;
  font-weight: 900;
}

.truck-marker__phase {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.berlin { left: 58%; top: 28%; }
.hamburg { left: 43%; top: 13%; }
.munich { left: 55%; top: 79%; }
.cologne { left: 25%; top: 50%; }
.frankfurt { left: 33%; top: 58%; }
.stuttgart { left: 39%; top: 72%; }
.duesseldorf { left: 19%; top: 45%; }
.leipzig { left: 52%; top: 43%; }
.dortmund { left: 26%; top: 39%; }
.essen { left: 18%; top: 34%; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.room-toolbar {
  justify-content: flex-end;
}

.stack {
  display: grid;
  gap: 10px;
}

#yardPanel {
  display: grid;
  gap: 10px;
}

.truck-shop {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

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

.truck-shop-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.truck-shop-note {
  align-self: center;
}

.finance-summary {
  display: grid;
  gap: 10px;
}

.finance-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.finance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.finance-row--total {
  border-bottom: 0;
  padding-top: 12px;
  font-weight: 800;
}

.finance-value {
  text-align: right;
  white-space: nowrap;
}

.finance-history {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.finance-transaction {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.finance-transaction__meta {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.finance-transaction__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.finance-transaction__head h4 {
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
}

.finance-transaction p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.finance-transaction__amount {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

.finance-transaction__amount--positive {
  color: var(--good);
}

.finance-transaction__amount--negative {
  color: #8e2f20;
}

.finance-transaction__balance {
  font-size: 0.78rem;
}

.dispatch-preview {
  display: grid;
  gap: 10px;
}

.dispatch-preview h3 {
  margin-bottom: 0;
}

.dispatch-preview__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dispatch-preview__grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.dispatch-preview__grid strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.dispatch-preview__deadline {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.86rem;
}

.dispatch-preview__deadline--neutral {
  border: 1px solid var(--line);
  background: #f7f8f4;
  color: var(--ink);
}

.dispatch-preview__deadline--ok {
  background: #eef7f1;
  color: var(--good);
}

.dispatch-preview__deadline--warning {
  background: #f8edda;
  color: var(--warn);
}

.dispatch-preview__deadline--danger {
  background: #f5e7e2;
  color: #8e2f20;
}

.event-log {
  display: grid;
  gap: 10px;
}

.event-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(13, 118, 110, 0.35);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.event-card--success {
  border-left-color: rgba(29, 122, 67, 0.7);
}

.event-card--warning,
.event-card--finance {
  border-left-color: rgba(155, 77, 31, 0.7);
}

.event-card--danger {
  border-left-color: rgba(142, 47, 32, 0.75);
}

.event-card--truck {
  border-left-color: rgba(13, 118, 110, 0.75);
}

.event-card__meta {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.event-card__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.event-card__head h3 {
  min-width: 0;
  margin-bottom: 0;
}

.event-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.event-card__amount {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

.event-card__amount--positive {
  color: var(--good);
}

.event-card__amount--negative {
  color: #8e2f20;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.card.dimmed {
  background: #f7f8f4;
}

.market-status {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f7f8f4;
}

.market-status__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-status__head h3 {
  margin-bottom: 0;
}

.market-status__state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 99px;
  padding: 0 9px;
  background: #eef5f3;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.order-expiry {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  margin: 10px 0 0;
  border-radius: 99px;
  padding: 0 9px;
  background: #eef5f3;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.order-expiry--soon {
  background: #f8edda;
  color: var(--warn);
}

.delivery-terms {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.delivery-profile {
  display: grid;
  gap: 2px;
}

.delivery-profile strong {
  width: fit-content;
  border-radius: 99px;
  padding: 4px 8px;
  background: #eef5f3;
  color: var(--accent);
  font-size: 0.76rem;
}

.delivery-profile span,
.delivery-result span {
  color: var(--muted);
  font-size: 0.82rem;
}

.delivery-profile--urgent strong {
  background: #f8edda;
  color: var(--warn);
}

.delivery-profile--express strong {
  background: #f5e7e2;
  color: #8e2f20;
}

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

.delivery-terms__grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.delivery-status {
  margin: 0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.delivery-status--ok {
  background: #eef7f1;
  color: var(--good);
}

.delivery-status--warning,
.delivery-result--late {
  background: #f8edda;
  color: var(--warn);
}

.delivery-status--danger,
.delivery-result--failed {
  background: #f5e7e2;
  color: #8e2f20;
}

.delivery-result {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
}

.delivery-result--bonus {
  background: #eef7f1;
  color: var(--good);
}

.order-profit {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.order-profit--empty {
  border-top: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.order-profit__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.order-profit__item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.order-profit__item strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.grid-2,
.grid-3,
.summary-grid {
  display: grid;
  gap: 10px;
}

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

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.primary,
.secondary,
.danger,
.icon-button,
.tab {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: white;
}

.secondary,
.tab,
.icon-button {
  border: 1px solid var(--line);
  background: #f7f8f4;
  color: var(--ink);
}

.danger {
  background: #f5e7e2;
  color: #8e2f20;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab.active {
  background: var(--ink);
  color: white;
}

.hidden {
  display: none;
}

.order-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8ece6;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--good);
}

.reputation-bar {
  margin: 10px 0;
}

.reputation-bar span {
  background: var(--accent-3);
}

.form-row {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.form-row label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

select,
input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: white;
}

.truck-state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 99px;
  padding: 0 9px;
  background: #eef5f3;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.truck-state.busy {
  background: #f8edda;
  color: var(--warn);
}

.setup-dialog {
  width: min(460px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.setup-dialog::backdrop {
  background: rgba(30, 37, 36, 0.42);
}

.setup-card {
  padding: 18px;
}

.setup-actions {
  justify-content: flex-end;
}

/* Operations UI pass: calm surfaces, denser lists, clearer workspace hierarchy. */
body {
  background: #f3f5f2;
  font-size: var(--text-md);
}

.app-shell {
  width: min(1500px, 100%);
  padding: 0 var(--space-5) var(--space-5);
}

.sticky-head {
  margin: 0 calc(var(--space-5) * -1) var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: rgba(243, 245, 242, 0.98);
  box-shadow: none;
}

.topbar {
  gap: var(--space-4);
}

.topbar h1 {
  font-size: var(--text-xl);
  line-height: 1.05;
}

.kicker {
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
}

.header-side {
  gap: var(--space-2);
  width: min(980px, 100%);
}

.status-strip {
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: var(--space-2);
  width: min(920px, 100%);
}

.status-strip div,
.summary-tile {
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: #fff;
}

.status-strip span,
.summary-tile span,
.meta,
.fine {
  font-size: var(--text-xs);
}

.status-strip strong,
.summary-tile strong {
  font-size: var(--text-md);
}

.feedback-panel {
  margin-top: var(--space-2);
}

.ui-message,
.hint {
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.dispatch-board {
  grid-template-columns: minmax(0, 0.72fr) minmax(560px, 1.28fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.top-panel,
.room-card,
.card,
.market-status,
.finance-transaction,
.event-card,
.finance-transaction,
.setup-dialog {
  border-radius: var(--radius-md);
  box-shadow: none;
}

.top-panel,
.room-card {
  padding: var(--space-4);
}

.top-panel h2,
.room-card summary h2 {
  font-size: var(--text-lg);
}

.market-scroll {
  max-height: 640px;
  padding-right: var(--space-1);
}

.map-panel {
  height: 300px;
  min-height: 300px;
  background: linear-gradient(145deg, #eef2ee, #f8faf8);
}

.map-panel::before {
  border-color: rgba(13, 118, 110, 0.16);
  background: rgba(255, 255, 255, 0.38);
}

.route-path {
  stroke: rgba(13, 118, 110, 0.28);
}

.route-path--active {
  stroke-width: 2.2;
}

.truck-marker {
  box-shadow: 0 2px 8px rgba(23, 33, 31, 0.12);
}

.rooms,
.stack,
#yardPanel,
.finance-summary,
.event-log,
.finance-history,
.truck-shop,
.dispatch-preview {
  gap: var(--space-3);
}

.room-card summary {
  justify-content: flex-start;
  min-height: 34px;
}

.room-card summary::before {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
}

.room-card[open] summary {
  margin-bottom: var(--space-3);
}

.room-toolbar {
  justify-content: flex-start;
  margin-bottom: var(--space-3);
}

.tabs {
  gap: 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.tab {
  min-height: 34px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
}

.tab.active {
  background: transparent;
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.card {
  padding: var(--space-3);
}

.card--compact {
  padding: var(--space-3);
}

.card-title {
  gap: var(--space-3);
}

.card-title h3,
.market-status__head h3,
.dispatch-preview h3,
.truck-shop h3 {
  margin-bottom: var(--space-1);
  font-size: var(--text-md);
}

.order-progress,
.grid-2,
.grid-3,
.summary-grid,
.delivery-terms__grid,
.dispatch-preview__grid,
.order-profit__grid {
  gap: var(--space-2);
}

.delivery-terms,
.dispatch-preview__grid > div,
.order-profit__item,
.finance-transaction,
.event-card,
.delivery-result {
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}

.delivery-terms {
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: var(--space-2) 0 0;
}

.delivery-profile {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.delivery-profile strong,
.market-status__state,
.truck-state,
.order-expiry {
  min-height: 22px;
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  font-size: var(--text-xs);
}

.delivery-profile span {
  font-size: var(--text-xs);
}

.delivery-terms__grid,
.dispatch-preview__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-terms__grid > div,
.dispatch-preview__grid > div {
  background: #fafbf9;
}

.delivery-status,
.dispatch-preview__deadline,
.delivery-result {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.order-profit {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
}

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

.completed-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.completed-order__head {
  display: contents;
}

.completed-order__head > div {
  min-width: 0;
}

.completed-order__line {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.completed-order__result {
  justify-self: end;
  white-space: nowrap;
}

.completed-order--failed {
  border-left: 3px solid rgba(142, 47, 32, 0.55);
}

.dispatch-form {
  display: grid;
  gap: var(--space-3);
}

.dispatch-form h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.form-row {
  gap: var(--space-1);
  margin-top: 0;
}

select,
input {
  min-height: 36px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.primary,
.secondary,
.danger,
.icon-button,
.tab {
  font-size: var(--text-sm);
}

.primary,
.secondary,
.danger,
.icon-button {
  min-height: 36px;
  border-radius: var(--radius-sm);
}

.truck-shop {
  margin-top: var(--space-2);
}

.truck-shop-grid {
  gap: var(--space-3);
}

.finance-row {
  padding: var(--space-2) 0;
}

.finance-transaction p,
.event-card p {
  font-size: var(--text-sm);
}

@media (max-width: 980px) {
  .topbar {
    display: grid;
    justify-content: stretch;
  }

  .header-side {
    justify-items: stretch;
    width: 100%;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .status-strip {
    width: 100%;
  }

  .dispatch-board {
    grid-template-columns: 1fr;
  }

  .market-scroll {
    max-height: 420px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 0 14px 14px;
  }

  .sticky-head {
    margin: 0 -14px 14px;
    padding: 12px 14px 8px;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .status-strip,
  .grid-2,
  .grid-3,
  .summary-grid,
  .truck-shop-grid,
  .order-progress,
  .order-profit__grid,
  .delivery-terms__grid,
  .dispatch-preview__grid {
    grid-template-columns: 1fr;
  }

  .map-panel {
    height: 300px;
    min-height: 300px;
  }

  .city-dot {
    font-size: 0.68rem;
  }

  .route-path {
    stroke-width: 1;
  }

  .route-path--active {
    stroke-width: 2.1;
  }

  .truck-marker {
    max-width: 82px;
    padding: 4px 5px;
  }

  .truck-marker__plate {
    font-size: 0.64rem;
  }

  .truck-marker__phase {
    font-size: 0.55rem;
  }

  .event-card__head {
    display: grid;
    gap: 4px;
  }

  .event-card__amount {
    text-align: left;
  }

  .finance-transaction__head {
    display: grid;
    gap: 4px;
  }

  .finance-transaction__amount {
    text-align: left;
  }

  .essen { left: 18%; top: 34%; }
  .dortmund { left: 22%; top: 41%; }
  .duesseldorf { left: 16%; top: 48%; }
  .cologne { left: 23%; top: 55%; }
  .frankfurt { left: 34%; top: 61%; }
}
