:root {
  --screen-scale: 1;
  --screen-offset-x: 0px;
  --screen-offset-y: 0px;
  --bg-base: #04111f;
  --bg-panel: rgba(10, 29, 51, 0.82);
  --bg-panel-soft: rgba(91, 183, 255, 0.11);
  --bg-panel-float: rgba(7, 22, 38, 0.42);
  --bg-panel-float-strong: rgba(8, 26, 43, 0.58);
  --line-soft: rgba(118, 208, 255, 0.28);
  --line-strong: rgba(94, 208, 255, 0.9);
  --text-main: #e9f8ff;
  --text-soft: #95b7cf;
  --text-dim: #6f93ad;
  --empty-text: rgba(156, 185, 205, 0.72);
  --blue-main: #36b7ff;
  --blue-bright: #6fe3ff;
  --blue-deep: #123861;
  --cyan: #33ffd9;
  --amber: #ffcd6b;
  --red: #ff6f91;
  --green: #4dffb2;
  --shadow-glow: 0 0 0 1px rgba(91, 199, 255, 0.2), 0 0 28px rgba(25, 143, 214, 0.18),
    inset 0 0 36px rgba(61, 144, 201, 0.08);
  --shadow-float:
    0 0 0 1px rgba(109, 214, 255, 0.08),
    0 14px 34px rgba(0, 10, 20, 0.24),
    inset 0 1px 0 rgba(185, 241, 255, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(42, 130, 218, 0.28), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(32, 198, 255, 0.18), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(16, 84, 142, 0.28), transparent 36%),
    linear-gradient(135deg, #020913 0%, #07182a 52%, #030c17 100%);
  color: var(--text-main);
  font-family: "Rajdhani", "DIN Alternate", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(88, 176, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 176, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

@keyframes map-scan-sweep {
  0% {
    transform: translate3d(-16%, -4%, 0) scale(1);
    opacity: 0.06;
  }
  50% {
    opacity: 0.28;
  }
  100% {
    transform: translate3d(16%, 4%, 0) scale(1.05);
    opacity: 0.08;
  }
}

@keyframes map-grid-breathe {
  0%,
  100% {
    opacity: 0.24;
  }
  50% {
    opacity: 0.42;
  }
}

html[data-map-power="low"] .map-shell::before,
html[data-map-power="low"] .map-shell::after {
  animation: none;
}

html[data-map-power="low"] .map-shell::before {
  opacity: 0.14;
}

html[data-map-power="low"] .map-shell::after {
  opacity: 0.18;
}

#screen-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#app {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  transform: translate3d(var(--screen-offset-x), var(--screen-offset-y), 0) scale(var(--screen-scale));
  transform-origin: top left;
  will-change: transform;
}

.viewport {
  position: relative;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 20px 24px 22px;
  display: grid;
  grid-template-rows: 46px 108px minmax(0, 1fr) 324px;
  gap: 10px;
  min-height: 0;
}

.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 2px;
  min-height: 0;
}

.title-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 46px;
}

.screen-brand {
  display: block;
  width: auto;
  height: 46.2px;
  max-width: 399px;
  object-fit: contain;
  filter:
    brightness(0) invert(1)
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.2))
    drop-shadow(0 0 18px rgba(91, 199, 255, 0.08));
}

.screen-clock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 10px 5px;
  min-width: 174px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(12, 35, 56, 0.42), rgba(8, 22, 38, 0.18));
  border: 1px solid rgba(123, 219, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(91, 199, 255, 0.08), 0 0 18px rgba(25, 143, 214, 0.08);
  backdrop-filter: blur(10px);
  text-align: right;
  height: 40px;
}

.header-status {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-end;
  gap: 5px;
  width: auto;
  max-width: 620px;
  flex: none;
  margin-left: auto;
}

.header-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  flex: none;
  gap: 8px;
  flex-wrap: wrap;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  height: 28px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(77, 255, 178, 0.18);
  background: linear-gradient(135deg, rgba(17, 60, 54, 0.6), rgba(8, 26, 24, 0.92));
  color: #baffee;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 28px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(111, 227, 255, 0.24);
  background: linear-gradient(135deg, rgba(54, 183, 255, 0.16), rgba(9, 35, 62, 0.84));
  color: #f5fdff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.3px;
  box-shadow: 0 0 0 1px rgba(91, 199, 255, 0.12), 0 0 16px rgba(25, 143, 214, 0.1);
}

button.nav-button {
  cursor: pointer;
  font-family: inherit;
}

button.nav-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.clock-label {
  font-size: 9px;
  color: var(--text-soft);
  letter-spacing: 0.45px;
  line-height: 1;
}

.clock-value {
  margin-top: 1px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.api-badge {
  width: 286px;
  max-width: 286px;
  padding: 4px 9px 5px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(9, 26, 45, 0.48), rgba(5, 16, 28, 0.2));
  border: 1px solid rgba(110, 208, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(91, 199, 255, 0.08), 0 0 18px rgba(25, 143, 214, 0.08);
  backdrop-filter: blur(10px);
  min-height: 40px;
}

.api-badge-head {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.api-source {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue-bright);
  background: rgba(54, 183, 255, 0.12);
  line-height: 1.1;
}

.api-state {
  font-size: 10px;
  color: var(--text-soft);
  line-height: 1.1;
}

.api-state.error {
  color: #ffd4dd;
}

.api-badge-text {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.1;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 0;
  min-height: 0;
}

.metric-card,
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(11, 34, 58, 0.72), rgba(7, 20, 37, 0.58));
  border: 1px solid rgba(116, 216, 255, 0.12);
  border-radius: 22px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.metric-card {
  min-height: 0;
  height: 100%;
  padding: 14px 18px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background:
    linear-gradient(180deg, rgba(102, 193, 255, 0.12), rgba(7, 20, 37, 0.46)),
    linear-gradient(135deg, rgba(18, 56, 97, 0.54), rgba(7, 20, 37, 0.22));
  backdrop-filter: blur(12px);
}

.metric-card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(94, 208, 255, 0.08), transparent 34%, transparent 66%, rgba(94, 208, 255, 0.05)),
    radial-gradient(circle at top left, rgba(140, 232, 255, 0.08), transparent 28%);
  pointer-events: none;
}

.metric-card::after,
.panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(181, 240, 255, 0.03);
  pointer-events: none;
}

.metric-label {
  font-size: 15px;
  color: var(--text-soft);
  letter-spacing: 0.6px;
  line-height: 1.2;
}

.metric-value {
  margin-top: 10px;
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.06;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(54, 183, 255, 0.24);
}

.metric-value-money {
  white-space: pre-line;
  line-height: 1.14;
  font-size: 30px;
  letter-spacing: 0.2px;
}

.metric-note {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.25;
  min-height: 28px;
}

.content-grid {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr) 668px;
  gap: 10px;
  height: auto;
  min-height: 0;
}

.content-grid > * {
  min-width: 0;
  min-height: 0;
}

.panel-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

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

.right-column {
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 14px 16px 12px;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 1.15;
}

.panel-tag {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  color: var(--blue-bright);
  background: rgba(67, 178, 255, 0.12);
  border: 1px solid rgba(112, 212, 255, 0.22);
}

.right-column .panel {
  padding: 14px 14px 12px;
}

.right-column .panel-header {
  margin-bottom: 7px;
  pointer-events: auto;
}

.panel-header-meta-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.trend-range-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(7, 28, 48, 0.3);
  border: 1px solid rgba(111, 227, 255, 0.1);
  backdrop-filter: blur(8px);
}

.trend-range-button {
  appearance: none;
  min-width: 44px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.trend-range-button:hover {
  color: #dff7ff;
}

.trend-range-button.active {
  background: linear-gradient(135deg, rgba(54, 183, 255, 0.22), rgba(10, 42, 72, 0.94));
  border-color: rgba(111, 227, 255, 0.26);
  color: #eafaff;
}

.alert-carousel-controls {
  gap: 6px;
}

.alert-carousel-info {
  padding: 0 4px 0 6px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rank-carousel-controls {
  gap: 6px;
}

.table-wrap {
  height: auto;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.rank-carousel-wrap {
  position: relative;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

thead th {
  padding: 8px 8px;
  font-size: 13px;
  text-align: left;
  color: var(--text-soft);
  font-weight: 600;
  border-bottom: 1px solid rgba(119, 211, 255, 0.16);
  line-height: 1.2;
}

tbody td {
  padding: 7px 8px;
  font-size: 14px;
  color: #f0f8ff;
  border-bottom: 1px solid rgba(119, 211, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(49, 144, 214, 0.12);
}

tbody tr.empty-row:hover {
  background: transparent;
}

.rank-rotate-enter-active,
.rank-rotate-leave-active {
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.rank-rotate-move {
  transition: transform 0.42s ease;
}

.rank-rotate-enter-from {
  opacity: 0;
  transform: translateY(14px);
}

.rank-rotate-leave-to {
  opacity: 0;
  transform: translateY(-14px);
}

.empty-cell {
  color: var(--empty-text);
}

.rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(62, 176, 255, 0.14);
  color: var(--blue-bright);
  font-weight: 700;
  font-size: 13px;
}

.number-cell {
  color: #ffffff;
  font-weight: 600;
}

.money-cell {
  color: var(--cyan);
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
  font-size: 12px;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.product-thumb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
  border: 1px solid rgba(124, 212, 255, 0.24);
}

.product-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.map-panel {
  height: auto;
  min-width: 0;
}

.map-header-meta {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.map-layer-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(7, 28, 48, 0.3);
  border: 1px solid rgba(111, 227, 255, 0.08);
  backdrop-filter: blur(8px);
}

.map-layer-button {
  appearance: none;
  min-width: 74px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.map-layer-button.active {
  background: linear-gradient(135deg, rgba(54, 183, 255, 0.22), rgba(10, 42, 72, 0.94));
  border-color: rgba(111, 227, 255, 0.26);
  color: #f4fdff;
}

.map-layer-button.suppressed,
.map-layer-button:disabled {
  background: rgba(10, 24, 40, 0.38);
  border-color: rgba(134, 156, 177, 0.16);
  color: rgba(174, 194, 211, 0.5);
  cursor: not-allowed;
  box-shadow: none;
  text-shadow: none;
}

.map-overlay-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(8, 24, 40, 0.24);
  border: 1px solid rgba(111, 227, 255, 0.07);
  backdrop-filter: blur(8px);
}

.map-overlay-button {
  appearance: none;
  min-width: 72px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.map-overlay-button.active {
  background: linear-gradient(135deg, rgba(77, 255, 178, 0.18), rgba(8, 31, 54, 0.9));
  border-color: rgba(77, 255, 178, 0.26);
  color: #ecfff7;
}

.map-power-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(9, 25, 42, 0.26);
  border: 1px solid rgba(111, 227, 255, 0.08);
  backdrop-filter: blur(8px);
}

.map-power-button {
  appearance: none;
  min-width: 62px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.map-power-button.active {
  background: linear-gradient(135deg, rgba(255, 211, 108, 0.18), rgba(8, 31, 54, 0.92));
  border-color: rgba(255, 211, 108, 0.24);
  color: #fff7db;
}

.map-filter-button {
  appearance: none;
  min-width: 84px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(111, 227, 255, 0.18);
  background: rgba(8, 31, 54, 0.28);
  color: #f3fcff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.map-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 48%, rgba(31, 121, 194, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(6, 18, 34, 0.32), rgba(2, 10, 19, 0.46));
}

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

.map-shell::before {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(104, 225, 255, 0.14) 0%, transparent 22%),
    radial-gradient(circle at 50% 48%, rgba(77, 255, 178, 0.06) 0%, transparent 36%),
    linear-gradient(108deg, transparent 34%, rgba(111, 227, 255, 0.16) 48%, rgba(111, 227, 255, 0.02) 58%, transparent 70%);
  mix-blend-mode: screen;
  animation: map-scan-sweep 10s linear infinite;
}

.map-shell::after {
  z-index: 0;
  background-image:
    linear-gradient(rgba(111, 227, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 227, 255, 0.03) 1px, transparent 1px);
  background-size: 96px 96px;
  animation: map-grid-breathe 7.2s ease-in-out infinite;
}

.map-shell > * {
  position: relative;
  z-index: 1;
}

.map-dock {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  z-index: 6;
  pointer-events: none;
}

.map-dock-left {
  flex-direction: row;
}

.map-dock-right {
  flex-direction: row-reverse;
}

.map-dock-handle {
  position: relative;
  pointer-events: auto;
  appearance: none;
  width: 38px;
  min-height: 124px;
  padding: 14px 7px 12px;
  border-radius: 16px;
  border: 1px solid rgba(111, 227, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 30, 52, 0.84), rgba(4, 15, 26, 0.72)),
    linear-gradient(160deg, rgba(54, 183, 255, 0.12), transparent 72%);
  box-shadow: 0 0 0 1px rgba(115, 214, 255, 0.05), 0 12px 28px rgba(2, 11, 22, 0.16);
  backdrop-filter: blur(14px);
  color: #eefbff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.map-dock-handle::before {
  content: "//";
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(111, 227, 255, 0.74);
}

.map-dock:hover .map-dock-handle,
.map-dock:focus-within .map-dock-handle,
.map-dock-handle:focus-visible,
.map-dock.is-open .map-dock-handle {
  border-color: rgba(111, 227, 255, 0.34);
  box-shadow: 0 0 0 1px rgba(115, 214, 255, 0.12), 0 16px 32px rgba(7, 25, 44, 0.2);
  transform: translateY(-2px);
}

.map-dock-handle-label,
.map-dock-handle-subtitle {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.map-dock-handle-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f2fdff;
}

.map-dock-handle-subtitle {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--text-dim);
}

.map-dock .map-legend-card,
.map-dock .supply-command-card {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  filter: blur(2px);
  transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}

.map-dock-left .map-legend-card {
  transform: translateX(-22px) scale(0.97);
  transform-origin: left bottom;
}

.map-dock-right .supply-command-card {
  transform: translateX(22px) scale(0.97);
  transform-origin: right bottom;
}

.map-dock:hover .map-legend-card,
.map-dock:hover .supply-command-card,
.map-dock:focus-within .map-legend-card,
.map-dock:focus-within .supply-command-card,
.map-dock.is-open .map-legend-card,
.map-dock.is-open .supply-command-card {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  filter: none;
  transform: translateX(0) scale(1);
}

.map-legend-card {
  width: 264px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(8, 25, 45, 0.2), rgba(5, 16, 28, 0.04)),
    linear-gradient(135deg, rgba(54, 183, 255, 0.04), transparent 62%);
  border: 1px solid rgba(115, 214, 255, 0.07);
  box-shadow: 0 0 16px rgba(24, 126, 197, 0.05);
  backdrop-filter: blur(8px);
}

.map-legend-header {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.map-legend-title {
  font-size: 13px;
  font-weight: 700;
  color: #effbff;
}

.map-legend-hint {
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-dim);
}

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

.map-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.map-legend-swatch {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.map-legend-copy {
  min-width: 0;
}

.map-legend-label {
  font-size: 12px;
  font-weight: 700;
  color: #eefbff;
  line-height: 1.25;
}

.map-legend-note {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-soft);
}

.chart {
  width: 100%;
  height: 100%;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.shop-info-card {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 320px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(8, 25, 45, 0.22), rgba(5, 16, 28, 0.04)),
    linear-gradient(135deg, rgba(54, 183, 255, 0.04), transparent 58%);
  border: 1px solid rgba(115, 214, 255, 0.07);
  box-shadow: 0 0 16px rgba(24, 126, 197, 0.05);
  backdrop-filter: blur(8px);
}

.shop-info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shop-info-copy {
  min-width: 0;
  flex: 1;
}

.shop-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 6px;
}

.shop-city {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.4;
  margin-bottom: 12px;
}

.shop-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 10px;
}

.shop-info-block {
  min-width: 0;
}

.info-label {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.2;
}

.info-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.shop-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(115, 214, 255, 0.12);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.shop-footer-label {
  font-size: 11px;
  color: var(--text-dim);
}

.shop-footer-value {
  margin-top: 5px;
  font-size: 13px;
  color: #eefbff;
  line-height: 1.3;
}

.shop-actions {
  margin-top: 10px;
}

.shop-card-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(111, 227, 255, 0.22);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(54, 183, 255, 0.18), rgba(7, 24, 43, 0.92));
  color: #e9f8ff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(91, 199, 255, 0.08), 0 0 14px rgba(25, 143, 214, 0.08);
}

.shop-card-close:hover {
  border-color: rgba(111, 227, 255, 0.42);
  color: #ffffff;
}

.shop-card-close:focus-visible,
.store-name-button:focus-visible {
  outline: 2px solid rgba(111, 227, 255, 0.72);
  outline-offset: 2px;
}

.store-name-button {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.store-name-button:hover {
  color: var(--blue-bright);
  text-shadow: 0 0 12px rgba(54, 183, 255, 0.28);
}

.supply-command-card {
  width: 300px;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(8, 25, 45, 0.52), rgba(5, 16, 28, 0.18)),
    linear-gradient(135deg, rgba(77, 255, 178, 0.08), transparent 64%);
  border: 1px solid rgba(115, 214, 255, 0.12);
  box-shadow: 0 0 18px rgba(24, 126, 197, 0.1);
  backdrop-filter: blur(14px);
}

.supply-command-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.supply-command-eyebrow {
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--blue-bright);
}

.supply-command-title {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #f4fdff;
}

.supply-command-pill {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #e8fff4;
  background: rgba(77, 255, 178, 0.12);
  border: 1px solid rgba(77, 255, 178, 0.18);
  white-space: nowrap;
}

.supply-command-hint {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-soft);
}

.supply-lane-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.supply-lane-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(15, 38, 63, 0.42), rgba(6, 18, 31, 0.16)),
    linear-gradient(90deg, rgba(111, 227, 255, 0.05), transparent 56%);
  border: 1px solid rgba(119, 211, 255, 0.08);
}

.supply-lane-accent {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.supply-lane-main {
  min-width: 0;
}

.supply-lane-route {
  font-size: 13px;
  font-weight: 700;
  color: #eefbff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.supply-lane-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.35;
}

.supply-lane-kpi {
  text-align: right;
}

.supply-lane-kpi-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1.2;
}

.supply-lane-kpi-label {
  margin-top: 3px;
  font-size: 10px;
  color: var(--text-dim);
}

.shop-share-button {
  appearance: none;
  width: 100%;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(111, 227, 255, 0.24);
  background: linear-gradient(135deg, rgba(54, 183, 255, 0.18), rgba(8, 31, 54, 0.92));
  color: #f4fdff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-share-button:hover {
  border-color: rgba(111, 227, 255, 0.36);
  box-shadow: 0 0 18px rgba(54, 183, 255, 0.14);
  transform: translateY(-1px);
}

.status-online {
  color: var(--green);
}

.status-alert {
  color: var(--red);
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 10px;
  height: auto;
  margin-top: 0;
  min-height: 0;
}

.bottom-grid > * {
  min-width: 0;
  min-height: 0;
}

.orders-panel,
.alerts-panel {
  height: auto;
  min-width: 0;
  min-height: 0;
}

.feed-table tbody td {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 13px;
  line-height: 1.15;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  border: 1px solid transparent;
}

.pill-signed {
  color: var(--green);
  background: rgba(77, 255, 178, 0.12);
  border-color: rgba(77, 255, 178, 0.2);
}

.pill-pending,
.pill-shipping {
  color: var(--amber);
  background: rgba(255, 205, 107, 0.1);
  border-color: rgba(255, 205, 107, 0.18);
}

.pill-cancel,
.pill-return {
  color: var(--red);
  background: rgba(255, 111, 145, 0.12);
  border-color: rgba(255, 111, 145, 0.18);
}

.pill-empty {
  color: var(--empty-text);
  background: rgba(111, 147, 173, 0.1);
  border-color: rgba(111, 147, 173, 0.18);
}

.alerts-list {
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 4px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.alert-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 72px;
  column-gap: 12px;
  align-items: center;
  padding: 10px 13px;
  min-height: 64px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(15, 38, 63, 0.46), rgba(6, 18, 31, 0.18)),
    linear-gradient(90deg, rgba(94, 208, 255, 0.05), transparent 56%);
  border: 1px solid rgba(119, 211, 255, 0.08);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.alert-level {
  min-width: 58px;
  padding: 4px 0;
  border-radius: 999px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.level-high {
  color: #ffd9e1;
  background: rgba(255, 111, 145, 0.18);
}

.level-medium {
  color: #ffefc4;
  background: rgba(255, 205, 107, 0.16);
}

.level-low {
  color: #c9f8ff;
  background: rgba(54, 183, 255, 0.16);
}

.alert-content {
  display: grid;
  grid-template-rows: auto auto;
  row-gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.alert-title {
  font-size: 15px;
  font-weight: 700;
  color: #f5fbff;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-type {
  display: inline;
  margin: 0;
  font-size: 12px;
  color: var(--blue-bright);
}

.alert-desc {
  margin-top: 0;
  font-size: 12px;
  line-height: 1.24;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-time {
  width: 72px;
  justify-self: end;
  align-self: start;
  padding-top: 2px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.mini-note {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
}

.screen {
  grid-template-rows: 46px minmax(0, 1fr);
  gap: 12px;
}

.command-stage {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 392px;
  grid-template-rows: 104px 250px 250px minmax(0, 1fr);
  gap: 12px;
}

.command-stage > * {
  min-width: 0;
  min-height: 0;
}

.stage-map-panel {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  z-index: 1;
  --stage-floating-card-top: 176px;
  --stage-floating-card-bottom: 360px;
  --stage-floating-card-max-height: min(320px, calc(100% - var(--stage-floating-card-top) - var(--stage-floating-card-bottom)));
  padding: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 38%, rgba(33, 135, 211, 0.08), transparent 28%),
    radial-gradient(circle at 48% 62%, rgba(14, 68, 112, 0.06), transparent 36%),
    linear-gradient(180deg, rgba(3, 20, 32, 0.28), rgba(2, 10, 19, 0.42));
  border-color: rgba(84, 205, 255, 0.06);
}

.stage-map-panel::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 24px;
  border: 1px solid rgba(111, 227, 255, 0.06);
  pointer-events: none;
}

.stage-map-panel .panel-header {
  position: absolute;
  left: 50%;
  right: auto;
  width: auto;
  max-width: calc(100% - 420px);
  top: 126px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(8, 25, 43, 0.18), rgba(6, 18, 31, 0.03)),
    linear-gradient(135deg, rgba(54, 183, 255, 0.04), transparent 65%);
  border: 1px solid rgba(111, 227, 255, 0.07);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 18px rgba(16, 94, 152, 0.04);
  pointer-events: none;
}

.stage-map-panel .panel-header > * {
  pointer-events: auto;
}

.stage-map-panel .map-header-meta {
  flex: 0 1 auto;
  justify-content: center;
}

.stage-map-panel .panel-title {
  font-size: 18px;
  letter-spacing: 0.8px;
}

.stage-map-panel .panel-title::before,
.panel:not(.stage-map-panel) .panel-title::before {
  content: "//";
  display: inline-block;
  margin-right: 10px;
  color: var(--blue-main);
  letter-spacing: -2px;
}

.stage-map-panel .map-shell {
  height: 100%;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 48%, rgba(42, 140, 214, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(6, 18, 34, 0.28), rgba(2, 10, 19, 0.42));
}

.stage-summary-grid {
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 3;
  padding: 0 34px;
  align-self: start;
}

.stage-summary-grid .metric-card {
  border-radius: 20px;
  padding: 12px 16px 10px;
  backdrop-filter: blur(7px);
  background:
    linear-gradient(180deg, rgba(91, 183, 255, 0.05), rgba(6, 20, 36, 0.08)),
    linear-gradient(135deg, rgba(9, 31, 52, 0.16), rgba(4, 16, 28, 0.02));
  border-color: rgba(111, 227, 255, 0.07);
}

.stage-summary-grid .metric-label {
  font-size: 13px;
}

.stage-summary-grid .metric-value {
  margin-top: 7px;
  font-size: 32px;
}

.stage-summary-grid .metric-value-money {
  font-size: 24px;
}

.stage-summary-grid .metric-note {
  padding-top: 6px;
  min-height: 0;
  font-size: 11px;
  line-height: 1.25;
}

.stage-rail-left {
  grid-column: 1;
  grid-row: 2 / 4;
  z-index: 3;
}

.stage-rail-right {
  grid-column: 3;
  grid-row: 2 / 5;
  z-index: 3;
}

.stage-orders-panel {
  grid-column: 2;
  grid-row: 4;
  z-index: 3;
  pointer-events: none;
}

.stage-alerts-panel {
  grid-column: 1;
  grid-row: 4;
  z-index: 3;
}

.command-stage .panel:not(.stage-map-panel) {
  background:
    linear-gradient(180deg, rgba(10, 31, 52, 0.16), rgba(5, 18, 31, 0.02)),
    linear-gradient(135deg, rgba(94, 208, 255, 0.04), transparent 48%),
    radial-gradient(circle at top left, rgba(111, 227, 255, 0.04), transparent 34%);
  border-radius: 22px;
  border-color: rgba(112, 214, 255, 0.07);
  backdrop-filter: blur(10px) saturate(112%);
  box-shadow:
    0 0 0 1px rgba(91, 199, 255, 0.03),
    0 10px 22px rgba(1, 11, 20, 0.08),
    inset 0 0 30px rgba(61, 144, 201, 0.02);
}

.command-stage .panel-header {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 12px;
}

.command-stage .panel-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(54, 183, 255, 0.82) 0%, rgba(54, 183, 255, 0.2) 42%, rgba(54, 183, 255, 0.01) 100%);
  opacity: 0.54;
}

.command-stage .panel-tag {
  background: rgba(54, 183, 255, 0.1);
}

.stage-orders-panel .table-wrap,
.stage-alerts-panel .alerts-list,
.stage-rail-left .table-wrap,
.stage-rail-right .chart {
  min-height: 0;
}

.stage-orders-panel {
  padding: 16px 18px 14px;
}

.stage-alerts-panel {
  padding: 16px 16px 14px;
}

.stage-alerts-panel .alerts-list {
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stage-map-panel .map-dock-left {
  left: 390px;
  bottom: 412px;
}

.stage-map-panel .map-dock-right {
  right: 430px;
  bottom: var(--stage-floating-card-bottom);
}

.stage-map-panel .map-dock .map-legend-card {
  width: 304px;
  padding: 14px 16px 12px;
  background:
    linear-gradient(180deg, rgba(8, 25, 45, 0.24), rgba(5, 16, 28, 0.05)),
    linear-gradient(135deg, rgba(54, 183, 255, 0.05), transparent 64%);
}

.stage-map-panel .shop-info-card {
  left: 390px;
  right: auto;
  top: auto;
  bottom: var(--stage-floating-card-bottom);
  width: 318px;
  max-height: var(--stage-floating-card-max-height);
  min-height: 0;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(8, 25, 45, 0.26), rgba(5, 16, 28, 0.05)),
    linear-gradient(135deg, rgba(54, 183, 255, 0.05), transparent 64%);
  z-index: 5;
  pointer-events: none;
}

.stage-map-panel .map-dock .supply-command-card {
  width: 318px;
  max-height: var(--stage-floating-card-max-height);
  min-height: 0;
}

.shop-info-head,
.shop-info-head * {
  pointer-events: auto;
}

.shop-actions,
.shop-actions * {
  pointer-events: auto;
}

.stage-map-panel .shop-name {
  font-size: 20px;
}

.stage-map-panel .shop-city {
  margin-bottom: 12px;
}

.stage-map-panel .shop-footer {
  gap: 10px;
}

.stage-orders-panel .feed-table tbody td {
  font-size: 12px;
}

.stage-rail-right .panel,
.stage-rail-left .panel {
  padding: 16px 16px 14px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 8, 14, 0.72);
  backdrop-filter: blur(8px);
  z-index: 60;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(111, 227, 255, 0.16);
  background: linear-gradient(180deg, rgba(10, 22, 34, 0.98), rgba(6, 14, 22, 0.98));
  box-shadow: 0 28px 54px rgba(0, 7, 14, 0.4);
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.modal-subtitle {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 13px;
  color: var(--text-soft);
}

.form-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(103, 210, 255, 0.12);
  background: rgba(5, 11, 18, 0.88);
  color: var(--text-main);
  font-size: 14px;
}

.inline-error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 111, 145, 0.28);
  background: rgba(255, 111, 145, 0.12);
  color: #ffd9e3;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(103, 210, 255, 0.18);
  background: rgba(11, 25, 39, 0.9);
  color: var(--text-main);
  cursor: pointer;
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(111, 227, 255, 0.3);
  background: linear-gradient(135deg, rgba(54, 183, 255, 0.9), rgba(20, 96, 155, 0.9));
  color: #f6fdff;
  cursor: pointer;
  font-weight: 700;
}

.button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.hud-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 80;
}

.hud-toast {
  min-width: 280px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(103, 210, 255, 0.14);
  background: rgba(7, 16, 26, 0.96);
  box-shadow: 0 18px 34px rgba(0, 8, 16, 0.32);
}

.hud-toast-title {
  font-size: 13px;
  font-weight: 700;
}

.hud-toast-message {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

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

.hud-toast.error .hud-toast-title {
  color: #ffd9e3;
}

.hud-toast.info .hud-toast-title {
  color: var(--blue-bright);
}
