:root {
  --ink: #17202a;
  --muted: #607080;
  --line: #d9e1e8;
  --surface: #ffffff;
  --soft: #f4f7f9;
  --nav: #1e2930;
  --accent: #0f7a6a;
  --accent-strong: #095f54;
  --gold: #d89d29;
  --red: #cf4f45;
  --blue: #2672c8;
  --shadow: 0 20px 50px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #edf2f5;
  font-family: Inter, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 82px 1fr;
}

.sidebar {
  background: var(--nav);
  color: #f8fbfc;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #f3c24f;
  color: #14242b;
  border-radius: 8px;
  font-weight: 800;
}

.brand-title,
.brand-subtitle,
.eyebrow,
.section-label {
  margin: 0;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 3px;
  color: #aac0ca;
  font-size: 12px;
}

.collapse-button {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.collapse-button span {
  width: 10px;
  height: 10px;
  border-left: 2px solid #d9e6ec;
  border-bottom: 2px solid #d9e6ec;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.collapse-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-collapsed .sidebar {
  padding-inline: 16px;
  align-items: center;
}

.sidebar-collapsed .brand {
  width: 100%;
  justify-content: center;
}

.sidebar-collapsed .brand-copy,
.sidebar-collapsed .nav-item span:last-child,
.sidebar-collapsed .budget-note {
  display: none;
}

.sidebar-collapsed .collapse-button {
  position: absolute;
  left: 50%;
  top: 58px;
  transform: translateX(-50%);
  background: #2f3b43;
}

.sidebar-collapsed .collapse-button span {
  transform: rotate(225deg);
}

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

.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  color: #c9d7de;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sidebar-collapsed .nav-list {
  width: 100%;
  margin-top: 34px;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

.nav-item.active,
.nav-item:hover {
  background: #2f3b43;
  color: #ffffff;
}

.nav-icon {
  width: 32px;
  text-align: center;
  font-size: 18px;
}

.budget-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 6px;
}

.budget-note span,
.budget-note small {
  color: #b8cbd4;
}

.budget-note strong {
  font-size: 22px;
}

.main {
  padding: 26px;
  display: grid;
  gap: 18px;
}

.main:has(#dashboardView:not(.hidden)) {
  padding: 14px 18px;
  gap: 10px;
}

.main:has(#mapView:not(.hidden)) {
  padding: 12px 18px;
  gap: 8px;
}

.main:has(#dashboardView:not(.hidden)) h1,
.main:has(#mapView:not(.hidden)) h1 {
  font-size: 22px;
  line-height: 1.15;
  margin-top: 2px;
}

.main:has(#dashboardView:not(.hidden)) .topbar,
.main:has(#mapView:not(.hidden)) .topbar {
  align-items: center;
}

.main:has(#dashboardView:not(.hidden)) .eyebrow,
.main:has(#mapView:not(.hidden)) .eyebrow {
  font-size: 11px;
}

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

.eyebrow,
.section-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 4px 0 0;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: 30px;
  line-height: 1.25;
}

h2 {
  font-size: 20px;
}

.top-actions,
.map-controls,
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.ghost-button,
.chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 0 15px;
  cursor: pointer;
  white-space: nowrap;
}

.primary-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.ghost-button,
.chip {
  background: #ffffff;
  color: var(--ink);
}

.chip {
  min-height: 34px;
  padding: 0 12px;
}

.chip.active {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.compact {
  min-height: 44px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.metric {
  min-height: 104px;
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 5px;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.05);
}

.metric span,
.metric small,
.detail-list dt,
.qr-block small {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  font-size: 30px;
  line-height: 1;
}

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

.dashboard-view .kpi-strip {
  margin-bottom: 0;
}

.metric.highlight {
  border-left: 5px solid var(--accent);
}

.metric.market-up {
  border-left: 5px solid var(--blue);
}

.metric.warning {
  border-left: 5px solid var(--gold);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
}

.decision-panel,
.market-panel {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 16px;
}

.sell-alert {
  border-radius: 8px;
  border: 1px solid rgba(216, 157, 41, 0.4);
  background: linear-gradient(135deg, #fff8e8, #ffffff);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.sell-alert h3,
.sell-alert p {
  margin: 0;
}

.sell-alert h3 {
  font-size: 24px;
}

.sell-alert p {
  color: var(--muted);
}

.sell-alert strong {
  color: #7a5200;
  font-size: 17px;
}

.alert-badge {
  width: fit-content;
  border-radius: 999px;
  background: var(--gold);
  color: #ffffff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.decision-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 5px;
  background: #fbfcfd;
}

.decision-list span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.decision-list small {
  color: var(--muted);
  line-height: 1.4;
}

.market-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.market-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr 0.9fr;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 0 14px;
  border-bottom: 1px solid #edf1f4;
}

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

.market-row.head {
  min-height: 42px;
  background: #f4f7f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.market-row.hot {
  background: #fffaf0;
}

.market-row strong {
  width: fit-content;
  border-radius: 999px;
  background: #eef8f5;
  color: var(--accent-strong);
  padding: 5px 8px;
  font-size: 12px;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.map-panel,
.detail-panel {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.map-panel {
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 10px;
}

.detail-panel {
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.tight {
  align-items: center;
}

.search-box {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #fbfcfd;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

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

.scenario-card {
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 9px 10px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.scenario-card:hover,
.scenario-card.active {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(15, 122, 106, 0.12);
  transform: translateY(-1px);
}

.scenario-card.active {
  background: #eef8f5;
}

.scenario-card span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.scenario-card strong {
  font-size: 14px;
}

.scenario-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.map-stage {
  position: relative;
  height: 340px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(rgba(23, 32, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 42, 0.04) 1px, transparent 1px),
    #f9fbfc;
  background-size: 32px 32px;
}

.map-stage.site-view .compass {
  display: none;
}

.compass {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  z-index: 3;
  font-size: 11px;
  color: var(--muted);
}

.compass span {
  position: absolute;
  font-weight: 800;
  line-height: 1;
}

.compass span:nth-child(1) {
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.compass span:nth-child(2) {
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
}

.compass span:nth-child(3) {
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.compass span:nth-child(4) {
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
}

.site-map,
.warehouse-map {
  position: absolute;
  inset: 0;
}

.regional-map {
  position: absolute;
  inset: 28px;
  border: 2px solid #cbd7df;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04)),
    url("./map.png") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.regional-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 68% 52%, rgba(38, 114, 200, 0.08), transparent 24%);
  pointer-events: none;
}

.warehouse-card {
  position: absolute;
  min-width: 180px;
  min-height: 118px;
  border: 2px solid #9fb1bd;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 14px;
  display: grid;
  align-content: space-between;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.warehouse-card.map-marker {
  min-width: 220px;
  min-height: auto;
  transform: translate(-50%, -50%);
  grid-template-columns: 38px 1fr;
  align-items: center;
  align-content: center;
  gap: 10px;
  border-width: 3px;
  border-color: rgba(15, 122, 106, 0.55);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 48px rgba(23, 32, 42, 0.18);
}

.warehouse-card:hover,
.warehouse-card.target {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 14px 28px rgba(38, 114, 200, 0.2);
}

.warehouse-card.map-marker:hover,
.warehouse-card.map-marker.target {
  transform: translate(-50%, -54%);
}

.marker-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(15, 122, 106, 0.12);
  flex: 0 0 auto;
}

.warehouse-card.target .marker-dot {
  background: var(--blue);
  box-shadow: 0 0 0 9px rgba(38, 114, 200, 0.15);
}

.marker-copy {
  display: grid;
  gap: 2px;
}

.marker-copy em {
  color: #34434c;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.warehouse-card strong {
  font-size: 20px;
}

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

.warehouse-card .occupancy {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce5eb;
}

.warehouse-card .occupancy i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.floorplan {
  position: absolute;
  inset: 24px;
  border: 3px solid #9fb1bd;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 122, 106, 0.06) 0 1px, transparent 1px),
    linear-gradient(rgba(15, 122, 106, 0.06) 0 1px, transparent 1px),
    #f7fafb;
  background-size: 26px 26px;
  overflow: hidden;
}

.floorplan::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(96, 112, 128, 0.28);
  border-radius: 6px;
  pointer-events: none;
}

.warehouse-label {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 5;
  border: 1px solid rgba(15, 122, 106, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-strong);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.08);
}

.aisle {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(38, 114, 200, 0.1);
  color: #3e6c94;
  font-size: 12px;
  font-weight: 800;
  z-index: 1;
}

.aisle-main {
  left: 6%;
  right: 6%;
  top: 47%;
  height: 8%;
}

.aisle-cross {
  top: 12%;
  bottom: 12%;
  left: 60%;
  width: 4%;
  writing-mode: vertical-rl;
}

.corner-label {
  position: absolute;
  z-index: 2;
  color: rgba(96, 112, 128, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.corner-label.north {
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
}

.corner-label.east {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.corner-label.south {
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
}

.corner-label.west {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.zone {
  position: absolute;
  z-index: 2;
  border: 2px solid #b9c6cf;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  text-align: left;
}

.zone:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(23, 32, 42, 0.12);
}

.zone.target {
  border: 3px solid var(--blue);
  background: #eaf3ff;
  animation: pulse 1.2s ease-in-out infinite;
  z-index: 4;
}

.zone.reserved {
  border-color: var(--gold);
  background: #fff7e4;
}

.zone.alert {
  border-color: var(--red);
  background: #fff0ef;
}

.zone strong {
  font-size: 15px;
}

.zone small,
.zone em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.zone em {
  color: #34434c;
  font-weight: 700;
}

.pin {
  position: absolute;
  right: 8px;
  top: 8px;
  min-width: 74px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(38, 114, 200, 0.78);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(38, 114, 200, 0.3);
  backdrop-filter: blur(5px);
}

.pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(38, 114, 200, 0.78);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(38, 114, 200, 0.22); }
  50% { box-shadow: 0 0 0 8px rgba(38, 114, 200, 0.08); }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.dot.normal { background: var(--accent); }
.dot.target { background: var(--blue); }
.dot.reserved { background: var(--gold); }
.dot.alert { background: var(--red); }

.status-pill {
  border-radius: 999px;
  background: #e7f5f2;
  color: var(--accent-strong);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.reserved {
  background: #fff2d2;
  color: #895f08;
}

.status-pill.alert {
  background: #fff0ef;
  color: #9d3128;
}

.photo-box {
  min-height: 76px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dae7ec, #f7fafb);
  display: grid;
  place-items: center;
  overflow: hidden;
}

#mapView .photo-box {
  display: none;
}

.machine-visual {
  width: 132px;
  height: 62px;
  border-radius: 8px;
  border: 6px solid #65717a;
  background: #f2f5f7;
  position: relative;
  box-shadow: 0 16px 30px rgba(23, 32, 42, 0.18);
}

.machine-visual span {
  position: absolute;
  display: block;
  background: var(--accent);
}

.machine-visual span:nth-child(1) {
  width: 36px;
  height: 22px;
  left: 12px;
  top: 14px;
}

.machine-visual span:nth-child(2) {
  width: 48px;
  height: 7px;
  right: 14px;
  top: 15px;
  background: #9aa8b1;
}

.machine-visual span:nth-child(3) {
  width: 66px;
  height: 8px;
  right: 14px;
  bottom: 13px;
  background: #d89d29;
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 4px;
}

.detail-list div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  min-height: 22px;
  align-items: center;
  border-bottom: 1px solid #edf1f4;
}

.detail-list dt,
.detail-list dd {
  margin: 0;
}

.detail-list dd {
  font-weight: 700;
}

.qr-block {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.action-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
  display: grid;
  gap: 8px;
}

.action-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.action-heading span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.action-heading strong {
  font-size: 13px;
}

.action-buttons {
  display: grid;
  gap: 8px;
}

.move-select {
  display: grid;
  gap: 6px;
}

.move-select span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.move-select select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbd7df;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
}

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

.action-button {
  min-height: 52px;
  border: 1px solid #cbd7df;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px;
  display: grid;
  gap: 3px;
  text-align: left;
  cursor: pointer;
}

.action-button:hover:not(:disabled) {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(15, 122, 106, 0.12);
}

.action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-button strong {
  font-size: 13px;
}

.action-button small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.qr-code {
  width: 42px;
  height: 42px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 5px;
  background: #ffffff;
  border: 1px solid #c9d4dc;
}

.qr-code span {
  background: #1f2a31;
}

.qr-code span:nth-child(2),
.qr-code span:nth-child(7),
.qr-code span:nth-child(9),
.qr-code span:nth-child(14) {
  background: transparent;
}

.timeline {
  display: grid;
  gap: 7px;
  max-height: 118px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}

.timeline::-webkit-scrollbar {
  width: 6px;
}

.timeline::-webkit-scrollbar-thumb {
  background: #cbd7df;
  border-radius: 999px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.timeline-item i {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(80px);
  opacity: 0;
  background: #14242b;
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden {
  display: none;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 88px 1fr;
  }

  .brand div:not(.brand-mark),
  .nav-item span:last-child,
  .budget-note {
    display: none;
  }

  .sidebar {
    align-items: center;
  }

  .collapse-button {
    position: absolute;
    left: 50%;
    top: 58px;
    transform: translateX(-50%);
    background: #2f3b43;
  }

  .collapse-button span {
    transform: rotate(225deg);
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .detail-panel {
    min-width: 0;
  }

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

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 82px 1fr;
  }

  .sidebar {
    display: flex;
    padding-inline: 16px;
    align-items: center;
  }

  .brand-copy,
  .nav-item span:last-child,
  .budget-note {
    display: none;
  }

  .nav-list {
    width: 100%;
    margin-top: 34px;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .panel-heading,
  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    font-size: 24px;
  }

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

  .map-controls,
  .top-actions {
    flex-wrap: wrap;
  }

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

  .scenario-strip,
  .action-button-grid,
  .decision-list {
    grid-template-columns: 1fr;
  }

  .market-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 14px;
  }

  .market-row.head {
    display: none;
  }

  .floorplan {
    inset: 18px;
  }

  .map-stage {
    height: 340px;
  }
}
