/* ===== 顺心捷达场地屏 · 深色科技风 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #060b1d;
  --panel: rgba(13, 27, 58, 0.55);
  --panel-border: #1e3a6e;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --red: #ef4444;
  --green: #22c55e;
  --text: #c9dcf5;
  --text-dim: #7d92b8;
  --num: #e8f4ff;
}
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 88, 180, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(20, 60, 140, 0.18), transparent);
}
#app { height: 100vh; display: flex; flex-direction: column; }

/* ===== 顶栏 ===== */
#topbar {
  height: 64px; flex: none; display: flex; align-items: center;
  padding: 0 20px; position: relative;
  background: linear-gradient(180deg, rgba(18, 38, 84, 0.9), rgba(10, 20, 46, 0.6));
  border-bottom: 1px solid var(--panel-border);
}
#topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}
.tb-left { width: 280px; display: flex; align-items: center; gap: 12px; }
.logo { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.6); }
.divider { width: 1px; height: 20px; background: var(--panel-border); }
.crumb { font-size: 13px; color: var(--text-dim); }
.tb-center { flex: 1; text-align: center; }
.tb-center h1 { font-size: 24px; font-weight: 600; color: #eaf3ff; letter-spacing: 4px;
  text-shadow: 0 0 24px rgba(59, 130, 246, 0.8); }
.tb-right { width: 420px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.badge { padding: 2px 10px; border: 1px solid var(--cyan); border-radius: 3px;
  color: var(--cyan); font-size: 12px; }
.manager { font-size: 13px; color: var(--text-dim); }
.clock { font-size: 15px; color: var(--cyan); font-family: "Consolas", monospace; letter-spacing: 1px; }
.admin-link { font-size: 12px; color: var(--text-dim); text-decoration: none;
  border: 1px solid var(--panel-border); padding: 3px 10px; border-radius: 3px; }
.admin-link:hover { color: var(--cyan); border-color: var(--cyan); }

/* ===== 主体布局 ===== */
#main { flex: 1; display: flex; gap: 12px; padding: 12px; min-height: 0; }
.col { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.col-left { width: 21%; }
.col-center { flex: 1; }
.col-right { width: 30%; }

/* ===== 面板 ===== */
.panel {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 6px; position: relative; display: flex; flex-direction: column;
  backdrop-filter: blur(2px); min-height: 0;
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }
.panel-title {
  height: 38px; flex: none; display: flex; align-items: center; gap: 8px;
  padding: 0 12px; font-size: 15px; font-weight: 600; color: #dcebff;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.14), transparent 70%);
  border-bottom: 1px solid rgba(30, 58, 110, 0.6);
}
.pt-icon { width: 4px; height: 14px; background: var(--cyan); border-radius: 1px;
  box-shadow: 0 0 8px var(--cyan); }
.panel-body { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; min-height: 0; }

/* ===== 货量 ===== */
.metric-flow { display: flex; align-items: center; justify-content: space-between; }
.metric { text-align: center; flex: 1; }
.m-label { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.m-value { font-size: 26px; font-weight: 700; color: var(--num);
  font-family: "Consolas", "DIN Alternate", monospace; text-shadow: 0 0 12px rgba(34, 211, 238, 0.35); }
.m-value.accent { color: var(--cyan); }
.m-value.danger { color: var(--red); }
.m-unit { font-size: 11px; color: var(--text-dim); }
.flow-arrow { color: var(--blue); font-size: 12px; opacity: 0.7; }
.metric-wide { margin-top: 14px; display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: 10px; }
.metric-wide .m-value { font-size: 22px; }
.bar-track { height: 6px; background: rgba(30, 58, 110, 0.5); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; width: 30%; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width 0.8s; }

/* ===== 出勤 ===== */
.att-grid { display: flex; justify-content: space-between; }
.att-item { text-align: center; flex: 1; }
.att-item .m-value { font-size: 28px; }
.m-sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.m-sub em { font-style: normal; }
.warn { color: var(--amber); }
.danger { color: var(--red); }

/* ===== 过程监控 ===== */
.proc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.proc-item { text-align: center; }
.ring { width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; position: relative;
  background: conic-gradient(var(--cyan) 0deg, rgba(30,58,110,.4) 0deg); }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #0a1530; }
.ring span { position: relative; font-size: 14px; font-weight: 700; color: var(--num); font-family: Consolas, monospace; }
.big-num { font-size: 34px; font-weight: 700; color: var(--amber); font-family: Consolas, monospace;
  height: 64px; line-height: 64px; text-shadow: 0 0 14px rgba(245, 158, 11, 0.5); }

/* ===== 中央仿真区 ===== */
.panel-scene { flex: 1; }
.scene-legend { margin-left: auto; display: flex; gap: 14px; font-size: 11px; color: var(--text-dim); font-weight: 400; }
.scene-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.dot-normal { background: var(--cyan); }
.dot-late { background: var(--red); }
.dot-arrived { background: var(--amber); }
.dot-departed { background: var(--green); }
.scene-wrap { flex: 1; min-height: 0; padding: 4px; }
#isoScene { width: 100%; height: 100%; }

/* ===== 车辆区块 ===== */
.col-right .panel { flex: 1; overflow: hidden; }
.count-badge {
  min-width: 26px; height: 20px; padding: 0 7px; border-radius: 10px;
  background: rgba(34, 211, 238, 0.18); border: 1px solid var(--cyan);
  color: var(--cyan); font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: Consolas, monospace;
}
.side-tags { margin-left: auto; display: flex; gap: 8px; }
.tag { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 3px; font-weight: 400; }
.tag b { font-family: Consolas, monospace; }
.tag.ok { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.tag.bad { background: rgba(239, 68, 68, 0.15); color: var(--red); }

.mini-flow { flex: none; display: flex; align-items: center; justify-content: space-around;
  padding: 8px 8px 6px; border-bottom: 1px dashed rgba(30, 58, 110, 0.6); }
.mf-item { text-align: center; }
.mf-item b { display: block; font-size: 20px; font-family: Consolas, monospace; color: var(--num); }
.mf-item span { font-size: 11px; color: var(--text-dim); }
.mf-item.warn b { color: var(--amber); }
.mf-item.danger b { color: var(--red); }
.mf-item.ok b { color: var(--green); }
.mf-item.muted b { color: var(--text-dim); }
.mf-arrow { color: var(--blue); font-size: 10px; opacity: 0.6; }

/* ===== 车辆表格 ===== */
.veh-table-wrap { flex: 1; overflow-y: auto; min-height: 0; }
.veh-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.veh-table th { position: sticky; top: 0; background: #0d1b3a; color: var(--text-dim);
  font-weight: 400; padding: 6px 4px; text-align: left; white-space: nowrap; z-index: 1; }
.veh-table td { padding: 5px 4px; border-bottom: 1px solid rgba(30, 58, 110, 0.35);
  color: var(--text); white-space: nowrap; }
.veh-table tr:hover td { background: rgba(34, 211, 238, 0.06); }
.veh-table .st { padding: 1px 6px; border-radius: 3px; font-size: 11px; }
.st-normal { background: rgba(34, 211, 238, 0.15); color: var(--cyan); }
.st-late { background: rgba(239, 68, 68, 0.18); color: var(--red); }
.st-wait { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.st-ok { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.st-muted { background: rgba(125, 146, 184, 0.15); color: var(--text-dim); }
.num { font-family: Consolas, monospace; }

/* 滚动条 */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e3a6e; border-radius: 2px; }

/* ===== 底栏 ===== */
#bottombar { flex: none; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-dim); letter-spacing: 1px;
  border-top: 1px solid rgba(30, 58, 110, 0.4); }

/* ===== SVG 场景动效 ===== */
@keyframes pulseRed { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes pulseSoft { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.truck-late { animation: pulseRed 1.2s infinite; }
.truck-wait { animation: pulseSoft 2s infinite; }
.zone-label { pointer-events: none; }
