/* ============================================================================
   混凝土多目标AI配比设计数字大屏 — HydromatData 视觉风格规范
   匹配目标站点：https://dashboard.hydromatdata.com/
   ============================================================================ */

:root {
  --bg-shell: #020a19;
  --panel-bg: linear-gradient(135deg, rgba(0, 28, 64, 0.56), rgba(0, 21, 47, 0.44));
  --card-bg: linear-gradient(100deg, rgba(5, 22, 44, 0.92), rgba(8, 40, 82, 0.72));
  --plot-bg: #001c41;
  --border-panel: #103564;
  --border-inner: #174278;
  --border-neon: #16a6e4;

  --text-bright: #e7f9ff;
  --text-primary: #d7eaff;
  --text-secondary: #9cc4e4;
  --text-muted: #6f9bc0;

  --cyan: #20c8ff;
  --cyan-bright: #67e7ff;
  --cyan-glow: #80f8ff;
  --amber: #ffb347;
  --violet: #c08cff;
  --emerald: #33d69f;
  --green-live: #36ff77;

  --font-main: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-shell);
  color: var(--text-primary);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
}

/* 背景科技网格与径向光晕 */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 126, 225, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 126, 225, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 45% at 50% 0%, rgba(18, 126, 232, 0.22), transparent 70%),
    radial-gradient(ellipse 55% 45% at 50% 100%, rgba(0, 74, 158, 0.18), transparent 72%);
  z-index: 0;
}

/* 主壳体：严格一屏展示 */
.dashboard-shell {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  gap: 10px;
  padding: 0 14px 12px;
}

/* ===========================
   顶部通栏（梯形科技横幅）
   =========================== */
.topbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(8, 103, 170, 0.65);
  box-shadow: 0 2px 14px rgba(22, 166, 228, 0.14);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 44%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #16a6e4 20%, #80f8ff 50%, #16a6e4 80%, transparent);
  box-shadow: 0 0 8px rgba(103, 231, 255, 0.8);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  color: #c9ecff;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(18, 56, 92, 0.72), rgba(5, 34, 81, 0.92));
  border: 1px solid #2b6899;
  transition: all 0.2s ease;
}

.back-btn:hover {
  color: #ffffff;
  border-color: #79efff;
  box-shadow: inset 0 0 10px rgba(111, 197, 239, 0.45), 0 0 8px rgba(32, 200, 255, 0.35);
}

.datetime-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #14c5fa;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-live);
  box-shadow: 0 0 8px var(--green-live);
}

.clock-time {
  color: #e7f9ff;
  font-weight: 700;
}

.topbar-center {
  display: flex;
  justify-content: center;
}

.title-banner {
  display: flex;
  align-items: center;
  height: 58px;
}

.banner-wing {
  width: 72px;
  height: 46px;
}

.banner-core {
  position: relative;
  padding: 6px 34px 7px;
  text-align: center;
  background: linear-gradient(180deg, rgba(11, 74, 146, 0.62) 0%, rgba(4, 34, 82, 0.88) 100%);
  border-bottom: 2px solid #35caff;
  clip-path: polygon(0 0, 100% 0, 94% 100%, 6% 100%);
  box-shadow: inset 0 0 22px rgba(22, 166, 228, 0.35);
}

.banner-core h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-bright);
  text-shadow: 0 2px 2px #1c5484, 0 0 12px rgba(147, 216, 255, 0.65);
  line-height: 1.15;
}

.banner-sub {
  font-size: 9px;
  letter-spacing: 2.2px;
  color: rgba(128, 248, 255, 0.72);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.slogan {
  font-size: 12px;
  font-weight: 700;
  color: #35caff;
  letter-spacing: 0.8px;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(53, 202, 255, 0.35);
}

.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  color: #b7ecff;
  background: rgba(5, 34, 78, 0.76);
  border: 1px solid #1b5c98;
  white-space: nowrap;
}

@media (max-width: 1420px) {
  .topbar-right .slogan { display: none; }
}

.engine-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #33d69f;
  box-shadow: 0 0 6px #33d69f;
}

.engine-pill.running .engine-dot {
  background: #ffb347;
  box-shadow: 0 0 8px #ffb347;
  animation: blink 0.7s infinite alternate;
}

/* ===========================
   主三栏网格
   =========================== */
.main-grid {
  display: grid;
  grid-template-columns: 325px minmax(0, 1fr) 345px;
  gap: 12px;
  min-height: 0;
}

/* ===========================
   通用大屏面板 (.panel)
   =========================== */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel-bg);
  border: 1px solid var(--border-panel);
  box-shadow: inset 0 0 14px rgba(9, 96, 207, 0.32), 0 0 2px #0c3372;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 1px solid rgba(20, 126, 225, 0.35);
  border-bottom: 1px solid rgba(20, 126, 225, 0.35);
}

.panel::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 22%;
  width: 2px;
  height: 36px;
  background: #47cfff;
  box-shadow: 0 0 8px #47cfff;
  pointer-events: none;
}

.corner-light {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--cyan-glow);
  box-shadow: 0 0 6px 1px rgba(36, 168, 233, 0.85);
  pointer-events: none;
  z-index: 3;
}
.corner-light.tl { top: -1px; left: -1px; }
.corner-light.tr { top: -1px; right: -1px; }
.corner-light.bl { bottom: -1px; left: -1px; }
.corner-light.br { bottom: -1px; right: -1px; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(90deg, rgba(14, 96, 184, 0.45), rgba(6, 38, 86, 0.15) 75%, transparent);
  border-bottom: 1px solid rgba(22, 166, 228, 0.38);
  flex-shrink: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-accent {
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #80f8ff, #147ee1);
  box-shadow: 0 0 8px #20c8ff;
  transform: skewX(-14deg);
}

.panel-title h2 {
  font-size: 15px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 1px;
  color: #e1f4ff;
  text-shadow: 0 0 6px rgba(130, 200, 255, 0.55);
}

/* ===========================
   左栏：目标约束与控制面板
   =========================== */
.control-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: #17648c #051a32;
}

.control-scroll::-webkit-scrollbar,
.rec-list::-webkit-scrollbar {
  width: 5px;
}
.control-scroll::-webkit-scrollbar-track,
.rec-list::-webkit-scrollbar-track {
  background: #051a32;
}
.control-scroll::-webkit-scrollbar-thumb,
.rec-list::-webkit-scrollbar-thumb {
  background: #17648c;
}

.mini-reset-btn {
  padding: 3px 9px;
  font-size: 11px;
  color: #8fd9ff;
  background: rgba(8, 42, 86, 0.72);
  border: 1px solid #265f91;
  cursor: pointer;
  transition: all 0.18s;
}
.mini-reset-btn:hover {
  color: #fff;
  border-color: #79efff;
  background: rgba(16, 84, 146, 0.8);
}

.objective-card {
  background: var(--card-bg);
  border: 1px solid var(--border-inner);
  box-shadow: inset 0 0 8px rgba(6, 77, 190, 0.28);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-radius: 2px;
}

.obj-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.obj-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #eaf7ff;
}

.obj-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid currentColor;
  letter-spacing: 0.4px;
}
.obj-tag.cyan { color: #20c8ff; background: rgba(32, 200, 255, 0.12); }
.obj-tag.amber { color: #ffb347; background: rgba(255, 179, 71, 0.12); }
.obj-tag.blue { color: #67e7ff; background: rgba(103, 231, 255, 0.12); }
.obj-tag.emerald { color: #33d69f; background: rgba(51, 214, 159, 0.12); }

.obj-unit {
  font-size: 11px;
  color: var(--text-muted);
}

.range-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: #021229;
  border: 1px solid #1b4e84;
  padding: 3px 7px;
  gap: 5px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.input-wrap:focus-within {
  border-color: #67e7ff;
  box-shadow: 0 0 7px rgba(32, 200, 255, 0.4);
}
.input-wrap span {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}
.input-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #e7f9ff;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-main);
  font-variant-numeric: tabular-nums;
  text-align: right;
  user-select: text;
}
.input-wrap input::-webkit-inner-spin-button {
  opacity: 0.4;
}

.range-sep {
  color: #4ea7d9;
  font-weight: 700;
  font-size: 12px;
}

/* 快捷按钮组（匹配 HydromatData .map-tabs button） */
.preset-group {
  display: grid;
  gap: 5px;
}
.preset-group.cols-2 { grid-template-columns: repeat(2, 1fr); }
.preset-group.cols-3 { grid-template-columns: repeat(3, 1fr); }
.preset-group.cols-4 { grid-template-columns: repeat(4, 1fr); }

.preset-btn {
  padding: 5px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #b7daf5;
  font-family: var(--font-main);
  background: linear-gradient(180deg, rgba(18, 56, 92, 0.66), rgba(5, 34, 81, 0.92));
  border: 1px solid #346991;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.preset-btn:hover {
  color: #ecfbff;
  border-color: #91c2dd;
  background: linear-gradient(180deg, rgba(27, 72, 109, 0.78), rgba(4, 95, 155, 0.95));
}

.preset-btn.active {
  color: #ffffff;
  font-weight: 700;
  border-color: #91c2dd;
  background: linear-gradient(180deg, rgba(27, 88, 134, 0.85), rgba(4, 110, 178, 0.96));
  box-shadow: inset 0 0 9px rgba(111, 197, 239, 0.6), 0 0 5px rgba(32, 200, 255, 0.45);
}

/* 高级折叠选项 */
.advanced-box {
  background: rgba(3, 20, 44, 0.72);
  border: 1px solid #164478;
}

.advanced-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: linear-gradient(90deg, rgba(12, 54, 102, 0.5), rgba(5, 24, 52, 0.3));
  border: none;
  color: #a9d5f4;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: color 0.18s;
}
.advanced-toggle:hover {
  color: #ffffff;
}

.adv-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.adv-icon {
  color: #35caff;
}
.adv-chevron {
  color: #67e7ff;
  transition: transform 0.2s;
}
.advanced-box.open .adv-chevron {
  transform: rotate(180deg);
}

.advanced-body {
  padding: 8px 9px 10px;
  border-top: 1px solid rgba(22, 114, 196, 0.32);
}

.adv-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.adv-tab {
  padding: 4px 4px;
  font-size: 11px;
  color: #96c2e2;
  background: #041a38;
  border: 1px solid #1b4e82;
  cursor: pointer;
  font-family: var(--font-main);
}
.adv-tab.active {
  color: #fff;
  background: #0c4d8c;
  border-color: #67e7ff;
}

.adv-pane {
  display: none;
  flex-direction: column;
  gap: 5px;
}
.adv-pane.active {
  display: flex;
}

.adv-row {
  display: grid;
  grid-template-columns: 78px 1fr 12px 1fr;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.adv-row.single {
  grid-template-columns: 88px 1fr 42px;
}
.adv-row label {
  color: #a8cee8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adv-row input {
  width: 100%;
  padding: 2px 5px;
  font-size: 11px;
  color: #e7f9ff;
  background: #021126;
  border: 1px solid #194778;
  text-align: right;
  font-family: var(--font-main);
  user-select: text;
}
.adv-row input:focus {
  outline: none;
  border-color: #67e7ff;
}
.adv-row .adv-sep {
  text-align: center;
  color: #538bb5;
}
.adv-row .adv-unit {
  color: #6e9cc0;
  font-size: 10px;
  text-align: right;
}

/* 底部启动按钮与实时遥测 */
.action-footer {
  padding: 9px 10px 10px;
  background: linear-gradient(180deg, rgba(4, 24, 52, 0.65), rgba(2, 16, 38, 0.95));
  border-top: 1px solid rgba(22, 166, 228, 0.35);
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.run-telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tele-item {
  background: rgba(3, 24, 54, 0.8);
  border: 1px solid #154374;
  padding: 4px 6px;
  text-align: center;
}
.tele-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}
.tele-val {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #e7f9ff;
  font-variant-numeric: tabular-nums;
}
.tele-val.cyan { color: var(--cyan-bright); }
.tele-val.emerald { color: var(--emerald); }

.progress-track {
  height: 4px;
  background: rgba(16, 62, 114, 0.55);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #008cff, #20c8ff, #80f8ff);
  box-shadow: 0 0 10px #20c8ff;
  transition: width 0.08s linear;
}

.cta-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffffff;
  font-family: var(--font-main);
  background: linear-gradient(180deg, #1694e8 0%, #055bb5 100%);
  border: 1px solid #74e7ff;
  box-shadow: inset 0 0 14px rgba(128, 248, 255, 0.45), 0 0 16px rgba(22, 166, 228, 0.42);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cta-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #24aeff 0%, #0a6fd4 100%);
  box-shadow: inset 0 0 18px rgba(168, 252, 255, 0.65), 0 0 22px rgba(32, 200, 255, 0.65);
  transform: translateY(-1px);
}

.cta-btn:disabled {
  cursor: wait;
  background: linear-gradient(180deg, #0f68a8 0%, #063d7a 100%);
  border-color: #46a8d6;
}

.cta-glow {
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  transform: skewX(-24deg);
  animation: sweep 3.2s infinite;
}

@keyframes sweep {
  0% { left: -60%; }
  45%, 100% { left: 130%; }
}

@keyframes blink {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

/* ===========================
   中栏：2×2 四图实时寻优区
   =========================== */
.viz-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}

.chart-panel {
  overflow: hidden;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: linear-gradient(90deg, rgba(10, 72, 142, 0.45), rgba(3, 24, 56, 0.2));
  border-bottom: 1px solid rgba(20, 126, 225, 0.34);
  flex-shrink: 0;
  gap: 8px;
}

.chart-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.chart-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 5px;
  color: #67e7ff;
  background: rgba(0, 155, 255, 0.16);
  border: 1px solid rgba(0, 155, 255, 0.65);
  flex-shrink: 0;
}
.chart-badge.emerald {
  color: #33d69f;
  background: rgba(51, 214, 159, 0.14);
  border-color: rgba(51, 214, 159, 0.6);
}

.chart-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: #f2f8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.icon-chip {
  padding: 2px 7px;
  font-size: 10px;
  color: #9ecce8;
  background: rgba(6, 36, 74, 0.8);
  border: 1px solid #266091;
  cursor: pointer;
  font-family: var(--font-main);
}
.icon-chip.active,
.icon-chip:hover {
  color: #ffffff;
  border-color: #67e7ff;
  background: rgba(11, 86, 150, 0.85);
}

.mini-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #a4cde8;
  flex-shrink: 0;
}
.mini-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mini-legend .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.mini-legend .dot.candidate { background: rgba(90, 203, 255, 0.45); border: 1px solid #5acbff; }
.mini-legend .dot.front { background: #67e7ff; box-shadow: 0 0 5px #67e7ff; }
.mini-legend .dot.low { background: #20c8ff; }
.mini-legend .dot.perf { background: #ffb347; }
.mini-legend .dot.bal { background: #c08cff; }

.hv-pill {
  font-size: 11px;
  font-weight: 700;
  color: #33d69f;
  background: rgba(51, 214, 159, 0.12);
  border: 1px solid rgba(51, 214, 159, 0.45);
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  background: radial-gradient(circle at 50% 45%, rgba(0, 44, 96, 0.55), var(--plot-bg) 82%);
}

.canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-hint {
  position: absolute;
  left: 10px;
  bottom: 6px;
  font-size: 10px;
  color: rgba(145, 198, 232, 0.62);
  pointer-events: none;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  min-width: 158px;
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.5;
  color: #e8f8ff;
  background: linear-gradient(135deg, rgba(3, 26, 54, 0.96), rgba(5, 38, 80, 0.94));
  border: 1px solid #4cc8ff;
  box-shadow: 0 4px 16px rgba(0, 10, 28, 0.7), 0 0 10px rgba(32, 200, 255, 0.25);
  border-radius: 3px;
}
.chart-tooltip .tt-title {
  font-weight: 800;
  margin-bottom: 3px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(103, 231, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-tooltip .tt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}
.chart-tooltip .tt-k { color: #90bedf; }
.chart-tooltip .tt-v { font-weight: 700; color: #ffffff; }

/* ===========================
   右栏：三组推荐配比方案
   =========================== */
.rec-sub-badge {
  font-size: 10px;
  color: #79efff;
  background: rgba(20, 126, 225, 0.2);
  border: 1px solid rgba(121, 239, 255, 0.45);
  padding: 2px 7px;
}

.rec-notice {
  margin: 8px 10px 0;
  padding: 6px 9px;
  font-size: 11px;
  color: #ffd79a;
  background: rgba(255, 179, 71, 0.12);
  border: 1px solid rgba(255, 179, 71, 0.45);
}

.rec-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  scrollbar-width: thin;
  scrollbar-color: #17648c #051a32;
}

.rec-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  gap: 10px;
}

.pulse-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #20c8ff;
  box-shadow: 0 0 18px rgba(32, 200, 255, 0.5);
  animation: pulse 1.8s infinite ease-in-out;
}
@keyframes pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.65; }
  50% { transform: scale(1.08); opacity: 1; }
}

.rec-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-inner);
  border-left: 3px solid var(--rec-color, #20c8ff);
  padding: 9px 10px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: cardIn 0.36s ease backwards;
}

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

.rec-card:hover,
.rec-card.active {
  border-color: var(--rec-color, #20c8ff);
  box-shadow: inset 0 0 14px rgba(32, 200, 255, 0.22), 0 0 14px rgba(32, 200, 255, 0.28);
  transform: translateX(-2px);
}

.rec-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.rec-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rec-color);
  box-shadow: 0 0 10px var(--rec-color);
  flex-shrink: 0;
}

.rec-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.rec-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.topsis-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--rec-color);
  background: rgba(2, 16, 38, 0.85);
  border: 1px solid var(--rec-color);
  padding: 2px 7px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 4 个核心性能 KPI */
.rec-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 7px;
}

.kpi-box {
  background: rgba(2, 17, 38, 0.85);
  border: 1px solid rgba(25, 86, 148, 0.55);
  padding: 4px 5px;
  text-align: center;
}

.kpi-box .k-label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
}

.kpi-box .k-val {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #eaf8ff;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.kpi-box .k-unit {
  font-size: 9px;
  font-weight: 400;
  color: #79a9cc;
  margin-left: 1px;
}

/* 单方材料配比网格 (8 种材料 kg/m³) */
.mix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(53, 140, 212, 0.3);
}

.mix-cell {
  background: rgba(4, 24, 52, 0.65);
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mix-cell .m-name {
  font-size: 9px;
  color: #7eaad0;
}
.mix-cell .m-val {
  font-size: 11px;
  font-weight: 700;
  color: #d9f1ff;
  font-variant-numeric: tabular-nums;
}

.mix-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: #84b4d8;
  font-variant-numeric: tabular-nums;
}

.rec-footer {
  padding: 8px 10px;
  border-top: 1px solid rgba(22, 166, 228, 0.3);
  background: rgba(2, 16, 38, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.footer-tip {
  font-size: 10px;
  color: #79aad0;
  line-height: 1.3;
}

.export-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #d9f6ff;
  font-family: var(--font-main);
  background: linear-gradient(180deg, rgba(18, 68, 114, 0.85), rgba(5, 40, 88, 0.95));
  border: 1px solid #3c8cc2;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}
.export-btn:hover:not(:disabled) {
  border-color: #79efff;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(32, 200, 255, 0.45);
}
.export-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 响应式：中小屏自动适配 */
@media (max-width: 1220px) {
  html, body { overflow: auto; }
  .dashboard-shell { height: auto; min-height: 100vh; }
  .main-grid {
    grid-template-columns: 1fr;
  }
  .viz-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 340px 340px;
  }
  .topbar-right .slogan { display: none; }
}

@media (max-width: 780px) {
  .viz-stage {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 300px);
  }
  .banner-wing { display: none; }
  .banner-core h1 { font-size: 18px; }
}
