/* ============================================================
   MAIN LAYOUT - Ironveil Chronicles
   ============================================================ */

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

:root {
  --brass:       #b5891c;
  --brass-light: #d4a827;
  --brass-dark:  #8a6610;
  --copper:      #b87333;
  --wood-dark:   #1e0f02;
  --wood-med:    #2a1506;
  --wood-light:  #3d200a;
  --parchment:   #f4e8c1;
  --parchment-dark: #e0cc99;
  --iron:        #4a4a4a;
  --iron-light:  #6a6a6a;
  --smoke:       #1a1a2e;
  --smoke-light: #16213e;
  --text-main:   #f0dfa0;
  --text-dim:    #9a8a60;
  --text-bright: #ffe680;
  --green-ok:    #5fca5f;
  --red-warn:    #e05050;
  --blue-info:   #5090e0;

  --top-bar-h:    56px;
  --bottom-bar-h: 90px;
  --left-w:       200px;
  --right-w:      220px;
  --font-main:    'Courier New', Courier, monospace;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--wood-dark);
  font-family: var(--font-main);
  color: var(--text-main);
  font-size: 13px;
}

#game-container {
  display: grid;
  grid-template-rows: var(--top-bar-h) 1fr var(--bottom-bar-h);
  grid-template-columns: 1fr;
  width: 100vw;
  height: 100vh;
}

/* ---- TOP BAR ---- */
#top-bar {
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 12px;
  border-bottom: 2px solid var(--brass-dark);
  background: var(--wood-med);
  z-index: 10;
}

#top-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.menu-tab {
  min-width: 78px;
}

.menu-tab.active {
  background: var(--wood-light);
  border-color: var(--brass);
  color: var(--brass-light);
}

#fleet-menu-panel {
  position: fixed;
  top: calc(var(--top-bar-h) + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
  max-height: 55vh;
  overflow-y: auto;
  padding: 10px 12px;
  background: var(--wood-med);
  border: 2px solid var(--brass);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  z-index: 60;
}

#player-info {
  display: flex;
  gap: 16px;
  flex: 1;
}

#title-block {
  flex: 1;
  text-align: center;
}

#game-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--brass-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}

#time-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

/* ---- MAIN CONTENT ---- */
#main-content {
  grid-row: 2;
  display: grid;
  grid-template-columns: 170px 1fr var(--right-w);
  overflow: hidden;
}

/* ---- PANELS ---- */
#left-panel,
#right-panel {
  background: var(--wood-med);
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#left-panel { border-right: 2px solid var(--brass-dark); }
#right-panel { border-left: 2px solid var(--brass-dark); }

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---- CENTER VIEW ---- */
#center-view {
  position: relative;
  overflow: hidden;
  background: var(--smoke);
}

#map-view {
  width: 100%;
  height: 100%;
  position: relative;
}

#game-map {
  display: block;
  width: 100%;
  height: 100%;
}

#map-tooltip {
  position: absolute;
  background: var(--wood-med);
  border: 1px solid var(--brass);
  padding: 6px 10px;
  border-radius: 4px;
  pointer-events: none;
  font-size: 12px;
  color: var(--parchment);
  z-index: 20;
  max-width: 220px;
  line-height: 1.5;
}

/* ---- MAP VEHICLE PANEL ---- */
#map-vehicle-panel {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wood-med);
  border: 2px solid var(--brass);
  border-radius: 6px;
  width: 360px;
  max-width: calc(100% - 32px);
  z-index: 30;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  animation: mvpSlideIn 0.2s ease;
}

@keyframes mvpSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#mvp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--brass-dark);
}

#mvp-icon { font-size: 22px; flex-shrink: 0; }

#mvp-title-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#mvp-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-bright);
}

#mvp-status {
  font-size: 11px;
  color: var(--text-dim);
}

#mvp-close {
  background: transparent;
  border: 1px solid var(--brass-dark);
  color: var(--text-dim);
  width: 22px;
  height: 22px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
#mvp-close:hover { background: var(--wood-light); color: var(--text-main); border-color: var(--brass); }

#mvp-transport-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(90,70,20,0.3);
}

#mvp-transport-wrap {
  flex: 1;
  height: 5px;
  background: var(--wood-dark);
  border-radius: 3px;
  overflow: hidden;
}

#mvp-transport-bar {
  height: 100%;
  background: var(--brass);
  border-radius: 3px;
  transition: width 0.3s;
}

#mvp-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mvp-section-label {
  font-size: 10px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.mvp-transport-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mvp-good-chip {
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 11px;
  color: var(--text-main);
}

.mvp-action-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.mvp-dispatch-btn {
  flex: 1;
  padding: 7px 12px;
  background: rgba(95,202,95,0.15);
  border: 1px solid var(--green-ok);
  color: var(--green-ok);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: bold;
  transition: all 0.15s;
}
.mvp-dispatch-btn:hover { background: rgba(95,202,95,0.3); }
.mvp-dispatch-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.mvp-visit-btn {
  padding: 7px 12px;
  background: rgba(181,137,28,0.15);
  border: 1px solid var(--brass-dark);
  color: var(--brass-light);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 12px;
  transition: all 0.15s;
}
.mvp-visit-btn:hover { background: rgba(181,137,28,0.3); border-color: var(--brass); }

.mvp-travelling-info {
  font-size: 12px;
  color: var(--blue-info);
  line-height: 1.6;
}

.mvp-eta-bar-wrap {
  height: 4px;
  background: var(--wood-dark);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.mvp-eta-bar {
  height: 100%;
  background: var(--blue-info);
  border-radius: 2px;
  transition: width 0.5s linear;
}

#city-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 8, 12, 0.62);
  backdrop-filter: blur(2px);
}

#city-view {
  width: min(1100px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--smoke-light);
  border: 2px solid var(--brass);
  border-radius: 8px;
  box-shadow: 0 10px 36px rgba(0,0,0,0.55);
}

#city-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--wood-med);
  border-bottom: 2px solid var(--brass-dark);
  flex-shrink: 0;
}

#city-header h2 {
  color: var(--brass-light);
  font-size: 16px;
  letter-spacing: 1px;
}

#city-header p {
  font-size: 11px;
  color: var(--text-dim);
}

#city-stats {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

/* ---- CITY REPUTATION DISPLAY ---- */
#city-rep-display {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  flex-shrink: 0;
}

#city-rep-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

#city-rep-tier {
  font-weight: bold;
  font-size: 11px;
  min-width: 110px;
  white-space: nowrap;
}

#city-rep-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--wood-dark);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(90,70,20,0.3);
}

#city-rep-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease, background 0.4s ease;
  background: var(--brass);
  width: 0%;
}

#city-rep-val {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}

.city-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--brass-dark);
  flex-shrink: 0;
}

.tab-btn {
  padding: 6px 16px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--brass-dark);
  color: var(--text-dim);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 12px;
  transition: background 0.15s, color 0.15s;
}

.tab-btn:hover { background: var(--wood-light); color: var(--text-main); }
.tab-btn.active { background: var(--wood-light); color: var(--brass-light); border-bottom: 2px solid var(--brass); }

.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

/* ---- MARKET TABLE ---- */
#market-controls {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#market-controls input {
  width: 70px;
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  padding: 3px 6px;
  border-radius: 3px;
}

#market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

#market-table th {
  background: var(--wood-med);
  color: var(--brass);
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px solid var(--brass-dark);
  position: sticky;
  top: 0;
}

#market-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(90,70,20,0.3);
  vertical-align: middle;
}

#market-table tr:hover td {
  background: rgba(181, 137, 28, 0.08);
}

.price-cheap { color: var(--green-ok); }
.price-normal { color: var(--text-main); }
.price-expensive { color: var(--red-warn); }

.trend-up   { color: var(--green-ok); }
.trend-down { color: var(--red-warn); }
.trend-flat { color: var(--text-dim); }

/* ---- MARKET REPUTATION LOCK ---- */
.market-row-locked td {
  opacity: 0.45;
  color: var(--text-dim) !important;
}

.market-row-locked .cat-badge {
  opacity: 0.5;
}

.access-locked {
  font-size: 10px;
  color: var(--red-warn) !important;
  opacity: 1 !important;
  line-height: 1.4;
}

.access-locked small {
  color: var(--text-dim);
  display: block;
}

.access-ok {
  color: var(--green-ok);
  font-size: 12px;
}

/* ---- REP GAIN PREVIEW in sell rows ---- */
.rep-gain {
  color: var(--text-dim);
  font-size: 9px;
  margin-left: 4px;
}

.rep-gain-high {
  color: var(--green-ok);
  font-size: 9px;
  font-weight: bold;
  margin-left: 4px;
}

/* ---- TRANSPORT ROW LOCKED ---- */
.transport-row-locked {
  opacity: 0.45;
}

.transport-row-locked .buy-btn,
.transport-row-locked .sell-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- BOTTOM BAR ---- */
#bottom-bar {
  grid-row: 3;
  background: var(--wood-med);
  border-top: 2px solid var(--brass-dark);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

#bottom-bar .panel-header {
  flex-shrink: 0;
}

#player-inventory {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow-y: auto;
  max-height: calc(var(--bottom-bar-h) - 24px);
}

.inventory-item {
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.inventory-item .item-qty {
  color: var(--brass-light);
  font-weight: bold;
}

/* ---- CITY LIST ---- */
#city-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#city-list li {
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.15s;
  font-size: 12px;
}

#city-list li:hover {
  background: var(--wood-light);
  border-color: var(--brass-dark);
}

#city-list li.active {
  background: var(--wood-light);
  border-color: var(--brass);
  color: var(--brass-light);
}

.city-list-item .city-li-name { font-weight: bold; }
.city-list-item .city-li-sub { font-size: 10px; color: var(--text-dim); }

/* ---- NOTIFICATIONS / JOURNAL ---- */
#notifications {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}

.notif-entry {
  font-size: 11px;
  color: var(--text-dim);
  border-left: 2px solid var(--brass-dark);
  padding-left: 6px;
}

.notif-entry.notif-good { border-color: var(--green-ok); color: var(--green-ok); }
.notif-entry.notif-bad  { border-color: var(--red-warn); color: var(--red-warn); }
.notif-entry.notif-info { border-color: var(--blue-info); color: var(--blue-info); }

/* ---- QUEST ---- */
#quest-display {
  font-size: 11px;
  line-height: 1.5;
}

.quest-title {
  color: var(--brass-light);
  font-weight: bold;
  margin-bottom: 4px;
}

#quest-progress {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quest-goal {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}

.quest-goal.done { color: var(--green-ok); }
.quest-goal.done::before { content: '✓ '; }
.quest-goal:not(.done)::before { content: '○ '; color: var(--text-dim); }

/* ---- DIALOGUE ---- */
#dialogue-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 40px;
  z-index: 100;
}

#dialogue-box {
  background: var(--wood-med);
  border: 2px solid var(--brass);
  border-radius: 6px;
  padding: 16px 20px;
  max-width: 640px;
  width: 90%;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

#dialogue-portrait {
  font-size: 40px;
  flex-shrink: 0;
}

#dialogue-content { flex: 1; }

#dialogue-speaker {
  font-size: 13px;
  font-weight: bold;
  color: var(--brass-light);
  margin-bottom: 6px;
}

#dialogue-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--parchment);
}

#dialogue-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.dialogue-choice {
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 12px;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.dialogue-choice:hover {
  background: var(--wood-light);
  border-color: var(--brass);
  color: var(--brass-light);
}

/* ---- TOAST ---- */
#toast-container {
  position: fixed;
  bottom: calc(var(--bottom-bar-h) + 10px);
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 200;
}

.toast {
  background: var(--wood-med);
  border: 1px solid var(--brass);
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--parchment);
  animation: toastIn 0.2s ease;
  max-width: 280px;
}

.toast.toast-good { border-color: var(--green-ok); color: var(--green-ok); }
.toast.toast-bad  { border-color: var(--red-warn); color: var(--red-warn); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---- UTILITIES ---- */
.hidden { display: none !important; }
.empty-msg { font-size: 11px; color: var(--text-dim); padding: 4px 8px; }
.stat-display { display: flex; flex-direction: column; align-items: flex-start; }
.stat-label { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 13px; color: var(--text-bright); font-weight: bold; }

ul { list-style: none; }

/* ---- BUILDINGS GRID ---- */
#buildings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 4px;
}

.building-card {
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  border-radius: 4px;
  padding: 10px;
  font-size: 11px;
}

.building-card h4 { color: var(--brass-light); margin-bottom: 4px; font-size: 12px; }
.building-card p  { color: var(--text-dim); line-height: 1.5; }
.building-card .build-cost { color: var(--brass); margin-top: 6px; }

/* ---- FLEET SIDEBAR ---- */
.fleet-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 6px;
  border-bottom: 1px solid rgba(90,70,20,0.2);
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s;
}
.fleet-item:hover { background: var(--wood-light); }
.fleet-item-active { background: var(--wood-light); border: 1px solid var(--brass-dark) !important; }
.fleet-icon { font-size: 18px; flex-shrink: 0; line-height: 1; }
.fleet-info { flex: 1; min-width: 0; }
.fleet-name { font-size: 11px; font-weight: bold; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fleet-status { font-size: 10px; }
.fleet-transport { font-size: 10px; color: var(--brass); margin-top: 2px; }
.status-idle       { color: var(--text-dim); }
.status-travelling { color: var(--blue-info); }
.status-arrived    { color: var(--green-ok); }

/* ---- VEHICLE TAB ---- */
#tab-vehicles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* market hint */
.market-hint {
  font-size: 11px;
  color: var(--text-dim);
  padding: 6px 8px;
  margin-bottom: 8px;
  border-left: 2px solid var(--brass-dark);
}
.market-hint strong { color: var(--brass-light); }

#market-trade-bar {
  margin-bottom: 10px;
}

.market-trade-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(18, 9, 2, 0.72);
  border: 1px solid rgba(181,137,28,0.28);
  border-radius: 6px;
  padding: 10px 12px;
}

.market-trade-panel strong {
  color: var(--brass-light);
}

.market-trade-panel p {
  font-size: 11px;
  color: var(--text-dim);
}

.market-vehicle-picker {
  min-width: 220px;
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 4px;
}

.market-trade-empty {
  border-left: 2px solid var(--blue-info);
  padding-left: 10px;
}

.market-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 180px;
}

.market-qty-input {
  width: 54px;
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 3px;
}

.market-holdings {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}

#city-overview {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.city-overview-intro {
  background: rgba(18, 9, 2, 0.7);
  border: 1px solid rgba(181,137,28,0.28);
  border-radius: 6px;
  padding: 14px;
}

.city-overview-intro h3 {
  font-size: 14px;
  color: var(--brass-light);
  margin-bottom: 8px;
}

.city-overview-intro p {
  line-height: 1.7;
  color: var(--parchment);
}

.city-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.city-overview-card {
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.city-overview-card h4 {
  font-size: 10px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.city-overview-card p {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

.city-overview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.city-overview-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(181,137,28,0.08);
  border: 1px solid rgba(181,137,28,0.24);
  font-size: 11px;
  color: var(--text-main);
}

.city-overview-chip strong {
  color: var(--brass-light);
  font-weight: normal;
}

/* Vehicle cards */
.vehicle-card {
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  border-radius: 4px;
  overflow: hidden;
}
.vehicle-card-expanded { border-color: var(--brass); }

.vehicle-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.vehicle-card-header:hover { background: var(--wood-light); }
.vehicle-card-icon  { font-size: 20px; flex-shrink: 0; }
.vehicle-card-info  { flex: 1; }
.vehicle-card-name  { display: block; font-size: 12px; font-weight: bold; color: var(--text-main); }
.vehicle-card-sub   { display: block; font-size: 10px; color: var(--text-dim); }
.vehicle-card-transport { font-size: 11px; color: var(--brass); }
.vehicle-card-chevron { font-size: 10px; color: var(--text-dim); margin-left: 4px; }

.vehicle-expanded {
  border-top: 1px solid var(--brass-dark);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Transport capacity bar inside vehicle card */
.transport-capacity-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  padding: 4px 0;
}
.transport-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--wood-med);
  border-radius: 3px;
  overflow: hidden;
}
.transport-bar {
  height: 100%;
  background: var(--brass);
  border-radius: 3px;
  transition: width 0.3s;
}

.transport-subsection { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.transport-subsection h5 {
  font-size: 10px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--brass-dark);
}
.transport-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-main);
  padding: 3px 0;
  border-bottom: 1px solid rgba(90,70,20,0.15);
}
.transport-row:last-child { border-bottom: none; }
.tr-good { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.tr-meta { font-size: 9px; color: var(--text-dim); }
.transport-qty-input {
  width: 52px;
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 3px;
}

/* weight badge in market table */
.wt-badge {
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(90,70,20,0.2);
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid rgba(90,70,20,0.3);
}

.dispatch-section { display: flex; flex-direction: column; gap: 6px; }
.dispatch-section h5 {
  font-size: 10px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.dispatch-controls { display: flex; gap: 6px; align-items: center; }
.dispatch-select {
  flex: 1;
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 3px;
}

/* Vehicle shop */
.vehicle-shop {
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  border-radius: 4px;
  padding: 10px;
}
.shop-header {
  font-size: 11px;
  font-weight: bold;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--brass-dark);
}
.shop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(90,70,20,0.2);
}
.shop-item:last-child { border-bottom: none; }
.shop-locked { opacity: 0.45; }
.shop-icon { font-size: 22px; flex-shrink: 0; }
.shop-info { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.shop-name  { font-size: 12px; font-weight: bold; color: var(--text-main); }
.shop-desc  { font-size: 10px; color: var(--text-dim); }
.shop-stats { font-size: 10px; color: var(--brass); }
.menu-btn.disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- DOCKED VEHICLES FOOTER ---- */
#docked-vehicles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-y: auto;
  max-height: calc(var(--bottom-bar-h) - 28px);
  align-items: center;
}

.docked-vehicle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--wood-dark);
  border: 1px solid var(--brass-dark);
  border-radius: 4px;
  padding: 4px 10px 4px 6px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-width: 140px;
}
.docked-vehicle:hover {
  background: var(--wood-light);
  border-color: var(--brass);
}
.docked-icon { font-size: 18px; flex-shrink: 0; }
.docked-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.docked-name { font-size: 11px; font-weight: bold; color: var(--text-main); }
.docked-bar-wrap {
  height: 4px;
  background: var(--wood-med);
  border-radius: 2px;
  overflow: hidden;
  width: 80px;
}
.docked-bar {
  height: 100%;
  background: var(--brass);
  border-radius: 2px;
  transition: width 0.3s;
}
.docked-cap { font-size: 9px; color: var(--text-dim); }
