/* ==========================================================================
   数据大屏样式 — 1920×1080 固定舞台，按视口等比缩放
   ========================================================================== */

.screen-page {
  background: #04080e;
  overflow: hidden;
  height: 100vh;
}
.screen-page::before { opacity: 0.35; }
.screen-page::after {
  background-image:
    linear-gradient(to right, rgba(80, 140, 190, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(80, 140, 190, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
}

.screen-shell {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.stage {
  width: 1920px;
  height: 1080px;
  flex: none;
  transform-origin: center center;
  position: relative;
  display: grid;
  grid-template-rows: 92px 1fr 44px;
  gap: 14px;
  padding: 0 22px 8px;
  background:
    radial-gradient(1200px 620px at 50% -10%, rgba(46, 230, 200, 0.10), transparent 62%),
    radial-gradient(900px 600px at 8% 110%, rgba(91, 140, 255, 0.12), transparent 65%),
    radial-gradient(900px 600px at 94% 105%, rgba(160, 107, 255, 0.10), transparent 65%),
    #050b13;
}

/* ---------- 顶部 ---------- */
.scr-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 10px;
}
.scr-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 230, 200, 0.55) 20%, rgba(91, 140, 255, 0.65) 50%, rgba(46, 230, 200, 0.55) 80%, transparent);
}
.scr-brand { display: flex; align-items: center; gap: 14px; }
.scr-brand .mark {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #04120f;
  font-weight: 800;
  font-size: 21px;
}
.scr-brand .txt strong { display: block; font-size: 17px; letter-spacing: 0.04em; }
.scr-brand .txt span { font-size: 10.5px; color: var(--dim); letter-spacing: 0.2em; }

.scr-title {
  text-align: center;
  position: relative;
}
.scr-title h1 {
  font-size: 34px;
  letter-spacing: 0.14em;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 20%, #8fd8ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(91, 140, 255, 0.25);
  line-height: 1.2;
}
.scr-title .sub {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: rgba(140, 175, 210, 0.7);
}
.scr-title .sub::before,
.scr-title .sub::after {
  content: "";
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 230, 200, 0.7));
}
.scr-title .sub::after { transform: rotate(180deg); }

.scr-clock {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: right;
}
.scr-clock .time {
  font-family: var(--font-num);
  font-size: 26px;
  letter-spacing: 0.06em;
  color: #dff3ff;
  line-height: 1.1;
}
.scr-clock .date { font-size: 11px; color: var(--dim); letter-spacing: 0.12em; }
.scr-clock .divider { width: 1px; height: 34px; background: var(--line); }
.scr-clock .live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 0.1em;
}
.scr-clock .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}

/* ---------- 栅格 ---------- */
.scr-grid {
  display: grid;
  grid-template-columns: 452px minmax(0, 1fr) 452px;
  gap: 14px;
  min-height: 0;
}
.scr-col {
  display: grid;
  gap: 14px;
  min-height: 0;
  grid-auto-rows: minmax(0, 1fr);
}
.scr-col--left { grid-template-rows: 176px 1.06fr 1fr; }
.scr-col--center { grid-template-rows: minmax(0, 1.62fr) minmax(0, 1fr); }
.scr-col--right { grid-template-rows: 1fr 1fr 1fr; }

/* ---------- 面板 ---------- */
.panel {
  position: relative;
  border: 1px solid rgba(86, 140, 190, 0.22);
  background:
    linear-gradient(180deg, rgba(18, 34, 52, 0.72), rgba(7, 14, 24, 0.86));
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  border-color: rgba(46, 230, 200, 0.75);
  border-style: solid;
}
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  flex: none;
  padding: 0 16px;
  border-bottom: 1px solid rgba(86, 140, 190, 0.14);
  background: linear-gradient(90deg, rgba(46, 230, 200, 0.09), transparent 55%);
}
.panel-head h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #d8ecff;
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel-head h2::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--teal);
  box-shadow: 0 0 10px rgba(46, 230, 200, 0.8);
}
.panel-head .ph-note {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0.1em;
  font-family: var(--font-num);
}
.panel-body {
  flex: 1;
  min-height: 0;
  position: relative;
  padding: 6px 10px 8px;
}
.panel-body--flush { padding: 0; }
.panel-body .chart-host { height: 100%; }

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.kpi {
  position: relative;
  border: 1px solid rgba(86, 140, 190, 0.2);
  border-radius: 4px;
  padding: 7px 14px;
  background: linear-gradient(150deg, rgba(22, 42, 62, 0.7), rgba(8, 16, 26, 0.85));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kpi::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(46, 230, 200, 0.18), transparent);
}
.kpi .label {
  font-size: 11px;
  color: #7f95ad;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi .label svg { width: 13px; height: 13px; color: rgba(46, 230, 200, 0.85); }
.kpi .val {
  font-family: var(--font-num);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #eaf7ff;
  margin-top: 2px;
  text-shadow: 0 0 26px rgba(46, 230, 200, 0.28);
}
.kpi .val small { font-size: 12px; color: #7f95ad; margin-left: 4px; font-weight: 400; }
.kpi .delta { font-size: 10.5px; display: flex; align-items: center; gap: 5px; color: var(--teal); }
.kpi .delta.down { color: var(--rose); }
.kpi .delta span { color: #7c8b9f; }

/* 地图 */
.map-wrap { position: absolute; inset: 0; }
.map-legend {
  position: absolute;
  left: 18px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: #7f95ad;
  letter-spacing: 0.08em;
}
.map-legend .bar {
  width: 110px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(46, 230, 200, 0.15), rgba(46, 230, 200, 0.55), rgba(91, 140, 255, 0.9));
}
.map-stats {
  position: absolute;
  right: 18px;
  top: 14px;
  display: grid;
  gap: 8px;
  text-align: right;
}
.map-stats div { font-size: 10.5px; color: #7f95ad; letter-spacing: 0.08em; }
.map-stats b {
  display: block;
  font-family: var(--font-num);
  font-size: 20px;
  color: #dff3ff;
  letter-spacing: 0.02em;
}

/* 实时订单滚动 */
.order-list { height: 100%; overflow: hidden; position: relative; padding: 4px 14px 0; }
.order-list::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(6, 12, 20, 0.95));
  pointer-events: none;
}
.order-row {
  display: grid;
  grid-template-columns: 58px 1fr auto auto;
  gap: 12px;
  align-items: center;
  height: 34px;
  font-size: 12px;
  border-bottom: 1px dashed rgba(86, 140, 190, 0.12);
  color: #9fb4c9;
  animation: fadeIn 0.5s ease both;
}
.order-row .oid { font-family: var(--font-num); color: #6d8298; font-size: 11px; }
.order-row .city { color: #d5e7f7; }
.order-row .amt { font-family: var(--font-num); color: var(--teal); }
.order-row .st {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(46, 230, 200, 0.3);
  color: var(--teal);
  background: rgba(46, 230, 200, 0.08);
}
.order-row .st.warn { color: var(--amber); border-color: rgba(255, 180, 92, 0.3); background: rgba(255, 180, 92, 0.08); }
.order-row .st.mute { color: #7f95ad; border-color: rgba(127, 149, 173, 0.3); background: rgba(127, 149, 173, 0.08); }

/* 滚动日志 */
.log-list { height: 100%; overflow: hidden; padding: 10px 14px 0; }
.log-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 11.5px;
  line-height: 1.6;
  padding: 5px 0;
  color: #8ea4ba;
  animation: fadeIn 0.5s ease both;
}
.log-row .t { font-family: var(--font-num); color: #7c8b9f; font-size: 10.5px; flex: none; }
.log-row .lvl {
  flex: none;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.log-row .lvl.ok { color: var(--teal); background: rgba(46, 230, 200, 0.12); }
.log-row .lvl.warn { color: var(--amber); background: rgba(255, 180, 92, 0.12); }
.log-row .lvl.info { color: #8fb4ff; background: rgba(91, 140, 255, 0.14); }

/* 底部滚动条 */
.scr-foot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 16px;
  border-top: 1px solid rgba(86, 140, 190, 0.16);
  background: rgba(8, 16, 26, 0.55);
  overflow: hidden;
  font-size: 11.5px;
  color: #7f95ad;
  letter-spacing: 0.06em;
}
.scr-foot .ticker {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  height: 100%;
}
.scr-foot .ticker div {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  white-space: nowrap;
  animation: ticker 34s linear infinite;
}
.scr-foot .ticker b { color: var(--teal); font-weight: 500; }
.scr-foot .foot-right { flex: none; display: flex; align-items: center; gap: 14px; }
.scr-foot .demo-mark {
  color: var(--amber);
  border: 1px dashed rgba(255, 180, 92, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.14em;
}
@keyframes ticker {
  from { transform: translate(100%, -50%); }
  to { transform: translate(-100%, -50%); }
}

/* 悬浮工具条 */
.scr-toolbar {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 20;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.screen-page:hover .scr-toolbar,
.scr-toolbar:focus-within { opacity: 1; }
.scr-toolbar a,
.scr-toolbar button {
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  border: 1px solid rgba(148, 178, 220, 0.25);
  background: rgba(8, 14, 22, 0.85);
  color: #b9c6da;
  font-size: 12px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.scr-toolbar a:hover,
.scr-toolbar button:hover { color: #fff; border-color: rgba(46, 230, 200, 0.5); }
.scr-toolbar svg { width: 14px; height: 14px; }

/* 移动端提示 */
.screen-hint {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 92, 0.35);
  background: rgba(20, 14, 6, 0.92);
  color: var(--amber);
  font-size: 12px;
  text-align: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---------- 大屏响应式：小于 1180px 改为流式单列 ---------- */
@media (max-width: 1180px) {
  .screen-page { overflow: auto; height: auto; min-height: 100vh; }
  .screen-shell { height: auto; display: block; }
  .stage {
    width: 100%;
    height: auto;
    transform: none !important;
    grid-template-rows: auto auto auto;
    padding: 0 12px 12px;
    min-height: 100vh;
  }
  .scr-head { grid-template-columns: 1fr auto; gap: 10px; padding: 14px 4px 12px; }
  .scr-title { grid-column: 1 / -1; grid-row: 2; text-align: left; margin-top: 10px; }
  .scr-title h1 { font-size: 24px; letter-spacing: 0.06em; }
  .scr-title .sub { font-size: 10px; letter-spacing: 0.18em; }
  .scr-title .sub::after { display: none; }
  .scr-clock .divider, .scr-clock .live { display: none; }
  .scr-clock .time { font-size: 18px; }
  .scr-grid { grid-template-columns: 1fr; }
  .scr-col { grid-auto-rows: auto; }
  .scr-col--left, .scr-col--center, .scr-col--right { grid-template-rows: none; }
  .kpi-grid { gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .val { font-size: 26px; }
  .panel { min-height: 260px; }
  .panel--map { min-height: 380px; }
  .panel-body { min-height: 200px; }
  .panel--map .panel-body { min-height: 320px; }
  .scr-foot { margin-top: 12px; height: 40px; }
  .scr-toolbar { opacity: 1; top: auto; bottom: 12px; right: 12px; }
  .screen-hint { display: block; }
  .screen-page { padding-bottom: 56px; }
}
