/* Web-WAF cyber operations visual layer */
:root {
  --cyber-bg: #060a0f;
  --cyber-bg-2: #090f15;
  --cyber-panel: #0d151c;
  --cyber-panel-2: #111c24;
  --cyber-line: rgba(107, 232, 219, 0.13);
  --cyber-line-strong: rgba(82, 230, 212, 0.32);
  --cyber-cyan: #38e8d0;
  --cyber-blue: #5ba7ff;
  --cyber-amber: #ffb45f;
  --cyber-red: #ff6272;
  --cyber-text: #edf7f5;
  --cyber-muted: #7d9497;
  color-scheme: dark;
}

body {
  background-color: var(--cyber-bg);
  background-image:
    linear-gradient(rgba(72, 211, 196, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 211, 196, 0.026) 1px, transparent 1px);
  background-size: 40px 40px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.2;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.012) 3px 4px);
}

/* Login */
.login-shell {
  position: relative;
  background:
    linear-gradient(90deg, rgba(56, 232, 208, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(56, 232, 208, 0.025) 1px, transparent 1px),
    #05090d;
  background-size: 48px 48px;
}

.login-shell::before {
  content: "SECURE GATEWAY  /  AUTHENTICATION REQUIRED";
  position: absolute;
  top: 24px;
  left: 32px;
  color: #3c5a5d;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.login-stage {
  min-height: 650px;
  border-color: rgba(89, 227, 211, 0.2);
  background: #0b1217;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 60px rgba(56, 232, 208, 0.035);
}

.login-brand {
  border-color: rgba(89, 227, 211, 0.14);
  background:
    linear-gradient(135deg, rgba(56, 232, 208, 0.06), transparent 44%),
    #091015;
}

.login-brand::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 150px;
  height: 150px;
  border-right: 1px solid rgba(56, 232, 208, 0.25);
  border-bottom: 1px solid rgba(56, 232, 208, 0.25);
  clip-path: polygon(45% 0, 100% 0, 100% 100%, 0 100%, 0 45%);
}

.login-brand-copy h1 {
  max-width: 520px;
  font-size: clamp(42px, 4.2vw, 64px);
  line-height: 1.12;
  text-shadow: 0 0 26px rgba(56, 232, 208, 0.12);
}

.login-telemetry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 42px;
  border-top: 1px solid rgba(89, 227, 211, 0.15);
  border-bottom: 1px solid rgba(89, 227, 211, 0.15);
}

.login-telemetry > div {
  min-width: 0;
  padding: 16px 14px 15px 0;
}

.login-telemetry > div + div {
  padding-left: 14px;
  border-left: 1px solid rgba(89, 227, 211, 0.12);
}

.login-telemetry strong,
.login-telemetry span {
  display: block;
}

.login-telemetry strong {
  color: var(--cyber-cyan);
  font: 700 16px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.login-telemetry span {
  margin-top: 6px;
  color: #5f7778;
  font-size: 9px;
}

.login-form {
  position: relative;
  color: var(--cyber-text);
  background: #0c141a;
}

.login-form::before {
  content: "ENCRYPTED / TLS 1.3";
  position: absolute;
  right: 24px;
  bottom: 20px;
  color: #355054;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.login-form .product-kicker,
.login-form-head h2 {
  color: var(--cyber-text);
}

.login-form .product-kicker {
  color: var(--cyber-cyan);
}

.login-form-head > p:last-child {
  color: var(--cyber-muted);
}

.login-form .login-field > label {
  color: #9badae;
}

.login-input-shell {
  border-color: rgba(126, 162, 164, 0.25);
  background: #081016;
}

.login-input-shell:focus-within {
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 0 3px rgba(56, 232, 208, 0.08), inset 3px 0 var(--cyber-cyan);
}

.login-form .login-input-shell input {
  color: #eff9f7;
  background: transparent;
}

.login-submit {
  position: relative;
  overflow: hidden;
  background: var(--cyber-cyan);
  box-shadow: 0 0 22px rgba(56, 232, 208, 0.13);
}

/* Application shell */
.app {
  background: transparent;
}

.sidebar {
  border-right-color: rgba(96, 231, 214, 0.13);
  background: rgba(7, 13, 18, 0.97);
}

.logo {
  border-bottom-color: var(--cyber-line);
}

.logo::after {
  content: "NODE 01";
  margin-left: auto;
  color: #39575a;
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sidebar nav button {
  position: relative;
  min-height: 44px;
  border: 1px solid transparent;
}

.sidebar nav button::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}

.sidebar nav button:hover {
  border-color: rgba(56, 232, 208, 0.1);
  background: rgba(56, 232, 208, 0.045);
}

.sidebar nav button.active {
  border-color: rgba(56, 232, 208, 0.2);
  background: rgba(56, 232, 208, 0.09);
  box-shadow: inset 3px 0 var(--cyber-cyan), 0 0 22px rgba(56, 232, 208, 0.035);
}

.sidebar nav button.active::after {
  background: var(--cyber-cyan);
  box-shadow: 0 0 8px var(--cyber-cyan);
}

.topbar {
  border-bottom-color: var(--cyber-line);
  background: rgba(8, 14, 19, 0.94);
  backdrop-filter: blur(16px);
}

.topbar-context {
  color: #4c7777;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.content {
  background: transparent;
}

.panel,
.metric,
.metric-card,
.applications-toolbar,
.cc-global-panel,
.application-card,
.cc-policy-card,
.acl-overview-card,
.system-card,
.settings-section {
  border-color: var(--cyber-line);
  background: rgba(12, 20, 26, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.panel,
.metric-card,
.application-card,
.cc-policy-card {
  position: relative;
  overflow: hidden;
}

.panel::before,
.metric-card::before,
.application-card::before,
.cc-policy-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 34px;
  height: 1px;
  background: var(--cyber-cyan);
  box-shadow: 0 0 8px rgba(56, 232, 208, 0.6);
}

table thead,
.table-wrap {
  background: rgba(6, 12, 17, 0.42);
}

th {
  color: #6f898b;
  font-size: 10px;
  text-transform: uppercase;
}

td {
  border-bottom-color: rgba(99, 222, 208, 0.07);
}

tbody tr:hover td {
  background: rgba(56, 232, 208, 0.035);
}

.code {
  color: #68ead8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.primary {
  border-color: var(--cyber-cyan);
  background: var(--cyber-cyan);
  color: #06110f;
}

.primary:hover {
  border-color: #72f4e2;
  background: #72f4e2;
  box-shadow: 0 0 20px rgba(56, 232, 208, 0.16);
}

.field input,
.field select,
.field textarea,
.filter-bar input,
.filter-bar select,
.header-right select,
.search-control input {
  border-color: rgba(116, 157, 160, 0.24);
  background: #081116;
}

/* Security operations screen */
body.screen-mode::before {
  opacity: 0.3;
}

.big-screen-fullscreen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 680px;
  padding: 0 18px 18px;
  gap: 12px;
  background:
    linear-gradient(rgba(56, 232, 208, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 232, 208, 0.035) 1px, transparent 1px),
    #050a0e;
  background-size: 54px 54px;
}

.big-screen-fullscreen::before {
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyber-cyan) 18%, var(--cyber-blue) 50%, var(--cyber-red) 82%, transparent);
}

.screen-header-row {
  flex: 0 0 72px;
  height: 72px;
  margin: 0 -18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--cyber-line);
  background: rgba(4, 10, 14, 0.88);
}

.screen-logo-title {
  min-width: 0;
}

.screen-logo-title > div p {
  margin-bottom: 4px;
  color: #4d7b7a;
  font-size: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.screen-logo-title h2 {
  overflow: hidden;
  color: #f3fbf9;
  font-size: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-dot-pulse {
  position: relative;
  flex: 0 0 10px;
}

.live-dot-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(56, 232, 208, 0.5);
  border-radius: 50%;
  animation: radarPulse 1.8s ease-out infinite;
}

@keyframes radarPulse {
  to { opacity: 0; transform: scale(1.7); }
}

.screen-head-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
}

.screen-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(56, 232, 208, 0.14);
  border-radius: 4px;
  color: #6f8c8c;
  background: rgba(56, 232, 208, 0.035);
  font-size: 9px;
  font-weight: 700;
}

.screen-status-chip strong {
  color: #a9f4e8;
}

.btn-s-tab,
.btn-s-action,
.screen-clock-tag {
  border-color: var(--cyber-line);
  border-radius: 4px;
  background: #0a1217;
}

.btn-s-tab.active {
  border-color: var(--cyber-cyan);
  background: rgba(56, 232, 208, 0.12);
  color: var(--cyber-cyan);
  box-shadow: inset 0 -2px var(--cyber-cyan);
}

.btn-s-action {
  gap: 6px;
}

.btn-s-action .lucide-icon {
  width: 14px;
  height: 14px;
}

.screen-scope-bar {
  position: relative;
  z-index: 2;
  flex: 0 0 52px;
  min-width: 0;
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--cyber-line);
  border-left: 2px solid var(--cyber-cyan);
  border-radius: 5px;
  background: rgba(8, 15, 20, 0.94);
  overflow: hidden;
}

.screen-scope-current {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-right: 1px solid var(--cyber-line);
}

.scope-shield {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 232, 208, 0.24);
  border-radius: 4px;
  color: var(--cyber-cyan);
  background: rgba(56, 232, 208, 0.07);
}

.scope-shield .lucide-icon { width: 17px; height: 17px; }

.screen-scope-current > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
}

.screen-scope-current span,
.screen-scope-current strong,
.screen-scope-current small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-scope-current > div > span {
  grid-column: 1 / -1;
  color: #456568;
  font: 700 7px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.screen-scope-current strong {
  margin-top: 4px;
  color: #e4f0ee;
  font-size: 11px;
}

.screen-scope-current small {
  align-self: end;
  color: #60797b;
  font-size: 8px;
  text-align: right;
}

.screen-app-switcher {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 1px;
  padding: 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.screen-app-chip {
  position: relative;
  min-width: 132px;
  max-width: 200px;
  flex: 1 0 132px;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #6f8384;
  background: transparent;
  text-align: left;
}

.screen-app-chip:hover {
  border-color: color-mix(in srgb, var(--app-color) 22%, transparent);
  background: color-mix(in srgb, var(--app-color) 5%, transparent);
}

.screen-app-chip.active {
  border-color: color-mix(in srgb, var(--app-color) 34%, transparent);
  color: #dce9e7;
  background: color-mix(in srgb, var(--app-color) 9%, transparent);
  box-shadow: inset 0 -2px var(--app-color);
}

.screen-app-chip.is-off {
  opacity: 0.48;
}

.screen-app-chip > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-color);
  box-shadow: 0 0 8px color-mix(in srgb, var(--app-color) 72%, transparent);
}

.screen-app-chip > span {
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-app-chip > small {
  color: color-mix(in srgb, var(--app-color) 68%, #5f7274);
  font: 700 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.screen-main-layout {
  flex: 1;
  height: auto;
  min-height: 0;
  grid-template-columns: minmax(270px, 300px) minmax(480px, 1fr) minmax(320px, 360px);
  gap: 12px;
}

.screen-col-left,
.screen-col-center,
.screen-col-right {
  gap: 12px;
}

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

.screen-metric-card {
  min-height: 92px;
  padding: 14px;
  border-color: var(--cyber-line);
  border-radius: 5px;
  background: rgba(10, 18, 23, 0.94);
}

.screen-metric-card::before {
  content: attr(data-index);
  position: absolute;
  right: 11px;
  bottom: 8px;
  color: rgba(129, 166, 166, 0.16);
  font: 800 24px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.screen-metric-card::after {
  top: 0;
  right: auto;
  left: 0;
  width: 32px;
  height: 2px;
}

.screen-metric-card p {
  max-width: 88px;
  color: #6f8485;
  font-size: 9px;
  line-height: 1.45;
}

.screen-metric-card strong {
  display: block;
  margin-top: 9px;
  color: #f2faf8;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.screen-metric-card.critical::after { background: var(--cyber-red); }
.screen-metric-card.critical strong { color: #ff8994; }
.screen-metric-card.orange::after { background: var(--cyber-amber); }
.screen-metric-card.orange strong { color: #ffc078; }
.screen-metric-card.blue::after { background: var(--cyber-blue); }

.screen-panel-box {
  position: relative;
  border-color: var(--cyber-line);
  border-radius: 5px;
  background: rgba(9, 17, 22, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.screen-panel-box::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 28px;
  height: 1px;
  background: var(--cyber-cyan);
  box-shadow: 0 0 10px rgba(56, 232, 208, 0.5);
}

.box-title-bar {
  min-height: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(79, 210, 197, 0.08);
}

.box-title-bar h3 {
  color: #dff0ed;
  font-size: 11px;
}

.box-title-bar > div {
  min-width: 0;
}

.box-title-bar > div h3,
.box-title-bar > div small {
  display: block;
}

.box-title-bar > div small {
  margin-top: 4px;
  color: #4f696b;
  font-size: 8px;
}

.box-title-bar > span {
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.map-fill-box {
  flex: 1;
  border-color: rgba(56, 232, 208, 0.18);
  box-shadow: inset 0 0 55px rgba(26, 143, 134, 0.035), 0 18px 50px rgba(0, 0, 0, 0.25);
}

.map-fill-box::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
  border: 1px solid transparent;
  border-top-color: rgba(56, 232, 208, 0.12);
  border-bottom-color: rgba(91, 167, 255, 0.09);
}

.attack-map-container {
  background: #050b0f;
}

.screen-map-heading {
  top: 18px;
  left: 20px;
  padding-left: 10px;
  border-left: 2px solid var(--cyber-cyan);
}

.screen-map-heading strong {
  font-size: 13px;
}

.screen-map-heading span {
  color: #4e7777;
}

.screen-map-legend {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #5f7779;
  font-size: 9px;
  pointer-events: none;
}

.screen-map-legend em {
  color: #405e61;
  font: 800 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
}

.screen-map-legend b {
  color: #597174;
  font: 800 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.screen-map-legend span {
  max-width: 135px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: color-mix(in srgb, var(--route-color) 72%, #9aafaf);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-map-legend i {
  width: 18px;
  flex: 0 0 18px;
  height: 2px;
  background: var(--route-color);
  box-shadow: 0 0 7px color-mix(in srgb, var(--route-color) 65%, transparent);
}

.screen-node-label {
  bottom: 18px;
  right: 20px;
}

.screen-telemetry-strip {
  flex: 0 0 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
}

.qps-mini-box {
  height: 150px;
}

.screen-engine-box {
  display: grid;
  grid-template-rows: auto 1fr;
}

.engine-gauge {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
}

.engine-ring {
  width: 68px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 7px solid rgba(56, 232, 208, 0.13);
  border-top-color: var(--cyber-cyan);
  border-right-color: var(--cyber-blue);
  border-radius: 50%;
  color: var(--cyber-cyan);
  box-shadow: 0 0 18px rgba(56, 232, 208, 0.08);
  font: 800 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  transform: rotate(18deg);
}

.engine-ring span { transform: rotate(-18deg); }

.engine-details {
  display: grid;
  gap: 8px;
}

.engine-details span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #667f80;
  font-size: 9px;
}

.engine-details strong { color: #cce6e2; }

.threat-source-list {
  grid-auto-rows: minmax(82px, 112px);
  align-content: start;
  gap: 6px;
}

.threat-source-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 10px 9px 8px;
  border: 1px solid rgba(100, 220, 208, 0.075);
  border-left: 2px solid color-mix(in srgb, var(--app-color) 72%, transparent);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
}

.threat-source-row::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--app-color) 9%, transparent), transparent 60%);
  transition: opacity 160ms ease;
}

.threat-source-row:hover {
  border-color: color-mix(in srgb, var(--app-color) 24%, transparent);
}

.threat-source-row:hover::before { opacity: 1; }

.source-rank {
  width: 28px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #849596;
  background: #182228;
  clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.rank-1 .source-rank { color: #fff; background: var(--cyber-red); box-shadow: 0 0 16px rgba(255, 98, 114, 0.22); }
.rank-2 .source-rank { color: #07100f; background: var(--cyber-amber); }
.rank-3 .source-rank { color: #07100f; background: #d9c36b; }

.source-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.source-primary,
.source-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.source-primary strong {
  flex: 0 0 auto;
  color: #64e9d7;
  font-size: 11px;
}

.source-primary > span {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: #61787a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-context {
  font-size: 8px;
}

.source-context time {
  flex: 0 0 auto;
  margin-left: auto;
  color: #627678;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.source-category {
  flex: 0 0 auto;
  color: #ff818c;
  font-weight: 700;
}

.event-app-badge {
  min-width: 0;
  max-width: 140px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: color-mix(in srgb, var(--app-color) 76%, #d8e5e3);
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-app-badge i {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--app-color);
  box-shadow: 0 0 6px color-mix(in srgb, var(--app-color) 75%, transparent);
}

.source-threat-meter {
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.source-threat-meter i {
  display: block;
  width: var(--threat-width);
  height: 100%;
  background: linear-gradient(90deg, var(--app-color), var(--cyber-red));
  box-shadow: 0 0 8px color-mix(in srgb, var(--app-color) 45%, transparent);
}

.source-hits {
  min-width: 34px;
  display: grid;
  text-align: right;
}

.source-hits strong {
  color: #f4f8f7;
  font: 800 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.source-hits span {
  margin-top: 5px;
  color: #4e6668;
  font: 700 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.screen-attack-stream {
  position: relative;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 5px 3px 5px 0;
  mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}

.stream-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 10px 10px 0;
  border: 1px solid rgba(100, 220, 208, 0.07);
  border-left: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.016);
}

.stream-card:hover {
  border-color: color-mix(in srgb, var(--app-color) 22%, transparent);
  background: color-mix(in srgb, var(--app-color) 3%, rgba(255, 255, 255, 0.016));
}

.stream-time-rail {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.stream-time-rail::after {
  content: "";
  position: absolute;
  top: 17px;
  right: -1px;
  bottom: -18px;
  width: 1px;
  background: color-mix(in srgb, var(--app-color) 23%, transparent);
}

.stream-card:last-child .stream-time-rail::after { display: none; }

.stream-time-rail i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 1px;
  border: 2px solid #091116;
  border-radius: 50%;
  background: var(--app-color);
  box-shadow: 0 0 9px color-mix(in srgb, var(--app-color) 72%, transparent);
}

.stream-time-rail time {
  color: #536a6c;
  font: 700 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  writing-mode: vertical-rl;
}

.stream-event-body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.stream-event-head,
.stream-event-foot,
.stream-route,
.stream-location {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.stream-event-head {
  justify-content: space-between;
}

.stream-event-head .event-app-badge {
  max-width: calc(100% - 44px);
}

.event-severity {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(255, 98, 114, 0.24);
  border-radius: 2px;
  color: #ff818c;
  background: rgba(255, 98, 114, 0.07);
  font-size: 7px;
  font-weight: 800;
}

.severity-medium .event-severity { border-color: rgba(255, 180, 95, 0.24); color: #ffc078; background: rgba(255, 180, 95, 0.06); }
.severity-low .event-severity { border-color: rgba(91, 167, 255, 0.2); color: #80bbff; background: rgba(91, 167, 255, 0.06); }

.stream-route {
  font-size: 9px;
}

.stream-route strong,
.stream-route em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-route strong { flex: 0 1 auto; color: #65e9d7; }
.stream-route > span { flex: 0 0 auto; color: var(--app-color); }
.stream-route em { flex: 1; color: #9cb0b0; font-style: normal; text-align: right; }

.stream-location {
  color: #586f71;
  font-size: 8px;
}

.stream-location .lucide-icon { width: 10px; height: 10px; flex: 0 0 10px; }

.stream-location span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-card .card-uri {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  padding: 5px 7px;
  border-left: 2px solid color-mix(in srgb, var(--app-color) 55%, transparent);
  background: #070e13;
}

.stream-card .card-uri strong {
  color: var(--app-color);
  font-size: 8px;
}

.stream-card .card-uri span {
  overflow: hidden;
  color: #aebdbd;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-event-foot {
  color: #52696b;
  font-size: 7px;
}

.stream-event-foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-event-foot strong {
  flex: 0 0 auto;
  margin-left: auto;
}

.stream-event-foot strong.is-blocked {
  color: #ff7581;
}

.stream-event-foot strong.is-logged {
  color: #ffc078;
}

.screen-protection-state {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--cyber-line);
  background: var(--cyber-line);
}

.screen-protection-state div {
  padding: 9px 8px;
  background: #091116;
}

.screen-protection-state span,
.screen-protection-state strong {
  display: block;
}

.screen-protection-state span {
  color: #567072;
  font-size: 8px;
}

.screen-protection-state strong {
  margin-top: 5px;
  color: #9feadc;
  font-size: 9px;
}

@media (max-width: 1180px) {
  .screen-head-status { display: none; }
  .screen-scope-bar { grid-template-columns: 220px minmax(0, 1fr); }
  .screen-main-layout { grid-template-columns: 250px minmax(420px, 1fr) 300px; }
}

@media (max-width: 900px) {
  .big-screen-fullscreen { height: auto; overflow: visible; }
  .screen-scope-bar { grid-template-columns: 1fr; height: auto; }
  .screen-scope-current { display: none; }
  .screen-main-layout { grid-template-columns: 1fr; }
  .screen-col-left { grid-template-columns: 1fr; }
  .screen-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .screen-col-left .flex-fill { grid-column: auto; }
  .screen-telemetry-strip { grid-template-columns: minmax(0, 1fr) 220px; }
}

@media (max-width: 700px) {
  .login-telemetry { grid-template-columns: 1fr; }
  .login-telemetry > div + div { padding-left: 0; border-left: 0; border-top: 1px solid rgba(89, 227, 211, 0.12); }
  .logo::after { display: none; }
  .screen-header-row { height: auto; flex-basis: auto; padding-block: 12px; }
  .screen-controls { width: 100%; justify-content: flex-start; }
  .screen-clock-tag { order: -1; width: 100%; justify-content: center; }
  .screen-scope-bar { flex-basis: 48px; }
  .screen-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-telemetry-strip { grid-template-columns: 1fr; }
  .qps-mini-box { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot-pulse,
  .live-dot-pulse::after { animation: none; }
}

/* Cluster nodes */
.nodes-page {
  width: min(100%, 1800px);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.nodes-toolbar {
  margin-bottom: 0;
}

.nodes-toolbar .ghost,
.nodes-toolbar .ghost .lucide-icon {
  flex: 0 0 auto;
}

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

.node-overview-item {
  min-width: 0;
  min-height: 116px;
  display: grid;
  align-content: center;
  padding: 17px 19px;
  border: 1px solid var(--cyber-line);
  border-radius: 6px;
  background: #0d151a;
}

.node-overview-item > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #718a8c;
  font-size: 11px;
  font-weight: 700;
}

.node-overview-item > span .lucide-icon {
  width: 14px;
  height: 14px;
  color: #49d8c5;
}

.node-overview-item > strong {
  margin-top: 9px;
  color: #f1f6f5;
  font-size: 28px;
  line-height: 1;
}

.node-overview-item > strong em {
  color: #6f8587;
  font-size: 15px;
  font-style: normal;
}

.node-overview-item > small {
  margin-top: 7px;
  color: #52696b;
  font-size: 10px;
}

.nodes-pool-strip {
  border: 1px solid var(--cyber-line);
  border-radius: 6px;
  background: #0a1217;
}

.nodes-pool-strip > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(150px, 1fr) minmax(330px, 1.5fr);
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
}

.nodes-pool-strip > div + div {
  border-top: 1px solid var(--cyber-line);
}

.pool-status-mark,
.node-primary-icon,
.node-detail-mark {
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 232, 208, 0.18);
  border-radius: 5px;
  background: rgba(56, 232, 208, 0.06);
  color: #56dfcc;
}

.pool-status-mark {
  width: 34px;
  height: 34px;
}

.pool-status-mark .lucide-icon,
.node-primary-icon .lucide-icon {
  width: 15px;
  height: 15px;
}

.nodes-pool-strip p,
.node-primary p {
  min-width: 0;
  margin: 0;
}

.nodes-pool-strip p strong,
.nodes-pool-strip p small {
  display: block;
}

.nodes-pool-strip p strong {
  color: #e8efed;
  font-size: 13px;
}

.nodes-pool-strip p small {
  margin-top: 3px;
  color: #566d6f;
  font-size: 9px;
}

.nodes-pool-strip dl {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  margin: 0;
}

.nodes-pool-strip dl > div {
  padding: 0 14px;
  border-left: 1px solid rgba(84, 131, 132, 0.14);
}

.nodes-pool-strip dt {
  color: #52696b;
  font-size: 9px;
}

.nodes-pool-strip dd {
  margin: 3px 0 0;
  color: #a9e7dd;
  font-size: 12px;
  font-weight: 750;
}

.node-table-wrap {
  padding: 0;
  overflow-x: auto;
}

.nodes-table {
  min-width: 1160px;
}

.nodes-table th,
.nodes-table td {
  padding: 15px 14px;
  vertical-align: middle;
}

.nodes-table th {
  background: #11191d;
}

.nodes-table tbody tr:last-child td {
  border-bottom: 0;
}

.node-primary {
  min-width: 210px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.node-primary-icon {
  width: 38px;
  height: 38px;
}

.node-primary p strong,
.node-primary p small {
  display: block;
}

.node-primary p strong {
  overflow: hidden;
  color: #e8efed;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-primary p small {
  width: max-content;
  margin-top: 5px;
  font-size: 8px;
}

.node-connection,
.node-pool-cell,
.node-runtime,
.node-heartbeat {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 5px;
}

.node-connection {
  min-width: 150px;
}

.node-connection > strong {
  max-width: 190px;
  font-size: 9px;
}

.node-connection > small,
.node-pool-cell small,
.node-runtime small,
.node-heartbeat small {
  color: #566d6f;
  font-size: 9px;
}

.node-connection > span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.node-connection i {
  padding: 2px 5px;
  border: 1px solid rgba(88, 124, 126, 0.18);
  border-radius: 3px;
  color: #718789;
  font-size: 8px;
  font-style: normal;
}

.node-pool-cell strong,
.node-runtime strong,
.node-heartbeat strong {
  color: #dce5e3;
  font-size: 11px;
}

.node-pool-cell small {
  display: flex;
  align-items: center;
  gap: 4px;
}

.node-pool-cell small .lucide-icon {
  width: 10px;
  height: 10px;
}

.node-badges,
.node-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.node-badges .badge {
  min-height: 21px;
  padding-inline: 6px;
  font-size: 9px;
}

.node-version {
  min-width: 112px;
  display: grid;
  grid-template-columns: auto 12px auto;
  align-items: center;
  gap: 4px;
}

.node-version > span {
  color: #b4c2bf;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.node-version > i {
  color: #52696b;
  font-size: 9px;
  font-style: normal;
  text-align: center;
}

.node-version > small {
  grid-column: 1 / -1;
  color: #657a7c;
  font-size: 8px;
}

.node-version.is-synced > small {
  color: #53d49a;
}

.node-version.is-pending > small {
  color: #efb36d;
}

.node-actions {
  justify-content: flex-end;
}

.node-detail-modal .modal-shell {
  width: min(860px, calc(100vw - 36px));
}

.node-detail-modal .modal-body {
  padding: 0;
}

.node-detail {
  display: grid;
  gap: 0;
}

.node-detail-hero {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--cyber-line);
  background: #10181c;
}

.node-detail-mark {
  width: 48px;
  height: 48px;
}

.node-detail-mark .lucide-icon {
  width: 21px;
  height: 21px;
}

.node-detail-hero p {
  margin: 7px 0 0;
  color: #667c7e;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.node-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--cyber-line);
  background: #0b1318;
}

.node-detail-summary > div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 16px 20px;
}

.node-detail-summary > div + div {
  border-left: 1px solid var(--cyber-line);
}

.node-detail-summary span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #607779;
  font-size: 9px;
}

.node-detail-summary span .lucide-icon {
  width: 12px;
  height: 12px;
}

.node-detail-summary strong {
  overflow-wrap: anywhere;
  color: #e4ecea;
  font-size: 15px;
}

.node-detail-summary strong.is-good,
.node-ok-text {
  color: #58d89d;
}

.node-detail-summary strong.is-warn {
  color: #efb36d;
}

.node-detail-summary small {
  color: #506668;
  font-size: 8px;
}

.node-detail-section {
  padding: 20px 24px 0;
}

.node-detail-section:last-child {
  padding-bottom: 24px;
}

.node-detail-section h4 {
  margin: 0 0 10px;
  color: #8ca19f;
  font-size: 10px;
  font-weight: 750;
}

.node-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--cyber-line);
  background: var(--cyber-line);
  gap: 1px;
}

.node-detail-grid > div {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  background: #11191d;
}

.node-detail-grid > .detail-wide {
  grid-column: 1 / -1;
}

.node-detail-grid span {
  color: #5d7375;
  font-size: 9px;
}

.node-detail-grid strong {
  min-width: 0;
  color: #dce5e3;
  font-size: 10px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.node-detail-grid strong.code {
  width: fit-content;
  max-width: 100%;
  font-size: 9px;
}

.node-address-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.node-address-list i {
  font-size: 9px;
  font-style: normal;
}

.node-detail-grid .node-error-text {
  color: #ff858e;
}

@media (max-width: 900px) {
  .nodes-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .nodes-overview { grid-template-columns: 1fr; }
  .node-overview-item { min-height: 94px; }
  .nodes-pool-strip > div { grid-template-columns: 34px minmax(0, 1fr); }
  .nodes-pool-strip dl { grid-column: 1 / -1; }
  .nodes-pool-strip dl > div:first-child { border-left: 0; }
  .node-detail-modal .modal-shell { width: calc(100vw - 12px); }
  .node-detail-hero { padding: 16px; }
  .node-detail-summary { grid-template-columns: 1fr; }
  .node-detail-summary > div + div { border-left: 0; border-top: 1px solid var(--cyber-line); }
  .node-detail-section { padding: 16px 16px 0; }
  .node-detail-section:last-child { padding-bottom: 16px; }
  .node-detail-grid { grid-template-columns: 1fr; }
  .node-detail-grid > .detail-wide { grid-column: auto; }
}
