/* ========================================
   安伴智慧养老数据大屏 · 公共样式 & 设计 Token
   适用于 5 个大屏页面（dashboard-1 ~ dashboard-5）
   ======================================== */

/* ---- 设计 Token ---- */
:root {
  --bg-deep:        #06121f;      /* 主背景深色 */
  --bg-panel:       rgba(13, 32, 60, 0.6);   /* 面板底色 */
  --bg-panel-2:     rgba(18, 44, 78, 0.55);
  --border-cyan:    rgba(64, 200, 255, 0.35);
  --border-cyan-2:  rgba(64, 200, 255, 0.15);
  --cyan:           #40c8ff;      /* 主色（青色） */
  --cyan-2:         #4af2ff;      /* 亮青 */
  --blue:           #2b6fff;      /* 辅助蓝 */
  --blue-deep:      #0e2a52;
  --green:          #00e09e;      /* 数据绿色（正常） */
  --yellow:         #ffc144;      /* 黄色（提醒） */
  --orange:         #ff7a45;      /* 橙色（中等告警） */
  --red:            #ff5160;      /* 红色（高危告警） */
  --purple:         #a566ff;      /* 紫色（特殊） */
  --text-main:      #d6e7ff;
  --text-sub:       #7c9bbf;
  --text-fade:      #4d6989;
  --grid-line:      rgba(64, 200, 255, 0.08);
  --shadow-glow:    0 0 24px rgba(64, 200, 255, 0.15);
  --font-num:       "DIN Alternate", "Bebas Neue", "Orbitron", "Helvetica Neue", sans-serif;
  --font-cn:        "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
}

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  font-family: var(--font-cn);
  background: var(--bg-deep);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ---- 通用大屏容器 ---- */
.dashboard {
  position: relative;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(43, 111, 255, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(64, 200, 255, 0.12), transparent 50%),
    linear-gradient(180deg, #04101e 0%, #061a30 50%, #04101e 100%);
  overflow: hidden;
}
.dashboard::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ---- 顶部 Header ---- */
.dash-header {
  position: relative; z-index: 10;
  height: 78px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background:
    linear-gradient(180deg, rgba(11, 32, 60, 0.9), rgba(11, 32, 60, 0));
  border-bottom: 1px solid var(--border-cyan-2);
}
.dash-header__title-wrap {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
}
.dash-header__title {
  font-size: 30px; font-weight: 700; letter-spacing: 6px;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(64, 200, 255, 0.6), 0 0 24px rgba(64, 200, 255, 0.3);
  position: relative; padding: 0 36px;
}
.dash-header__title::before, .dash-header__title::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  width: 80px; height: 18px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 18'><path d='M0 9 L60 9 M70 4 L80 9 L70 14' stroke='%2340c8ff' stroke-width='1.5' fill='none'/></svg>") no-repeat center;
}
.dash-header__title::before { right: 100%; transform: translateY(-50%) scaleX(-1); }
.dash-header__title::after  { left: 100%; }
.dash-header__sub {
  margin-top: 4px;
  font-size: 12px; color: var(--text-sub); letter-spacing: 4px;
}
.dash-header__left, .dash-header__right {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--text-sub);
}
.dash-header__pill {
  padding: 4px 10px; border: 1px solid var(--border-cyan-2); border-radius: 3px;
  background: rgba(64, 200, 255, 0.08);
  color: var(--cyan); font-size: 12px;
}
.dash-header__time {
  font-family: var(--font-num); font-size: 22px; color: #fff; letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(64, 200, 255, 0.6);
}
.dash-header__weather { display: flex; align-items: center; gap: 6px; }
.dash-header__icon { font-size: 16px; }

/* ---- 主内容区三列布局 ---- */
.dash-body {
  position: relative; z-index: 5;
  display: grid;
  grid-template-columns: 360px 1fr 360px;
  gap: 16px;
  padding: 16px 20px;
  height: calc(100vh - 78px);
}
.dash-body--two { grid-template-columns: 1fr 1fr; }
.dash-body--full { grid-template-columns: 1fr; }

/* ---- 面板（卡片） ---- */
.panel {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-cyan-2);
  border-radius: 4px;
  backdrop-filter: blur(4px);
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.panel::before, .panel::after,
.panel > .panel-corner-bl, .panel > .panel-corner-br {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--cyan);
  pointer-events: none;
}
.panel::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.panel::after  { top: 0; right: 0; border-left: none; border-bottom: none; }
.panel > .panel-corner-bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.panel > .panel-corner-br { bottom: 0; right: 0; border-left: none; border-top: none; }

.panel__title {
  display: flex; align-items: center; justify-content: space-between;
  height: 36px; padding: 0 14px;
  background: linear-gradient(90deg, rgba(64, 200, 255, 0.18), rgba(64, 200, 255, 0.02));
  border-bottom: 1px solid var(--border-cyan-2);
  font-size: 14px; color: var(--text-main); font-weight: 600;
  letter-spacing: 1px;
}
.panel__title::before {
  content: ""; display: inline-block;
  width: 4px; height: 14px; margin-right: 8px;
  background: linear-gradient(180deg, var(--cyan-2), var(--blue));
  box-shadow: 0 0 6px var(--cyan);
}
.panel__title-tag {
  font-size: 11px; color: var(--text-sub); letter-spacing: 0;
  padding: 2px 6px; border: 1px solid var(--border-cyan-2); border-radius: 2px;
  background: rgba(64, 200, 255, 0.06);
}
.panel__body { flex: 1; padding: 12px; overflow: hidden; min-height: 0; }

/* ---- KPI 数字大字号 ---- */
.kpi-num {
  font-family: var(--font-num);
  font-weight: 700; line-height: 1;
  background: linear-gradient(180deg, #ffffff, var(--cyan-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 18px rgba(64, 200, 255, 0.4);
  letter-spacing: 1px;
}
.kpi-unit { font-family: var(--font-cn); font-size: 12px; color: var(--text-sub); margin-left: 4px; }
.kpi-row { display: flex; align-items: baseline; gap: 8px; }
.kpi-label { font-size: 12px; color: var(--text-sub); letter-spacing: 1px; }

/* ---- 标签 tag ---- */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 2px;
  font-size: 12px; letter-spacing: 0.5px;
}
.tag--green  { background: rgba(0, 224, 158, 0.15); color: var(--green); border: 1px solid rgba(0, 224, 158, 0.35); }
.tag--yellow { background: rgba(255, 193, 68, 0.15); color: var(--yellow); border: 1px solid rgba(255, 193, 68, 0.35); }
.tag--red    { background: rgba(255, 81, 96, 0.15);  color: var(--red);   border: 1px solid rgba(255, 81, 96, 0.35); }
.tag--cyan   { background: rgba(64, 200, 255, 0.15); color: var(--cyan);  border: 1px solid rgba(64, 200, 255, 0.35); }
.tag--purple { background: rgba(165, 102, 255, 0.15); color: var(--purple); border: 1px solid rgba(165, 102, 255, 0.35); }
.tag--orange { background: rgba(255, 122, 69, 0.15); color: var(--orange); border: 1px solid rgba(255, 122, 69, 0.35); }

/* ---- 状态圆点 ---- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot--green  { background: var(--green);  box-shadow: 0 0 6px var(--green); }
.dot--yellow { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.dot--red    { background: var(--red);    box-shadow: 0 0 6px var(--red); animation: dot-pulse 1.4s infinite; }
.dot--cyan   { background: var(--cyan);   box-shadow: 0 0 6px var(--cyan); }

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

/* ---- 滚动列表（自动滚动） ---- */
.scroll-list { height: 100%; overflow: hidden; }
.scroll-list__viewport { animation: scroll-vertical 28s linear infinite; }
.scroll-list:hover .scroll-list__viewport { animation-play-state: paused; }

@keyframes scroll-vertical {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* ---- 进度条 ---- */
.bar {
  position: relative; height: 8px; background: rgba(64, 200, 255, 0.08);
  border-radius: 2px; overflow: hidden;
}
.bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan-2));
  box-shadow: 0 0 8px rgba(64, 200, 255, 0.6);
  border-radius: 2px;
  width: 0; transition: width 1.4s ease;
}

/* ---- 表格 ---- */
.dt {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.dt thead th {
  background: rgba(64, 200, 255, 0.12);
  color: var(--cyan-2);
  font-weight: 500; letter-spacing: 0.5px;
  padding: 6px 8px; text-align: left;
  border-bottom: 1px solid var(--border-cyan-2);
}
.dt tbody td {
  padding: 6px 8px;
  border-bottom: 1px dashed rgba(64, 200, 255, 0.08);
  color: var(--text-main);
}
.dt tbody tr:hover td { background: rgba(64, 200, 255, 0.05); }

/* ---- 中央数字面板 ---- */
.center-stat {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.center-stat__num {
  font-family: var(--font-num);
  font-size: 56px; font-weight: 700;
  color: #fff;
  text-shadow: 0 0 16px rgba(64, 200, 255, 0.5);
  letter-spacing: 1px;
  line-height: 1;
}
.center-stat__label { margin-top: 8px; font-size: 13px; color: var(--text-sub); letter-spacing: 2px; }

/* ---- 工具：闪烁扫描线 ---- */
.scanline {
  position: absolute; left: 0; right: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 12px var(--cyan);
  animation: scanline 4s linear infinite;
}
@keyframes scanline {
  0%   { top: 0%; opacity: 0.2; }
  50%  { opacity: 1; }
  100% { top: 100%; opacity: 0.2; }
}

/* ---- 装饰：四角星 ---- */
.deco-hex {
  position: absolute; pointer-events: none; opacity: 0.6;
}

/* ---- 文字发光 ---- */
.glow { text-shadow: 0 0 6px var(--cyan), 0 0 12px rgba(64, 200, 255, 0.4); }

/* ---- 翻页数字 ---- */
.num-flip { font-family: var(--font-num); font-feature-settings: "tnum"; }

/* ---- 滚动条美化（隐藏但保留可滚动） ---- */
.thin-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.thin-scroll::-webkit-scrollbar-thumb { background: var(--border-cyan); border-radius: 2px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---- 全屏切换按钮 ---- */
.fs-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 999;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(64, 200, 255, 0.15); color: var(--cyan);
  border: 1px solid var(--border-cyan); font-size: 12px;
  cursor: pointer; backdrop-filter: blur(4px);
  transition: all 0.2s;
}
.fs-btn:hover { background: rgba(64, 200, 255, 0.3); }

/* ---- 工具：flex 间距 ---- */
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { justify-content: center; align-items: center; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; }
.text-sub { color: var(--text-sub); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-orange { color: var(--orange); }
.text-purple { color: var(--purple); }
