/* 算数·弱电 经营大屏：1920×1080 一屏铺满，无长条、无留白 */
:root {
  --bg: #071a1c;
  --bg2: #0b2629;
  --panel: rgba(16, 48, 52, .72);
  --line: rgba(94, 234, 212, .16);
  --text: #e6fffb;
  --muted: #7fb3ad;
  --teal: #2dd4bf;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --violet: #a78bfa;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(45, 212, 191, .16), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(34, 211, 238, .12), transparent 55%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg2) 60%, #06181a 100%);
  overflow: hidden;
}
.board {
  height: 100dvh;
  display: grid;
  grid-template-rows: 62px 132px minmax(0, 1fr) 26px;
  gap: 12px;
  padding: 14px 18px 10px;
}
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(145deg, #2dd4bf, #0d9488);
  box-shadow: 0 0 24px rgba(45, 212, 191, .35);
}
.brand h1 { margin: 0; font-size: 22px; letter-spacing: .06em; font-weight: 700; white-space: nowrap; }
.brand p { margin: 3px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.head-right { display: flex; align-items: center; gap: 10px; }
.clock { font-variant-numeric: tabular-nums; text-align: right; line-height: 1.25; }
.clock b { font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.clock span { display: block; font-size: 12px; color: var(--muted); }
.ghost {
  height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04); color: var(--text); font-size: 13px; cursor: pointer;
}
.ghost:hover { background: rgba(45, 212, 191, .14); border-color: rgba(45, 212, 191, .5); }
.ghost.on { background: rgba(45, 212, 191, .2); border-color: rgba(45, 212, 191, .7); }

.kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.kpi {
  position: relative; overflow: hidden; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: linear-gradient(150deg, rgba(20, 62, 66, .85), rgba(9, 34, 37, .9));
  cursor: pointer; transition: transform .15s, border-color .15s;
}
.kpi:hover { transform: translateY(-2px); border-color: rgba(45, 212, 191, .6); }
.kpi::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), transparent);
  opacity: .8;
}
.kpi .k-label { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-value { margin-top: 8px; font-size: 25px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .k-value small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.kpi .k-hint { margin-top: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.pos .k-value { color: var(--green); }
.kpi.neg .k-value { color: var(--amber); }
.kpi.info .k-value { color: var(--cyan); }
.kpi.violet .k-value { color: var(--violet); }

.charts {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.panel {
  min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); backdrop-filter: blur(2px);
  padding: 10px 14px 12px;
}
.panel header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.panel h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .03em; }
.panel .sub { font-size: 11px; color: var(--muted); white-space: nowrap; }
.panel-body { flex: 1; min-height: 0; margin-top: 8px; }

.bars { display: flex; flex-direction: column; gap: 7px; height: 100%; justify-content: center; }
.bar-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) 92px; align-items: center; gap: 8px; cursor: pointer; }
.bar-row:hover .bar-label { color: var(--teal); }
.bar-label { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0d9488, var(--teal)); }
.bar-fill.amber { background: linear-gradient(90deg, #b45309, var(--amber)); }
.bar-fill.violet { background: linear-gradient(90deg, #6d28d9, var(--violet)); }
.bar-fill.cyan { background: linear-gradient(90deg, #0e7490, var(--cyan)); }
.bar-value { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: #cdeee9; white-space: nowrap; }
.bar-value em { font-style: normal; color: var(--muted); font-size: 11px; margin-left: 4px; }

.trend-wrap { height: calc(100% - 22px); display: flex; align-items: flex-end; }
.trend-cols { flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 6px; min-height: 0; }
.tc { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.tc:hover .tc-bars i { filter: brightness(1.3); }
.tc-bars { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.tc-bars i { width: 42%; max-width: 16px; border-radius: 3px 3px 0 0; display: block; }
.tc-bars .c1 { background: linear-gradient(180deg, var(--teal), rgba(45, 212, 191, .25)); }
.tc-bars .c2 { background: linear-gradient(180deg, var(--amber), rgba(251, 191, 36, .25)); }
.tc em { font-style: normal; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.trend-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding-top: 4px; }
.panel-legend { display: flex; justify-content: flex-end; margin-top: 4px; }
.trend { width: 100%; height: 100%; display: block; }
.trend text { fill: var(--muted); font-size: 10px; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.legend .c1 i { background: var(--teal); }
.legend .c2 i { background: var(--amber); }

.empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; }

.board-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.board-foot a { color: var(--muted); text-decoration: none; }
.board-foot a:hover { color: var(--teal); }

.login-mask {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center;
  background: rgba(4, 18, 20, .88); text-align: center;
}
.login-mask .box { border: 1px solid var(--line); border-radius: 16px; padding: 30px 34px; background: var(--panel); }
.login-mask h2 { margin: 0 0 8px; }
.login-mask p { color: var(--muted); margin: 0 0 18px; }
.login-mask a { display: inline-block; padding: 10px 20px; border-radius: 10px; background: linear-gradient(145deg, #2dd4bf, #0d9488); color: #04201e; font-weight: 700; text-decoration: none; }

@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, 56px); }
  .board { grid-template-rows: 62px 128px minmax(0, 1fr) 26px; }
  .board { overflow: auto; height: auto; min-height: 100dvh; }
  .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, 240px); }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts { grid-template-columns: 1fr; grid-template-rows: repeat(6, 220px); }
  .brand h1 { font-size: 17px; }
}
