:root {
  color-scheme: dark;
  --bg: #071016;
  --bg-soft: #0a151c;
  --surface: rgba(13, 27, 35, 0.94);
  --surface-2: rgba(17, 34, 43, 0.88);
  --surface-3: #12232c;
  --border: rgba(156, 191, 202, 0.14);
  --border-strong: rgba(78, 215, 193, 0.26);
  --text: #edf5f5;
  --text-2: #afc0c4;
  --text-3: #71898f;
  --teal: #43d7b8;
  --teal-bright: #77ead0;
  --blue: #61aef7;
  --amber: #f4ad45;
  --orange: #ed7b43;
  --red: #e76055;
  --grid-gap: 10px;
  --radius: 6px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }

html, body { width: 100%; min-width: 1180px; height: 100%; margin: 0; overflow: hidden; }

body {
  background:
    radial-gradient(circle at 55% 35%, rgba(30, 109, 106, .09), transparent 34%),
    linear-gradient(180deg, #071016 0%, #050c11 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; }

.dashboard-shell {
  display: grid;
  grid-template-rows: 62px 94px minmax(0, 1fr) 176px;
  gap: var(--grid-gap);
  width: 100cqw;
  height: 100cqh;
  padding: 0 12px 12px;
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 -12px;
  padding: 0 18px;
  background: rgba(7, 16, 22, .92);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px);
}

.topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(67, 215, 184, .28) 42%, rgba(67, 215, 184, .28) 58%, transparent);
  content: "";
}

.brand { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; min-width: 132px; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 7px 20px rgba(0,0,0,.24); }
.brand-mark img { display: block; width: 34px; height: 34px; object-fit: contain; }
.brand-name { color: #f3f7f7; font-size: 15px; font-weight: 650; letter-spacing: .08em; white-space: nowrap; }

.main-nav { display: flex; align-self: stretch; align-items: stretch; min-width: 590px; }
.nav-item { position: relative; display: flex; align-items: center; padding: 0 12px; color: #91a7ad; font-size: 14px; white-space: nowrap; transition: color .18s ease, background-color .18s ease; }
.nav-item:hover { color: #eef7f6; background: rgba(255,255,255,.025); }
.nav-item.active { color: #ecf7f5; }
.nav-item.active::after { position: absolute; right: 12px; bottom: 0; left: 12px; height: 2px; border-radius: 2px 2px 0 0; background: var(--teal); box-shadow: 0 -3px 10px rgba(67,215,184,.25); content: ""; }
.nav-badge { display: grid; width: 18px; height: 18px; margin-left: 5px; place-items: center; border-radius: 9px; background: rgba(244,173,69,.16); color: var(--amber); font-size: 11px; }

.header-title { position: absolute; left: 50%; top: 50%; z-index: -1; text-align: center; transform: translate(-50%, -50%); }
.header-title h1 { margin: 1px 0 0; color: #f5f8f8; font-size: 20px; font-weight: 650; letter-spacing: .08em; white-space: nowrap; }
.title-kicker { color: rgba(113, 234, 208, .66); font-size: 9px; font-weight: 700; letter-spacing: .34em; }

.topbar-meta { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: 12px; min-width: 410px; color: var(--text-2); white-space: nowrap; }
.clock-block { display: flex; gap: 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.clock-block strong { color: #dce6e7; font-size: 13px; font-weight: 550; }
.clock-block span { color: #879ba0; font-size: 12px; }
.meta-divider { width: 1px; height: 22px; background: var(--border); }
.weather { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.weather svg, .icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.weather svg { color: #d7e6e7; }
.system-status { display: flex; align-items: center; gap: 7px; color: var(--teal-bright); font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(67,215,184,.08), 0 0 12px rgba(67,215,184,.45); }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: rgba(255,255,255,.02); cursor: pointer; transition: border-color .18s, background .18s; }
.icon-button:hover { border-color: var(--border-strong); background: rgba(67,215,184,.05); }

.kpi-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(16,32,41,.96), rgba(9,20,27,.97));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.kpi-item { position: relative; min-width: 0; padding: 12px 16px 10px; }
.kpi-item + .kpi-item::before { position: absolute; top: 14px; bottom: 14px; left: 0; width: 1px; background: var(--border); content: ""; }
.kpi-label { display: flex; justify-content: space-between; color: #a9bdc1; font-size: 13px; }
.kpi-label > span:last-child { color: #567078; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.kpi-label .kpi-tag { padding: 2px 5px; border-radius: 2px; background: rgba(67,215,184,.1); color: var(--teal); letter-spacing: 0; }
.kpi-value { display: flex; align-items: baseline; gap: 7px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-value strong { color: #dff8f0; font-size: 30px; font-weight: 640; line-height: 1.05; letter-spacing: .02em; }
.kpi-value span { color: #8ea4aa; font-size: 11px; }
.kpi-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: #718a90; font-size: 10px; }
.progress { position: absolute; right: 16px; bottom: 8px; left: 16px; height: 2px; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.05); }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(67,215,184,.3), var(--teal)); }
.alarm-kpi { background: linear-gradient(125deg, rgba(244,173,69,.035), transparent); }
.alarm-kpi .kpi-value strong { color: var(--amber); }
.alarm-kpi .progress i { background: linear-gradient(90deg, rgba(244,173,69,.25), var(--amber)); }
.trend-up, .trend-down { color: var(--teal) !important; font-style: normal; }
.warning-text { color: var(--amber); }

.workspace { display: grid; grid-template-columns: 292px minmax(620px, 1fr) 314px; gap: var(--grid-gap); min-height: 0; }
.column { display: grid; gap: var(--grid-gap); min-height: 0; }
.left-column { grid-template-rows: 1.12fr 1fr .83fr; }
.right-column { grid-template-rows: 1.12fr .82fr 1.06fr; }

.panel, .scene-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15,31,39,.96), rgba(9,21,28,.96));
  box-shadow: 0 14px 32px rgba(0,0,0,.14);
}

.panel { padding: 12px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-heading.compact { margin-bottom: 7px; }
.panel-heading h2 { margin: 2px 0 0; color: #e2eced; font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.panel-eyebrow { display: block; color: #6f8c93; font-size: 8px; font-weight: 750; letter-spacing: .24em; }
.normal-pill, .saving-pill { padding: 3px 7px; border: 1px solid rgba(67,215,184,.18); border-radius: 10px; background: rgba(67,215,184,.07); color: var(--teal); font-size: 9px; white-space: nowrap; }
.saving-pill { border-color: rgba(244,173,69,.2); background: rgba(244,173,69,.08); color: var(--amber); }

.quality-row { display: grid; grid-template-columns: 1fr .58fr .58fr 1.15fr; align-items: center; min-height: 26px; border-top: 1px solid rgba(255,255,255,.035); color: #a5b7bb; font-size: 11px; font-variant-numeric: tabular-nums; }
.quality-row b { color: #cfdbdd; font-weight: 520; }
.quality-head { min-height: 21px; border-top: 0; color: #789097; font-size: 9px; }
.quality-row > span:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 5px; color: #789096; }
.mini-bar { width: 39px; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.06); }
.mini-bar em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(67,215,184,.45), var(--teal)); }

.ghost-select, .panel-link { min-height: 30px; padding: 0 6px; border: 0; background: transparent; color: #81989e; font-size: 10px; cursor: pointer; }
.ghost-select:hover, .panel-link:hover { color: var(--teal-bright); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; color: #879ba0; font-size: 9px; }
.chart-legend.mini { justify-content: flex-end; }
.line-key { display: inline-block; width: 12px; height: 2px; margin-right: 4px; vertical-align: middle; border-radius: 2px; }
.line-key.teal { background: var(--teal); }.line-key.blue { background: var(--blue); }.line-key.amber { background: var(--amber); }
.line-chart { display: block; width: 100%; height: calc(100% - 46px); min-height: 95px; overflow: visible; }
.grid-lines { fill: none; stroke: rgba(168,196,201,.09); stroke-width: 1; }
.series { fill: none; stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.teal-series { stroke: var(--teal); }.blue-series { stroke: var(--blue); }.amber-series { stroke: var(--amber); }
.area-line { fill: url(#waterFill); stroke: none; }
.axis-text { fill: #718990; font-size: 8px; }

.tiny-live { color: #83999f; font-size: 9px; }
.tiny-live i { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: var(--teal); }
.parameter { display: grid; grid-template-columns: 1fr 1fr 42px; align-items: center; min-height: 28px; border-top: 1px solid rgba(255,255,255,.035); color: #9eb0b4; font-size: 10px; }
.parameter b { color: #d2dddf; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.parameter small { color: #7b9096; font-size: 8px; font-weight: 400; }
.parameter em { color: var(--teal); font-size: 9px; font-style: normal; text-align: right; }

.scene-panel { display: grid; grid-template-rows: 50px minmax(0,1fr); padding: 0; border-color: rgba(101,176,177,.2); background: #071116; }
.scene-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, rgba(14,32,40,.98), rgba(9,22,29,.98)); }
.scene-heading h2 { margin: 2px 0 0; color: #e4eeee; font-size: 14px; font-weight: 620; letter-spacing: .05em; }
.scene-summary { display: flex; gap: 16px; color: #83989d; font-size: 10px; }
.scene-summary span { display: flex; align-items: center; gap: 6px; }
.scene-summary b { color: #b8c9cc; font-weight: 500; font-variant-numeric: tabular-nums; }
.scene-canvas { position: relative; min-height: 0; overflow: hidden; background: radial-gradient(circle at 50% 45%, #16303a 0%, #0a171e 53%, #050c11 100%); }
.scene-canvas canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; outline: none; }
.scene-canvas canvas:active { cursor: grabbing; }
.scene-canvas::before { position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: linear-gradient(rgba(98,170,174,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(98,170,174,.025) 1px, transparent 1px); background-size: 32px 32px; content: ""; }
.scene-vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(circle at center, transparent 54%, rgba(2,8,11,.5) 100%), linear-gradient(180deg, rgba(4,10,14,.08), transparent 15%, transparent 75%, rgba(4,10,14,.34)); }
.scene-loader { position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; gap: 10px; background: #09151c; color: #91a7ac; font-size: 12px; transition: opacity .35s ease, visibility .35s ease; }
.scene-loader.hidden { visibility: hidden; opacity: 0; }
.scene-loader i { width: 18px; height: 18px; border: 2px solid rgba(67,215,184,.15); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.scene-toolbar { position: absolute; z-index: 6; top: 12px; right: 12px; display: flex; padding: 4px; border: 1px solid rgba(157,190,199,.16); border-radius: 6px; background: rgba(6,15,20,.76); box-shadow: 0 8px 24px rgba(0,0,0,.24); backdrop-filter: blur(10px); }
.tool-button { display: grid; width: 34px; height: 32px; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #789097; cursor: pointer; transition: color .18s, background .18s; }
.tool-button + .tool-button { border-left: 1px solid rgba(255,255,255,.055); }
.tool-button:hover { color: #e6f1f1; background: rgba(255,255,255,.04); }
.tool-button.active { color: var(--teal); background: rgba(67,215,184,.08); }
.tool-button svg { width: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.model-badge { position: absolute; z-index: 5; top: 13px; left: 13px; display: flex; flex-direction: column; width: 136px; padding: 8px 10px; border-left: 2px solid var(--teal); border-radius: 0 4px 4px 0; background: rgba(5,14,18,.66); box-shadow: 0 8px 24px rgba(0,0,0,.16); backdrop-filter: blur(8px); }
.model-badge span { color: var(--teal); font-size: 8px; font-weight: 750; letter-spacing: .18em; }
.model-badge b { margin-top: 3px; color: #dce7e8; font-size: 11px; font-weight: 560; }
.model-badge small { margin-top: 2px; color: #789097; font-size: 8px; }

.scene-labels { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.scene-label { position: absolute; min-width: 76px; transform: translate(-50%, -115%); transition: opacity .15s ease; }
.scene-label::after { position: absolute; top: 100%; left: 50%; width: 1px; height: 10px; background: linear-gradient(var(--teal), transparent); content: ""; }
.scene-label-inner { display: flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid rgba(67,215,184,.25); border-radius: 3px; background: rgba(4,15,19,.78); box-shadow: 0 5px 18px rgba(0,0,0,.2); color: #d1dee0; font-size: 10px; white-space: nowrap; backdrop-filter: blur(6px); }
.scene-label-inner i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px rgba(67,215,184,.6); }
.scene-label.alarm .scene-label-inner { border-color: rgba(244,173,69,.55); color: #ffe0ad; }
.scene-label.alarm .scene-label-inner i { background: var(--amber); box-shadow: 0 0 8px rgba(244,173,69,.7); }

.device-card { position: absolute; right: 12px; bottom: 34px; z-index: 7; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; width: 275px; min-height: 64px; padding: 9px; border: 1px solid rgba(96,171,173,.24); border-radius: 5px; background: rgba(6,16,21,.82); box-shadow: 0 16px 32px rgba(0,0,0,.3); backdrop-filter: blur(12px); }
.device-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 4px; background: linear-gradient(145deg, rgba(67,215,184,.18), rgba(67,215,184,.04)); color: var(--teal); }
.device-icon svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.device-card span { color: #7b9197; font-size: 9px; letter-spacing: .08em; }
.device-card h3 { margin: 2px 0; color: #e2eded; font-size: 13px; font-weight: 580; }
.device-card p { margin: 0; color: #9eb0b4; font-size: 10px; }
.device-card .device-state { align-self: start; padding: 3px 6px; border-radius: 8px; background: rgba(67,215,184,.1); color: var(--teal); font-size: 9px; letter-spacing: 0; }
.device-card .device-state.warning { background: rgba(244,173,69,.12); color: var(--amber); }
.scene-hint { position: absolute; bottom: 10px; left: 50%; z-index: 5; display: flex; align-items: center; gap: 6px; color: rgba(186,204,207,.62); font-size: 9px; transform: translateX(-50%); white-space: nowrap; }
.mouse-icon { position: relative; width: 9px; height: 13px; border: 1px solid currentColor; border-radius: 5px; }
.mouse-icon::before { position: absolute; top: 2px; left: 3px; width: 1px; height: 3px; background: currentColor; content: ""; }

.equipment-body { display: flex; align-items: center; justify-content: center; gap: 22px; }
.donut { position: relative; display: grid; flex: 0 0 auto; width: 104px; height: 104px; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal) 0 72.7%, var(--blue) 72.7% 84.8%, var(--amber) 84.8% 90.9%, var(--orange) 90.9% 96.2%, #5c6d72 96.2% 100%); transform: rotate(-32deg); }
.donut::before { position: absolute; inset: 13px; border-radius: 50%; background: #0d1c24; box-shadow: inset 0 0 18px rgba(0,0,0,.3); content: ""; }
.donut > div { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; transform: rotate(32deg); }
.donut strong { color: #e8f1f1; font-size: 22px; font-weight: 580; line-height: 1; }
.donut span { margin-top: 4px; color: #869ba0; font-size: 9px; }
.donut-legend { display: grid; gap: 7px; min-width: 90px; }
.donut-legend span { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 6px; color: #98aaae; font-size: 10px; }
.donut-legend i { width: 7px; height: 7px; border-radius: 2px; }.donut-legend b { color: #cbd7d9; font-size: 10px; font-weight: 500; }
.donut-legend .run { background: var(--teal); }.donut-legend .standby { background: var(--blue); }.donut-legend .repair { background: var(--amber); }.donut-legend .alarm { background: var(--orange); }.donut-legend .offline { background: #5c6d72; }
.health-grid { display: grid; grid-template-columns: repeat(3,1fr); margin: 10px -12px -12px; border-top: 1px solid var(--border); }
.health-grid div { padding: 8px 5px; text-align: center; }.health-grid div + div { border-left: 1px solid var(--border); }
.health-grid span { display: block; color: #7d9399; font-size: 9px; }.health-grid strong { display: block; margin-top: 3px; color: var(--teal); font-size: 17px; font-weight: 550; }.health-grid small { font-size: 8px; }.health-grid .mid { color: #b6d9c1; }

.energy-totals { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.energy-totals > div { display: grid; grid-template-columns: 1fr auto; align-items: end; padding-right: 8px; border-right: 1px solid var(--border); }
.energy-totals span { grid-column: 1 / 3; color: #82979c; font-size: 9px; }.energy-totals strong { color: var(--teal-bright); font-size: 15px; font-weight: 560; }.energy-totals small { color: #879ba0; font-size: 8px; font-weight: 400; }.energy-totals em { font-size: 9px; }
.energy-bars { display: flex; height: 63px; margin-top: 7px; padding: 8px 4px 0; align-items: end; justify-content: space-around; border-bottom: 1px solid rgba(170,197,203,.12); background: repeating-linear-gradient(to bottom, rgba(169,195,201,.07) 0 1px, transparent 1px 20px); }
.energy-bars i { position: relative; width: 10px; min-height: 4px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, rgba(97,174,247,.85), rgba(67,215,184,.25)); }
.energy-bars i::after { position: absolute; top: -2px; left: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--blue); content: ""; transform: translateX(-50%); }
.energy-bars i.today { background: linear-gradient(180deg, var(--teal), rgba(67,215,184,.3)); box-shadow: 0 0 12px rgba(67,215,184,.18); }
.bar-axis { display: flex; justify-content: space-between; padding: 4px 3px 0; color: #71878d; font-size: 8px; }

.warning-count { color: var(--amber); font-size: 9px; }
.alarm-list { margin: 0 -4px; }
.alarm-item { display: grid; grid-template-columns: 5px 1fr auto; align-items: center; gap: 7px; width: 100%; min-height: 35px; padding: 4px; border: 0; border-top: 1px solid rgba(255,255,255,.035); background: transparent; text-align: left; cursor: pointer; }
.alarm-item:hover { background: rgba(255,255,255,.025); }
.alarm-item > i { width: 4px; height: 20px; border-radius: 2px; background: #63787e; }.alarm-item.warning > i { background: var(--amber); }.alarm-item.important > i { background: var(--orange); box-shadow: 0 0 8px rgba(237,123,67,.34); }
.alarm-item span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }.alarm-item b { overflow: hidden; color: #cbd7d9; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }.alarm-item small { color: #789097; font-size: 9px; }.alarm-item em { color: #82999f; font-size: 9px; font-style: normal; white-space: nowrap; }.alarm-item.important em { color: var(--orange); }.alarm-item.warning em { color: var(--amber); }
.view-all { width: 100%; min-height: 30px; margin-top: 3px; border: 1px solid rgba(142,178,185,.1); border-radius: 3px; background: rgba(255,255,255,.015); color: #7d9399; font-size: 10px; cursor: pointer; }.view-all:hover { border-color: var(--border-strong); color: var(--teal); }.view-all span { margin-left: 4px; }

.bottom-grid { display: grid; grid-template-columns: 1.08fr .68fr 1.12fr; gap: var(--grid-gap); min-height: 0; }
.bottom-grid .panel { padding: 10px 12px; }
.count-badge { display: grid; width: 24px; height: 20px; place-items: center; border-radius: 10px; background: rgba(67,215,184,.1); color: var(--teal); font-size: 10px; }
.order-row { display: grid; grid-template-columns: 1.8fr .58fr .78fr 1fr; align-items: center; min-height: 28px; border-top: 1px solid rgba(255,255,255,.035); color: #97a9ad; font-size: 10px; }
.order-head { min-height: 20px; border: 0; color: #71878d; font-size: 9px; }
.order-row > span:first-child { overflow: hidden; color: #b5c5c8; text-overflow: ellipsis; white-space: nowrap; }
.order-dot { display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: var(--teal); }.order-dot.important { background: var(--orange); }
.order-progress { display: inline-block; width: 42px; height: 3px; margin-right: 5px; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.06); vertical-align: middle; }.order-progress b { display: block; height: 100%; background: linear-gradient(90deg, rgba(67,215,184,.35), var(--teal)); }

.sludge-main { display: grid; grid-template-columns: 1fr .95fr; align-items: center; gap: 18px; }
.sludge-main > div:first-child { display: grid; grid-template-columns: auto 1fr; align-items: baseline; }
.sludge-main span { color: #83989d; font-size: 9px; }.sludge-main strong { color: var(--teal-bright); font-size: 20px; font-weight: 570; }.sludge-main small { margin-left: 4px; color: #83989d; font-size: 8px; }.sludge-main em { margin-left: auto; font-size: 9px; }
.moisture { display: flex; flex-direction: column; gap: 6px; }.moisture i { display: block; width: 100%; height: 5px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.055); }.moisture i b { display: block; height: 100%; background: linear-gradient(90deg, #4f9ec0, var(--teal)); }.moisture span { display: flex; justify-content: space-between; }.moisture strong { font-size: 10px; }
.sludge-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: 12px -12px -10px; border-top: 1px solid var(--border); }.sludge-stats div { padding: 8px 10px; }.sludge-stats div + div { border-left: 1px solid var(--border); }.sludge-stats span { display: block; color: #778e94; font-size: 8px; }.sludge-stats b { display: block; margin-top: 3px; color: #cfdbdd; font-size: 13px; font-weight: 520; }.sludge-stats small { color: #81969b; font-size: 8px; font-weight: 400; }.teal-text { color: var(--teal) !important; font-size: 10px !important; }

.weekly-chart { display: block; width: 100%; height: calc(100% - 34px); min-height: 92px; overflow: visible; }.data-points { fill: var(--teal); }.weekly-chart .axis-text { font-size: 8px; }

.noscript { position: fixed; inset: auto 20px 20px; z-index: 100; padding: 12px; border: 1px solid var(--amber); background: #20190e; color: #ffe0ad; }

@container console-screen (max-width: 1500px) {
  .workspace { grid-template-columns: 260px minmax(560px, 1fr) 286px; gap: 9px; }
  .main-nav { min-width: 510px; }
  .nav-item { padding: 0 8px; font-size: 13px; }
  .brand-name { display: none; }
  .brand { min-width: 44px; }
  .header-title { display: none; }
  .topbar { gap: 16px; }
  .topbar-meta { min-width: 330px; }
  .weather, .clock-block span { display: none; }
  .kpi-item { padding-right: 12px; padding-left: 12px; }
  .kpi-label { font-size: 12px; }
  .kpi-value strong { font-size: 27px; }
  .kpi-meta { gap: 5px; font-size: 9px; }
  .panel { padding-right: 10px; padding-left: 10px; }
  .scene-summary { gap: 10px; font-size: 9px; }
  .scene-summary span:last-child { display: none; }
  .equipment-body { gap: 12px; }
  .donut { width: 90px; height: 90px; }
  .order-row { grid-template-columns: 1.65fr .55fr .82fr .9fr; font-size: 9px; }
  .order-progress { width: 34px; }
  .sludge-main { gap: 10px; }
  .sludge-stats div { padding-right: 7px; padding-left: 7px; }
}

@container console-screen (max-height: 820px) {
  .dashboard-shell { grid-template-rows: 58px 84px minmax(0, 1fr) 152px; }
  .kpi-item { padding-top: 9px; }
  .kpi-value strong { font-size: 24px; }
  .kpi-meta { margin-top: 4px; }
  .panel { padding-top: 6px; padding-bottom: 6px; }
  .panel-heading { margin-bottom: 2px; }
  .left-column { grid-template-rows: 1.12fr .93fr .9fr; }
  .quality-row, .parameter { min-height: 19px; }
  .line-chart { min-height: 70px; }
  .right-column { grid-template-rows: 1fr .78fr 1.22fr; }
  .equipment-body { gap: 8px; }
  .donut { width: 78px; height: 78px; }
  .donut::before { inset: 11px; }
  .donut strong { font-size: 18px; }
  .donut-legend { gap: 3px; }
  .health-grid { display: none; }
  .health-grid div { padding-top: 5px; padding-bottom: 5px; }
  .energy-bars { height: 44px; margin-top: 3px; padding-top: 4px; }
  .alarm-item { min-height: 34px; }
  .alarm-item:nth-child(3) { display: none; }
  .view-all { min-height: 30px; }
  .bottom-grid .panel { padding-top: 7px; padding-bottom: 7px; }
  .order-row { min-height: 23px; font-size: 9px; }
  .sludge-stats { margin-top: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
