/* 生产实时数据大屏：深色指挥舱，独立于业务页皮肤 */
body.screen-mode .sidebar,
body.screen-mode .topbar { display: none !important; }
body.screen-mode .app-frame { height: 100vh; }
body.screen-mode .main-area { height: 100vh; }
body.screen-mode .page-container { padding: 0; overflow: hidden; height: 100vh; background: #04101c; }

.sc {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: #d7e9ff;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(28, 110, 190, .35), transparent 60%),
    linear-gradient(180deg, #07182c 0%, #04101c 100%);
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.sc::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(90, 170, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 170, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
}
.sc-scan {
  position: absolute; left: 0; right: 0; height: 90px; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(70, 180, 255, .09), transparent);
  animation: sc-scan 9s linear infinite;
}
@keyframes sc-scan { from { top: -90px; } to { top: 100%; } }

.sc-head {
  position: relative; z-index: 3;
  height: 58px; flex-shrink: 0;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 0 16px;
  background: linear-gradient(180deg, rgba(10, 40, 78, .65), rgba(6, 20, 40, .2));
  border-bottom: 1px solid rgba(70, 160, 255, .28);
}
.sc-live { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sc-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3dffb0;
  box-shadow: 0 0 8px #3dffb0; animation: sc-pulse 1.6s ease-in-out infinite;
}
@keyframes sc-pulse { 50% { opacity: .35; transform: scale(.8); } }
.sc-live-text { font-size: 13px; color: #9fd0ff; letter-spacing: 1px; white-space: nowrap; }
.sc-count { color: #7ec8ff; font-variant-numeric: tabular-nums; }
.sc-bar { width: 88px; height: 4px; border-radius: 2px; background: rgba(80, 150, 220, .25); overflow: hidden; }
.sc-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #1d7dff, #3dffb0); }

.sc-title-wrap { display: flex; align-items: center; gap: 14px; }
.sc-title-wrap h1 {
  font-size: 22px; font-weight: 700; letter-spacing: 4px; color: #f3f9ff;
  text-shadow: 0 0 18px rgba(80, 170, 255, .55);
}
.sc-orn { width: 90px; height: 1px; position: relative; background: linear-gradient(90deg, transparent, #4eb6ff); }
.sc-orn.r { background: linear-gradient(90deg, #4eb6ff, transparent); }
.sc-orn::after {
  content: ""; position: absolute; top: -3px; width: 7px; height: 7px;
  border: 1px solid #7ad0ff; transform: rotate(45deg); background: #0a2a4e;
}
.sc-orn::after { right: -2px; }
.sc-orn.r::after { left: -2px; right: auto; }

.sc-head-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.sc-clock { font-size: 14px; color: #d5ebff; letter-spacing: 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-btn {
  height: 28px; padding: 0 12px; border-radius: 3px; cursor: pointer;
  color: #cfe7ff; background: rgba(20, 70, 130, .35);
  border: 1px solid rgba(110, 190, 255, .55); font-size: 12px; letter-spacing: 1px;
}
.sc-btn:hover { background: rgba(40, 120, 200, .45); color: #fff; }

.sc-body {
  position: relative; z-index: 3; flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1.32fr) minmax(0, 1.12fr); gap: 10px;
  padding: 10px 12px 12px;
}
.sc-col { min-height: 0; min-width: 0; display: grid; gap: 10px; }
.sc-col.l { grid-template-rows: 1.05fr .92fr 1.08fr; }
.sc-col.m { grid-template-rows: auto minmax(0, 1fr); }
.sc-col.r { grid-template-rows: 1.05fr .82fr 1.12fr; }

.sc-panel {
  position: relative; min-height: 0;
  display: flex; flex-direction: column;
  padding: 8px 10px 8px;
  background-color: rgba(6, 28, 56, .78);
  background-image:
    linear-gradient(#49c8ff, #49c8ff), linear-gradient(#49c8ff, #49c8ff),
    linear-gradient(#49c8ff, #49c8ff), linear-gradient(#49c8ff, #49c8ff),
    linear-gradient(#49c8ff, #49c8ff), linear-gradient(#49c8ff, #49c8ff),
    linear-gradient(#49c8ff, #49c8ff), linear-gradient(#49c8ff, #49c8ff);
  background-repeat: no-repeat;
  background-size: 12px 2px, 2px 12px, 12px 2px, 2px 12px, 12px 2px, 2px 12px, 12px 2px, 2px 12px;
  background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
  border: 1px solid rgba(70, 160, 255, .28);
  box-shadow: inset 0 0 30px rgba(20, 80, 160, .18);
  overflow: hidden;
}
.sc-panel.flash { animation: sc-flash .7s ease; }
@keyframes sc-flash { 0% { box-shadow: inset 0 0 0 rgba(80, 180, 255, 0); } 30% { box-shadow: inset 0 0 28px rgba(80, 200, 255, .35); } 100% { box-shadow: inset 0 0 30px rgba(20, 80, 160, .18); } }
.sc-pt {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-size: 14px; letter-spacing: 1px; color: #e7f3ff; margin-bottom: 6px;
}
.sc-pt::before {
  content: ""; width: 3px; height: 14px;
  background: linear-gradient(#8ad7ff, #1d74ff); box-shadow: 0 0 8px #3aa6ff;
}
.sc-chart { flex: 1; min-height: 0; }
.sc-chart svg { width: 100%; height: 100%; display: block; }
.sc-legend { display: flex; gap: 14px; font-size: 12px; color: #9ec4e6; margin-bottom: 2px; }
.sc-legend b { display: inline-block; width: 16px; height: 2px; margin-right: 5px; vertical-align: middle; }
.sc-legend .g { background: #3dffb0; box-shadow: 0 0 6px #3dffb0; }
.sc-legend .d { background: repeating-linear-gradient(90deg, #ff5d6c 0 4px, transparent 4px 7px); height: 2px; }

.sc-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 74px; gap: 8px;
}
.sc-kpi {
  background: rgba(8, 36, 72, .72);
  border: 1px solid rgba(80, 160, 255, .28);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 16px rgba(20, 90, 170, .15);
}
.sc-kpi b {
  font-size: clamp(22px, 1.8vw, 32px); line-height: 1.1; color: #f4fbff;
  font-variant-numeric: tabular-nums; font-weight: 700;
  text-shadow: 0 0 12px rgba(120, 190, 255, .35);
}
.sc-kpi span { margin-top: 4px; font-size: 12px; color: #8eb6dc; letter-spacing: .5px; }
.sc-kpi.warn b { color: #ffc14d; text-shadow: 0 0 12px rgba(255, 180, 40, .35); }
.sc-kpi.danger b { color: #ff5d6c; text-shadow: 0 0 12px rgba(255, 80, 100, .4); }
.sc-kpi.ok b { color: #3dffb0; text-shadow: 0 0 12px rgba(60, 255, 180, .35); }
button.sc-shop {
  grid-column: span 2;
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer; position: relative;
  background: linear-gradient(180deg, rgba(18, 78, 150, .85), rgba(10, 46, 100, .85));
  border: 1px solid rgba(120, 200, 255, .7);
  box-shadow: 0 0 18px rgba(40, 140, 255, .35), inset 0 0 18px rgba(80, 170, 255, .25);
}
.sc-shop b { font-size: clamp(18px, 1.5vw, 26px); letter-spacing: 3px; }
.sc-shop small { position: absolute; right: 8px; bottom: 4px; font-size: 11px; color: #9fd0ff; letter-spacing: 0; }
.sc-shop:hover { filter: brightness(1.12); }

.sc-scroll { flex: 1; min-height: 0; overflow: hidden; position: relative; }
.sc-scroll:hover .sc-marquee { animation-play-state: paused; }
.sc-marquee.play { animation: sc-marquee var(--dur, 16s) linear infinite; will-change: transform; }
@keyframes sc-marquee { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.sc-cols, .sc-tr { display: grid; align-items: center; column-gap: 6px; width: 100%; min-width: 0; }
.sc-cols { color: #7eb6e8; font-size: 12px; padding: 0 4px 5px; border-bottom: 1px solid rgba(90, 170, 255, .28); }
.sc-tr { font-size: 12px; color: #e4f1ff; padding: 5px 4px; border-bottom: 1px solid rgba(90, 160, 255, .1); }
.sc-tr.is-late { color: #ff8d98; }
.sc-tr.is-warn { color: #ffd27a; }
.sc-tr.is-hot { background: rgba(40, 120, 220, .18); }
.sc-td { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sc-empty { color: #6f93b8; font-size: 12px; text-align: center; padding: 18px 0; }

.sc-mini { position: relative; height: 14px; background: rgba(80, 140, 200, .15); border-radius: 7px; overflow: hidden; }
.sc-mini i { display: block; height: 100%; background: linear-gradient(90deg, #1d7dff, #3dffb0); border-radius: 7px; }
.sc-mini.is-late i { background: linear-gradient(90deg, #ff5d6c, #ffb020); }
.sc-mini em { position: absolute; inset: 0; text-align: center; font-style: normal; font-size: 10px; line-height: 14px; color: #fff; }

.sc-bars { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 6px; }
.sc-bar-row { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr) 28px; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 10px; }
.sc-bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d5e8ff; }
.sc-bar-row em { font-style: normal; text-align: right; color: #ffb020; font-variant-numeric: tabular-nums; }
.sc-hbar { height: 8px; background: rgba(80, 140, 200, .15); border-radius: 4px; overflow: hidden; }
.sc-hbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #ffb020, #ff5d6c); transition: width .8s ease; }

.sc-mask {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(2, 8, 18, .55);
  display: flex; align-items: center; justify-content: center;
}
.sc-mask.hidden { display: none; }
.sc-dialog {
  width: 380px; padding: 20px 22px 16px;
  background: #0b2342; border: 1px solid rgba(110, 190, 255, .5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.sc-dialog h3 { font-size: 16px; letter-spacing: 2px; margin-bottom: 14px; color: #f2f8ff; }
.sc-dialog label { display: block; color: #8eb6dc; font-size: 12px; margin: 12px 0 6px; }
.sc-seg { display: flex; gap: 8px; }
.sc-seg button {
  flex: 1; height: 30px; cursor: pointer; color: #cfe7ff;
  background: rgba(20, 60, 110, .4); border: 1px solid rgba(110, 180, 255, .35);
}
.sc-seg button.on { background: rgba(30, 120, 210, .7); border-color: #7ec8ff; color: #fff; }
.sc-dialog select {
  width: 100%; height: 32px; background: #07182e; color: #e7f3ff;
  border: 1px solid rgba(110, 180, 255, .4); padding: 0 8px;
}
.sc-check { display: flex; align-items: center; gap: 8px; color: #d5e8ff; font-size: 13px; margin-top: 14px; }
.sc-dialog .sc-btn { margin-top: 16px; width: 100%; height: 34px; }

@media (max-width: 1280px) {
  .sc-title-wrap h1 { font-size: 18px; letter-spacing: 2px; }
  .sc-kpis { grid-auto-rows: 64px; }
  .sc-clock { font-size: 12px; }
}
