/*
  CAIJAI Screen Components
  大屏专用组件。和 caijai-components.css 可并用，也可单独引用。
*/

:root {
  --screen-bg: #030711;
  --screen-panel: rgba(8, 22, 50, 0.78);
  --screen-panel-strong: rgba(12, 33, 74, 0.86);
  --screen-line: rgba(76, 146, 244, 0.42);
  --screen-text: #e7f1ff;
  --screen-muted: #92a9ca;
  --screen-blue: #55b8ff;
  --screen-cyan: #19e6ff;
  --screen-green: #00e676;
  --screen-yellow: #ffd34d;
  --screen-red: #ff315f;
  --screen-radius: 6px;
  --screen-font: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.screen-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0, rgba(56, 139, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(6, 18, 42, 0.96), rgba(3, 8, 18, 0.98));
  color: var(--screen-text);
  font-family: var(--screen-font);
  font-variant-numeric: tabular-nums;
}

.screen-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(48, 120, 220, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(48, 120, 220, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.screen-header {
  position: absolute;
  inset: 0 0 auto;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background:
    radial-gradient(ellipse at 50% 0, rgba(79, 160, 255, 0.32), transparent 58%),
    linear-gradient(180deg, rgba(11, 42, 95, 0.66), rgba(5, 18, 44, 0.08));
  border-bottom: 1px solid rgba(80, 160, 255, 0.22);
}

.screen-title {
  color: #f8fbff;
  font-size: clamp(30px, 2.25vw, 48px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.12em;
  text-shadow: 0 0 14px rgba(77, 172, 255, 0.66);
}

.screen-header-left,
.screen-header-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.screen-header-left { left: 22px; }
.screen-header-right { right: 22px; }

.screen-chip,
.screen-time,
.screen-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--screen-line);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(21, 54, 114, 0.86), rgba(11, 31, 70, 0.82));
  color: var(--screen-text);
  box-shadow: inset 0 0 14px rgba(70, 150, 255, 0.12);
  padding: 0 14px;
  font-size: 15px;
  white-space: nowrap;
}

.screen-button {
  cursor: pointer;
  font-family: inherit;
}

.screen-body {
  position: absolute;
  inset: 94px 22px 24px;
  display: grid;
  gap: 12px;
  min-height: 0;
}

.screen-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--screen-line);
  border-radius: var(--screen-radius);
  background: linear-gradient(145deg, var(--screen-panel-strong), var(--screen-panel));
  box-shadow: inset 0 0 24px rgba(38, 110, 210, 0.1);
}

.screen-panel-head {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(76, 146, 244, 0.18);
}

.screen-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f5f9ff;
  font-size: 18px;
  font-weight: 800;
}

.screen-panel-body {
  height: calc(100% - 44px);
  min-height: 0;
  padding: 14px 16px;
  overflow: auto;
}

.screen-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.screen-kpi {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(77, 158, 255, 0.7);
  border-radius: var(--screen-radius);
  background: linear-gradient(180deg, rgba(20, 62, 122, 0.84), rgba(11, 31, 70, 0.72));
  box-shadow: 0 0 0 1px rgba(77, 158, 255, 0.24), inset 0 0 22px rgba(77, 158, 255, 0.1);
}

.screen-kpi-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(89, 164, 255, 0.42);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(76, 175, 255, 0.18), transparent 58%),
    linear-gradient(145deg, rgba(25, 68, 130, 0.88), rgba(8, 22, 52, 0.92));
  color: var(--screen-blue);
}

.screen-kpi-icon svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
}

.screen-kpi-label {
  color: #bfd0eb;
  font-size: 15px;
}

.screen-kpi-value {
  margin-top: 4px;
  color: var(--screen-blue);
  font-size: clamp(30px, 2.1vw, 42px);
  font-weight: 900;
  line-height: 1;
}

.screen-equipment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.screen-equipment-card {
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px 14px;
  overflow: hidden;
  border: 1px solid rgba(64, 125, 210, 0.38);
  border-radius: var(--screen-radius);
  background: linear-gradient(145deg, rgba(16, 24, 48, 0.96), rgba(9, 15, 32, 0.96));
}

.screen-equipment-card::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, rgba(77, 158, 255, 0.92), rgba(77, 158, 255, 0.16));
}

.screen-equipment-card.running::before { background: linear-gradient(90deg, rgba(0, 230, 118, 0.95), rgba(0, 230, 118, 0.18)); }
.screen-equipment-card.alert::before { background: linear-gradient(90deg, rgba(255, 49, 95, 0.95), rgba(255, 49, 95, 0.16)); }

.screen-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  color: rgba(178, 201, 235, 0.72);
  text-align: center;
  font-size: 13px;
}
