:root {
  --bg: #05090d;
  --bg-grid: rgba(25, 245, 198, 0.08);
  --surface: rgba(12, 22, 29, 0.88);
  --surface-strong: rgba(17, 32, 42, 0.96);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --ink: #e8f7fb;
  --muted: #89a7b0;
  --line: rgba(114, 227, 255, 0.18);
  --blue: #3b82f6;
  --teal: #19f5c6;
  --green: #31d583;
  --red: #ff5c7a;
  --amber: #f7c948;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  --glow: 0 0 24px rgba(25, 245, 198, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(25, 245, 198, 0.16), transparent 28%),
    radial-gradient(circle at 90% 14%, rgba(59, 130, 246, 0.2), transparent 32%),
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button-link {
  border: 1px solid rgba(25, 245, 198, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(25, 245, 198, 0.22), rgba(59, 130, 246, 0.42));
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, filter 150ms ease;
  position: relative;
  overflow: hidden;
}

button::after,
.button-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateX(-120%);
  transition: transform 420ms ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-2px);
  border-color: rgba(25, 245, 198, 0.55);
  box-shadow: var(--glow);
  filter: saturate(1.15);
}

button:hover::after,
.button-link:hover::after {
  transform: translateX(120%);
}

button.secondary,
.button-link.secondary {
  background: rgba(255,255,255,0.06);
  color: var(--ink);
}

button.danger {
  background: linear-gradient(135deg, rgba(255, 92, 122, 0.22), rgba(153, 27, 27, 0.46));
  border-color: rgba(255, 92, 122, 0.35);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.72);
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(25, 245, 198, 0.72);
  box-shadow: 0 0 0 3px rgba(25, 245, 198, 0.12);
}

.shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

body.auth-locked .shell {
  filter: blur(6px) brightness(0.55);
  pointer-events: none;
  user-select: none;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(25, 245, 198, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 245, 198, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(25, 245, 198, 0.18), transparent 34%),
    rgba(2, 8, 12, 0.94);
  background-size: 34px 34px, 34px 34px, auto, auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.auth-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-panel {
  width: min(520px, 100%);
  border: 1px solid rgba(25, 245, 198, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(11, 29, 38, 0.96), rgba(4, 13, 18, 0.98)),
    #040d12;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58), 0 0 48px rgba(25, 245, 198, 0.12);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent, rgba(25, 245, 198, 0.08), transparent),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,255,255,0.025) 7px 8px);
  pointer-events: none;
}

.auth-brand,
.auth-form,
.auth-message,
.auth-matrix {
  position: relative;
}

.auth-brand {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.auth-mark {
  width: 58px;
  height: 58px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 28px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form button {
  min-height: 44px;
}

.auth-message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--amber);
  font-size: 13px;
}

.auth-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.auth-matrix span {
  border: 1px solid rgba(114, 227, 255, 0.14);
  background: rgba(2, 8, 12, 0.58);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
}

.sidebar {
  background: rgba(4, 13, 18, 0.92);
  color: var(--ink);
  padding: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #071014;
  border: 1px solid rgba(25, 245, 198, 0.35);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--teal);
  box-shadow: var(--glow);
}

.brand span,
.muted,
#selectedVideoLabel,
.capture-state span {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  justify-content: flex-start;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  background: transparent;
  border-color: transparent;
  color: #b9d4dc;
  box-shadow: none;
  padding: 0 12px;
}

.nav button::before {
  content: "";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(25, 245, 198, 0.08);
  border: 1px solid rgba(25, 245, 198, 0.2);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 16px rgba(25, 245, 198, 0.05);
}

.nav button[data-symbol="home"]::before,
.home-icon::before {
  clip-path: polygon(50% 12%, 88% 42%, 78% 42%, 78% 86%, 58% 86%, 58% 62%, 42% 62%, 42% 86%, 22% 86%, 22% 42%, 12% 42%);
  background: var(--teal);
}

.nav button[data-symbol="video"]::before,
.video-icon::before {
  clip-path: polygon(28% 18%, 82% 50%, 28% 82%);
  background: var(--teal);
}

.nav button[data-symbol="text"]::before,
.text-icon::before {
  background: linear-gradient(var(--teal) 0 14%, transparent 14% 31%, var(--teal) 31% 45%, transparent 45% 62%, var(--teal) 62% 76%, transparent 76%);
}

.nav button[data-symbol="capture"]::before,
.capture-icon::before {
  border-radius: 50%;
  border: 3px solid var(--teal);
  box-shadow: inset 0 0 0 5px rgba(25, 245, 198, 0.12);
}

.nav button[data-symbol="heart"]::before,
.heart-icon::before {
  clip-path: polygon(50% 88%, 13% 50%, 13% 27%, 31% 12%, 50% 26%, 69% 12%, 87% 27%, 87% 50%);
  background: #ff8bc1;
}

.nav button[data-symbol="health"]::before,
.health-icon::before {
  background:
    linear-gradient(90deg, transparent 36%, var(--teal) 36% 64%, transparent 64%),
    linear-gradient(transparent 36%, var(--teal) 36% 64%, transparent 64%);
  border-radius: 8px;
}

.nav button[data-symbol="network"]::before,
.network-icon::before {
  background:
    radial-gradient(circle at 18% 50%, var(--teal) 0 10%, transparent 11%),
    radial-gradient(circle at 82% 24%, var(--teal) 0 10%, transparent 11%),
    radial-gradient(circle at 82% 76%, var(--teal) 0 10%, transparent 11%),
    linear-gradient(28deg, transparent 47%, var(--teal) 48% 52%, transparent 53%),
    linear-gradient(-28deg, transparent 47%, var(--teal) 48% 52%, transparent 53%);
}

.nav button[data-symbol="pulse"]::before,
.pulse-icon::before {
  background: var(--teal);
  clip-path: polygon(0 58%, 18% 58%, 28% 22%, 40% 86%, 52% 42%, 66% 42%, 76% 18%, 88% 58%, 100% 58%, 100% 70%, 82% 70%, 76% 50%, 68% 62%, 56% 62%, 44% 100%, 28% 48%, 22% 70%, 0 70%);
}

.nav button[data-symbol="service"]::before,
.service-icon-shape::before {
  border-radius: 50%;
  border: 5px dotted var(--teal);
}

.nav button[data-symbol="folder"]::before,
.folder-icon::before {
  background: var(--teal);
  clip-path: polygon(6% 28%, 38% 28%, 46% 40%, 94% 40%, 94% 82%, 6% 82%);
}

.nav button[data-symbol="log"]::before,
.log-icon::before {
  background: linear-gradient(var(--teal) 0 12%, transparent 12% 24%, var(--teal) 24% 36%, transparent 36% 48%, var(--teal) 48% 60%, transparent 60% 72%, var(--teal) 72% 84%, transparent 84%);
}

.nav button[data-symbol="settings"]::before,
.settings-icon::before {
  border-radius: 50%;
  border: 4px solid var(--teal);
  box-shadow: inset 0 0 0 5px #05090d;
}

.nav button:hover,
.nav button.active {
  background: rgba(25, 245, 198, 0.1);
  border-color: rgba(25, 245, 198, 0.24);
  color: #fff;
  transform: translateX(3px);
}

.nav button:hover::before,
.nav button.active::before {
  background: rgba(25, 245, 198, 0.18);
  border-color: rgba(25, 245, 198, 0.48);
  box-shadow: 0 0 18px rgba(25, 245, 198, 0.16);
}

.nav button[hidden],
.service-tile[hidden],
[data-required-view][hidden],
[data-admin-only][hidden],
.nav-section[hidden],
.admin-hidden {
  display: none !important;
}

.nav-section {
  color: #5f8893;
  font-size: 11px;
  font-weight: 800;
  margin: 12px 8px 2px;
  text-transform: uppercase;
}

.main {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: 0;
  text-shadow: 0 0 34px rgba(25, 245, 198, 0.18);
}

.welcome-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.topbar-actions,
.row-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.status-pill {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.command-deck,
.metric,
.panel,
.compact-item,
.job-card,
.service-card,
.video-card,
.command-card,
.upload-card,
.process-row,
.verification-item,
.kv {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.command-deck {
  padding: 18px;
  margin-bottom: 16px;
}

.cli-command-panel {
  margin-bottom: 16px;
}

.cli-command-text {
  min-height: 220px;
  max-height: 360px;
  font-size: 12px;
  background:
    linear-gradient(90deg, rgba(25, 245, 198, 0.06), transparent 34%),
    #02080c;
}

.command-deck h2,
.panel h2 {
  margin: 0;
  font-size: 18px;
}

.service-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.service-tile {
  min-height: 178px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 8px 12px;
  align-items: start;
  justify-content: stretch;
  padding: 16px;
  background: linear-gradient(145deg, rgba(13, 30, 40, 0.92), rgba(5, 14, 19, 0.92));
  text-align: left;
}

.service-tile .tile-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  grid-row: 1 / span 2;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(25, 245, 198, 0.22), rgba(59, 130, 246, 0.12)),
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(255,255,255,0.04) 6px 7px);
  color: var(--teal);
  font-size: 22px;
  font-weight: 900;
  border: 1px solid rgba(25, 245, 198, 0.38);
  box-shadow: inset 0 0 22px rgba(25, 245, 198, 0.08), 0 0 22px rgba(25, 245, 198, 0.12);
}

.service-icon::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
}

.girly-tile {
  background:
    radial-gradient(circle at 78% 18%, rgba(232, 93, 158, 0.28), transparent 28%),
    linear-gradient(145deg, rgba(33, 18, 37, 0.94), rgba(6, 13, 20, 0.94));
}

.girly-tile .tile-icon {
  color: #ffd6ea;
  border-color: rgba(232, 93, 158, 0.5);
  background:
    linear-gradient(135deg, rgba(232, 93, 158, 0.32), rgba(192, 132, 252, 0.18)),
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(255,255,255,0.05) 6px 7px);
  box-shadow: inset 0 0 22px rgba(232, 93, 158, 0.1), 0 0 24px rgba(232, 93, 158, 0.16);
}

.service-tile strong {
  font-size: 17px;
  align-self: end;
}

.service-tile em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.tile-visual {
  grid-column: 1 / -1;
  display: block;
  height: 52px;
  border-radius: 8px;
  border: 1px solid rgba(114, 227, 255, 0.14);
  background:
    linear-gradient(90deg, rgba(25,245,198,0.18), rgba(59,130,246,0.06)),
    linear-gradient(transparent 49%, rgba(255,255,255,0.09) 50%, transparent 51%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 16px);
  position: relative;
  overflow: hidden;
}

.tile-visual::after {
  content: "";
  position: absolute;
  inset: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(25,245,198,0.22);
  box-shadow: 38px 0 0 rgba(59,130,246,0.2), 76px 0 0 rgba(247,201,72,0.16);
}

.video-tile .tile-visual::before,
.transcript-tile .tile-visual::before,
.capture-tile .tile-visual::before,
.girly-tile .tile-visual::before,
.system-tile .tile-visual::before {
  content: "";
  position: absolute;
  inset: 16px 18px;
  border-left: 18px solid rgba(25,245,198,0.75);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.transcript-tile .tile-visual::before {
  inset: 14px 18px;
  border: 0;
  height: 4px;
  background: rgba(25,245,198,0.72);
  box-shadow: 0 10px 0 rgba(59,130,246,0.65), 0 20px 0 rgba(247,201,72,0.55);
}

.capture-tile .tile-visual::before {
  inset: 14px 20px;
  border: 2px solid rgba(25,245,198,0.72);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  box-shadow: 42px 0 0 rgba(59,130,246,0.25);
}

.girly-tile .tile-visual::before {
  inset: 12px 18px;
  border: 0;
  width: 86px;
  height: 28px;
  border-radius: 999px 999px 10px 10px;
  background:
    radial-gradient(circle at 22px 13px, rgba(255, 214, 234, 0.95) 0 4px, transparent 5px),
    radial-gradient(circle at 55px 13px, rgba(255, 214, 234, 0.8) 0 4px, transparent 5px),
    linear-gradient(90deg, rgba(232,93,158,0.85), rgba(192,132,252,0.72));
  box-shadow: 0 0 26px rgba(232, 93, 158, 0.28), 96px 10px 0 -8px rgba(244, 201, 93, 0.34);
}

.system-tile .tile-visual::before {
  inset: auto 18px 14px;
  height: 24px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(25,245,198,0.75), rgba(59,130,246,0.65), transparent);
  clip-path: polygon(0 70%, 18% 70%, 25% 20%, 34% 90%, 45% 45%, 58% 45%, 67% 10%, 77% 75%, 100% 75%, 100% 100%, 0 100%);
}

.network-tile {
  background:
    radial-gradient(circle at 80% 18%, rgba(25,245,198,0.22), transparent 25%),
    linear-gradient(145deg, rgba(6, 30, 36, 0.96), rgba(4, 12, 18, 0.96));
}

.noc-ai-tile {
  background:
    radial-gradient(circle at 78% 18%, rgba(114, 227, 255, 0.24), transparent 26%),
    linear-gradient(145deg, rgba(8, 24, 42, 0.96), rgba(4, 12, 18, 0.96));
}

.noc-ai-tile .tile-icon {
  border-color: rgba(114, 227, 255, 0.46);
  box-shadow: inset 0 0 22px rgba(114, 227, 255, 0.1), 0 0 24px rgba(114, 227, 255, 0.14);
}

.noc-ai-tile .tile-visual::before {
  content: "";
  position: absolute;
  inset: 11px 18px;
  width: 128px;
  height: 36px;
  border: 0;
  background:
    radial-gradient(circle at 14px 18px, rgba(114,227,255,0.92) 0 5px, transparent 6px),
    radial-gradient(circle at 56px 8px, rgba(25,245,198,0.82) 0 5px, transparent 6px),
    radial-gradient(circle at 102px 24px, rgba(247,201,72,0.76) 0 5px, transparent 6px),
    linear-gradient(14deg, transparent 45%, rgba(114,227,255,0.7) 46% 49%, transparent 50%),
    linear-gradient(-12deg, transparent 47%, rgba(25,245,198,0.58) 48% 51%, transparent 52%);
}

.network-tile .tile-visual::before {
  content: "";
  position: absolute;
  inset: 11px 18px;
  border: 0;
  background:
    radial-gradient(circle at 14px 16px, rgba(25,245,198,0.92) 0 5px, transparent 6px),
    radial-gradient(circle at 70px 8px, rgba(114,227,255,0.82) 0 5px, transparent 6px),
    radial-gradient(circle at 104px 30px, rgba(247,201,72,0.7) 0 5px, transparent 6px),
    linear-gradient(18deg, transparent 44%, rgba(25,245,198,0.65) 45% 48%, transparent 49%),
    linear-gradient(-14deg, transparent 50%, rgba(114,227,255,0.5) 51% 54%, transparent 55%);
  width: 124px;
  height: 38px;
}

.health-tile {
  background:
    radial-gradient(circle at 78% 18%, rgba(49, 213, 131, 0.24), transparent 26%),
    linear-gradient(145deg, rgba(10, 35, 30, 0.96), rgba(4, 12, 18, 0.96));
}

.health-tile .tile-icon {
  border-color: rgba(49, 213, 131, 0.46);
  box-shadow: inset 0 0 22px rgba(49, 213, 131, 0.1), 0 0 24px rgba(49, 213, 131, 0.14);
}

.health-tile .tile-visual::before {
  content: "";
  position: absolute;
  inset: 12px 18px;
  border: 0;
  width: 126px;
  height: 30px;
  background:
    radial-gradient(circle at 15px 20px, rgba(49,213,131,0.9) 0 5px, transparent 6px),
    radial-gradient(circle at 60px 10px, rgba(247,201,72,0.72) 0 5px, transparent 6px),
    radial-gradient(circle at 108px 18px, rgba(114,227,255,0.78) 0 5px, transparent 6px),
    linear-gradient(12deg, transparent 45%, rgba(49,213,131,0.75) 46% 50%, transparent 51%),
    linear-gradient(-10deg, transparent 45%, rgba(114,227,255,0.55) 46% 50%, transparent 51%);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 14px 12px;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), transparent);
  opacity: 0.72;
}

.metric span,
.kv span,
.compact-item span,
.meta,
label {
  color: var(--muted);
}

.metric span,
.kv span {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 25px;
  color: #fff;
}

.layout {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.layout.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.storage-bars {
  display: grid;
  gap: 10px;
}

.storage-bars label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.bar,
.progress {
  height: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.bar span,
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  box-shadow: 0 0 18px rgba(25, 245, 198, 0.34);
}

.compact-list,
.job-list,
.service-list,
.command-list,
.upload-queue,
.process-list,
.verification-list {
  display: grid;
  gap: 10px;
}

.compact-item,
.job-card,
.service-card,
.video-card-body,
.command-card,
.upload-card,
.process-row,
.verification-item,
.kv {
  padding: 12px;
}

.compact-item strong,
.compact-item span {
  display: block;
}

.compact-item span {
  font-size: 13px;
  margin-top: 2px;
}

.compact-actions {
  margin-top: 10px;
}

.noc-entity,
.noc-command {
  background:
    linear-gradient(135deg, rgba(25, 245, 198, 0.08), transparent 48%),
    var(--surface);
}

.noc-command code {
  color: var(--teal);
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.noc-token {
  display: inline;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid rgba(25, 245, 198, 0.25);
  background: rgba(25, 245, 198, 0.08);
  color: var(--teal);
  font-weight: 800;
}

.noc-token.ip {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(96, 165, 250, 0.11);
  color: #9fd0ff;
}

.noc-token.circuit {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(245, 158, 11, 0.1);
  color: #ffd38b;
}

.noc-report {
  display: grid;
  gap: 12px;
  white-space: normal;
  background:
    linear-gradient(145deg, rgba(25, 245, 198, 0.045), rgba(96, 165, 250, 0.035)),
    #01070b;
}

.answer-section,
.answer-empty,
.answer-footer {
  border: 1px solid rgba(25, 245, 198, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.035), transparent 44%),
    rgba(8, 18, 27, 0.82);
  padding: 14px;
}

.answer-section {
  display: grid;
  gap: 10px;
}

.answer-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.answer-section-head span {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 16px rgba(25, 245, 198, 0.72);
}

.answer-section h3 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
}

.answer-section p,
.answer-section li {
  margin: 0;
  color: #d9f4fb;
  line-height: 1.55;
}

.answer-section strong {
  color: #ffffff;
}

.answer-section.commands {
  border-color: rgba(34, 197, 94, 0.34);
}

.answer-section.commands .answer-section-head span {
  background: var(--green);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.62);
}

.answer-section.ticket,
.answer-section.decision {
  border-color: rgba(245, 158, 11, 0.36);
}

.answer-section.ticket .answer-section-head span,
.answer-section.decision .answer-section-head span {
  background: var(--amber);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.56);
}

.answer-section.warning {
  border-color: rgba(244, 63, 94, 0.4);
}

.answer-section.warning .answer-section-head span {
  background: var(--red);
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.54);
}

.answer-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.inline-code {
  border: 1px solid rgba(25, 245, 198, 0.25);
  border-radius: 7px;
  background: rgba(25, 245, 198, 0.08);
  color: #9fffff;
  padding: 1px 6px;
  font-family: "JetBrains Mono", "Consolas", monospace;
  overflow-wrap: anywhere;
}

.answer-code {
  overflow: hidden;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: var(--radius);
  background: #010508;
}

.code-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.16);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.answer-code pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
}

.answer-code code {
  color: #c7ffd8;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.mini {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.answer-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-row,
.form-grid,
.stack-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.upload-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.upload-panel {
  display: grid;
  gap: 10px;
  margin: -4px 0 16px;
}

.upload-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.upload-summary strong {
  color: var(--teal);
}

.upload-card {
  display: grid;
  gap: 9px;
  background:
    linear-gradient(135deg, rgba(25, 245, 198, 0.08), transparent 42%),
    var(--surface);
}

.upload-title,
.process-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.upload-title strong,
.process-head strong {
  overflow-wrap: anywhere;
}

.upload-meta,
.process-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.upload-error {
  color: var(--red);
  font-size: 12px;
}

.upload-card.cancelled,
.upload-card.failed {
  opacity: 0.76;
}

label {
  font-size: 13px;
}

label input,
label select {
  margin-top: 6px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 21px;
}

.checkbox input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.form-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  align-items: end;
}

.compact-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.player-wrap {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #02080c;
  border-radius: 8px;
  border: 1px solid rgba(25, 245, 198, 0.18);
}

.live-monitor {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(25, 245, 198, 0.22);
  background:
    linear-gradient(135deg, rgba(25,245,198,0.08), transparent 45%),
    #02080c;
  box-shadow: inset 0 0 48px rgba(25, 245, 198, 0.05), var(--shadow);
}

.live-monitor video {
  display: block;
  border: 0;
  border-radius: 0;
}

.live-overlay,
.live-actions {
  position: absolute;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.live-overlay {
  top: 12px;
}

.live-actions {
  bottom: 12px;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.live-monitor:hover .live-actions,
.live-monitor:focus-within .live-actions {
  opacity: 1;
  transform: translateY(0);
}

.live-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  pointer-events: auto;
  background: rgba(2, 8, 12, 0.76);
  backdrop-filter: blur(10px);
}

.live-badge,
#captureLiveMeta {
  border: 1px solid rgba(25, 245, 198, 0.24);
  background: rgba(2, 8, 12, 0.72);
  color: var(--teal);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

#captureLiveMeta {
  color: var(--muted);
  font-weight: 700;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 14px rgba(255, 92, 122, 0.74);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.video-card {
  overflow: hidden;
  display: grid;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.video-card:hover,
.job-card:hover,
.service-card:hover,
.command-card:hover,
.upload-card:hover,
.process-row:hover,
.verification-item:hover {
  transform: translateY(-2px);
  border-color: rgba(25, 245, 198, 0.35);
  box-shadow: var(--glow), var(--shadow);
}

.thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(25,245,198,0.14), rgba(59,130,246,0.16));
  display: grid;
  place-items: center;
  color: var(--teal);
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(25,245,198,0.18);
  border-radius: 8px;
  pointer-events: none;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card h3,
.job-card h3,
.service-card h3,
.command-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.meta {
  display: grid;
  gap: 3px;
  font-size: 12px;
  margin-bottom: 10px;
}

.card-actions button,
.card-actions .button-link {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.state {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 12px;
}

.state.running,
.state.completed,
.state.uploading,
.state.indexing,
.state.online {
  background: rgba(49, 213, 131, 0.12);
  color: var(--green);
}

.state.failed,
.state.cancelled,
.state.offline,
.state.blocked {
  background: rgba(255, 92, 122, 0.13);
  color: var(--red);
}

.state.pending,
.state.queued,
.state.unknown {
  background: rgba(247, 201, 72, 0.12);
  color: var(--amber);
}

.transcript-viewer,
.log-output,
.command-card code {
  margin: 0;
  background: #02080c;
  color: #d8fbff;
  border: 1px solid rgba(25, 245, 198, 0.14);
  border-radius: 8px;
  padding: 14px;
  min-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.5;
  scrollbar-color: rgba(25,245,198,0.5) rgba(255,255,255,0.05);
}

.transcript-viewer.noc-report {
  white-space: normal;
  font-size: 14px;
  line-height: 1.45;
}

canvas {
  background: rgba(2, 8, 12, 0.46);
  border-radius: 8px;
}

.command-card code {
  display: block;
  min-height: auto;
  margin: 8px 0;
}

.log-output.tall {
  min-height: 520px;
}

.log-output.small {
  min-height: 180px;
}

.capture-state {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.capture-state strong {
  font-size: 22px;
}

.system-table,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.network-command {
  background:
    linear-gradient(135deg, rgba(25,245,198,0.1), transparent 35%),
    linear-gradient(90deg, rgba(59,130,246,0.08), transparent 60%),
    var(--surface);
}

.network-discovery-status {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(114, 227, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(25,245,198,0.08), transparent 45%),
    #02080c;
}

.network-discovery-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
  align-items: baseline;
}

.network-discovery-copy strong {
  color: #fff;
}

.network-discovery-copy span {
  color: var(--muted);
  font-size: 13px;
}

.network-discovery-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(114, 227, 255, 0.1);
}

.network-discovery-bar span {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--amber));
  box-shadow: 0 0 20px rgba(25, 245, 198, 0.35);
  transition: width 0.25s ease;
}

.network-discovery-status.idle .network-discovery-bar span {
  width: 8%;
  opacity: 0.55;
}

.network-discovery-status.running .network-discovery-bar span {
  width: 42%;
  animation: networkDiscoverySweep 1.15s ease-in-out infinite;
}

.network-discovery-status.done {
  border-color: rgba(49, 213, 131, 0.28);
}

.network-discovery-status.done .network-discovery-bar span {
  width: 100%;
}

.network-discovery-status.error {
  border-color: rgba(255, 92, 122, 0.32);
}

.network-discovery-status.error .network-discovery-bar span {
  width: 100%;
  background: linear-gradient(90deg, var(--red), var(--amber));
}

@keyframes networkDiscoverySweep {
  0% { transform: translateX(-105%); }
  50% { transform: translateX(70%); }
  100% { transform: translateX(245%); }
}

.network-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.network-tabs button {
  min-height: 34px;
  padding: 0 11px;
  border-color: rgba(114, 227, 255, 0.18);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
}

.network-tabs button.active,
.network-tabs button:hover {
  border-color: rgba(25,245,198,0.42);
  background: rgba(25,245,198,0.12);
  color: #fff;
}

.network-panel {
  display: none;
}

.network-panel.active {
  display: block;
}

.network-metrics {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.network-table {
  overflow-x: auto;
}

.network-table table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.network-table th,
.network-table td {
  border-bottom: 1px solid rgba(114, 227, 255, 0.12);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.network-table th {
  color: var(--teal);
  font-size: 11px;
  text-transform: uppercase;
}

.network-table td span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.network-detail {
  display: grid;
  gap: 14px;
}

.network-device-form .wide,
.network-port-test .wide {
  grid-column: 1 / -1;
}

.network-map {
  display: grid;
  gap: 14px;
}

.network-map-group {
  border: 1px solid rgba(114, 227, 255, 0.15);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(25,245,198,0.06), transparent),
    #030b10;
}

.network-map-group h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--teal);
}

.network-map-group > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.network-node {
  min-height: 72px;
  justify-content: start;
  text-align: left;
  background:
    radial-gradient(circle at 18px 18px, rgba(25,245,198,0.28), transparent 22px),
    rgba(255,255,255,0.04);
}

.network-node strong,
.network-node span {
  display: block;
}

.network-node span {
  color: var(--muted);
  font-size: 12px;
}

.event-high,
.event-critical {
  border-color: rgba(255, 92, 122, 0.28);
}

.event-medium {
  border-color: rgba(247, 201, 72, 0.28);
}

.identity-panel,
.access-panel {
  background:
    linear-gradient(135deg, rgba(25, 245, 198, 0.08), transparent 42%),
    var(--surface);
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.account-password-form {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.password-reset-notice {
  border-color: rgba(255, 92, 122, 0.34);
  background:
    linear-gradient(90deg, rgba(255, 92, 122, 0.12), rgba(247, 201, 72, 0.08)),
    rgba(2, 8, 12, 0.66);
}

.access-create {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(160px, 1fr) 120px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.permission-toggle {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(114, 227, 255, 0.14);
  background: rgba(2, 8, 12, 0.48);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
}

.permission-toggle input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--teal);
}

.permission-toggle span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.permission-toggle strong {
  display: block;
  font-size: 13px;
}

.permission-toggle:has(input:checked) {
  border-color: rgba(25, 245, 198, 0.42);
  background: rgba(25, 245, 198, 0.08);
  box-shadow: inset 0 0 18px rgba(25, 245, 198, 0.05);
}

.permission-toggle.disabled {
  opacity: 0.6;
}

.user-list {
  display: grid;
  gap: 12px;
}

.user-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.46);
}

.user-card-head,
.user-controls,
.password-reset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.user-card-head strong {
  font-size: 17px;
}

.user-card-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.user-controls {
  justify-content: flex-start;
}

.user-controls select {
  width: 140px;
}

.password-reset-row input {
  max-width: 280px;
}

.verification-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.verification-item strong,
.verification-item span,
.verification-item code {
  display: block;
}

.verification-item span,
.verification-item code {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.verification-item code,
.process-row code {
  background: rgba(2, 8, 12, 0.58);
  border: 1px solid rgba(25, 245, 198, 0.1);
  border-radius: 6px;
  color: #c8eef4;
  padding: 6px 8px;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 12px rgba(137, 167, 176, 0.4);
}

.verification-item.ok .status-dot {
  background: var(--green);
  box-shadow: 0 0 14px rgba(49, 213, 131, 0.5);
}

.verification-item.warning .status-dot {
  background: var(--amber);
  box-shadow: 0 0 14px rgba(247, 201, 72, 0.5);
}

.verification-item.critical .status-dot {
  background: var(--red);
  box-shadow: 0 0 14px rgba(255, 92, 122, 0.5);
}

.process-row {
  display: grid;
  gap: 9px;
}

.process-row code {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.process-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.process-list.wide {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.notice {
  border: 1px solid rgba(247, 201, 72, 0.25);
  background: rgba(247, 201, 72, 0.08);
  color: #ffe8a3;
  border-radius: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
}

.big-input {
  min-height: 180px;
  margin-bottom: 12px;
}

.view.noc-grid.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.inner {
  box-shadow: none;
  background: rgba(255,255,255,0.035);
}

.compact-media {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin-top: 12px;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.copy-flash {
  outline: 2px solid var(--teal);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(4, 13, 18, 0.96);
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
  max-width: min(420px, calc(100vw - 40px));
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.error-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(2, 8, 12, 0.72);
  backdrop-filter: blur(12px);
}

.error-overlay.active {
  display: grid;
}

.error-modal,
.error-panel {
  width: min(540px, 100%);
  border: 1px solid rgba(255, 92, 122, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(18, 28, 38, 0.98), rgba(5, 12, 18, 0.98)),
    #050c12;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58), 0 0 42px rgba(255, 92, 122, 0.13);
  padding: 22px;
}

.error-modal h2,
.error-panel h1 {
  margin: 0 0 10px;
}

.error-modal p,
.error-panel p {
  color: var(--muted);
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.error-shell {
  width: min(620px, calc(100vw - 32px));
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

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

  .layout.two,
  .form-grid,
  .account-password-form,
  .view.noc-grid.active {
    grid-template-columns: 1fr;
  }

  .access-create {
    grid-template-columns: 1fr;
  }

  .checkbox {
    padding-top: 0;
  }
}

@media (max-width: 620px) {
  .main,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .upload-row,
  .upload-summary {
    grid-template-columns: 1fr;
  }

  .upload-summary,
  .upload-title,
  .process-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .auth-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
}
