:root {
  --bg: #020817;
  --panel: rgba(6, 20, 48, 0.82);
  --panel-solid: #071a38;
  --line: rgba(88, 170, 255, 0.34);
  --text: #f2f8ff;
  --muted: #8fb4d8;
  --blue: #258dff;
  --cyan: #27d9ff;
  --mint: #66b7ff;
  --violet: #7f8cff;
  --amber: #ffd35a;
  --red: #ff6b5c;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

body.auth-pending {
  background: var(--bg);
}

body.auth-pending .data-app {
  opacity: 0;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .data-app {
  filter: blur(8px);
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(2, 8, 23, 0.96), rgba(4, 30, 72, 0.72), rgba(2, 8, 23, 0.96)),
    linear-gradient(180deg, rgba(10, 76, 162, 0.22), rgba(2, 8, 23, 0.96));
}

.auth-gate::before,
.auth-gate::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.auth-gate::before {
  background:
    linear-gradient(90deg, rgba(69, 159, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(69, 159, 255, 0.07) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, transparent, black 16%, black 88%, transparent);
}

.auth-gate::after {
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(54, 143, 255, 0.12) 48%, transparent 66%),
    linear-gradient(180deg, rgba(39, 217, 255, 0.08), transparent 30%, rgba(115, 255, 191, 0.08) 100%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(98, 187, 255, 0.36);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(76, 151, 255, 0.16), rgba(9, 30, 68, 0.58)),
    rgba(6, 20, 48, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(191, 225, 255, 0.12),
    0 26px 70px rgba(0, 0, 0, 0.46),
    0 0 38px rgba(39, 217, 255, 0.16);
  backdrop-filter: blur(12px);
}

.auth-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(72, 172, 255, 0.86), transparent 28%) left top / 48% 1px no-repeat,
    linear-gradient(180deg, rgba(72, 172, 255, 0.86), transparent 32%) left top / 1px 48% no-repeat,
    linear-gradient(270deg, rgba(115, 255, 191, 0.46), transparent 26%) right bottom / 42% 1px no-repeat,
    linear-gradient(0deg, rgba(115, 255, 191, 0.46), transparent 28%) right bottom / 1px 42% no-repeat;
}

.auth-head {
  display: grid;
  place-items: center;
  padding: 4px 0 8px;
}

.auth-head h1 {
  margin: 0;
  color: #ffffff;
  font-size: 32px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 0 24px rgba(39, 217, 255, 0.32);
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(97, 183, 255, 0.36);
  border-radius: 8px;
  outline: none;
  color: #ffffff;
  background: rgba(2, 12, 30, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  font-size: 18px;
  font-weight: 800;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-field input::placeholder {
  color: rgba(169, 210, 244, 0.54);
}

.auth-field input:focus {
  border-color: rgba(39, 217, 255, 0.84);
  background: rgba(3, 18, 43, 0.84);
  box-shadow: 0 0 0 3px rgba(39, 217, 255, 0.13), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.auth-card.has-error .auth-field input {
  border-color: rgba(255, 107, 92, 0.88);
  box-shadow: 0 0 0 3px rgba(255, 107, 92, 0.13);
}

.auth-error,
.auth-hint {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.auth-error {
  color: #ffb4aa;
}

.auth-hint {
  color: #a9d2f4;
}

.auth-submit {
  height: 48px;
  border: 1px solid rgba(39, 217, 255, 0.58);
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(37, 141, 255, 0.9), rgba(39, 217, 255, 0.76));
  box-shadow: 0 18px 34px rgba(0, 104, 220, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  filter: brightness(1.08);
  box-shadow: 0 20px 38px rgba(0, 132, 255, 0.36), 0 0 24px rgba(39, 217, 255, 0.22);
  transform: translateY(-1px);
}

.data-app {
  position: relative;
  height: 100vh;
  min-height: 760px;
  overflow: hidden;
  padding: 22px 34px 28px;
  background:
    linear-gradient(90deg, rgba(2, 8, 23, 0.98), rgba(4, 30, 72, 0.62), rgba(2, 8, 23, 0.96)),
    linear-gradient(180deg, rgba(10, 76, 162, 0.34), rgba(2, 8, 23, 0.96)),
    url("assets/warehouse-bg.png") center / cover no-repeat;
}

.data-app::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(69, 159, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(69, 159, 255, 0.07) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, transparent, black 18%, black 86%, transparent);
}

.data-app::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 31%, rgba(54, 143, 255, 0.13) 49%, transparent 67%),
    linear-gradient(180deg, rgba(16, 108, 235, 0.17), transparent 24%, rgba(0, 122, 255, 0.1) 100%);
  opacity: 0.9;
}

.app-header,
.hero-strip,
.workspace-grid {
  position: relative;
  z-index: 1;
}

.app-header {
  position: relative;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 300px;
  overflow: hidden;
}

.app-header::before,
.app-header::after {
  position: absolute;
  top: 50%;
  width: min(30vw, 520px);
  height: 2px;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 20%, rgba(66, 171, 255, 0.28) 31%, rgba(39, 217, 255, 0.96) 49%, rgba(66, 171, 255, 0.28) 67%, transparent 80%),
    linear-gradient(90deg, transparent, rgba(66, 171, 255, 0.34), rgba(39, 217, 255, 0.62));
  background-position: -260px 0, 0 0;
  background-repeat: no-repeat;
  background-size: 260px 100%, 100% 100%;
  transform: translateY(-50%);
  animation: headerLineSweep 4.8s linear infinite;
}

.app-header::before {
  right: calc(50% + 340px);
}

.app-header::after {
  left: calc(50% + 340px);
  transform: translateY(-50%) scaleX(-1);
  animation-delay: -2.4s;
}

.brand-block {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 60px;
  padding: 0 72px;
}

.brand-block::before,
.brand-block::after {
  position: absolute;
  top: 50%;
  width: 360px;
  height: 2px;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(39, 217, 255, 0.95) 48%, transparent 68%),
    linear-gradient(90deg, transparent, rgba(60, 165, 255, 0.78));
  background-position: -180px 0, 0 0;
  background-repeat: no-repeat;
  background-size: 180px 100%, 100% 100%;
  animation: brandLineSweep 3.6s linear infinite;
}

.brand-block::before {
  right: 100%;
}

.brand-block::after {
  left: 100%;
  transform: scaleX(-1);
  animation-delay: -1.8s;
}

.brand-block p,
.brand-block h1 {
  margin: 0;
}

.brand-block p {
  color: #69dcff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.brand-block h1 {
  color: #ffffff;
  font-size: clamp(24px, 1.7vw, 36px);
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(54, 160, 255, 0.62), 0 8px 28px rgba(0, 0, 0, 0.45);
  animation: titleSignal 3.6s ease-in-out infinite;
}

.brand-block h1::before,
.brand-block h1::after {
  display: inline-block;
  width: 64px;
  height: 10px;
  margin: 0 18px;
  content: "";
  border-top: 2px solid rgba(73, 178, 255, 0.9);
  border-bottom: 2px solid rgba(39, 217, 255, 0.55);
  transform: skewX(-28deg) translateY(-4px);
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: rgba(31, 112, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(83, 179, 255, 0.26), 0 18px 36px rgba(0, 86, 194, 0.26);
}

.brand-mark span {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 14px 14px 4px 14px;
}

.brand-mark span:nth-child(1) { left: 13px; top: 5px; background: #7aa5ff; transform: rotate(45deg); }
.brand-mark span:nth-child(2) { right: 5px; top: 13px; background: #26dcff; transform: rotate(135deg); }
.brand-mark span:nth-child(3) { left: 13px; bottom: 5px; background: #168cff; transform: rotate(225deg); }
.brand-mark span:nth-child(4) { left: 5px; top: 13px; background: #65c4ff; transform: rotate(315deg); }

.clock {
  position: absolute;
  right: 0;
  color: #d9efff;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: clamp(17px, 1.15vw, 24px);
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(44, 147, 255, 0.58);
}

.hero-strip {
  height: 96px;
  display: grid;
  grid-template-columns: 1.35fr repeat(4, 1fr);
  gap: 14px;
  margin-top: 6px;
}

.hero-card,
.panel {
  border: 1px solid rgba(86, 165, 255, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(76, 151, 255, 0.14), rgba(9, 30, 68, 0.42)),
    rgba(6, 20, 48, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(191, 225, 255, 0.1),
    0 22px 48px rgba(0, 30, 86, 0.36);
  backdrop-filter: blur(10px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 14px 20px;
}

.hero-card::after {
  position: absolute;
  right: -30px;
  top: -40px;
  width: 110px;
  height: 110px;
  content: "";
  border-radius: 50%;
  background: rgba(47, 140, 255, 0.16);
}

.hero-card span,
.hero-card em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.hero-card strong {
  display: block;
  margin: 5px 0 3px;
  color: #ffffff;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: clamp(28px, 2vw, 42px);
  line-height: 1;
}

.hero-card.primary {
  background:
    linear-gradient(135deg, rgba(27, 128, 255, 0.38), rgba(34, 214, 255, 0.12)),
    rgba(6, 20, 48, 0.86);
}

.hero-card.warning::after {
  background: rgba(247, 191, 79, 0.16);
}

.workspace-grid {
  height: calc(100vh - 136px);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 22vw) minmax(640px, 1fr) minmax(310px, 22vw);
  gap: 16px;
  margin-top: 14px;
}

.overview-column,
.digital-twin-column,
.status-column {
  min-height: 0;
  min-width: 0;
  display: grid;
  gap: 16px;
}

.overview-column {
  grid-template-rows: 0.78fr 1fr 0.82fr;
}

.digital-twin-column {
  grid-template-rows: 1.65fr 0.95fr;
}

.status-column {
  grid-template-rows: 0.58fr 1.02fr 0.82fr 0.92fr 0.48fr;
}

.panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}

.panel::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(72, 172, 255, 0.8), transparent 24%) left top / 42% 1px no-repeat,
    linear-gradient(180deg, rgba(72, 172, 255, 0.8), transparent 28%) left top / 1px 42% no-repeat,
    linear-gradient(270deg, rgba(72, 172, 255, 0.42), transparent 22%) right bottom / 36% 1px no-repeat,
    linear-gradient(0deg, rgba(72, 172, 255, 0.42), transparent 24%) right bottom / 1px 36% no-repeat;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.section-title.with-action {
  justify-content: space-between;
}

.section-title.with-action > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(92, 180, 255, 0.32);
  border-radius: 999px;
  color: #9be8ff;
  background: rgba(37, 141, 255, 0.12);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.text-link::after {
  content: ">";
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: #ffffff;
  border-color: rgba(77, 255, 164, 0.72);
  background: rgba(77, 255, 164, 0.14);
  box-shadow: 0 0 18px rgba(77, 255, 164, 0.22);
  transform: translateY(-1px);
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: translateX(3px);
}

.section-title span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan), 0 0 28px rgba(37, 141, 255, 0.4);
}

.section-title h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(16px, 1vw, 21px);
  font-weight: 900;
}

.inventory-matrix {
  height: calc(100% - 38px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.inventory-matrix article {
  display: grid;
  place-content: center;
  min-height: 0;
  border: 1px solid rgba(93, 174, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(56, 135, 255, 0.12), rgba(9, 34, 78, 0.36)),
    rgba(255, 255, 255, 0.035);
  text-align: center;
}

.inventory-matrix b {
  color: #ffffff;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: clamp(26px, 2vw, 38px);
  line-height: 1;
}

.inventory-matrix span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.inventory-dashboard {
  height: calc(100% - 38px);
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 12px;
  margin-top: 12px;
}

.inventory-total {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(93, 174, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(39, 144, 255, 0.2), rgba(7, 28, 66, 0.62)),
    rgba(7, 28, 66, 0.5);
}

.inventory-total::after {
  display: none;
}

.inventory-total span,
.inventory-total em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.inventory-total strong {
  margin: 8px 0;
  color: #ffffff;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: clamp(38px, 3.2vw, 64px);
  line-height: 1;
}

.inventory-ring {
  position: relative;
  width: 70px;
  height: 70px;
  min-width: 70px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(9, 34, 82, 0.58);
  box-shadow: 0 0 22px rgba(39, 217, 255, 0.2);
}

.inventory-ring::before {
  position: absolute;
  inset: -5px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(93, 190, 255, 0.28);
  border-radius: 50%;
  animation: ringSpin 7s linear infinite;
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

.inventory-bars {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.inventory-bars article {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 0;
  padding: 9px 11px;
  border: 1px solid rgba(93, 174, 255, 0.16);
  border-radius: 8px;
  background: rgba(12, 44, 94, 0.52);
}

.inventory-bars div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-bars span {
  color: var(--muted);
  font-weight: 900;
}

.inventory-bars b {
  color: #eaf6ff;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: 16px;
}

.inventory-bars .inline-progress-chart {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(114, 178, 255, 0.14);
}

.donut-wrap {
  height: calc(100% - 40px);
  display: grid;
  grid-template-columns: minmax(128px, 0.84fr) 1fr;
  align-items: center;
  gap: 14px;
}

.category-layout {
  height: calc(100% - 40px);
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(92px, 0.88fr) minmax(0, 1.12fr);
  gap: 12px;
  margin-top: 12px;
}

.category-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.category-main .donut-chart {
  width: min(112px, 100%);
}

.category-main article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(93, 174, 255, 0.18);
  border-radius: 8px;
  background: rgba(9, 34, 78, 0.44);
}

.category-main article span,
.category-main article em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.category-main article strong {
  display: block;
  margin: 5px 0;
  color: #ffffff;
  font-size: clamp(19px, 1.05vw, 26px);
}

.category-list {
  min-height: 0;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-list li {
  display: grid;
  grid-template-columns: 12px minmax(68px, 1fr) 42px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #dcecff;
  font-size: 12px;
  font-weight: 900;
}

.category-list b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-list em {
  color: #68dfff;
  font-style: normal;
  text-align: right;
}

.donut-chart {
  position: relative;
  width: min(180px, 100%);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(56, 147, 255, 0.06), 0 16px 34px rgba(0, 58, 142, 0.24);
}

.legend-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-list li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: #dce9e7;
  font-size: 13px;
  font-weight: 800;
}

.legend-list b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.legend-list em {
  color: #5de1ff;
  font-style: normal;
  text-align: right;
}

.swatch {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.swatch-blue { color: var(--blue); }
.swatch-cyan { color: var(--cyan); }
.swatch-violet { color: var(--violet); }
.swatch-mint { color: var(--mint); }
.swatch-amber { color: #a9d8ff; }

.ai-summary {
  height: calc(100% - 40px);
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 16px;
}

.ai-core {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(38, 145, 255, 0.34), rgba(39, 217, 255, 0.22));
}

.ai-core i {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.ai-core i:nth-child(1) { left: 18px; top: 24px; width: 42px; height: 7px; }
.ai-core i:nth-child(2) { left: 18px; top: 38px; width: 28px; height: 7px; }
.ai-core i:nth-child(3) { left: 18px; top: 52px; width: 36px; height: 7px; }

.ai-summary strong,
.state-row strong {
  display: block;
  color: #ffffff;
  font-size: clamp(20px, 1.35vw, 29px);
  line-height: 1.2;
}

.ai-summary p,
.state-row span {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.access-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.access-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.access-grid article {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid rgba(91, 170, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 141, 255, 0.14), rgba(8, 32, 72, 0.18)),
    rgba(255, 255, 255, 0.035);
}

.access-grid article::after {
  position: absolute;
  right: -18px;
  top: -18px;
  width: 58px;
  height: 58px;
  content: "";
  border-radius: 50%;
  background: rgba(37, 141, 255, 0.15);
}

.access-grid span,
.access-grid em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.access-grid strong {
  display: block;
  margin: 6px 0 4px;
  color: #ffffff;
  font-size: clamp(20px, 1.25vw, 28px);
  line-height: 1;
}

.access-list {
  min-height: 0;
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.access-list article {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  min-height: 0;
  padding: 10px 12px 10px 32px;
  border: 1px solid rgba(91, 170, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(37, 141, 255, 0.16), rgba(7, 29, 67, 0.42)),
    rgba(255, 255, 255, 0.03);
}

.access-list article::before {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  transform: translateY(-50%);
}

.access-list span,
.access-list em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.access-list span {
  grid-column: 1;
  font-size: 13px;
}

.access-list strong {
  grid-column: 2;
  grid-row: 1 / 3;
  color: #ffffff;
  font-family: Consolas, "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-size: clamp(19px, 1.15vw, 27px);
  line-height: 1;
}

.access-list em {
  grid-column: 1;
  font-size: 12px;
}

.twin-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 104px;
  gap: 14px;
}

.twin-topbar,
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 15px;
  border: 1px solid rgba(99, 182, 255, 0.36);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(41, 130, 255, 0.22), rgba(6, 26, 60, 0.55));
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(205, 235, 255, 0.12), 0 10px 22px rgba(0, 75, 170, 0.2);
}

.monitor-main {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(83, 169, 255, 0.22);
  border-radius: 8px;
  background: #020b1d;
}

.monitor-main::after {
  position: absolute;
  inset: 0;
  content: "";
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(22, 118, 255, 0.05) 0 58%, rgba(3, 11, 30, 0.82)),
    linear-gradient(90deg, rgba(2, 12, 32, 0.66), transparent 45%, rgba(2, 12, 32, 0.5)),
    repeating-linear-gradient(0deg, rgba(86, 181, 255, 0.045) 0 1px, transparent 1px 9px);
}

.monitor-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #020b1d;
}

.monitor-embed {
  display: block;
}

.live-badge,
.monitor-title,
.monitor-reticle,
.monitor-meta {
  position: absolute;
  z-index: 2;
}

.live-badge {
  left: 18px;
  top: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(70, 175, 255, 0.5);
  border-radius: 999px;
  color: #75dcff;
  background: rgba(3, 22, 56, 0.76);
  font-size: 13px;
  font-weight: 900;
}

.monitor-title {
  left: 18px;
  bottom: 16px;
  max-width: min(420px, 72%);
}

.monitor-title strong {
  display: block;
  color: #ffffff;
  font-size: clamp(13px, 0.86vw, 18px);
  line-height: 1.2;
  padding: 7px 10px;
  border: 1px solid rgba(85, 179, 255, 0.24);
  border-radius: 6px;
  background: rgba(3, 22, 56, 0.7);
}

.monitor-title span {
  display: block;
  margin-top: 8px;
  color: #bfd6ee;
  font-weight: 800;
}

.monitor-reticle {
  left: 50%;
  top: 50%;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(54, 166, 255, 0.38);
  border-radius: 8px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 999px rgba(7, 17, 22, 0.08);
}

.monitor-reticle::before,
.monitor-reticle::after {
  position: absolute;
  content: "";
  background: rgba(54, 166, 255, 0.64);
}

.monitor-reticle::before {
  left: 50%;
  top: -24px;
  width: 1px;
  height: 166px;
}

.monitor-reticle::after {
  left: -24px;
  top: 50%;
  width: 166px;
  height: 1px;
}

.monitor-meta {
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
}

.monitor-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #dcefff;
  background: rgba(3, 22, 56, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.video-strip {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  padding: 2px 0 4px;
}

.video-dock {
  height: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 2px 48px 8px;
}

.video-dock::-webkit-scrollbar {
  display: none;
}

.video-tile {
  position: relative;
  flex: 0 0 174px;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 12px 14px 13px;
  border-radius: 8px;
  border: 1px solid rgba(80, 162, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(65, 145, 255, 0.14), rgba(255, 255, 255, 0.01)),
    #071b3a;
  cursor: pointer;
}

.video-tile.active {
  border-color: rgba(77, 255, 164, 0.9);
  background:
    linear-gradient(180deg, rgba(0, 174, 126, 0.24), rgba(37, 141, 255, 0.08)),
    #071b3a;
  box-shadow: inset 0 0 0 1px rgba(77, 255, 164, 0.22), 0 12px 28px rgba(0, 120, 92, 0.24);
  transform: translateY(-2px);
}

.video-tile::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, rgba(54, 152, 255, 0.5), rgba(39, 217, 255, 0.42));
}

.video-tile.active::after {
  background: linear-gradient(90deg, #28e18f, #73ffbf);
}

.video-tile span,
.video-tile em,
.video-tile small {
  position: relative;
  z-index: 1;
  display: block;
  font-weight: 900;
}

.video-tile small {
  color: #7fb5e8;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: 11px;
}

.video-tile span {
  align-self: center;
  color: #ffffff;
  font-size: 15px;
}

.video-tile em {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  color: #91d9ff;
  background: rgba(37, 141, 255, 0.14);
  font-size: 13px;
  font-style: normal;
}

.video-tile.active em {
  color: #86ffd0;
  background: rgba(40, 225, 143, 0.12);
}

.scroll-edge {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 42px;
  display: grid;
  place-items: center;
  border: 0;
  color: #dff5ff;
  background:
    linear-gradient(90deg, rgba(4, 18, 46, 0.92), rgba(4, 18, 46, 0.1));
  font-size: 30px;
  font-weight: 900;
  cursor: pointer;
}

.scroll-left {
  left: 0;
}

.scroll-right {
  right: 0;
  background:
    linear-gradient(270deg, rgba(4, 18, 46, 0.92), rgba(4, 18, 46, 0.1));
}

.back-link {
  position: absolute;
  left: 0;
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid rgba(99, 182, 255, 0.36);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(41, 130, 255, 0.22), rgba(6, 26, 60, 0.55));
  font-weight: 900;
  text-decoration: none;
}

.video-page {
  overflow: hidden;
}

.camera-grid {
  position: relative;
  z-index: 1;
  height: calc(100vh - 78px - 20px);
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.camera-window {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(90, 174, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(44, 133, 255, 0.14), rgba(0, 13, 39, 0.52)),
    url("assets/warehouse-bg.png") center / cover no-repeat;
  box-shadow: inset 0 -80px 80px rgba(0, 14, 46, 0.58), 0 20px 40px rgba(0, 50, 120, 0.25);
}

.camera-window::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(42, 171, 255, 0.12), transparent);
  transform: translateY(-100%);
  animation: cameraScan 4.8s linear infinite;
}

.camera-window strong,
.camera-window span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.camera-window strong {
  padding: 7px 11px;
  color: #ffffff;
  background: rgba(3, 18, 50, 0.74);
}

.camera-window span {
  float: right;
  padding: 7px 10px;
  color: #6edcff;
  background: rgba(3, 18, 50, 0.74);
}

@keyframes cameraScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.flow-panel {
  display: block;
  padding-bottom: 14px;
}

.flow-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 14px;
}

.flow-summary {
  min-width: 0;
  display: grid;
  grid-template-rows: auto repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.flow-title-row {
  min-width: 0;
}

.flow-title-row > div {
  min-width: 0;
}

.flow-title-row h2 {
  white-space: nowrap;
}

.flow-title-row .text-link {
  flex: 0 0 auto;
}

.flow-summary article {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 0;
  padding: 9px 12px;
  border: 1px solid rgba(91, 170, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 141, 255, 0.16), rgba(7, 29, 67, 0.36));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.flow-summary article::before {
  display: none;
}

.flow-summary article > * {
  position: relative;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .flow-summary article:hover {
    border-color: rgba(115, 255, 191, 0.58);
    box-shadow:
      inset 0 0 0 1px rgba(154, 242, 255, 0.08),
      0 14px 28px rgba(0, 69, 156, 0.34),
      0 0 22px rgba(39, 217, 255, 0.16);
    transform: translateY(-2px);
  }

  .flow-summary article:hover strong {
    color: #f2feff;
    text-shadow: 0 0 18px rgba(39, 217, 255, 0.46);
  }

  .flow-summary article:hover i {
    color: #ffffff;
    border-color: rgba(115, 255, 191, 0.68);
    background: rgba(39, 217, 255, 0.2);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 18px rgba(39, 217, 255, 0.32);
    transform: translateY(-1px) scale(1.05);
  }
}

.flow-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.flow-summary strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: clamp(22px, 1.45vw, 34px);
  line-height: 1;
  transition: color 0.22s ease, text-shadow 0.22s ease;
}

.flow-summary article i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(39, 217, 255, 0.34);
  border-radius: 12px;
  color: #93eaff;
  background: rgba(37, 141, 255, 0.14);
  font-style: normal;
  font-weight: 900;
  transition:
    color 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.flow-chart-area {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 22px minmax(0, 1fr);
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  color: #dbefff;
  font-size: 13px;
  font-weight: 900;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.chart-legend .out { color: var(--blue); }
.chart-legend .in { color: var(--cyan); }

.echart {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

#flowChart {
  height: 100%;
  min-height: 0;
}

.ai-insight-panel,
.env-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.ai-insight-body {
  height: calc(100% - 34px);
  min-height: 0;
  display: grid;
  align-content: center;
  gap: 7px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(91, 170, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 141, 255, 0.16), rgba(77, 255, 164, 0.07));
}

.ai-insight-body strong {
  color: #ffffff;
  font-size: clamp(16px, 1vw, 22px);
  line-height: 1;
}

.ai-insight-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.ai-insight-body div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8fb4d8;
  font-size: 12px;
  font-weight: 900;
}

.ai-insight-body em {
  color: #73ffbf;
  font-family: Consolas, "DIN Alternate", monospace;
  font-style: normal;
}

.env-dashboard {
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  padding-top: 10px;
}

.env-stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.env-stat-row article {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid rgba(91, 170, 255, 0.2);
  border-radius: 8px;
  background: rgba(12, 44, 94, 0.48);
}

.env-stat-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.env-stat-row strong {
  margin-top: 4px;
  color: #ffffff;
  font-family: Consolas, "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-size: clamp(17px, 1.15vw, 25px);
  line-height: 1;
}

.env-stat-row em {
  font-size: 13px;
  font-style: normal;
}

.env-chart-wrap {
  min-height: 0;
  display: grid;
  grid-template-rows: 20px minmax(0, 1fr);
  padding: 8px 10px 6px;
  border: 1px solid rgba(91, 170, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 20, 50, 0.36);
}

.mini-legend {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  color: #cfe9ff;
  font-size: 12px;
  font-weight: 900;
}

.mini-legend i {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
}

.mini-legend .temp { color: #27d9ff; }
.mini-legend .humidity { color: #73ffbf; }

#envChart {
  height: 100%;
  min-height: 0;
}

.status-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.state-row {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.state-icon {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #33d8ff, var(--blue));
  box-shadow: 0 15px 28px rgba(37, 141, 255, 0.32);
}

.state-icon::before {
  position: absolute;
  left: 16px;
  top: 15px;
  width: 26px;
  height: 28px;
  content: "";
  border: 4px solid #fff;
  border-radius: 3px;
}

.state-icon.cooling::before {
  content: "*";
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.door-status-grid {
  height: calc(100% - 40px);
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.door-status-grid article {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(91, 170, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(42, 137, 255, 0.18), rgba(8, 31, 72, 0.44)),
    rgba(255, 255, 255, 0.025);
  text-align: center;
}

.door-status-grid article::before {
  width: 26px;
  height: 28px;
  content: "";
  justify-self: center;
  border: 3px solid #60d7ff;
  border-radius: 4px;
  box-shadow: 0 0 16px rgba(39, 217, 255, 0.28);
}

.door-status-grid span,
.door-status-grid em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.door-status-grid strong {
  color: #ffffff;
  font-size: clamp(17px, 1.05vw, 24px);
  line-height: 1;
}

.cold-room-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.cold-room-grid {
  min-height: 0;
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.cold-room-grid article {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  min-height: 0;
  padding: 7px 14px 7px 28px;
  border: 1px solid rgba(88, 170, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(37, 141, 255, 0.18), transparent),
    rgba(255, 255, 255, 0.045);
}

.cold-room-grid article::before {
  position: absolute;
  left: 12px;
  top: 18px;
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.cold-room-grid span {
  grid-column: 1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.cold-room-grid strong {
  grid-column: 1;
  color: #ffffff;
  font-size: clamp(20px, 1.25vw, 27px);
  line-height: 1;
}

.cold-room-grid em {
  grid-column: 2;
  grid-row: 1 / 3;
  color: #72ddff;
  font-family: Consolas, "DIN Alternate", monospace;
  font-style: normal;
  font-weight: 900;
}

.cold-room-stack {
  height: calc(100% - 40px);
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.cold-room-stack article {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  align-content: stretch;
  gap: 3px 12px;
  padding: 12px;
  border: 1px solid rgba(88, 170, 255, 0.23);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(37, 141, 255, 0.2), rgba(8, 31, 72, 0.28)),
    rgba(255, 255, 255, 0.035);
}

.cold-room-stack article::before {
  display: none;
}

.cold-room-stack article::after {
  display: none;
}

.cold-room-stack span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.cold-room-stack strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: clamp(18px, 1.05vw, 25px);
  line-height: 1;
}

.cold-room-stack em {
  grid-column: 1;
  grid-row: auto;
  color: #62ddff;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: clamp(16px, 1vw, 23px);
  font-style: normal;
  font-weight: 900;
}

.cold-room-stack i {
  display: none;
  font-style: normal;
  font-weight: 900;
  text-align: left;
}

.timeline-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.timeline-panel ol {
  display: grid;
  align-content: center;
  gap: 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-panel li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  color: #dbe9e7;
  font-size: 13px;
  font-weight: 800;
}

.timeline-panel time {
  color: #8bcaff;
  font-family: Consolas, "DIN Alternate", monospace;
}

.backend-jump {
  position: relative;
  width: 100%;
  min-height: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 16px 14px 50px;
  border: 1px solid rgba(77, 255, 164, 0.48);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 174, 126, 0.22), rgba(5, 25, 60, 0.9)),
    rgba(4, 18, 46, 0.94);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), inset 0 0 24px rgba(77, 255, 164, 0.08);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.backend-jump::before {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 22px;
  height: 22px;
  content: "";
  border: 2px solid #73ffbf;
  border-radius: 6px;
  box-shadow: 0 0 16px rgba(77, 255, 164, 0.42);
  transform: translateY(-50%);
}

.backend-jump span,
.backend-jump em {
  color: #92d3ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.backend-jump strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  line-height: 1.2;
}

.backend-jump:hover,
.backend-jump:focus-visible {
  border-color: rgba(115, 255, 191, 0.88);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.28), 0 0 24px rgba(77, 255, 164, 0.2);
  transform: translateY(-2px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(1, 8, 22, 0.72);
  backdrop-filter: blur(10px);
}

.modal-backdrop.is-open {
  display: grid;
}

.modal-panel {
  position: relative;
  width: min(1320px, 94vw);
  max-height: 86vh;
  overflow: auto;
  border: 1px solid rgba(91, 170, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(37, 141, 255, 0.18), rgba(3, 18, 50, 0.95)),
    #051532;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.44);
  padding: 28px;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(91, 170, 255, 0.24);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.modal-head span {
  color: #72ddff;
  font-size: 12px;
  font-weight: 900;
}

.modal-head h2 {
  margin: 6px 0 18px;
  color: #ffffff;
  font-size: 26px;
}

.category-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
}

.modal-category-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(480px, 1.05fr);
  align-items: stretch;
  gap: 18px;
}

.modal-chart-block {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(91, 170, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(37, 141, 255, 0.16), rgba(7, 25, 61, 0.48)),
    rgba(12, 44, 94, 0.36);
}

.modal-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-chart-head span {
  display: block;
  color: #72ddff;
  font-size: 12px;
  font-weight: 900;
}

.modal-chart-head h3 {
  margin: 5px 0 0;
  color: #ffffff;
  font-size: 20px;
}

.modal-chart-head strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(115, 255, 191, 0.36);
  border-radius: 999px;
  color: #bffff1;
  background: rgba(18, 188, 139, 0.12);
  font-size: 13px;
}

.modal-pie-wrap {
  min-height: 240px;
  display: grid;
  grid-template-columns: minmax(220px, 0.92fr) minmax(210px, 1fr);
  align-items: center;
  gap: 24px;
}

.modal-pie-chart {
  position: relative;
  width: min(280px, 100%);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 50%;
  box-shadow:
    0 0 0 10px rgba(56, 147, 255, 0.07),
    0 24px 42px rgba(0, 48, 128, 0.36);
}

.modal-pie-legend {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.modal-pie-legend li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  color: #dcecff;
  font-size: 13px;
  font-weight: 900;
}

.modal-pie-legend b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.modal-pie-legend em {
  color: #68dfff;
  font-style: normal;
  text-align: right;
}

.modal-pie-legend .swatch-amber {
  color: var(--amber);
}

.modal-share-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(91, 170, 255, 0.16);
  border-radius: 8px;
  background: rgba(91, 170, 255, 0.16);
}

.modal-share-summary span {
  min-width: 0;
  padding: 11px 12px;
  color: #cde9ff;
  background: rgba(4, 19, 48, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.modal-metrics article {
  padding: 12px;
  border: 1px solid rgba(91, 170, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 20, 50, 0.42);
}

.modal-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.modal-metrics strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 22px;
}

.category-detail-grid article {
  min-width: 0;
  min-height: 98px;
  display: grid;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(91, 170, 255, 0.2);
  border-radius: 8px;
  background: rgba(12, 44, 94, 0.5);
}

.category-detail-grid article:last-child {
  grid-column: 1 / -1;
}

.category-detail-grid span,
.category-detail-grid em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.45;
}

.category-detail-grid strong {
  display: block;
  margin: 10px 0;
  color: #ffffff;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: 28px;
}

.modal-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #cde9ff;
  background: rgba(39, 217, 255, 0.08);
  font-weight: 800;
}

.detail-page {
  overflow: hidden;
}

.detail-grid {
  position: relative;
  z-index: 1;
  height: calc(100vh - 106px);
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.detail-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  min-height: 0;
  padding: 18px;
  border: 1px solid rgba(86, 165, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(76, 151, 255, 0.14), rgba(9, 30, 68, 0.42)),
    rgba(6, 20, 48, 0.78);
  box-shadow: inset 0 1px 0 rgba(191, 225, 255, 0.1), 0 22px 48px rgba(0, 30, 86, 0.36);
}

.detail-card span,
.detail-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.detail-card strong {
  color: #ffffff;
  font-family: Consolas, "DIN Alternate", "Microsoft YaHei", sans-serif;
  font-size: clamp(30px, 3vw, 58px);
}

.detail-progress-chart {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(119, 177, 255, 0.14);
}

.device-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.device-detail-card {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
}

.device-detail-card span {
  font-size: 17px;
}

.device-detail-card em {
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 1320px) {
  .data-app {
    padding: 18px;
  }

  .workspace-grid {
    grid-template-columns: minmax(260px, 23vw) minmax(540px, 1fr) minmax(270px, 23vw);
    gap: 12px;
  }

  .panel {
    padding: 14px;
  }
}

@media (max-width: 1120px) {
  body {
    overflow: auto;
  }

  .data-app {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .app-header {
    height: auto;
    padding-inline: 0;
  }

  .clock {
    position: static;
  }

  .hero-strip,
  .workspace-grid,
  .camera-grid {
    height: auto;
    grid-template-columns: 1fr;
  }

  .hero-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-column,
  .digital-twin-column,
  .status-column {
    grid-template-rows: auto;
  }

  .panel {
    min-height: 240px;
  }

  .twin-panel {
    min-height: 680px;
  }

  .camera-grid {
    grid-template-rows: none;
  }

  .camera-window {
    min-height: 240px;
  }

  .modal-category-layout {
    grid-template-columns: 1fr;
  }

  .category-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-pie-wrap {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .data-app {
    padding: 12px;
  }

  .brand-block h1 {
    white-space: normal;
    font-size: 24px;
  }

  .hero-strip,
  .inventory-matrix,
  .donut-wrap,
  .video-dock,
  .env-dashboard,
  .state-row {
    grid-template-columns: 1fr;
  }

  .monitor-main {
    min-height: 320px;
  }

  .brand-block {
    padding-inline: 18px;
  }

  .brand-block::before,
  .brand-block::after {
    display: none;
  }

  .modal-backdrop {
    padding: 14px;
  }

  .modal-panel {
    width: calc(100vw - 28px);
    padding: 22px 16px;
  }

  .category-detail-grid,
  .modal-pie-wrap,
  .modal-share-summary {
    grid-template-columns: 1fr;
  }

  .category-detail-grid article:last-child {
    grid-column: auto;
  }

  .modal-pie-chart {
    width: min(240px, 76vw);
  }
}

/* Big-screen polish */
body {
  font-size: 15px;
}

.data-app {
  padding-bottom: 72px;
}

.workspace-grid {
  height: calc(100vh - 184px);
}

.panel {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.panel:hover {
  border-color: rgba(72, 172, 255, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(191, 225, 255, 0.12),
    0 24px 52px rgba(0, 53, 138, 0.42);
}

.section-title h2 {
  font-size: clamp(18px, 1.08vw, 24px);
}

.section-title span {
  animation: pulseDot 2.4s ease-in-out infinite;
}

.inventory-dashboard {
  grid-template-columns: 1fr;
  grid-template-rows: 0.9fr 1.1fr;
}

.inventory-total {
  grid-template-columns: minmax(0, 1fr) 84px;
  grid-template-rows: auto auto;
  padding: 12px 14px;
}

.inventory-total span {
  align-self: end;
  font-size: 15px;
}

.inventory-total strong {
  margin: 3px 0;
  font-size: clamp(34px, 2.6vw, 54px);
}

.inventory-total em {
  font-size: 14px;
}

.inventory-ring {
  grid-column: 2;
  grid-row: 1 / 4;
  width: 76px;
}

.inventory-bars article {
  padding: 8px 12px;
}

.inventory-bars span,
.access-list span,
.category-list li,
.door-status-grid span,
.cold-room-stack span {
  font-size: 14px;
}

.access-list {
  gap: 9px;
}

.access-list article {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px 10px 16px;
}

.access-list article::before {
  display: none;
}

.access-list div {
  min-width: 0;
}

.access-list span,
.access-list em {
  display: block;
}

.access-list em {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.86;
}

.access-list strong {
  grid-column: 2;
  grid-row: 1;
  font-size: clamp(22px, 1.2vw, 30px);
}

.video-play-button {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(132, 218, 255, 0.48);
  border-radius: 50%;
  background: rgba(2, 16, 42, 0.56);
  box-shadow: 0 0 28px rgba(39, 217, 255, 0.18);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.video-play-button::before {
  position: absolute;
  left: 28px;
  top: 21px;
  width: 0;
  height: 0;
  content: "";
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 19px solid #dff8ff;
}

.video-play-button::after {
  position: absolute;
  inset: -8px;
  content: "";
  border: 1px solid rgba(39, 217, 255, 0.22);
  border-radius: 50%;
  animation: softRing 2.2s ease-in-out infinite;
}

.monitor-main.is-playing .video-play-button {
  display: none;
}

.flow-summary article {
  padding-left: 28px;
  padding-right: 28px;
}

.ai-insight-panel {
  min-height: 0;
}

.ai-insight-body {
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: 12px;
  height: calc(100% - 34px);
  padding: 9px 12px;
}

.ai-score {
  display: grid;
  place-items: center;
  width: 78px;
  aspect-ratio: 1;
  border: 1px solid rgba(77, 255, 164, 0.34);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 255, 164, 0.15), rgba(37, 141, 255, 0.08));
}

.ai-score strong {
  color: #73ffbf;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: 20px;
  line-height: 1;
}

.ai-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ai-copy strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
}

.ai-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.door-status-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.door-status-grid article {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
  gap: 3px 10px;
  padding: 8px 12px;
  text-align: left;
}

.door-status-grid article::before {
  display: none;
}

.door-status-grid i {
  grid-row: 1 / 3;
  width: 28px;
  height: 30px;
  border: 3px solid #60d7ff;
  border-radius: 5px;
  box-shadow: 0 0 16px rgba(39, 217, 255, 0.28);
}

.door-status-grid span {
  grid-column: 2;
}

.door-status-grid strong {
  grid-column: 3;
  grid-row: 1 / 3;
  font-size: clamp(20px, 1.1vw, 28px);
}

.door-status-grid em {
  grid-column: 2;
  font-size: 12px;
}

.cold-room-stack {
  grid-template-columns: 1fr;
  gap: 8px;
}

.cold-room-stack article {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  padding: 9px 12px 13px;
}

.cold-room-stack strong {
  margin-top: 3px;
  font-size: clamp(18px, 1vw, 24px);
}

.cold-room-stack em {
  grid-column: 2;
  grid-row: 1 / 3;
}

.cold-room-stack i {
  grid-column: 1;
  grid-row: 2;
}

.backend-jump {
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px 8px 14px;
}

.backend-jump::before {
  display: none;
}

.backend-jump span {
  display: block;
  font-size: 12px;
}

.backend-jump strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.backend-jump em {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  height: 32px;
  border-radius: 999px;
  color: #062316;
  background: linear-gradient(90deg, #73ffbf, #27d9ff);
  font-size: 13px;
}

.device-marquee {
  position: relative;
  z-index: 2;
  height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 0 18px;
  border: 1px solid rgba(86, 165, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(37, 141, 255, 0.18), rgba(5, 20, 50, 0.72)),
    rgba(6, 20, 48, 0.78);
  overflow: hidden;
}

.device-marquee > strong {
  color: #ffffff;
  font-size: 16px;
  white-space: nowrap;
}

.marquee-track {
  min-width: 0;
  overflow: hidden;
}

.marquee-content {
  width: max-content;
  display: flex;
  align-items: center;
  animation: marqueeRun 28s linear infinite;
  will-change: transform;
}

.marquee-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
}

.marquee-content span {
  position: relative;
  color: #dcefff;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.marquee-content span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  content: "";
  border-radius: 50%;
  background: #73ffbf;
  box-shadow: 0 0 12px rgba(115, 255, 191, 0.7);
}

@keyframes marqueeRun {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes headerLineSweep {
  from { background-position: -260px 0, 0 0; }
  to { background-position: calc(100% + 260px) 0, 0 0; }
}

@keyframes brandLineSweep {
  from { background-position: -180px 0, 0 0; }
  to { background-position: calc(100% + 180px) 0, 0 0; }
}

@keyframes titleSignal {
  0%, 100% { text-shadow: 0 0 18px rgba(54, 160, 255, 0.62), 0 8px 28px rgba(0, 0, 0, 0.45); }
  50% { text-shadow: 0 0 24px rgba(39, 217, 255, 0.92), 0 8px 28px rgba(0, 0, 0, 0.45); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes softRing {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .section-title span,
  .inventory-ring::before,
  .video-play-button::after {
    animation: none;
  }
}

/* Browser feedback refinements */
.overview-column {
  grid-template-rows: 1.04fr 0.9fr 0.92fr;
}

.inventory-dashboard {
  grid-template-rows: minmax(100px, 0.8fr) minmax(0, 1.2fr);
  gap: 9px;
  min-height: 0;
}

.inventory-total {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 68px;
  padding: 10px 12px;
}

.inventory-total span {
  font-size: 14px;
}

.inventory-total strong {
  font-size: clamp(30px, 2.2vw, 46px);
  line-height: 0.95;
}

.inventory-total em {
  font-size: 13px;
}

.inventory-ring {
  width: 64px;
  height: 64px;
  min-width: 64px;
}

.inventory-bars {
  gap: 7px;
  min-height: 0;
}

.inventory-bars article {
  min-height: 0;
  padding: 7px 10px;
}

.inventory-bars span {
  font-size: 13px;
}

.inventory-bars b {
  font-size: 15px;
}

.category-layout {
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.category-main {
  display: grid;
  place-items: center;
}

.category-main .donut-chart {
  width: 108px;
}

.category-list {
  align-content: center;
  gap: 10px;
}

.text-link,
.ghost-button {
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.text-link:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  border-color: rgba(115, 255, 191, 0.64);
  background: rgba(37, 217, 255, 0.18);
  box-shadow: 0 0 18px rgba(39, 217, 255, 0.24);
}

.ghost-button {
  min-width: 64px;
  height: 27px;
  padding: 0 10px;
  border: 1px solid rgba(94, 181, 255, 0.34);
  border-radius: 999px;
  color: #aeeeff;
  background: rgba(37, 141, 255, 0.12);
  box-shadow: none;
  font-size: 13px;
}

.ghost-button::after {
  content: ">";
  margin-left: 4px;
}

.access-list {
  gap: 8px;
}

.access-list article {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 12px;
  background:
    linear-gradient(90deg, rgba(38, 140, 255, 0.18), rgba(31, 217, 255, 0.05)),
    rgba(21, 70, 128, 0.42);
}

.access-list span {
  color: #e5f7ff;
  font-size: 14px;
  font-weight: 900;
}

.access-list em {
  color: #89b9dc;
  font-size: 12px;
}

.access-list strong {
  color: #ffffff;
  font-size: clamp(24px, 1.25vw, 32px);
  text-shadow: 0 0 14px rgba(39, 217, 255, 0.28);
}

.monitor-main,
.monitor-video {
  background:
    linear-gradient(rgba(2, 16, 44, 0.18), rgba(2, 16, 44, 0.48)),
    url("assets/warehouse-bg.png") center / cover no-repeat,
    #020b1d;
}

.video-tile {
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.video-tile:hover {
  transform: none;
  border-color: rgba(115, 255, 191, 0.56);
  background:
    linear-gradient(135deg, rgba(14, 88, 133, 0.92), rgba(8, 44, 92, 0.94)),
    rgba(9, 49, 106, 0.94);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.26);
}

.video-tile:not(.active):hover::after {
  background: linear-gradient(90deg, #27d9ff, #73ffbf);
  opacity: 0.76;
}

.env-chart-wrap {
  position: relative;
  overflow: hidden;
}

.env-chart-wrap::after {
  position: absolute;
  top: 34px;
  bottom: 10px;
  left: -42%;
  width: 36%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(88, 204, 255, 0.16), transparent);
  animation: chartSweep 4.6s linear infinite;
  pointer-events: none;
}

#envChart {
  animation: chartFadeIn 0.8s ease both;
}

.status-column {
  grid-template-rows: 112px 1.04fr 0.72fr 1.08fr auto;
  gap: 12px;
}

.ai-insight-body {
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 11px;
  height: calc(100% - 34px);
  padding: 8px 10px;
}

.ai-score {
  width: 62px;
}

.ai-score strong {
  font-size: 18px;
}

.ai-score span {
  writing-mode: initial;
  font-size: 11px;
  letter-spacing: 0;
}

.ai-copy {
  min-width: 0;
}

.ai-copy strong {
  font-size: 19px;
  line-height: 1.05;
  white-space: nowrap;
}

.ai-copy p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
}

.door-status-grid {
  height: calc(100% - 34px);
  gap: 7px;
  margin-top: 8px;
  overflow: hidden;
}

.door-status-grid article {
  min-height: 0;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  padding: 7px 10px;
}

.door-status-grid i {
  width: 24px;
  height: 26px;
  border-width: 2px;
}

.door-status-grid span {
  font-size: 13px;
  font-weight: 900;
}

.door-status-grid strong {
  font-size: clamp(18px, 0.98vw, 24px);
}

.door-status-grid em {
  color: #a4c8e7;
  font-size: 11px;
}

.cold-room-stack {
  height: calc(100% - 34px);
  gap: 7px;
  margin-top: 8px;
}

.cold-room-stack article {
  min-height: 0;
  padding: 8px 10px 12px;
}

.backend-jump {
  grid-template-columns: minmax(0, 1fr) 58px;
  min-height: 0;
  height: auto;
  padding: 10px 10px 10px 14px;
}

.backend-jump strong {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.25;
}

.backend-jump em {
  width: 52px;
  height: 30px;
  font-size: 13px;
}

.device-marquee {
  grid-template-columns: auto minmax(0, 1fr) minmax(238px, auto);
  gap: 14px;
}

.fault-alert {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 1px 8px;
  padding: 6px 12px;
  border-left: 1px solid rgba(255, 211, 90, 0.34);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 82, 82, 0.16), rgba(255, 211, 90, 0.07)),
    rgba(47, 17, 25, 0.28);
}

.fault-alert span {
  color: #ffd35a;
  font-size: 12px;
  font-weight: 900;
}

.fault-alert strong {
  color: #ffe28a;
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: 18px;
  line-height: 1;
}

.fault-alert em {
  grid-column: 1 / 3;
  color: #ffd6c8;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

@keyframes chartSweep {
  from { transform: translateX(0); }
  to { transform: translateX(410%); }
}

@keyframes chartFadeIn {
  from { opacity: 0.35; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .env-chart-wrap::after,
  #envChart {
    animation: none;
  }
}

/* Focused refinements from the latest screen review */
.inventory-dashboard {
  grid-template-rows: minmax(104px, 1fr) minmax(72px, 0.7fr);
}

.inventory-total {
  grid-template-columns: minmax(0, 1fr) 72px;
  grid-template-rows: auto 1fr;
}

.inventory-total span {
  color: #b6dbf7;
  font-size: 16px;
  font-weight: 900;
}

.inventory-total strong {
  align-self: center;
  font-size: clamp(42px, 2.8vw, 62px);
}

.inventory-total em {
  display: none;
}

.inventory-ring {
  align-self: center;
  width: 70px;
}

.inventory-bars {
  grid-template-rows: repeat(2, 1fr);
}

.inventory-bars article {
  padding: 10px 12px;
}

.inventory-bars span {
  font-size: 15px;
}

.inventory-bars b {
  font-size: 18px;
}

.share-panel .category-layout {
  height: calc(100% - 38px);
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: stretch;
  padding: 6px 0 2px;
}

.share-panel .category-main {
  align-content: center;
}

.share-panel .category-main .donut-chart {
  width: 124px;
}

.share-panel .category-list {
  justify-content: space-evenly;
  gap: 0;
}

.share-panel .category-list li {
  min-height: 28px;
}

.access-list {
  height: calc(100% - 38px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: stretch;
  gap: 10px;
}

.access-list article {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-content: space-between;
  gap: 8px;
  padding: 12px;
}

.access-list article::after {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 24px;
  height: 24px;
  content: "";
  border-radius: 8px;
  background: rgba(39, 217, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(77, 193, 255, 0.18);
}

.access-list span {
  font-size: 15px;
}

.access-list em {
  max-width: 86px;
  font-size: 12px;
  line-height: 1.25;
}

.access-list strong {
  justify-self: end;
  align-self: end;
  font-size: clamp(28px, 1.55vw, 38px);
  line-height: 1;
}

.monitor-main,
.monitor-video {
  background:
    radial-gradient(circle at 50% 45%, rgba(23, 86, 143, 0.34), transparent 24%),
    linear-gradient(180deg, rgba(2, 12, 34, 0.86), rgba(0, 5, 16, 0.98)),
    #010712;
}

.monitor-main::before {
  opacity: 0.2;
}

.video-tile,
.video-tile:hover,
.video-tile:active,
.video-tile.active {
  transform: none;
}

.video-tile:hover {
  border-color: rgba(86, 185, 255, 0.74);
  background:
    linear-gradient(135deg, rgba(24, 105, 174, 0.88), rgba(10, 53, 115, 0.96)),
    rgba(9, 49, 106, 0.94);
  box-shadow: inset 0 0 0 1px rgba(99, 199, 255, 0.22);
}

.video-tile.active:hover {
  border-color: rgba(115, 255, 191, 0.9);
  background:
    linear-gradient(135deg, rgba(0, 124, 118, 0.84), rgba(8, 56, 102, 0.96)),
    rgba(10, 55, 100, 0.95);
}

.flow-summary article i {
  width: 42px;
  height: 42px;
  font-size: 20px;
  animation: iconBreathe 2.6s ease-in-out infinite;
}

.ai-insight-panel {
  align-content: start;
}

.ai-loading {
  display: none;
  height: calc(100% - 42px);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(76, 177, 255, 0.2);
  border-radius: 8px;
  background: rgba(22, 75, 132, 0.36);
}

.ai-loading i {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(88, 204, 255, 0.22);
  border-top-color: #73ffbf;
  border-radius: 50%;
  animation: spinLoad 0.9s linear infinite;
}

.ai-loading span {
  color: #cfeaff;
  font-size: 14px;
  font-weight: 900;
}

.ai-insight-panel.is-loading .ai-loading {
  display: flex;
}

.ai-insight-panel.is-loading .ai-insight-body {
  display: none;
}

.ai-insight-panel.is-ready .ai-insight-body {
  animation: insightIn 0.48s ease both;
}

.ai-insight-body {
  height: auto;
  min-height: 68px;
  align-items: center;
  padding: 8px 10px;
}

.ai-score {
  width: 56px;
}

.ai-score strong {
  font-size: 16px;
}

.ai-copy strong {
  font-size: 18px;
}

.ai-copy p {
  max-width: 190px;
}

.door-status-grid {
  height: calc(100% - 38px);
  display: grid;
  place-items: stretch;
  margin-top: 8px;
}

.door-status-grid article {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  padding: 16px 14px;
}

.door-status-grid i {
  width: 34px;
  height: 36px;
}

.door-status-grid span {
  font-size: 16px;
}

.door-status-grid strong {
  font-size: clamp(28px, 1.8vw, 40px);
}

.door-status-grid em {
  font-size: 13px;
}

.cold-room-stack {
  height: calc(100% - 38px);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.cold-room-stack article {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  padding: 12px 14px 18px;
}

.cold-room-stack span {
  font-size: 14px;
}

.cold-room-stack strong {
  margin-top: 5px;
  font-size: clamp(22px, 1.28vw, 30px);
  line-height: 1;
}

.cold-room-stack em {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: clamp(18px, 1.05vw, 26px);
}

.cold-room-stack i {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  font-size: 12px;
}

.device-marquee > strong {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.device-marquee > strong::before {
  display: inline-grid;
  width: 28px;
  height: 24px;
  place-items: center;
  content: "";
  border: 1px solid rgba(115, 255, 191, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(115, 255, 191, 0.18), rgba(39, 217, 255, 0.12)),
    rgba(10, 55, 98, 0.72);
  box-shadow: 0 0 14px rgba(39, 217, 255, 0.22);
}

.device-marquee > strong::after {
  position: absolute;
  left: 27px;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: #73ffbf;
  box-shadow: 0 0 10px rgba(115, 255, 191, 0.9);
}

@keyframes iconBreathe {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(39, 217, 255, 0.24), 0 0 0 rgba(39, 217, 255, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(115, 255, 191, 0.48), 0 0 18px rgba(39, 217, 255, 0.26); }
}

@keyframes spinLoad {
  to { transform: rotate(360deg); }
}

@keyframes insightIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .flow-summary article,
  .flow-summary article::before,
  .flow-summary article i,
  .flow-summary strong,
  .ai-loading i,
  .ai-insight-panel.is-ready .ai-insight-body {
    animation: none;
    transition: none;
  }

  .flow-summary article:hover,
  .flow-summary article:hover::before,
  .flow-summary article:hover i {
    transform: none;
  }
}

.monitor-reticle {
  display: none;
}

.bottom-status-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
}

.bottom-status-row .device-marquee {
  height: 42px;
  margin-top: 0;
  grid-template-columns: auto minmax(0, 1fr);
}

.bottom-status-row .fault-alert {
  min-height: 42px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 7px 14px;
  cursor: pointer;
  appearance: none;
  border: 1px solid rgba(255, 197, 83, 0.34);
  border-left: 3px solid rgba(255, 197, 83, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 86, 86, 0.2), rgba(255, 193, 77, 0.08)),
    rgba(54, 25, 25, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 22px rgba(255, 142, 68, 0.12);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.bottom-status-row .fault-alert:hover,
.bottom-status-row .fault-alert:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 216, 109, 0.68);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 24px rgba(255, 142, 68, 0.2);
}

.monitor-main.is-no-resource,
.monitor-main.is-no-resource .monitor-video {
  background: #000;
}

.monitor-main.is-no-resource::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.72)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px);
}

.monitor-main.is-no-resource .video-play-button {
  display: block;
  border-color: rgba(72, 230, 255, 0.72);
  background:
    radial-gradient(circle, rgba(72, 230, 255, 0.16), rgba(2, 16, 42, 0.68) 58%, rgba(0, 0, 0, 0.72));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 34px rgba(39, 217, 255, 0.34),
    inset 0 0 18px rgba(39, 217, 255, 0.12);
}

.video-blackout {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 8px;
  place-items: center;
  min-width: 168px;
  padding: 16px 20px;
  border: 1px solid rgba(99, 182, 255, 0.26);
  border-radius: 8px;
  color: #dcefff;
  background: rgba(0, 0, 0, 0.62);
  box-shadow: 0 0 26px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
}

.video-blackout strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.video-blackout span {
  color: #7fa9cb;
  font-size: 13px;
  font-weight: 900;
}

.monitor-main.is-no-resource .video-blackout {
  display: none;
}

.monitor-main.is-no-resource .monitor-reticle {
  opacity: 0.18;
}

.monitor-main.is-no-resource .live-badge {
  color: #a8c4dc;
  border-color: rgba(145, 180, 210, 0.32);
  background: rgba(0, 0, 0, 0.68);
}

.camera-window.no-resource {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(90, 174, 255, 0.18), 0 20px 40px rgba(0, 0, 0, 0.35);
}

.camera-window.no-resource::before {
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.055), transparent),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 9px);
  opacity: 0.6;
}

.camera-window.no-resource em {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  padding: 10px 15px;
  border: 1px solid rgba(99, 182, 255, 0.22);
  border-radius: 8px;
  color: #8baecc;
  background: rgba(0, 0, 0, 0.66);
  font-style: normal;
  font-weight: 900;
}

.camera-window.no-resource span {
  color: #a8c4dc;
}

.camera-window.live-camera {
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(90, 174, 255, 0.18), 0 20px 40px rgba(0, 0, 0, 0.35);
}

.camera-window.live-camera::before {
  pointer-events: none;
  z-index: 1;
}

.camera-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.ai-insight-body {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  min-height: 86px;
}

.ai-copy {
  display: block;
}

.ai-copy strong {
  white-space: normal;
}

.ai-copy p {
  max-width: none;
  margin-top: 8px;
}

.bottom-status-row .fault-alert span {
  font-size: 14px;
}

.bottom-status-row .fault-alert strong {
  justify-self: end;
  font-size: 20px;
}

.bottom-status-row .fault-alert em {
  grid-column: 1 / 3;
  font-size: 12px;
}

.fault-modal-panel {
  width: min(720px, calc(100vw - 56px));
}

.fault-list {
  display: grid;
  gap: 12px;
}

.fault-list article {
  display: grid;
  grid-template-columns: 88px 86px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 197, 83, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 88, 88, 0.13), rgba(37, 141, 255, 0.06)),
    rgba(9, 32, 72, 0.64);
}

.fault-list span,
.fault-list time {
  color: #a8c8e7;
  font-size: 13px;
  font-weight: 900;
}

.fault-list strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-radius: 999px;
  color: #2a1600;
  background: linear-gradient(90deg, #ffe28a, #ffb456);
  font-size: 14px;
}

.fault-list em {
  color: #ffffff;
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}

.fault-list time {
  color: #ffd77c;
  text-align: right;
}

/* Metric card wording and icon layout refinements */
.env-stat-row article {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 12px 12px 12px 14px;
}

.env-stat-row article > div {
  min-width: 0;
}

.env-stat-row article > .env-icon {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(39, 217, 255, 0.16), rgba(115, 255, 191, 0.07)),
    rgba(5, 24, 58, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(84, 187, 255, 0.28),
    0 0 18px rgba(39, 217, 255, 0.16);
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.temp-icon {
  color: #5de6ff;
}

.humidity-icon {
  color: #73ffbf;
}

.env-icon .icon-line {
  stroke: currentColor;
  stroke-width: 2.6;
}

.env-icon .icon-soft {
  opacity: 0.76;
  stroke-width: 2.2;
}

.temp-icon .icon-frost {
  stroke: #a8f7ff;
  stroke-width: 2.1;
}

.temp-icon .icon-core,
.humidity-icon .icon-fill {
  fill: currentColor;
  opacity: 0.28;
}

.temp-icon .icon-core {
  opacity: 0.86;
  filter: drop-shadow(0 0 7px rgba(39, 217, 255, 0.72));
}

.humidity-icon .icon-fill {
  filter: drop-shadow(0 0 8px rgba(115, 255, 191, 0.48));
}

.flow-summary span {
  color: #a9d2f4;
  font-size: 14px;
}

.flow-summary strong {
  font-size: clamp(24px, 1.55vw, 36px);
}

/* Final browser-comment layout pass */
.share-panel .category-layout {
  height: calc(100% - 38px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(84px, 0.82fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  padding: 5px 0 0;
}

.share-panel .category-main {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  align-content: center;
}

.share-panel .category-main .donut-chart {
  width: min(112px, 46%);
  min-width: 92px;
}

.share-panel .category-list {
  display: grid;
  grid-template-columns: 1fr;
  align-content: space-between;
  gap: 5px;
}

.share-panel .category-list li {
  grid-template-columns: 10px minmax(0, 1fr) 46px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(91, 170, 255, 0.14);
  border-radius: 6px;
  background: rgba(10, 41, 87, 0.28);
}

.access-list {
  height: calc(100% - 38px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: stretch;
  margin-top: 10px;
}

.access-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  gap: 7px 10px;
  padding: 12px;
  border-color: rgba(82, 184, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(37, 141, 255, 0.2), rgba(7, 29, 67, 0.44)),
    rgba(255, 255, 255, 0.03);
}

.access-list article::before {
  display: none;
}

.access-list article::after {
  display: none;
}

.access-list article > * {
  position: relative;
  z-index: 1;
}

.access-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(112, 216, 255, 0.28);
  border-radius: 8px;
  color: #78e9ff;
  background:
    linear-gradient(135deg, rgba(39, 217, 255, 0.18), rgba(115, 255, 191, 0.08)),
    rgba(6, 32, 75, 0.42);
  box-shadow:
    inset 0 0 14px rgba(87, 210, 255, 0.14),
    0 0 18px rgba(39, 217, 255, 0.1);
  font-style: normal;
}

.access-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.access-icon-door {
  color: #80ffca;
}

.access-icon-gateway {
  color: #99c7ff;
}

.access-icon-health {
  color: #ffd76d;
}

.access-list article div {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.access-list span {
  display: block;
  color: #dff4ff;
  font-size: 15px;
  line-height: 1.1;
  white-space: nowrap;
}

.access-list em {
  display: block;
  max-width: 100%;
  color: #93bad8;
  font-size: 12px;
  line-height: 1.25;
}

.access-list strong {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  align-self: end;
  min-width: 48px;
  padding: 3px 8px;
  border: 1px solid rgba(115, 255, 191, 0.36);
  border-radius: 999px;
  color: #9affcc;
  background: rgba(36, 180, 134, 0.14);
  font-size: clamp(14px, 0.8vw, 18px);
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.door-status-grid article {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 5px 14px;
  padding: 18px 18px;
  text-align: left;
}

.door-status-grid i {
  display: none;
}

.door-status-grid span {
  grid-column: 1;
  grid-row: 1;
  color: #dff4ff;
  font-size: 16px;
}

.door-status-grid em {
  grid-column: 1;
  grid-row: 2;
  color: #83dfff;
  font-size: 12px;
}

.door-status-grid strong {
  grid-column: 2;
  grid-row: 1 / 3;
  justify-self: end;
  padding: 4px 0;
  color: #ffffff;
  font-size: clamp(30px, 1.72vw, 42px);
  line-height: 1;
}

.cold-room-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
}

.cold-room-stack article {
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: start;
  gap: 14px;
  padding: 14px 14px 16px;
  border-color: rgba(77, 197, 255, 0.32);
  background:
    radial-gradient(circle at 86% 18%, rgba(39, 217, 255, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(31, 116, 208, 0.28), rgba(7, 33, 78, 0.5)),
    rgba(255, 255, 255, 0.025);
}

.cold-room-stack article::before {
  position: absolute;
  right: 12px;
  top: 12px;
  display: block;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: #73ffbf;
  box-shadow: 0 0 12px rgba(115, 255, 191, 0.86);
}

.cold-room-stack article::after {
  position: absolute;
  right: 14px;
  bottom: 10px;
  left: 14px;
  display: block;
  height: 3px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, #27d9ff, rgba(115, 255, 191, 0.64));
  box-shadow: 0 0 14px rgba(39, 217, 255, 0.28);
}

.cold-room-stack article > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: start;
  gap: 7px;
  padding-right: 14px;
}

.cold-room-stack span {
  color: #c9e8ff;
  font-size: 14px;
  line-height: 1;
}

.cold-room-stack strong {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid rgba(115, 255, 191, 0.4);
  border-radius: 999px;
  color: #82ffce;
  background: rgba(18, 116, 85, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.cold-room-stack em {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  justify-self: start;
  padding: 0 0 8px;
  color: #6de7ff;
  font-size: clamp(24px, 1.55vw, 34px);
  line-height: 1;
  text-shadow: 0 0 15px rgba(39, 217, 255, 0.34);
}

.cold-room-stack i {
  grid-column: 1;
  grid-row: 2;
  color: #9cc5e4;
  font-size: 12px;
}

.device-marquee > .status-title {
  display: grid;
  grid-template-columns: 28px auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 8px;
  padding-right: 4px;
  color: #ffffff;
  line-height: 1;
}

.device-marquee > .status-title::before {
  grid-row: 1 / 3;
}

.device-marquee > .status-title::after {
  left: 20px;
  top: 17px;
}

.device-marquee > .status-title span {
  font-size: 14px;
  font-weight: 900;
}

.device-marquee > .status-title em {
  color: #78eaff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.bottom-status-row .fault-alert {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  grid-template-rows: 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 12px;
}

.bottom-status-row .fault-alert i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 224, 138, 0.62);
  border-radius: 50%;
  color: #3a1700;
  background: linear-gradient(180deg, #ffe28a, #ff8e44);
  box-shadow: 0 0 14px rgba(255, 142, 68, 0.42);
  font-family: Consolas, "DIN Alternate", monospace;
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.bottom-status-row .fault-alert span {
  font-size: 14px;
}

.bottom-status-row .fault-alert strong {
  justify-self: end;
  font-size: 20px;
}

.bottom-status-row .fault-alert.is-normal {
  border-color: rgba(115, 255, 191, 0.4);
  border-left-color: rgba(115, 255, 191, 0.9);
  background:
    linear-gradient(135deg, rgba(27, 184, 127, 0.2), rgba(39, 217, 255, 0.08)),
    rgba(8, 54, 56, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 22px rgba(39, 217, 255, 0.1);
}

.bottom-status-row .fault-alert.is-normal i {
  border-color: rgba(115, 255, 191, 0.62);
  color: #053326;
  background: linear-gradient(180deg, #9bffd8, #35dca3);
  box-shadow: 0 0 14px rgba(115, 255, 191, 0.3);
}

.bottom-status-row .fault-alert.is-normal span,
.bottom-status-row .fault-alert.is-normal strong {
  color: #9bffd8;
}

.fault-list .no-fault {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 8px;
  min-height: 120px;
  text-align: center;
  border-color: rgba(115, 255, 191, 0.28);
  background: rgba(20, 105, 82, 0.14);
}

.fault-list .no-fault strong {
  color: #82ffce;
}

.fault-list .no-fault em {
  color: #a8d8ca;
}

@media (max-width: 720px) {
  .auth-gate {
    padding: 18px;
  }

  .auth-card {
    padding: 22px;
  }

  .auth-head h1 {
    font-size: 26px;
  }

  .auth-field input,
  .auth-submit {
    height: 46px;
  }
}

/* Right-column browser comment refinements */
@media (min-width: 721px) {
  .status-column {
    grid-template-rows: 178px minmax(208px, 0.84fr) minmax(176px, 0.88fr) 1.08fr auto;
  }

  .env-dashboard {
    grid-template-rows: 52px minmax(0, 1fr);
    gap: 7px;
    padding-top: 7px;
  }

  .env-stat-row article {
    padding-block: 9px;
  }

  .env-stat-row article > .env-icon {
    width: 36px;
    height: 36px;
  }

  .env-chart-wrap {
    grid-template-rows: 18px minmax(0, 1fr);
    padding: 6px 9px 5px;
  }
}

.ai-insight-body {
  align-content: stretch;
  padding: 10px 12px;
}

.ai-insight-body .ai-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-content: stretch;
  gap: 7px;
}

.ai-insight-body .ai-copy strong,
.ai-insight-body .ai-copy p {
  width: 100%;
  max-width: none;
  white-space: normal;
}

.ai-insight-body .ai-copy p {
  margin-top: 0;
  color: #a9c9e4;
  font-size: 12px;
  line-height: 1.5;
}

.door-status-grid article {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 10px 16px;
  padding: 16px 18px;
  border-color: rgba(77, 197, 255, 0.34);
  background:
    radial-gradient(circle at 88% 50%, rgba(39, 217, 255, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(31, 116, 208, 0.28), rgba(7, 33, 78, 0.5)),
    rgba(255, 255, 255, 0.025);
}

.door-status-grid article::after {
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  content: "";
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #27d9ff, #73ffbf);
  box-shadow: 0 0 12px rgba(39, 217, 255, 0.5);
}

.door-status-grid span {
  align-self: end;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.door-status-grid em {
  width: max-content;
  align-self: start;
  padding: 3px 8px;
  border: 1px solid rgba(115, 255, 191, 0.42);
  border-radius: 999px;
  color: #9affcc;
  background: rgba(36, 180, 134, 0.14);
  font-size: 11px;
  line-height: 1;
}

.door-status-grid strong {
  min-width: 76px;
  padding-left: 16px;
  border-left: 1px solid rgba(91, 170, 255, 0.22);
  text-align: right;
  text-shadow: 0 0 16px rgba(91, 210, 255, 0.3);
}
