:root {
  color-scheme: dark;
  --bg: #081118;
  --surface: rgba(19, 28, 36, .88);
  --surface-2: rgba(27, 40, 51, .9);
  --border: rgba(116, 145, 166, .32);
  --text: #f2f5f7;
  --muted: #b7c7d4;
  --danger: #ff5d5d;
  --danger-bg: #381c22;
  --warning: #f3b345;
  --warning-bg: #342a19;
  --good: #49c58f;
  --good-bg: #153326;
  --primary: #61d4ff;
  --primary-bg: #162a45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 14% 10%, rgba(97, 212, 255, .24), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(73, 197, 143, .16), transparent 30%),
    radial-gradient(circle at 50% 92%, rgba(255, 93, 93, .10), transparent 34%),
    linear-gradient(rgba(97, 212, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 212, 255, .045) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, auto, 44px 44px, 44px 44px, auto;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0 28%, rgba(97, 212, 255, .08) 30%, transparent 34% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 42%);
  mix-blend-mode: screen;
  animation: background-sweep 12s ease-in-out infinite;
}

body.netdata-public .topbar,
body.netdata-public .app-footer,
body.public-sidebar .topbar,
body.public-sidebar .app-footer,
body.admin-landscape .topbar,
body.admin-landscape .app-footer {
  margin-left: 222px;
}

body.netdata-public .topbar {
  padding-block: 14px;
}

body.netdata-public .topbar h1 {
  font-size: 22px;
}

button,
select,
input {
  font: inherit;
}

a {
  color: inherit;
}

button,
select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}

input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}

input[type="url"],
input[type="password"],
input[type="text"],
input[type="time"],
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  resize: vertical;
}

button {
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, background-color .22s ease, box-shadow .22s ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: .52;
  transform: none;
  box-shadow: none;
}

button:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #07111f;
  font-weight: 700;
}

.top-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.top-link:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 18, 25, .86);
  backdrop-filter: blur(18px);
  animation: slide-down .55s ease both;
}

.motion-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.motion-backdrop span {
  position: absolute;
  inset-inline: -20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(97, 212, 255, .66), rgba(73, 197, 143, .3), transparent);
  box-shadow: 0 0 18px rgba(97, 212, 255, .35);
  animation: drift-line 9s linear infinite;
}

.motion-backdrop span:nth-child(1) {
  top: 18%;
}

.motion-backdrop span:nth-child(2) {
  top: 46%;
  animation-delay: -3s;
  animation-duration: 12s;
  opacity: .72;
}

.motion-backdrop span:nth-child(3) {
  top: 78%;
  animation-delay: -6s;
  animation-duration: 15s;
  opacity: .55;
}

.motion-backdrop::before,
.motion-backdrop::after {
  content: "";
  position: absolute;
  width: min(42vw, 520px);
  aspect-ratio: 1.8;
  border: 1px solid rgba(97, 212, 255, .18);
  transform: skewX(-18deg) rotate(-8deg);
  animation: template-float 14s ease-in-out infinite;
}

.motion-backdrop::before {
  top: 10%;
  right: -12%;
  background: linear-gradient(135deg, rgba(97, 212, 255, .08), transparent 62%);
}

.motion-backdrop::after {
  left: -16%;
  bottom: 8%;
  animation-delay: -7s;
  background: linear-gradient(135deg, rgba(73, 197, 143, .08), transparent 62%);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(25px, 3vw, 38px);
}

h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

p {
  color: var(--muted);
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.state-pill,
.health {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.state-pill.alerting {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
  animation: alarm-pulse 1.1s ease-in-out infinite;
}

.health.good {
  background: var(--good-bg);
  border-color: var(--good);
  color: var(--good);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 2vw, 28px) 32px;
}

body.public-sidebar .shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: calc(222px + clamp(14px, 2vw, 28px));
}

body.admin-landscape .shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: calc(222px + clamp(14px, 2vw, 28px));
}

.netdata-shell {
  width: min(1680px, 100%);
  padding-left: calc(222px + clamp(14px, 2vw, 28px));
}

.dashboard-page .netdata-shell {
  padding-left: clamp(14px, 2vw, 28px);
}

.room-toolbar,
.node-overview,
.charts-overview {
  display: grid;
  gap: 12px;
}

.room-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(12, 20, 27, .92);
  backdrop-filter: blur(16px);
}

.room-toolbar h2 {
  margin: 0;
  font-size: 18px;
}

.toolbar-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.node-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.public-page .node-overview {
  margin-top: 14px;
}

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

.node-card,
.chart-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 24, 32, .92);
  padding: 12px;
}

.node-card strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 28px;
}

.node-card small {
  color: var(--muted);
}

.charts-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.dashboard-rule-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.rule-card {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 17, 24, .35);
}

.rule-card small {
  color: var(--muted);
  line-height: 1.35;
}

.rule-card.disabled {
  opacity: .58;
  border-style: dashed;
}

.rule-card .rule-state {
  margin-top: auto;
  color: var(--primary);
}

.rule-card.disabled .rule-state {
  color: var(--warning);
}

.chart-line {
  height: 70px;
  margin-top: 12px;
  border: 1px solid rgba(116, 145, 166, .18);
  border-radius: 8px;
  background:
    linear-gradient(rgba(116, 145, 166, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 145, 166, .10) 1px, transparent 1px);
  background-size: 26px 18px;
  position: relative;
}

.chart-line::before {
  content: "";
  position: absolute;
  inset: 12px 10px;
  clip-path: polygon(0 72%, 12% 48%, 22% 62%, 34% 26%, 46% 55%, 58% 36%, 70% 64%, 84% 30%, 100% 46%, 100% 100%, 0 100%);
  opacity: .72;
}

.danger-line::before {
  background: linear-gradient(180deg, rgba(255, 93, 93, .55), rgba(255, 93, 93, .04));
}

.warning-line::before {
  background: linear-gradient(180deg, rgba(243, 179, 69, .55), rgba(243, 179, 69, .04));
}

.good-line::before {
  background: linear-gradient(180deg, rgba(73, 197, 143, .55), rgba(73, 197, 143, .04));
}

.mini-bars,
.sparkline,
.retention-strip,
.node-dots {
  display: flex;
  align-items: end;
  gap: 5px;
  min-height: 26px;
  margin-top: 10px;
}

.mini-bars span,
.node-dots span {
  display: block;
  width: 100%;
  border-radius: 5px;
  background: rgba(97, 212, 255, .68);
}

.mini-bars span:nth-child(1) { height: 13px; }
.mini-bars span:nth-child(2) { height: 22px; }
.mini-bars span:nth-child(3) { height: 17px; }
.mini-bars span:nth-child(4) { height: 25px; }

.sparkline span,
.retention-strip span {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--good), var(--primary), var(--warning), var(--danger));
}

.node-dots {
  align-items: center;
}

.node-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 12px rgba(73, 197, 143, .45);
}

.node-dots span:nth-child(4) {
  background: var(--warning);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .36fr);
  gap: 14px;
  align-items: start;
}

.node-table {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.node-row {
  display: grid;
  grid-template-columns: 48px minmax(130px, 1fr) minmax(150px, 1fr) minmax(110px, .7fr) minmax(90px, .6fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(8, 17, 24, .35);
}

.node-head {
  min-height: 30px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  background: transparent;
}

.node-state {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 93, 93, .45);
}

.node-state.online {
  background: var(--good);
  box-shadow: 0 0 10px rgba(73, 197, 143, .45);
}

.node-state.configured {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(97, 212, 255, .42);
}

.dashboard-rail a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.dashboard-rail a.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.app-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px clamp(16px, 3vw, 34px);
  border-top: 1px solid var(--border);
  background: rgba(10, 18, 25, .78);
  color: var(--muted);
}

.app-footer span:last-child {
  margin-left: auto;
}

.admin-shell {
  width: min(1080px, 100%);
}

body.admin-landscape .admin-shell {
  width: 100%;
}

.admin-content[hidden],
[hidden] {
  display: none !important;
}

body.admin-landscape .admin-content {
  display: grid;
  gap: 14px;
}

.signal-ribbon {
  overflow: hidden;
  margin-bottom: 16px;
  border-block: 1px solid var(--border);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.heartbeat-panel {
  display: grid;
  grid-template-columns: minmax(170px, .35fr) minmax(260px, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(19, 28, 36, .72);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.heartbeat-label {
  display: grid;
  gap: 3px;
}

.heartbeat-label span {
  color: var(--muted);
}

.heartbeat-label strong {
  color: var(--good);
}

.heartbeat-line {
  width: 100%;
  height: 70px;
  overflow: visible;
}

.heartbeat-line polyline {
  fill: none;
  stroke: var(--good);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 980;
  stroke-dashoffset: 980;
  filter: drop-shadow(0 0 8px rgba(73, 197, 143, .65));
  animation: heartbeat-draw 2.4s linear infinite;
}

.signal-track {
  display: flex;
  width: max-content;
  gap: 12px;
  padding: 10px 0;
  animation: ribbon-flow 22s linear infinite;
}

.signal-track span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(18, 34, 45, .74);
  color: var(--muted);
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(97, 212, 255, .08);
}

.control-panel,
.grid,
.workspace,
.integration-grid,
.source-section,
.ops-layout {
  display: grid;
  gap: 14px;
}

.control-panel {
  grid-template-columns: repeat(3, minmax(120px, 1fr)) minmax(260px, 1.5fr);
  align-items: stretch;
  margin-bottom: 16px;
}

.metric,
.feed-panel,
.filters,
.alert-board,
.section-side-panel,
.integration,
.admin-panel,
.source-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: blur(16px);
}

.metric {
  padding: 14px;
  animation: rise-in .55s ease both;
  transition: transform .24s ease, border-color .24s ease, background-color .24s ease;
}

.metric::after {
  content: "";
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, currentColor, transparent);
  transform-origin: left;
  animation: meter-fill 1.2s cubic-bezier(.2, .75, .25, 1) both;
}

.metric:nth-child(2) {
  animation-delay: .06s;
}

.metric:nth-child(3) {
  animation-delay: .12s;
}

.metric:hover,
.feed-panel:hover,
.filters:hover,
.alert-board:hover,
.integration:hover {
  transform: translateY(-2px);
  border-color: rgba(106, 164, 255, .65);
}

.metric-label {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.metric strong {
  font-size: 34px;
}

.metric.danger strong {
  color: var(--danger);
}

.metric.warning strong {
  color: var(--warning);
}

.metric.calm strong {
  color: var(--good);
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.grid {
  grid-template-columns: repeat(3, 1fr);
}

.ops-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, .42fr);
  align-items: start;
  margin-top: 16px;
}

.ops-layout.single-page {
  grid-template-columns: 1fr;
}

.ops-layout .grid {
  grid-template-columns: 1fr;
}

.feed-panel,
.filters,
.alert-board,
.section-side-panel,
.integration,
.admin-panel,
.source-section {
  position: relative;
  overflow: hidden;
  padding: 16px;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
  animation: rise-in .62s ease both;
}

.feed-panel::before,
.filters::before,
.alert-board::before,
.section-side-panel::before,
.integration::before,
.admin-panel::before,
.source-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, .055) 48%, transparent 54% 100%);
  transform: translateX(-115%);
  pointer-events: none;
}

.feed-panel:hover::before,
.filters:hover::before,
.alert-board:hover::before,
.section-side-panel:hover::before,
.integration:hover::before,
.admin-panel:hover::before,
.source-section:hover::before {
  animation: panel-shine .9s ease;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.source-section {
  margin-top: 0;
}

.source-section .grid {
  margin-top: 0;
}

.section-side-panel {
  grid-column: 2;
  display: grid;
  gap: 12px;
  align-self: start;
  position: sticky;
  top: 14px;
}

.side-list {
  display: grid;
  gap: 9px;
}

.side-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 9px;
  align-items: center;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 17, 24, .35);
}

.side-row strong {
  min-width: 0;
}

.side-row span:last-child {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
}

.side-filters {
  position: static;
  margin-top: 2px;
  padding: 12px;
}

.config-overview {
  margin-top: 16px;
}

.feed-panel:nth-child(2) {
  animation-delay: .08s;
}

.feed-panel:nth-child(3) {
  animation-delay: .16s;
}

.sensor-wave {
  display: grid;
  gap: 6px;
  margin: 12px 0 4px;
}

.sensor-wave span {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(97, 212, 255, .22), rgba(97, 212, 255, .92), rgba(73, 197, 143, .22));
  transform-origin: left;
  animation: wave-load 2.6s ease-in-out infinite;
}

.sensor-wave span:nth-child(2) {
  width: 72%;
  animation-delay: -.45s;
}

.sensor-wave span:nth-child(3) {
  width: 48%;
  animation-delay: -.9s;
}

.firewall-wave span {
  background: linear-gradient(90deg, rgba(243, 179, 69, .18), rgba(243, 179, 69, .92), rgba(97, 212, 255, .2));
}

.endpoint-wave span {
  background: linear-gradient(90deg, rgba(73, 197, 143, .18), rgba(73, 197, 143, .95), rgba(97, 212, 255, .22));
}

.office-cctv-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  color: var(--muted);
}

.evidence-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.evidence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.evidence-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 17, 24, .35);
  overflow: hidden;
}

.evidence-card img {
  display: block;
  width: 100%;
  aspect-ratio: 12 / 7;
  object-fit: cover;
  background: rgba(8, 17, 24, .55);
  border-bottom: 1px solid var(--border);
}

.evidence-card div {
  display: grid;
  gap: 5px;
  padding: 9px;
}

.evidence-card small {
  color: var(--muted);
}

.office-cctv-row {
  display: grid;
  grid-template-columns: auto minmax(90px, .8fr) minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 17, 24, .35);
}

.panel-head,
.board-head,
.alert-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.camera-grid-16 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.live-camera-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.live-camera {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 17, 24, .48);
}

.live-camera.online {
  border-color: rgba(73, 197, 143, .62);
}

.live-camera.offline {
  border-color: rgba(255, 93, 93, .38);
}

.live-frame {
  position: relative;
  background: #071018;
}

.live-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity .18s ease, filter .18s ease;
}

.live-frame img.refreshing {
  opacity: .82;
  filter: saturate(.92);
}

.live-camera-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  padding: 9px;
}

.live-camera-meta span:first-child,
.live-camera-meta small,
.live-camera-meta a {
  color: var(--muted);
  font-size: 12px;
}

.live-camera-meta strong {
  display: block;
  margin-top: 2px;
}

.live-camera-meta small,
.live-camera-meta a {
  grid-column: 1 / -1;
}

.live-camera-meta a {
  text-decoration: none;
  color: var(--primary);
}

.camera {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 96px;
  place-items: start;
  align-content: space-between;
  text-align: left;
  padding: 12px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.camera:hover {
  transform: perspective(700px) rotateX(2deg) rotateY(-3deg) translateY(-3px);
}

.camera::after {
  content: "";
  position: absolute;
  inset-inline: 10%;
  top: -30%;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(106, 164, 255, .18), transparent);
  transform: translateY(-120%);
  animation: camera-scan 4.8s ease-in-out infinite;
}

.camera.active::after,
.camera.warning::after {
  animation-duration: 2.8s;
}

.camera span,
.camera strong,
.camera small {
  display: block;
}

.camera small {
  color: var(--muted);
}

.camera .camera-ip {
  font-size: 12px;
  word-break: break-word;
}

.camera.active {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.camera.warning {
  background: var(--warning-bg);
  border-color: var(--warning);
}

.camera.online {
  background: var(--good-bg);
  border-color: var(--good);
}

.camera.offline {
  background: rgba(56, 28, 34, .7);
  border-color: rgba(255, 93, 93, .75);
}

.rule-list,
.endpoint-list {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}

.rule-list label,
.endpoint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  backdrop-filter: blur(10px);
  transition: transform .2s ease, border-color .2s ease;
}

.rule-list label:hover,
.endpoint:hover {
  transform: translateX(4px);
  border-color: rgba(106, 164, 255, .55);
}

.rule-list label {
  justify-content: flex-start;
}

.workspace {
  grid-template-columns: minmax(240px, 300px) 1fr;
  align-items: start;
  margin-top: 16px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(160px, .8fr) auto minmax(160px, .8fr) auto;
  align-items: center;
  margin-top: 16px;
}

.filters {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 14px;
}

.filters select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.alert-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.alert-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.alert-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(8, 17, 24, .35);
  color: var(--muted);
}

.alert-summary strong {
  margin-right: 4px;
  color: var(--text);
}

.alert {
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
  backdrop-filter: blur(10px);
  animation: alert-enter .32s ease both;
  transition: transform .24s ease, opacity .24s ease, border-color .24s ease;
}

.alert:hover {
  transform: translateX(3px);
}

.alert.new-alert {
  animation: alert-enter .38s ease both, new-alert-glow 1.5s ease-out both;
}

.alert.critical {
  border-left-color: var(--danger);
}

.alert.high {
  border-left-color: var(--warning);
}

.alert.medium {
  border-left-color: var(--primary);
}

.alert.acknowledged {
  opacity: .65;
  transform: scale(.995);
}

.alert-title {
  margin: 0;
  font-weight: 700;
}

.alert-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.source-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 12px currentColor;
}

.source-dot.cctv {
  color: var(--danger);
  background: var(--danger);
}

.source-dot.firewall {
  color: var(--warning);
  background: var(--warning);
}

.source-dot.bitdefender {
  color: var(--good);
  background: var(--good);
}

.alert-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  margin-top: 6px;
}

.alert-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.badge {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
}

.badge.critical {
  color: var(--danger);
  border-color: var(--danger);
  animation: badge-breathe 1.5s ease-in-out infinite;
}

.badge.high {
  color: var(--warning);
  border-color: var(--warning);
}

.badge.medium {
  color: var(--primary);
  border-color: var(--primary);
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.admin-panel {
  margin-top: 16px;
  animation-delay: .1s;
}

.admin-section-nav,
.public-section-nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.admin-section-nav {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

body.admin-landscape .admin-section-nav {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  width: 222px;
  grid-template-columns: 1fr;
  align-content: start;
  margin: 0;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: rgba(8, 15, 21, .96);
  backdrop-filter: blur(18px);
}

body.admin-landscape .admin-section-nav::before {
  content: "Admin";
  display: block;
  margin: 2px 4px 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

body.admin-landscape .admin-section-nav button {
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  border-radius: 6px;
}

body.admin-landscape .admin-panel {
  margin-top: 0;
}

body.admin-landscape .key-form {
  grid-template-columns: minmax(0, 1fr);
}

body.admin-landscape .admin-actions {
  position: sticky;
  bottom: 12px;
  z-index: 4;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(10, 18, 25, .92);
  backdrop-filter: blur(16px);
}

.public-section-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.netdata-public .public-section-nav,
body.public-sidebar .public-section-nav {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  width: 222px;
  grid-template-columns: 1fr;
  align-content: start;
  margin: 0;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: rgba(8, 15, 21, .96);
  backdrop-filter: blur(18px);
}

body.netdata-public .public-section-nav::before,
body.public-sidebar .public-section-nav::before {
  content: "MNSFT Room";
  display: block;
  margin: 2px 4px 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

body.netdata-public .public-section-nav button,
body.netdata-public .public-section-nav a,
body.public-sidebar .public-section-nav button,
body.public-sidebar .public-section-nav a {
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  border-radius: 6px;
}

.admin-section-nav button,
.public-section-nav button,
.public-section-nav a {
  min-height: 44px;
  padding: 8px 10px;
  white-space: normal;
}

.admin-section-nav button.active,
.public-section-nav button.active,
.public-section-nav a.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.admin-page,
.public-page {
  animation: rise-in .3s ease both;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(280px, 1.1fr);
  gap: 14px;
  margin-top: 14px;
}

.upload-box,
.sample-format,
.upload-preview,
.key-form fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.upload-box {
  display: grid;
  gap: 12px;
}

.upload-box label {
  font-weight: 700;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.key-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.login-panel {
  max-width: 620px;
  margin-inline: auto;
}

.login-form {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.login-help {
  margin-bottom: 0;
}

.key-form fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
}

.key-form legend {
  padding: 0 6px;
  font-weight: 700;
}

.key-form label {
  color: var(--muted);
}

.credential-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(97, 212, 255, .38);
  border-radius: 8px;
  background: rgba(22, 42, 69, .54);
}

.credential-card p {
  margin: 0;
}

.camera-config-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.camera-config-title span {
  color: var(--muted);
}

.camera-config-grid {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 17, 24, .28);
}

.camera-config-row {
  display: grid;
  grid-template-columns: 44px minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(78px, .45fr);
  gap: 8px;
  align-items: center;
}

.camera-config-row > span:first-child {
  color: var(--muted);
  font-weight: 700;
}

.camera-config-head {
  min-height: 26px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.check-grid label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 17, 24, .35);
}

.check-grid input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.check-grid label span {
  display: grid;
  gap: 3px;
}

.check-grid label strong {
  color: var(--text);
  font-weight: 600;
}

.check-grid label small {
  color: var(--muted);
  line-height: 1.25;
}

.sample-format pre {
  margin: 10px 0 0;
  overflow: auto;
  color: var(--muted);
}

.upload-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
}

.preview-head,
.preview-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.preview-head {
  color: var(--text);
}

.preview-row {
  min-height: 40px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.text-danger {
  color: var(--danger);
}

.integration {
  margin-top: 16px;
}

.integration-grid {
  grid-template-columns: repeat(3, 1fr);
}

.integration-grid div {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  animation: rise-in .6s ease both;
}

.integration-grid div:hover {
  animation: tiny-bounce .42s ease both;
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes alert-enter {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes new-alert-glow {
  0% {
    box-shadow: 0 0 0 rgba(255, 93, 93, 0);
  }
  35% {
    box-shadow: 0 0 0 5px rgba(255, 93, 93, .16);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 93, 93, 0);
  }
}

@keyframes alarm-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 93, 93, .18);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 93, 93, 0);
  }
}

@keyframes badge-breathe {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.25);
  }
}

@keyframes camera-scan {
  0%, 28% {
    transform: translateY(-120%);
  }
  70%, 100% {
    transform: translateY(310%);
  }
}

@keyframes drift-line {
  from {
    transform: translateX(-18%);
  }
  to {
    transform: translateX(18%);
  }
}

@keyframes ribbon-flow {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes background-sweep {
  0%, 100% {
    opacity: .55;
    transform: translateX(-8%);
  }
  50% {
    opacity: 1;
    transform: translateX(8%);
  }
}

@keyframes template-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) skewX(-18deg) rotate(-8deg);
  }
  50% {
    transform: translate3d(24px, -18px, 0) skewX(-18deg) rotate(-5deg);
  }
}

@keyframes panel-shine {
  from {
    transform: translateX(-115%);
  }
  to {
    transform: translateX(115%);
  }
}

@keyframes meter-fill {
  from {
    transform: scaleX(.08);
    opacity: .35;
  }
  to {
    transform: scaleX(1);
    opacity: .9;
  }
}

@keyframes wave-load {
  0%, 100% {
    transform: scaleX(.32);
    opacity: .52;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes tiny-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-5px);
  }
}

@keyframes heartbeat-draw {
  0% {
    stroke-dashoffset: 980;
    opacity: .45;
  }
  18% {
    opacity: 1;
  }
  55% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -980;
    opacity: .45;
  }
}

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

@media (max-width: 980px) {
  body.netdata-public .topbar,
  body.netdata-public .app-footer,
  body.public-sidebar .topbar,
  body.public-sidebar .app-footer,
  body.admin-landscape .topbar,
  body.admin-landscape .app-footer {
    margin-left: 0;
  }

  body.public-sidebar .shell,
  body.admin-landscape .shell {
    padding-left: clamp(14px, 2vw, 28px);
  }

  .netdata-shell {
    padding-left: clamp(14px, 2vw, 28px);
  }

  body.netdata-public .public-section-nav,
  body.public-sidebar .public-section-nav,
  body.admin-landscape .admin-section-nav {
    position: static;
    width: auto;
    grid-template-columns: 1fr;
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  body.netdata-public .public-section-nav::before,
  body.public-sidebar .public-section-nav::before,
  body.admin-landscape .admin-section-nav::before {
    margin-bottom: 6px;
  }

  .control-panel,
  .grid,
  .workspace,
  .integration-grid,
  .admin-grid,
  .admin-section-nav,
  .public-section-nav,
  .check-grid,
  .camera-config-row,
  .office-cctv-row,
  .ops-layout,
  .filter-row,
  .heartbeat-panel {
    grid-template-columns: 1fr;
  }

  .room-toolbar,
  .node-overview,
  .admin-kpi-row,
  .charts-overview,
  .dashboard-rule-grid,
  .dashboard-layout,
  .live-camera-grid,
  .node-row {
    grid-template-columns: 1fr;
  }

  .section-side-panel {
    grid-column: 1;
    position: static;
  }

  .actions {
    justify-content: flex-start;
  }

  .filters {
    position: static;
  }

  .signal-track {
    animation-duration: 18s;
  }
}

@media (max-width: 620px) {
  .topbar,
  .panel-head,
  .section-head,
  .board-head,
  .alert-top,
  .preview-head,
  .preview-row {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-head,
  .preview-row {
    display: flex;
  }

  .camera-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-list {
    grid-template-columns: 1fr;
  }

  .camera-config-title {
    display: grid;
  }

  button {
    width: 100%;
  }
}

/* SafeLine-inspired security console theme */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #d9e2ec;
  --text: #102033;
  --muted: #64748b;
  --danger: #e5484d;
  --danger-bg: #fff1f2;
  --warning: #d97706;
  --warning-bg: #fff7ed;
  --good: #16a36a;
  --good-bg: #ecfdf5;
  --primary: #16a36a;
  --primary-bg: #e8fff3;
  color-scheme: light;
}

body {
  background: #f4f7fb;
  color: var(--text);
}

body::before,
.motion-backdrop {
  display: none;
}

body.public-sidebar .topbar,
body.admin-landscape .topbar {
  min-height: 66px;
  border-bottom: 1px solid #e5eaf1;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
  backdrop-filter: none;
}

.topbar h1 {
  font-size: 24px;
  color: #0f172a;
}

.eyebrow {
  color: #64748b;
  letter-spacing: .06em;
}

body.public-sidebar .public-section-nav,
body.admin-landscape .admin-section-nav {
  background: #111827;
  border-right: 0;
  box-shadow: 8px 0 24px rgba(15, 23, 42, .08);
}

body.public-sidebar .public-section-nav::before,
body.admin-landscape .admin-section-nav::before {
  color: #ffffff;
  font-size: 18px;
  padding: 10px 4px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

body.public-sidebar .public-section-nav button,
body.admin-landscape .admin-section-nav button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #cbd5e1;
  justify-content: flex-start;
  box-shadow: none;
}

body.public-sidebar .public-section-nav button:hover,
body.admin-landscape .admin-section-nav button:hover {
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
  transform: none;
}

body.public-sidebar .public-section-nav button.active,
body.admin-landscape .admin-section-nav button.active {
  background: #16a36a;
  color: #ffffff;
  border-color: #16a36a;
  box-shadow: 0 10px 24px rgba(22, 163, 106, .24);
}

.shell {
  background: transparent;
}

.signal-ribbon {
  display: none;
}

.heartbeat-panel {
  display: grid;
  background: #ffffff;
  border-color: #dfe7ef;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .055);
}

.control-panel {
  margin-top: 0;
}

.metric,
.feed-panel,
.filters,
.alert-board,
.section-side-panel,
.integration,
.admin-panel,
.source-section,
.node-card,
.chart-card,
.rule-card,
.live-camera,
.evidence-card,
.camera,
.credential-card,
.upload-preview {
  border: 1px solid #dfe7ef;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .055);
  backdrop-filter: none;
}

.feed-panel::before,
.filters::before,
.alert-board::before,
.section-side-panel::before,
.integration::before,
.admin-panel::before,
.source-section::before {
  display: none;
}

.metric:hover,
.feed-panel:hover,
.filters:hover,
.alert-board:hover,
.integration:hover {
  transform: none;
  border-color: #b7c7d8;
}

.metric::after {
  height: 3px;
  background: linear-gradient(90deg, #16a36a, rgba(22, 163, 106, .08));
}

.state-pill,
.health,
.badge {
  border-radius: 999px;
  border-color: #dbe5ee;
  background: #f8fafc;
  color: #334155;
}

.state-pill.alerting,
.badge.critical,
.metric.danger strong {
  color: #e5484d;
}

.health.good,
.badge.medium,
.metric.calm strong {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.badge.high,
.metric.warning strong {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

button,
select,
input[type="url"],
input[type="password"],
input[type="text"],
input[type="time"],
textarea {
  border-color: #d9e2ec;
  background: #ffffff;
  color: #102033;
}

input[type="file"] {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #102033;
}

button {
  background: #ffffff;
  color: #102033;
}

button:hover {
  border-color: #16a36a;
  box-shadow: 0 8px 18px rgba(22, 163, 106, .12);
  transform: none;
}

button.primary {
  background: #16a36a;
  border-color: #16a36a;
  color: #ffffff;
}

.theme-toggle {
  min-height: 32px;
  border-radius: 999px;
  font-size: 13px;
}

.mfa-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.mfa-qr-wrap {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.mfa-qr-wrap img {
  width: 132px;
  height: 132px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.mfa-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 8px;
}

.mfa-status-row button {
  min-height: 34px;
  padding: 8px 14px;
}

.mfa-status-row button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

#mfaSecretText {
  display: block;
  color: var(--muted);
}

.reset-shell {
  max-width: 620px;
  padding-left: clamp(14px, 2vw, 28px) !important;
}

.section-head,
.panel-head,
.board-head {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 12px;
}

.section-head h2,
.panel-head h2,
.board-head h2,
.node-card strong,
.metric strong,
.alert-title,
.live-camera-meta strong,
.camera strong {
  color: #0f172a;
}

p,
.metric-label,
.node-card small,
.live-camera-meta small,
.evidence-card small,
.camera small,
.side-row span:last-child,
.alert-meta,
.login-help {
  color: #64748b;
}

.sensor-wave span {
  background: linear-gradient(90deg, rgba(22, 163, 106, .14), rgba(22, 163, 106, .78), rgba(20, 184, 166, .2));
}

.live-frame {
  background: #0f172a;
}

.live-camera.online {
  border-color: #9fe6c4;
}

.live-camera.offline,
.camera.offline {
  border-color: #fecdd3;
}

.camera.active {
  background: #fff1f2;
  border-color: #fda4af;
}

.camera.warning {
  background: #fff7ed;
  border-color: #fdba74;
}

.office-cctv-row,
.preview-row,
.side-row,
.endpoint,
.alert,
.node-row {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.alert.critical {
  background: #fff1f2;
  border-color: #fecdd3;
}

.alert.high {
  background: #fff7ed;
  border-color: #fed7aa;
}

.alert.medium {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.app-footer {
  border-top: 1px solid #e5eaf1;
  background: #ffffff;
  color: #64748b;
}

.live-camera-grid {
  gap: 12px;
}

@media (max-width: 980px) {
  body.public-sidebar .public-section-nav,
  body.admin-landscape .admin-section-nav {
    background: #111827;
  }
}

body.theme-dark {
  --bg: #081118;
  --surface: rgba(19, 28, 36, .94);
  --surface-2: rgba(27, 40, 51, .94);
  --border: rgba(116, 145, 166, .32);
  --text: #f2f5f7;
  --muted: #b7c7d4;
  --danger: #ff5d5d;
  --danger-bg: #381c22;
  --warning: #f3b345;
  --warning-bg: #342a19;
  --good: #49c58f;
  --good-bg: #153326;
  --primary: #49c58f;
  --primary-bg: #153326;
  background:
    linear-gradient(rgba(97, 212, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 212, 255, .045) 1px, transparent 1px),
    #081118;
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--text);
}

body.theme-dark.public-sidebar .topbar,
body.theme-dark.admin-landscape .topbar,
body.theme-dark .app-footer,
body.theme-dark .metric,
body.theme-dark .feed-panel,
body.theme-dark .filters,
body.theme-dark .alert-board,
body.theme-dark .section-side-panel,
body.theme-dark .integration,
body.theme-dark .admin-panel,
body.theme-dark .source-section,
body.theme-dark .node-card,
body.theme-dark .chart-card,
body.theme-dark .rule-card,
body.theme-dark .live-camera,
body.theme-dark .evidence-card,
body.theme-dark .camera,
body.theme-dark .credential-card,
body.theme-dark .upload-preview {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .18);
}

body.theme-dark .heartbeat-panel {
  display: grid;
}

body.theme-dark .topbar h1,
body.theme-dark .section-head h2,
body.theme-dark .panel-head h2,
body.theme-dark .board-head h2,
body.theme-dark .node-card strong,
body.theme-dark .metric strong,
body.theme-dark .alert-title,
body.theme-dark .live-camera-meta strong,
body.theme-dark .camera strong {
  color: var(--text);
}

body.theme-dark p,
body.theme-dark .metric-label,
body.theme-dark .node-card small,
body.theme-dark .live-camera-meta small,
body.theme-dark .evidence-card small,
body.theme-dark .camera small,
body.theme-dark .side-row span:last-child,
body.theme-dark .alert-meta,
body.theme-dark .login-help,
body.theme-dark .eyebrow {
  color: var(--muted);
}

body.theme-dark button,
body.theme-dark select,
body.theme-dark input[type="url"],
body.theme-dark input[type="password"],
body.theme-dark input[type="text"],
body.theme-dark input[type="time"],
body.theme-dark textarea {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

body.theme-dark .state-pill,
body.theme-dark .health,
body.theme-dark .badge,
body.theme-dark .office-cctv-row,
body.theme-dark .preview-row,
body.theme-dark .side-row,
body.theme-dark .endpoint,
body.theme-dark .alert,
body.theme-dark .node-row {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

body.theme-dark button.primary,
body.theme-dark .health.good,
body.theme-dark .badge.medium {
  background: var(--good-bg);
  border-color: var(--good);
  color: var(--good);
}

/* Vision Pro inspired spatial dashboard layer */
:root {
  --bg: #071017;
  --surface: rgba(248, 252, 255, .12);
  --surface-2: rgba(248, 252, 255, .08);
  --border: rgba(226, 238, 249, .22);
  --text: #eef7ff;
  --muted: #a9bbca;
  --danger: #ff6575;
  --danger-bg: rgba(255, 101, 117, .14);
  --warning: #ffc45d;
  --warning-bg: rgba(255, 196, 93, .14);
  --good: #5cf2b2;
  --good-bg: rgba(92, 242, 178, .13);
  --primary: #76d7ff;
  --primary-bg: rgba(118, 215, 255, .14);
  color-scheme: dark;
}

body,
body.theme-light,
body.theme-dark {
  min-height: 100vh;
  background:
    linear-gradient(145deg, rgba(118, 215, 255, .16), transparent 32%),
    linear-gradient(210deg, transparent 12%, rgba(92, 242, 178, .10) 44%, transparent 72%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px),
    #071017;
  background-size: auto, auto, 58px 58px, 58px 58px, auto;
  color: var(--text);
}

body.theme-light {
  --bg: #edf5fb;
  --surface: rgba(255, 255, 255, .62);
  --surface-2: rgba(255, 255, 255, .45);
  --border: rgba(96, 127, 153, .26);
  --text: #102033;
  --muted: #51677a;
  --danger-bg: rgba(229, 72, 77, .10);
  --warning-bg: rgba(217, 119, 6, .10);
  --good-bg: rgba(22, 163, 106, .12);
  --primary-bg: rgba(14, 116, 144, .10);
  color-scheme: light;
  background:
    linear-gradient(145deg, rgba(14, 116, 144, .18), transparent 36%),
    linear-gradient(210deg, transparent 10%, rgba(22, 163, 106, .10) 46%, transparent 72%),
    linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .028) 1px, transparent 1px),
    #edf5fb;
  background-size: auto, auto, 58px 58px, 58px 58px, auto;
}

body::before,
body.theme-dark::before,
body.theme-light::before {
  content: "";
  display: block;
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 20%, rgba(255, 255, 255, .08) 32%, transparent 38% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 46%);
  mix-blend-mode: screen;
  animation: background-sweep 14s ease-in-out infinite;
}

body.theme-light::before {
  mix-blend-mode: normal;
  opacity: .55;
}

.motion-backdrop {
  display: block;
  opacity: .45;
}

.motion-backdrop::before,
.motion-backdrop::after {
  display: none;
}

.motion-backdrop span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(118, 215, 255, .48), rgba(92, 242, 178, .36), transparent);
  box-shadow: 0 0 22px rgba(118, 215, 255, .28);
}

body.public-sidebar .topbar,
body.admin-landscape .topbar,
body.theme-dark.public-sidebar .topbar,
body.theme-dark.admin-landscape .topbar,
body.theme-light.public-sidebar .topbar,
body.theme-light.admin-landscape .topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(8, 18, 27, .62);
  color: var(--text);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
  backdrop-filter: blur(26px) saturate(1.25);
}

body.theme-light.public-sidebar .topbar,
body.theme-light.admin-landscape .topbar {
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 18px 60px rgba(29, 56, 75, .13);
}

.topbar h1,
body.theme-dark .topbar h1,
body.theme-light .topbar h1 {
  color: var(--text);
  letter-spacing: 0;
}

body.public-sidebar .public-section-nav,
body.admin-landscape .admin-section-nav,
body.theme-dark.public-sidebar .public-section-nav,
body.theme-dark.admin-landscape .admin-section-nav,
body.theme-light.public-sidebar .public-section-nav,
body.theme-light.admin-landscape .admin-section-nav {
  margin: 12px;
  height: calc(100vh - 24px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(4, 12, 19, .70);
  box-shadow: 24px 0 70px rgba(0, 0, 0, .28);
  backdrop-filter: blur(26px) saturate(1.3);
}

body.theme-light.public-sidebar .public-section-nav,
body.theme-light.admin-landscape .admin-section-nav {
  background: rgba(255, 255, 255, .56);
  box-shadow: 24px 0 70px rgba(29, 56, 75, .12);
}

body.public-sidebar .topbar,
body.public-sidebar .app-footer,
body.admin-landscape .topbar,
body.admin-landscape .app-footer {
  margin-left: 246px;
}

body.public-sidebar .shell,
body.admin-landscape .shell {
  padding-left: calc(246px + clamp(14px, 2vw, 28px));
}

body.public-sidebar .public-section-nav::before,
body.admin-landscape .admin-section-nav::before {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

body.public-sidebar .public-section-nav button,
body.admin-landscape .admin-section-nav button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
}

body.public-sidebar .public-section-nav button.active,
body.admin-landscape .admin-section-nav button.active {
  border-color: rgba(118, 215, 255, .38);
  background: linear-gradient(135deg, rgba(118, 215, 255, .22), rgba(92, 242, 178, .16));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 14px 34px rgba(0, 0, 0, .20);
}

.heartbeat-panel,
.metric,
.feed-panel,
.filters,
.alert-board,
.section-side-panel,
.integration,
.admin-panel,
.source-section,
.node-card,
.chart-card,
.rule-card,
.live-camera,
.evidence-card,
.camera,
.credential-card,
.upload-preview,
body.theme-dark .heartbeat-panel,
body.theme-dark .metric,
body.theme-dark .feed-panel,
body.theme-dark .filters,
body.theme-dark .alert-board,
body.theme-dark .section-side-panel,
body.theme-dark .integration,
body.theme-dark .admin-panel,
body.theme-dark .source-section,
body.theme-dark .node-card,
body.theme-dark .chart-card,
body.theme-dark .rule-card,
body.theme-dark .live-camera,
body.theme-dark .evidence-card,
body.theme-dark .camera,
body.theme-dark .credential-card,
body.theme-dark .upload-preview,
body.theme-light .heartbeat-panel,
body.theme-light .metric,
body.theme-light .feed-panel,
body.theme-light .filters,
body.theme-light .alert-board,
body.theme-light .section-side-panel,
body.theme-light .integration,
body.theme-light .admin-panel,
body.theme-light .source-section,
body.theme-light .node-card,
body.theme-light .chart-card,
body.theme-light .rule-card,
body.theme-light .live-camera,
body.theme-light .evidence-card,
body.theme-light .camera,
body.theme-light .credential-card,
body.theme-light .upload-preview {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 24px 70px rgba(0, 0, 0, .22);
  backdrop-filter: blur(26px) saturate(1.25);
}

body.theme-light .heartbeat-panel,
body.theme-light .metric,
body.theme-light .feed-panel,
body.theme-light .filters,
body.theme-light .alert-board,
body.theme-light .section-side-panel,
body.theme-light .integration,
body.theme-light .admin-panel,
body.theme-light .source-section,
body.theme-light .node-card,
body.theme-light .chart-card,
body.theme-light .rule-card,
body.theme-light .live-camera,
body.theme-light .evidence-card,
body.theme-light .camera,
body.theme-light .credential-card,
body.theme-light .upload-preview {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .76),
    0 24px 70px rgba(29, 56, 75, .13);
}

.node-card,
.metric,
.chart-card,
.rule-card {
  min-height: 122px;
}

.metric strong,
.node-card strong {
  font-size: 38px;
}

.metric::after {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--good), transparent);
  opacity: .8;
}

.section-head,
.panel-head,
.board-head {
  border-bottom-color: var(--border);
}

.section-head h2,
.panel-head h2,
.board-head h2,
.node-card strong,
.metric strong,
.alert-title,
.live-camera-meta strong,
.camera strong,
body.theme-dark .section-head h2,
body.theme-dark .panel-head h2,
body.theme-dark .board-head h2,
body.theme-dark .node-card strong,
body.theme-dark .metric strong,
body.theme-dark .alert-title,
body.theme-dark .live-camera-meta strong,
body.theme-dark .camera strong,
body.theme-light .section-head h2,
body.theme-light .panel-head h2,
body.theme-light .board-head h2,
body.theme-light .node-card strong,
body.theme-light .metric strong,
body.theme-light .alert-title,
body.theme-light .live-camera-meta strong,
body.theme-light .camera strong {
  color: var(--text);
}

p,
.metric-label,
.node-card small,
.live-camera-meta small,
.evidence-card small,
.camera small,
.side-row span:last-child,
.alert-meta,
.login-help,
.eyebrow,
body.theme-dark p,
body.theme-dark .metric-label,
body.theme-dark .node-card small,
body.theme-dark .live-camera-meta small,
body.theme-dark .evidence-card small,
body.theme-dark .camera small,
body.theme-dark .side-row span:last-child,
body.theme-dark .alert-meta,
body.theme-dark .login-help,
body.theme-dark .eyebrow,
body.theme-light p,
body.theme-light .metric-label,
body.theme-light .node-card small,
body.theme-light .live-camera-meta small,
body.theme-light .evidence-card small,
body.theme-light .camera small,
body.theme-light .side-row span:last-child,
body.theme-light .alert-meta,
body.theme-light .login-help,
body.theme-light .eyebrow {
  color: var(--muted);
}

.state-pill,
.health,
.badge,
.office-cctv-row,
.preview-row,
.side-row,
.endpoint,
.alert,
.node-row,
body.theme-dark .state-pill,
body.theme-dark .health,
body.theme-dark .badge,
body.theme-dark .office-cctv-row,
body.theme-dark .preview-row,
body.theme-dark .side-row,
body.theme-dark .endpoint,
body.theme-dark .alert,
body.theme-dark .node-row,
body.theme-light .state-pill,
body.theme-light .health,
body.theme-light .badge,
body.theme-light .office-cctv-row,
body.theme-light .preview-row,
body.theme-light .side-row,
body.theme-light .endpoint,
body.theme-light .alert,
body.theme-light .node-row {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
  backdrop-filter: blur(18px);
}

button,
select,
input[type="url"],
input[type="password"],
input[type="text"],
input[type="email"],
input[type="number"],
input[type="time"],
textarea,
body.theme-dark button,
body.theme-dark select,
body.theme-dark input[type="url"],
body.theme-dark input[type="password"],
body.theme-dark input[type="text"],
body.theme-dark input[type="email"],
body.theme-dark input[type="number"],
body.theme-dark input[type="time"],
body.theme-dark textarea,
body.theme-light button,
body.theme-light select,
body.theme-light input[type="url"],
body.theme-light input[type="password"],
body.theme-light input[type="text"],
body.theme-light input[type="email"],
body.theme-light input[type="number"],
body.theme-light input[type="time"],
body.theme-light textarea {
  border-color: var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  backdrop-filter: blur(18px);
}

button.primary,
body.theme-dark button.primary,
body.theme-light button.primary {
  background: linear-gradient(135deg, var(--primary), var(--good));
  border-color: rgba(255, 255, 255, .18);
  color: #041015;
  box-shadow: 0 16px 38px rgba(92, 242, 178, .20);
}

.live-frame {
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  background: rgba(4, 10, 16, .9);
}

.live-frame img {
  filter: saturate(1.08) contrast(1.02);
}

.chart-line,
.rule-card,
.camera,
.live-camera {
  transform: translateZ(0);
}

.chart-line {
  background:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px),
    rgba(255, 255, 255, .04);
  background-size: 26px 18px, 26px 18px, auto;
}

.app-footer,
body.theme-dark .app-footer,
body.theme-light .app-footer {
  border-top: 1px solid var(--border);
  background: rgba(8, 18, 27, .62);
  color: var(--muted);
  backdrop-filter: blur(26px) saturate(1.25);
}

body.theme-light .app-footer {
  background: rgba(255, 255, 255, .58);
}

.metric strong,
body.theme-dark .metric strong,
body.theme-light .metric strong {
  display: block;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent !important;
  box-shadow: none;
  color: var(--text);
  -webkit-text-fill-color: currentColor;
  line-height: 1;
}

.metric.danger strong,
body.theme-dark .metric.danger strong,
body.theme-light .metric.danger strong {
  color: var(--danger) !important;
}

.metric.warning strong,
body.theme-dark .metric.warning strong,
body.theme-light .metric.warning strong {
  color: var(--warning) !important;
}

.metric.calm strong,
body.theme-dark .metric.calm strong,
body.theme-light .metric.calm strong {
  color: var(--good) !important;
}
