* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #0a1628;
  color: #e8f4ff;
  min-height: 100vh;
  overflow-x: hidden;
}
.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid rgba(0, 180, 255, 0.3);
  background: linear-gradient(180deg, rgba(0, 80, 160, 0.35) 0%, transparent 100%);
}
.screen-header h1 {
  font-size: 28px;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #00d4ff, #7af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.screen-header .header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.screen-header .countdown {
  color: #00e5ff;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.screen-header .countdown.is-loading {
  color: #7dffb8;
  text-shadow: 0 0 12px rgba(0, 229, 170, 0.55);
  animation: countdownPulse 0.9s ease-in-out infinite;
}
.screen-header .updated-at,
.screen-header .sync-status { color: #5a9fd4; font-size: 12px; }
.screen-header .time { color: #6eb8ff; font-size: 14px; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 16px 24px;
}
.card {
  background: rgba(10, 40, 80, 0.6);
  border: 1px solid rgba(0, 150, 255, 0.25);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 0 20px rgba(0, 100, 200, 0.15) inset;
}
.card-title {
  font-size: 14px;
  color: #6eb8ff;
  margin-bottom: 8px;
  border-left: 3px solid #00b4ff;
  padding-left: 8px;
}
.card-value {
  font-size: 32px;
  font-weight: bold;
  color: #00e5ff;
}
.card-sub { font-size: 12px; color: #8aa; margin-top: 4px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.chart-box { height: 280px; width: 100%; }
.table-wrap { max-height: 320px; overflow: auto; }
.production-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.production-screen .screen-header { flex-shrink: 0; }
.production-screen .production-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.production-screen .production-grid { margin-bottom: 0; }
.production-screen .production-summary {
  flex-shrink: 0;
  padding: 10px 24px 8px;
  gap: 12px;
}
.production-screen .production-summary .card {
  padding: 10px 14px;
}
.production-screen .production-summary .card-value {
  font-size: 26px;
}
.production-screen .production-lower {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.production-screen .production-charts {
  flex-shrink: 0;
  padding: 0 24px 8px;
  gap: 12px;
}
.production-screen .production-progress-wrap {
  flex: 1 1 40vh;
  min-height: 40vh;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.production-screen .production-progress-card {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.production-header {
  position: relative;
  justify-content: center;
}
.production-header h1 {
  font-size: 32px;
  letter-spacing: 8px;
  text-align: center;
}
.production-header .header-meta {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
}
.production-header-deco {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(680px, 60vw);
  height: 2px;
  background: linear-gradient(90deg, transparent, #00d4ff 20%, #7af 50%, #00d4ff 80%, transparent);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.45);
}
.production-screen .summary-card .card-value {
  font-family: 'Arial Black', Impact, 'Microsoft YaHei', sans-serif;
  text-shadow: 0 0 16px rgba(0, 234, 255, 0.45);
}
.production-screen .production-charts .card {
  padding: 10px 14px;
}
.production-screen .chart-box-rank {
  height: 168px;
  min-height: 168px;
}
.production-screen .summary-card .card-sub em {
  font-style: normal;
  color: #00e5ff;
  font-weight: bold;
}
.production-progress-card .card-title { flex-shrink: 0; }
.production-table-head {
  display: grid;
  grid-template-columns: 14% 18% 18% 14% 20% 16%;
  gap: 0;
  padding: 0 8px 6px;
  font-size: 11px;
  color: #6eb8ff;
  text-align: center;
  flex-shrink: 0;
}
.production-list-panel {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  scrollbar-width: none;
}
.production-list-panel::-webkit-scrollbar { display: none; }
.production-table {
  width: 100%;
  table-layout: fixed;
  font-size: 11px;
}
.production-table td {
  padding: 6px 4px;
  text-align: center;
  vertical-align: middle;
}
.production-table .col-no { width: 14%; font-size: 10px; }
.production-table .col-name { width: 18%; }
.production-table .col-spec { width: 18%; font-size: 10px; color: #9bc; }
.production-table .col-qty { width: 14%; color: #00e5ff; }
.production-table .col-progress { width: 20%; }
.production-table .col-date { width: 18%; font-size: 10px; color: #9bc; }
.production-table .cell-clip {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.production-table .col-progress .progress-text {
  display: block;
  margin-bottom: 4px;
  color: #00e5aa;
  font-size: 10px;
}
.production-table .list-empty {
  text-align: center;
  color: #6eb8ff;
  padding: 20px 8px;
}
.production-table tr { height: 40px; }

/* 销售报表：标题居中 + 客户 TOP10 通栏 + 订单列表滚动 */
.sales-report-screen .production-header h1 {
  font-size: 32px;
  letter-spacing: 8px;
  text-align: center;
}
.sales-report-screen .sales-customers-card .chart-box-customers {
  height: 300px;
  min-height: 300px;
  width: 100%;
}
.sales-report-screen .sales-orders-card {
  display: flex;
  flex-direction: column;
}
.sales-report-screen .sales-list-panel {
  flex: 1;
  min-height: 0;
  max-height: 420px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}
}
.sales-report-screen .sales-list-panel::-webkit-scrollbar { display: none; }
.sales-report-screen .sales-orders-table { width: 100%; }
.sales-report-screen .sales-orders-table .list-empty {
  text-align: center;
  color: #6eb8ff;
  padding: 20px 8px;
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(0, 120, 200, 0.2); }
th { color: #6eb8ff; font-weight: normal; }
tr:hover td { background: rgba(0, 100, 180, 0.15); }
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #00b4ff, #00ffaa);
  border-radius: 3px;
}
.status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: rgba(0, 180, 255, 0.2);
  color: #7df;
}

.screen-refresh-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #00e5ff 35%, #7af 50%, #00e5ff 65%, transparent);
  background-size: 200% 100%;
  transition: opacity 0.2s ease;
}
body.screen-refreshing .screen-refresh-bar {
  opacity: 1;
  animation: screenRefreshBar 1s linear infinite;
}
body.screen-refreshing .grid,
body.screen-refreshing .screen-header {
  opacity: 0.72;
  filter: saturate(0.92);
  transition: opacity 0.25s ease, filter 0.25s ease;
}
body.screen-refreshed .grid {
  animation: screenContentIn 0.5s ease-out;
}
body.screen-refreshed .screen-header .updated-at {
  animation: updatedAtFlash 0.8s ease-out;
}
body.screen-refreshed .card-value {
  animation: valueFlash 0.7s ease-out;
}
body.screen-refreshed tbody tr {
  animation: rowFlash 0.45s ease-out;
}

@keyframes screenRefreshBar {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes screenContentIn {
  from { opacity: 0.45; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes countdownPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes updatedAtFlash {
  0% { color: #9ef; text-shadow: 0 0 10px rgba(0, 229, 255, 0.8); }
  100% { color: #5a9fd4; text-shadow: none; }
}
@keyframes valueFlash {
  0% { color: #fff; text-shadow: 0 0 16px rgba(0, 229, 255, 0.75); transform: scale(1.04); }
  100% { color: #00e5ff; text-shadow: none; transform: scale(1); }
}
@keyframes rowFlash {
  from { background: rgba(0, 180, 255, 0.18); }
  to { background: transparent; }
}

/* 车间大屏 */
.workshop-screen {
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #0a3d8f 0%, #020b2e 55%, #010818 100%);
}
.workshop-meta {
  font-size: 11px;
  color: #6eb8e8;
  gap: 6px;
}
.workshop-meta .updated-wrap { color: #6eb8e8; }
.workshop-meta .refresh-tip { color: #ffd54f; }
.workshop-meta .refresh-link {
  color: #00eaff;
  text-decoration: none;
  margin-left: 4px;
}
.workshop-meta .refresh-link:hover { text-decoration: underline; }
.workshop-header {
  position: relative;
  justify-content: center;
}
.workshop-header h1 {
  font-size: 32px;
  letter-spacing: 8px;
  text-align: center;
}
.workshop-header .header-meta {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
}
.workshop-header-deco {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(680px, 60vw);
  height: 2px;
  background: linear-gradient(90deg, transparent, #00d4ff 20%, #7af 50%, #00d4ff 80%, transparent);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.45);
}
.panel-frame {
  position: relative;
  background: rgba(8, 28, 58, 0.72);
  border: 1px solid rgba(0, 160, 255, 0.35);
  border-radius: 6px;
  padding: 14px 16px 16px;
  box-shadow: 0 0 24px rgba(0, 80, 160, 0.2) inset, 0 0 0 1px rgba(0, 100, 200, 0.08);
}
.panel-frame::before,
.panel-frame::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #00d4ff;
  border-style: solid;
  opacity: 0.85;
  pointer-events: none;
}
.panel-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}
.panel-frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}
.panel-frame-title {
  font-size: 15px;
  color: #9ed4ff;
  letter-spacing: 2px;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 4px solid #00b4ff;
}
.workshop-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: 16px;
  padding: 16px 24px 24px;
  height: calc(100vh - 72px);
  min-height: calc(100vh - 72px);
  overflow: hidden;
}
.workshop-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.workshop-side {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.workshop-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.overview-frame .panel-frame-title { margin-bottom: 8px; font-size: 14px; }
.overview-card .overview-rate { display: flex; align-items: center; gap: 12px; }
.overview-card .card-value { font-size: 28px; min-width: 90px; }
.overview-frame .overview-card { padding: 12px 14px; }
.process-panel .panel-frame-title { margin-bottom: 8px; font-size: 14px; }
.process-legend {
  display: flex;
  gap: 18px;
  font-size: 11px;
  color: #8ab;
  margin-bottom: 8px;
  padding: 0 8px;
  flex-shrink: 0;
}
.proc-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.proc-dot-done {
  background: #00e588;
  box-shadow: 0 0 8px rgba(0, 229, 136, 0.65);
}
.proc-dot-current {
  background: #ffc107;
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.65);
}
.proc-dot-pending {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}
.process-head { margin-bottom: 6px; flex-shrink: 0; }
.process-table-head {
  background: linear-gradient(180deg, rgba(0, 90, 170, 0.42) 0%, rgba(8, 36, 72, 0.72) 100%);
  border: 1px solid rgba(0, 180, 255, 0.35);
  border-radius: 8px;
  padding: 10px 8px 8px;
  box-shadow: 0 0 18px rgba(0, 120, 220, 0.18) inset;
}
.process-col-head {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #b8e4ff;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 200, 255, 0.35);
}
.process-row--head { min-height: 34px; padding-bottom: 0; }
.process-list-panel {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  scrollbar-width: none;
  padding: 0;
}
.process-rows { width: 100%; }
.process-row {
  display: grid;
  grid-template-columns: var(--process-col-grid);
  align-items: center;
  min-height: 44px;
  padding: 4px 6px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(0, 120, 200, 0.12);
}
.process-row > * {
  text-align: center;
  padding: 3px 2px;
  min-width: 0;
  box-sizing: border-box;
}
.process-row .col-no { font-size: 10px; }
.process-row .col-name,
.process-row .col-spec { position: relative; overflow: hidden; }
.process-row .col-spec { font-size: 10px; color: #9bc; }
.process-row .col-process-chain {
  text-align: left;
  overflow: hidden;
  padding: 0 4px;
}
.process-row .col-process-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 0 6px;
}
.process-bar-qty {
  font-size: 10px;
  color: #9bc;
  text-align: center;
  line-height: 1.2;
}
.process-bar-qty em {
  font-style: normal;
  color: #00e5ff;
}
.process-bar-text {
  font-size: 11px;
  color: #00e5aa;
  font-weight: 600;
  text-align: center;
}
.process-step-bar {
  height: 10px;
  margin: 0;
}
.process-step-bar span {
  background: linear-gradient(90deg, #00b4ff, #00e5aa);
  box-shadow: 0 0 8px rgba(0, 229, 170, 0.45);
}
.process-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  overflow: visible;
  white-space: normal;
  min-height: 28px;
  line-height: 1.5;
}
.process-chain-empty {
  color: #6eb8ff;
  font-size: 10px;
}
.proc-step {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.35;
  border: 1px solid transparent;
  flex-shrink: 0;
  max-width: none;
  white-space: nowrap;
}
.proc-done {
  background: rgba(0, 229, 136, 0.18);
  color: #7dffb8;
  border-color: rgba(0, 229, 136, 0.55);
  box-shadow: 0 0 10px rgba(0, 229, 136, 0.25);
}
.proc-current {
  background: rgba(255, 193, 7, 0.16);
  color: #ffd54f;
  border-color: rgba(255, 193, 7, 0.65);
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.35);
}
.proc-pending {
  background: rgba(255, 255, 255, 0.06);
  color: #c8d8e8;
  border-color: rgba(255, 255, 255, 0.22);
}
.proc-sep {
  color: #5a8fb8;
  font-size: 10px;
  flex-shrink: 0;
  padding: 0 1px;
}
.process-row:not(.process-row--head):hover {
  background: rgba(0, 100, 180, 0.12);
}
.process-list-panel::-webkit-scrollbar { display: none; }
.process-empty {
  text-align: center;
  color: #6eb8ff;
  font-size: 12px;
  padding: 24px 8px;
}
.gantt-time-col { text-align: center; }
.gantt-time-col small { margin-left: 4px; color: #5a8fb8; font-size: 10px; }
.gantt-timeline {
  position: relative;
  height: 18px;
  border-bottom: 1px solid rgba(0, 120, 200, 0.25);
}
.gantt-hours { font-size: 10px; padding-top: 0; }
.gantt-cell {
  gap: 6px;
  justify-content: center;
}
.gantt-qty {
  flex: 0 0 46px;
  font-size: 10px;
}
.gantt-track { height: 14px; }
.gantt-bar-plan,
.gantt-bar-done {
  top: 2px;
  height: 10px;
}
.status-tag { font-size: 11px; padding: 1px 6px; }
.workshop-main { gap: 12px; }
.workshop-layout {
  gap: 12px;
  padding: 12px 20px 16px;
  height: calc(100vh - 64px);
  min-height: calc(100vh - 64px);
}
.chart-box-sm { height: 180px; }
.workshop-side .side-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.workshop-side .side-panel .panel-frame-title {
  flex-shrink: 0;
  margin-bottom: 6px;
  padding: 0 8px;
}
.workshop-side .chart-box-sm {
  flex: 1;
  min-height: 0;
  height: auto;
  width: 100%;
}
.workshop-side .category-bars {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  gap: 12px;
  padding: 2px 8px 4px;
}
.workshop-side .category-bars.category-bars--few {
  justify-content: center;
  gap: 32px;
}
.workshop-side .category-bars.category-bars--few .category-block {
  padding: 10px 6px;
}
.category-bars { gap: 10px; padding: 2px 0 4px; }
.overview-frame { flex-shrink: 0; }
.process-row .cell-clip {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.process-row .cell-clip[data-tip]:hover::after,
.process-chain[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 5;
  background: rgba(4, 26, 82, 0.95);
  border: 1px solid rgba(0, 234, 255, 0.4);
  padding: 4px 8px;
  white-space: normal;
  max-width: 280px;
  font-size: 11px;
  color: #e8f6ff;
}
.overview-card .card-value {
  font-family: 'Arial Black', Impact, 'Microsoft YaHei', sans-serif;
  text-shadow: 0 0 16px rgba(0, 234, 255, 0.55);
}
.process-panel {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  --process-col-grid: 12% 14% 18% minmax(0, 1fr) 14%;
}
.process-head,
.process-legend,
.process-panel .panel-frame-title {
  flex-shrink: 0;
}
.process-panel::before,
.process-panel::after { display: none; }
.overview-frame { background: transparent; border: none; box-shadow: none; padding: 0; }
.overview-frame::before,
.overview-frame::after { display: none; }
.side-panel.card,
.side-panel { background: transparent; border: none; box-shadow: none; padding: 0; }
.side-panel::before,
.side-panel::after { display: none; }
.process-panel .card-title,
.overview-frame .overview-card { background: rgba(10, 40, 80, 0.6); border: 1px solid rgba(0, 150, 255, 0.25); border-radius: 8px; }
.overview-frame .workshop-overview { margin-top: 0; }
.progress-bar.lg { flex: 1; height: 8px; margin-top: 0; }
.overview-card .card-sub {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
}
.overview-card .card-sub em {
  font-style: normal;
  color: #00e5ff;
  font-weight: bold;
}
.gantt-legend em {
  font-style: normal;
  color: #cde;
  margin-left: 4px;
}
.gantt-legend .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.gantt-legend .dot-required { background: #00b4ff; box-shadow: 0 0 6px #00b4ff; }
.gantt-legend .dot-plan { background: #ffb347; box-shadow: 0 0 6px #ffb347; }
.gantt-legend .dot-done { background: #00e5aa; box-shadow: 0 0 6px #00e5aa; }
.gantt-time-col { text-align: center; }
.gantt-time-col small { margin-left: 4px; color: #5a8fb8; font-size: 10px; }
.gantt-hours {
  display: flex;
  justify-content: space-between;
  color: #5a8fb8;
}
.gantt-now-line {
  position: absolute;
  top: 0;
  bottom: -4px;
  width: 2px;
  background: #ff6b6b;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}
.gantt-cell { display: flex; align-items: center; justify-content: center; }
.gantt-qty { color: #9bc; text-align: center; }
.gantt-track {
  position: relative;
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar span,
.gantt-bar-done,
.gantt-bar-plan { transition: none; }
.status-tag.status-2 { background: rgba(0, 229, 170, 0.25); color: #7dffb8; }
.status-tag.status-1 { background: rgba(0, 180, 255, 0.2); color: #7df; }
.status-tag.status-4,
.status-tag.status-10 { background: rgba(255, 107, 107, 0.25); color: #ff9a9a; }
.category-bars {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.category-empty {
  text-align: center;
  color: #6eb8ff;
  font-size: 12px;
  padding: 12px 0;
}
.category-block .category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
  color: #cde;
}
.category-block .category-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-block .category-qty {
  flex-shrink: 0;
  color: #00e5ff;
}

/* ========== 设备采集大屏 ========== */
.device-collect-screen {
  --dc-cyan: #00e5ff;
  --dc-blue: #1a7fd4;
  --dc-line: rgba(0, 200, 255, 0.35);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #040b18;
  color: #e8f4ff;
}

/* --- 科技背景层 --- */
.dc-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(0, 90, 180, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 50% 110%, rgba(0, 140, 220, 0.22) 0%, transparent 55%),
    linear-gradient(180deg, #061428 0%, #071830 45%, #030a14 100%);
}
.dc-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(0, 160, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 160, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 20%, transparent 85%);
  animation: dcGridDrift 40s linear infinite;
}
.dc-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}
.dc-bg-glow-a {
  width: 42vw;
  height: 42vw;
  left: -12%;
  top: 18%;
  background: rgba(0, 100, 200, 0.28);
  animation: dcPulse 8s ease-in-out infinite;
}
.dc-bg-glow-b {
  width: 36vw;
  height: 36vw;
  right: -10%;
  bottom: 8%;
  background: rgba(0, 180, 220, 0.18);
  animation: dcPulse 10s ease-in-out infinite reverse;
}
.dc-bg-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8%;
  height: 42%;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0, 160, 255, 0.2) 0%, transparent 70%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 40px,
      rgba(0, 180, 255, 0.04) 40px,
      rgba(0, 180, 255, 0.04) 41px
    );
  opacity: 0.9;
}
.dc-bg-wave::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 220, 255, 0.45), transparent);
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.5);
  animation: dcWaveLine 6s ease-in-out infinite;
}
.dc-bg-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 200, 255, 0.03) 48%,
    rgba(0, 200, 255, 0.08) 50%,
    rgba(0, 200, 255, 0.03) 52%,
    transparent 100%
  );
  background-size: 100% 220%;
  animation: dcScan 7s linear infinite;
  opacity: 0.7;
}
.dc-bg-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(0, 220, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(120, 200, 255, 0.4) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(0, 180, 255, 0.35) 0 1px, transparent 2px);
  background-size: 180px 140px, 260px 200px, 320px 240px;
  background-position: 10% 20%, 70% 40%, 40% 80%;
  animation: dcParticles 28s linear infinite;
  opacity: 0.35;
}

.dc-frame {
  position: absolute;
  inset: 10px;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(0, 160, 255, 0.18);
  box-shadow:
    inset 0 0 40px rgba(0, 80, 160, 0.15),
    0 0 30px rgba(0, 100, 180, 0.12);
}
.dc-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--dc-cyan);
  border-style: solid;
  opacity: 0.85;
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.6));
}
.dc-corner-tl { left: -1px; top: -1px; border-width: 2px 0 0 2px; }
.dc-corner-tr { right: -1px; top: -1px; border-width: 2px 2px 0 0; }
.dc-corner-bl { left: -1px; bottom: -1px; border-width: 0 0 2px 2px; }
.dc-corner-br { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }

@keyframes dcGridDrift {
  from { background-position: 0 0; }
  to { background-position: 48px 48px; }
}
@keyframes dcPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.08); }
}
@keyframes dcScan {
  0% { background-position: 0 -40%; }
  100% { background-position: 0 140%; }
}
@keyframes dcWaveLine {
  0%, 100% { opacity: 0.45; transform: scaleX(0.92); }
  50% { opacity: 1; transform: scaleX(1); }
}
@keyframes dcParticles {
  from { background-position: 10% 20%, 70% 40%, 40% 80%; }
  to { background-position: 18% 60%, 55% 10%, 70% 50%; }
}
@keyframes dcTitleGlow {
  0%, 100% { box-shadow: inset 0 0 20px rgba(0, 140, 220, 0.18), 0 0 16px rgba(0, 120, 200, 0.2); }
  50% { box-shadow: inset 0 0 24px rgba(0, 160, 230, 0.28), 0 0 22px rgba(0, 160, 255, 0.28); }
}

.device-collect-header,
.device-collect-body {
  position: relative;
  z-index: 2;
}

.device-collect-header {
  justify-content: center;
  padding: 14px 24px 10px;
  border-bottom: none;
  background: transparent;
}
.dc-title-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}
.device-collect-header h1 {
  font-size: 26px;
  letter-spacing: 4px;
  margin: 0;
  padding: 8px 24px;
  position: relative;
  color: #e8f7ff !important;
  font-weight: 700;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
  /* 覆盖 .screen-header h1 的渐变透明字，避免标题发糊/看不见 */
  background: linear-gradient(180deg, rgba(8, 40, 78, 0.95), rgba(4, 22, 48, 0.98)) !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #e8f7ff !important;
  border: 1px solid rgba(0, 180, 255, 0.5);
  box-shadow:
    inset 0 0 20px rgba(0, 140, 220, 0.18),
    0 0 16px rgba(0, 120, 200, 0.2);
  animation: dcTitleGlow 3.5s ease-in-out infinite;
  white-space: nowrap;
}
.device-collect-header h1::before {
  content: none;
}
.dc-title-wing {
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e84a4a 30%, rgba(0, 200, 255, 0.7));
  box-shadow: 0 0 10px rgba(232, 74, 74, 0.5);
  position: relative;
}
.dc-title-wing-r {
  background: linear-gradient(90deg, rgba(0, 200, 255, 0.7), #e84a4a 70%, transparent);
}
.dc-title-wing::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--dc-cyan);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}
.dc-title-wing-l::after { right: 0; }
.dc-title-wing-r::after { left: 0; }

.dc-header-left {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.dc-date-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #8ab4d9;
  padding: 4px 10px;
  background: rgba(6, 28, 56, 0.75);
  border: 1px solid rgba(0, 160, 255, 0.3);
  box-shadow: 0 0 12px rgba(0, 100, 180, 0.2);
}
.dc-date-input {
  background: rgba(8, 36, 72, 0.85);
  border: 1px solid rgba(0, 160, 255, 0.4);
  color: #e8f4ff;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  color-scheme: dark;
}
.dc-date-input:focus {
  outline: none;
  border-color: #00d4ff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.25);
}
.device-collect-header-deco {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    #e84a4a 6%,
    rgba(0, 180, 255, 0.55) 28%,
    transparent 48%,
    transparent 52%,
    rgba(0, 180, 255, 0.55) 72%,
    #e84a4a 94%,
    transparent 100%);
  pointer-events: none;
  opacity: 0.85;
}
.device-collect-header .header-meta {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 4px 10px;
  background: rgba(6, 28, 56, 0.65);
  border: 1px solid rgba(0, 160, 255, 0.25);
}
.btn-fullscreen {
  background: rgba(0, 100, 180, 0.3);
  border: 1px solid rgba(0, 180, 255, 0.4);
  color: #9cf;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.btn-fullscreen:hover { background: rgba(0, 140, 220, 0.45); }

.device-collect-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 24px 20px;
  gap: 12px;
}

.dc-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  flex-shrink: 0;
}
.dc-kpi-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background:
    linear-gradient(135deg, rgba(10, 50, 95, 0.55) 0%, rgba(6, 24, 48, 0.75) 100%);
  border: 1px solid rgba(0, 170, 255, 0.32);
  border-radius: 2px;
  box-shadow:
    inset 0 0 28px rgba(0, 100, 200, 0.14),
    0 0 16px rgba(0, 80, 160, 0.12);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.dc-kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--dc-cyan), transparent);
}
.dc-kpi-card::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-top: 2px solid rgba(0, 220, 255, 0.55);
  border-right: 2px solid rgba(0, 220, 255, 0.55);
  opacity: 0.7;
}
.dc-kpi-card:hover {
  border-color: rgba(0, 220, 255, 0.55);
  box-shadow:
    inset 0 0 28px rgba(0, 140, 220, 0.2),
    0 0 22px rgba(0, 160, 255, 0.25);
}
.dc-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0, 180, 255, 0.35), rgba(0, 80, 160, 0.2));
  border: 1px solid rgba(0, 200, 255, 0.35);
  position: relative;
  box-shadow: 0 0 12px rgba(0, 180, 255, 0.25);
}
.dc-kpi-icon::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid #5ec8ff;
  border-radius: 4px;
  opacity: 0.85;
}
.dc-kpi-icon-alarm {
  background: linear-gradient(135deg, rgba(232, 74, 74, 0.4), rgba(120, 40, 40, 0.25));
  border-color: rgba(255, 120, 100, 0.45);
}
.dc-kpi-icon-alarm::after { border-color: #ff8a7a; }
.dc-kpi-label { font-size: 13px; color: #7ab0d8; }
.dc-kpi-value {
  font-size: 28px;
  font-weight: bold;
  color: #00e5ff;
  line-height: 1.2;
  margin-top: 2px;
}
.dc-kpi-alarm { color: #ff8a7a; }

.dc-main-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 2fr) minmax(240px, 1fr);
  gap: 12px;
}
.dc-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dc-panel {
  background:
    linear-gradient(160deg, rgba(8, 40, 78, 0.62) 0%, rgba(4, 18, 40, 0.78) 100%);
  border: 1px solid rgba(0, 160, 255, 0.32);
  border-radius: 2px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow:
    0 0 24px rgba(0, 80, 160, 0.14) inset,
    0 0 18px rgba(0, 100, 180, 0.1);
  position: relative;
}
.dc-panel::before,
.dc-panel::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(0, 220, 255, 0.65);
  border-style: solid;
  pointer-events: none;
}
.dc-panel::before {
  left: -1px;
  top: -1px;
  border-width: 2px 0 0 2px;
}
.dc-panel::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}
.dc-panel-grow { flex: 1; }
.dc-panel-title {
  font-size: 14px;
  color: #8ecfff;
  margin-bottom: 8px;
  padding: 2px 8px 2px 10px;
  border-left: 3px solid #00d4ff;
  flex-shrink: 0;
  letter-spacing: 1px;
  background: linear-gradient(90deg, rgba(0, 140, 220, 0.18), transparent 70%);
  text-shadow: 0 0 10px rgba(0, 180, 255, 0.25);
}
.dc-chart { height: 200px; width: 100%; flex-shrink: 0; }
.dc-empty {
  text-align: center;
  color: #6eb8ff;
  font-size: 13px;
  padding: 24px 8px;
}

.dc-duration-list {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dc-duration-item { padding: 4px 0; }
.dc-duration-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}
.dc-duration-rank {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: rgba(0, 140, 220, 0.35);
  color: #9cf;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dc-duration-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d8ecff;
}
.dc-duration-hours { color: #00e5ff; flex-shrink: 0; }
.dc-duration-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.dc-duration-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0a6ab8, #00d4ff);
  border-radius: 3px;
}

.dc-device-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dc-device-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 14px 18px;
  background:
    linear-gradient(120deg, rgba(10, 48, 90, 0.7) 0%, rgba(6, 24, 50, 0.82) 100%);
  border: 1px solid rgba(0, 170, 255, 0.35);
  border-radius: 2px;
  min-height: 160px;
  position: relative;
  box-shadow:
    inset 0 0 30px rgba(0, 100, 200, 0.12),
    0 0 20px rgba(0, 100, 180, 0.12);
  overflow: visible;
}
.dc-device-card::before {
  content: "";
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(0, 200, 255, 0.06) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: dcCardShine 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes dcCardShine {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}
.dc-device-card.is-offline {
  border-color: rgba(255, 120, 100, 0.4);
  opacity: 0.92;
}
.dc-device-card.is-online {
  border-color: rgba(0, 220, 180, 0.35);
}
.dc-device-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dc-device-silhouette {
  width: 88px;
  height: 72px;
  background:
    linear-gradient(160deg, rgba(80, 180, 255, 0.55) 0%, rgba(20, 80, 160, 0.35) 100%);
  clip-path: polygon(15% 70%, 15% 35%, 30% 20%, 70% 20%, 85% 35%, 85% 70%, 75% 85%, 25% 85%);
  box-shadow: 0 0 24px rgba(0, 180, 255, 0.35);
  position: relative;
}
.dc-device-silhouette::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 70px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 200, 255, 0.5), transparent 70%);
}
.dc-device-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(0, 180, 255, 0.45));
}
.dc-device-status {
  font-size: 13px;
  font-weight: bold;
  line-height: 1.2;
  flex-shrink: 0;
}
.dc-device-card.is-online .dc-device-status { color: #7dffb8; }
.dc-device-card.is-offline .dc-device-status { color: #ff9a9a; }
.dc-device-label {
  font-size: 13px;
  color: #cde;
  text-align: center;
  word-break: break-all;
}
.dc-device-metrics {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.dc-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  border-bottom: 1px dashed rgba(0, 140, 220, 0.2);
  padding-bottom: 6px;
}
.dc-metric span { color: #8ab4d9; }
.dc-metric em {
  font-style: normal;
  color: #00e5ff;
  font-weight: bold;
  font-size: 18px;
}
.dc-metric-fail { color: #ff8a7a !important; }

.dc-alarm-list {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dc-alarm-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 8px 10px;
  background: rgba(80, 20, 20, 0.25);
  border-left: 3px solid #e84a4a;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
}
.dc-alarm-time { color: #9ab; }
.dc-alarm-name { color: #d8ecff; }
.dc-alarm-text { color: #ff8a7a; }

@media (max-width: 1200px) {
  .device-collect-screen { height: auto; overflow: auto; }
  .dc-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dc-main-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .dc-device-card { grid-template-columns: 120px 1fr; }
}

@media (max-width: 1200px) {
  .workshop-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 64px);
    overflow: visible;
  }
  .workshop-side {
    grid-template-rows: none;
    grid-template-columns: repeat(2, 1fr);
    height: auto;
  }
  .workshop-side .side-panel:last-child {
    grid-column: 1 / -1;
  }
  .workshop-side .chart-box-sm { height: 160px; flex: none; }
  .workshop-side .category-bars { flex: none; max-height: 200px; }
}
