/* =========================================================================
   统计大屏专用样式：深蓝底 + 白/青色高亮的科技风，铺满视口并随窗口自适应
   ========================================================================= */

body.screen {
  min-width: 1280px;
  color: #e6f0ff;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(40, 120, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 40% at 100% 100%, rgba(34, 184, 240, 0.12), transparent 70%),
    linear-gradient(180deg, #041533 0%, #06204a 100%);
  background-attachment: fixed;
}
body.screen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(80, 150, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 150, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.25));
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.25));
}
body.screen .app-header {
  background: rgba(4, 21, 51, 0.72);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(79, 157, 255, 0.25);
  box-shadow: none;
}

.screen-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - var(--header-h));
  min-height: 700px;
  padding: 12px 20px 18px;
}

/* -------------------------------------------------------------- 标题栏 */
.screen-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 54px;
  flex: none;
}
.screen-head h1 {
  position: relative;
  margin: 0;
  padding: 0 70px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 0 18px rgba(88, 170, 255, 0.75);
  white-space: nowrap;
}
.screen-head h1::before,
.screen-head h1::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #5fd3ff);
}
.screen-head h1::before { left: 0; }
.screen-head h1::after { right: 0; transform: scaleX(-1); }
.screen-head .head-left,
.screen-head .head-right { display: flex; align-items: center; gap: 14px; color: #9fc3ff; font-size: 13px; }
.screen-head .head-right { justify-content: flex-end; }
.clock { font-family: var(--mono); font-size: 18px; color: #dbeaff; letter-spacing: 1px; }
.btn-screen {
  height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(95, 211, 255, 0.45);
  border-radius: 4px;
  background: rgba(31, 111, 255, 0.15);
  color: #cfe6ff;
  cursor: pointer;
  transition: all .2s;
}
.btn-screen:hover { background: rgba(31, 111, 255, 0.35); color: #fff; border-color: #5fd3ff; }

#page-banner { margin: 0; flex: none; }

/* -------------------------------------------------------------- 指标卡 */
.kpi-screen {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  flex: none;
}
.kpi-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 104px;
  padding: 0 22px;
  border: 1px solid rgba(79, 157, 255, 0.3);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(31, 111, 255, 0.22), rgba(6, 32, 74, 0.55));
  overflow: hidden;
}
.kpi-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #5fd3ff, transparent);
  opacity: 0.8;
}
.kpi-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(95, 211, 255, 0.5);
  background: radial-gradient(circle, rgba(95, 211, 255, 0.28), rgba(31, 111, 255, 0.05) 70%);
  box-shadow: 0 0 18px rgba(95, 211, 255, 0.25) inset;
}
.kpi-icon svg { width: 28px; height: 28px; stroke: #8fe3ff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kpi-main { min-width: 0; }
.kpi-name { color: #9fc3ff; font-size: 14px; letter-spacing: 1px; }
.kpi-num {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 0 12px rgba(95, 211, 255, 0.55);
  white-space: nowrap;
}
.kpi-num small { margin-left: 4px; font-family: var(--font); font-size: 14px; font-weight: normal; color: #9fc3ff; text-shadow: none; }
.kpi-extra { color: #7fa6dc; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-extra b { color: #5fd3ff; font-weight: 600; }

/* -------------------------------------------------------------- 面板 */
.screen-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid rgba(79, 157, 255, 0.28);
  background: linear-gradient(180deg, rgba(10, 44, 102, 0.55), rgba(6, 30, 70, 0.45));
  box-shadow: 0 0 24px rgba(31, 111, 255, 0.08) inset;
}
/* 四角装饰 */
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #5fd3ff;
  pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 16px;
  flex: none;
  background: linear-gradient(90deg, rgba(31, 111, 255, 0.35), transparent 70%);
  border-bottom: 1px solid rgba(79, 157, 255, 0.2);
}
.panel-head h2 {
  position: relative;
  margin: 0;
  padding-left: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}
.panel-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  transform: translateY(-50%) rotate(45deg);
  background: #5fd3ff;
  box-shadow: 0 0 8px #5fd3ff;
}
.panel-head span { color: #7fa6dc; font-size: 12px; }
.panel-body { position: relative; flex: 1; min-height: 0; padding: 6px 10px; }
.panel-body .chart { width: 100%; height: 100%; min-height: 0; }
.span-2 { grid-column: span 2; }

/* 状态/加载在深色背景下的样式 */
body.screen .loading-layer { background: rgba(4, 21, 51, 0.55); color: #8fe3ff; }
body.screen .spinner { border-color: rgba(95, 211, 255, 0.2); border-top-color: #5fd3ff; }
body.screen .state-box { color: #7fa6dc; min-height: 0; }
body.screen .state-icon { background: rgba(31, 111, 255, 0.2); color: #8fe3ff; }
body.screen .state-error .state-icon { background: rgba(229, 72, 77, 0.2); color: #ff8a8e; }
body.screen .state-title { color: #dbeaff; }
body.screen .banner { background: rgba(229, 72, 77, 0.15); border-color: rgba(255, 138, 142, 0.5); color: #ffb3b6; }
body.screen .banner-hint { color: #ffc9cb; }
body.screen .banner .btn { background: transparent; color: #ffdfe0; border-color: rgba(255, 179, 182, 0.6); }

/* -------------------------------------------------------------- 最新动态 */
.latest-list { list-style: none; margin: 0; padding: 4px 6px; height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(95, 211, 255, 0.35) transparent; }
.latest-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px dashed rgba(79, 157, 255, 0.2);
  transition: background .2s;
}
.latest-list li:hover { background: rgba(31, 111, 255, 0.15); }
.latest-list a { color: #e6f0ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.latest-list a:hover { color: #5fd3ff; }
.latest-list .meta { grid-column: 1; color: #7fa6dc; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-list .st { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.latest-list .tag { background: transparent; }
.latest-list .tag-none { color: #a9bbd8; border-color: rgba(169, 187, 216, 0.45); }
.latest-list .tag-talk { color: #ffc46b; border-color: rgba(255, 196, 107, 0.5); }
.latest-list .tag-done { color: #4fe3b0; border-color: rgba(79, 227, 176, 0.5); }

/* -------------------------------------------------------------- 自适应 */
@media (max-width: 1500px), (max-height: 820px) {
  .screen-wrap { gap: 10px; padding: 8px 14px 12px; min-height: 640px; }
  .screen-head { height: 44px; }
  .screen-head h1 { font-size: 22px; letter-spacing: 4px; padding: 0 56px; }
  .screen-head h1::before, .screen-head h1::after { width: 44px; }
  .clock { font-size: 15px; }
  .kpi-card { height: 84px; padding: 0 16px; gap: 12px; }
  .kpi-icon { width: 46px; height: 46px; }
  .kpi-icon svg { width: 22px; height: 22px; }
  .kpi-num { font-size: 28px; }
  .screen-grid { gap: 10px; }
  .panel-head { height: 34px; }
  .panel-head h2 { font-size: 14px; }
}
