:root {
  color-scheme: dark;
  --bg: #3f4442;
  --workspace: #101314;
  --panel: #1b2021;
  --panel-soft: #15191a;
  --panel-raised: #242a2b;
  --line: #303837;
  --line-strong: #4e5957;
  --text: #eef2f6;
  --muted: #b8c1ca;
  --subtle: #89949e;
  --nav: #0f1213;
  --nav-2: #1a2021;
  --blue: #a4adff;
  --blue-strong: #38bdf8;
  --blue-soft: rgba(154, 167, 255, 0.16);
  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.12);
  --gold: #f6c453;
  --gold-soft: rgba(246, 196, 83, 0.14);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.14);
  --amber: #f4e14d;
  --amber-soft: rgba(244, 225, 77, 0.16);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.16);
  --purple: #c084fc;
  --purple-soft: rgba(192, 132, 252, 0.16);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.22);
  --primary-ink: #071116;
  --primary-border: #58c9ff;
  --control: #252b31;
  --placeholder: #8f98a3;
  --link: #a8b3ff;
  --nav-border: #272f36;
  --brand-mark-bg: #0b0e11;
  --brand-mark-border: #2c3540;
  --nav-text: #dbe4ef;
  --nav-active: #252c33;
  --nav-active-border: #394653;
  --nav-badge-active-bg: rgba(56, 189, 248, 0.2);
  --nav-badge-active-text: #b9e9ff;
  --good-note-border: rgba(74, 222, 128, 0.45);
  --good-note-bg: rgba(74, 222, 128, 0.08);
  --danger-note-border: rgba(251, 113, 133, 0.48);
  --danger-note-bg: rgba(251, 113, 133, 0.08);
  --warning-note-border: rgba(244, 225, 77, 0.48);
  --warning-note-bg: rgba(244, 225, 77, 0.08);
  --operation-wash: rgba(246, 196, 83, 0.08);
  --chip-bg: rgba(255, 255, 255, 0.025);
  --rail-track: #2f3637;
  --table-head: #161b1f;
  --row-even: rgba(255, 255, 255, 0.012);
  --row-hover: #22292e;
  --row-selected: rgba(154, 167, 255, 0.12);
  --dossier-wash: rgba(246, 196, 83, 0.045);
  --dossier-border: rgba(246, 196, 83, 0.28);
  --dossier-text: #f8d77d;
  --handoff-bg: #181d1e;
  --progress-track: #313a42;
  --chart-bar: #7f8cff;
  --inset-highlight: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #dfe8e7;
  --workspace: #f6f8f8;
  --panel: #ffffff;
  --panel-soft: #f1f5f5;
  --panel-raised: #ffffff;
  --line: #d6dfdf;
  --line-strong: #aab8b8;
  --text: #142020;
  --muted: #536264;
  --subtle: #7a8788;
  --nav: #fbfdfc;
  --nav-2: #eef4f3;
  --blue: #5261d6;
  --blue-strong: #0f8ac0;
  --blue-soft: rgba(82, 97, 214, 0.12);
  --teal: #047d73;
  --teal-soft: rgba(4, 125, 115, 0.11);
  --gold: #b88716;
  --gold-soft: rgba(184, 135, 22, 0.12);
  --green: #138a4d;
  --green-soft: rgba(19, 138, 77, 0.11);
  --amber: #9b7a00;
  --amber-soft: rgba(155, 122, 0, 0.12);
  --red: #c24155;
  --red-soft: rgba(194, 65, 85, 0.11);
  --purple: #7c4db8;
  --purple-soft: rgba(124, 77, 184, 0.11);
  --shadow: 0 20px 45px rgba(31, 42, 42, 0.14);
  --shadow-soft: 0 10px 24px rgba(31, 42, 42, 0.1);
  --primary-ink: #ffffff;
  --primary-border: #0f8ac0;
  --control: #ffffff;
  --placeholder: #7a8788;
  --link: #384db9;
  --nav-border: #d6dfdf;
  --brand-mark-bg: #eef4f3;
  --brand-mark-border: #c8d5d4;
  --nav-text: #384648;
  --nav-active: #e8edff;
  --nav-active-border: #aeb9ff;
  --nav-badge-active-bg: #dae3ff;
  --nav-badge-active-text: #3040a8;
  --good-note-border: rgba(19, 138, 77, 0.36);
  --good-note-bg: rgba(19, 138, 77, 0.08);
  --danger-note-border: rgba(194, 65, 85, 0.36);
  --danger-note-bg: rgba(194, 65, 85, 0.08);
  --warning-note-border: rgba(155, 122, 0, 0.36);
  --warning-note-bg: rgba(155, 122, 0, 0.08);
  --operation-wash: rgba(184, 135, 22, 0.08);
  --chip-bg: rgba(20, 32, 32, 0.035);
  --rail-track: #d9e2e2;
  --table-head: #eef3f3;
  --row-even: rgba(20, 32, 32, 0.018);
  --row-hover: #edf4f5;
  --row-selected: rgba(82, 97, 214, 0.12);
  --dossier-wash: rgba(184, 135, 22, 0.07);
  --dossier-border: rgba(184, 135, 22, 0.28);
  --dossier-text: #8b650f;
  --handoff-bg: #fbfcfb;
  --progress-track: #d8e1e1;
  --chart-bar: #5261d6;
  --inset-highlight: rgba(255, 255, 255, 0.75);
}

:root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #050915;
  --workspace: #07101d;
  --panel: rgba(12, 20, 35, 0.86);
  --panel-soft: rgba(15, 25, 42, 0.86);
  --panel-raised: rgba(21, 34, 55, 0.92);
  --line: rgba(86, 120, 158, 0.24);
  --line-strong: rgba(95, 149, 197, 0.46);
  --text: #f3f7fb;
  --muted: #b4c1d3;
  --subtle: #7f91a8;
  --nav: #050813;
  --nav-2: rgba(18, 33, 56, 0.88);
  --blue: #4f8dff;
  --blue-strong: #2ed9ff;
  --blue-soft: rgba(47, 140, 255, 0.16);
  --teal: #55fff0;
  --teal-soft: rgba(85, 255, 240, 0.13);
  --gold: #b7c5d8;
  --gold-soft: rgba(183, 197, 216, 0.12);
  --green: #58f29c;
  --green-soft: rgba(88, 242, 156, 0.13);
  --amber: #f6c760;
  --amber-soft: rgba(246, 199, 96, 0.14);
  --red: #ff5f86;
  --red-soft: rgba(255, 95, 134, 0.15);
  --purple: #8b5cff;
  --purple-soft: rgba(139, 92, 255, 0.16);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 16px 34px rgba(0, 0, 0, 0.28);
  --primary-ink: #03101a;
  --primary-border: #66ecff;
  --control: rgba(9, 17, 31, 0.78);
  --placeholder: #70839a;
  --link: #65e7ff;
  --nav-border: rgba(84, 130, 173, 0.26);
  --brand-mark-bg: #06101f;
  --brand-mark-border: rgba(91, 238, 255, 0.58);
  --nav-text: #bdc9d8;
  --nav-active: rgba(24, 43, 73, 0.92);
  --nav-active-border: rgba(100, 231, 255, 0.42);
  --nav-badge-active-bg: rgba(82, 236, 255, 0.18);
  --nav-badge-active-text: #91f2ff;
  --operation-wash: rgba(80, 141, 255, 0.12);
  --chip-bg: rgba(255, 255, 255, 0.04);
  --rail-track: rgba(114, 145, 181, 0.2);
  --table-head: rgba(10, 18, 31, 0.96);
  --row-even: rgba(95, 149, 197, 0.035);
  --row-hover: rgba(37, 66, 105, 0.64);
  --row-selected: rgba(58, 143, 255, 0.16);
  --dossier-wash: rgba(52, 215, 255, 0.05);
  --dossier-border: rgba(94, 235, 255, 0.32);
  --dossier-text: #8cefff;
  --handoff-bg: rgba(11, 21, 36, 0.92);
  --progress-track: rgba(107, 137, 174, 0.2);
  --chart-bar: #4f8dff;
  --inset-highlight: rgba(255, 255, 255, 0.07);
}

:root[data-theme="light"] {
  --bg: #edf5f7;
  --workspace: #f7fbfc;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(239, 247, 250, 0.9);
  --panel-raised: #ffffff;
  --line: #d2e1e7;
  --line-strong: #9db6c5;
  --blue: #2d6fe8;
  --blue-strong: #0288c7;
  --teal: #047f8b;
  --purple: #6f4fd8;
  --gold: #69788a;
  --nav: #f9fcfd;
  --nav-2: #edf6f9;
  --brand-mark-bg: #06101f;
  --brand-mark-border: rgba(2, 136, 199, 0.3);
  --nav-active: #e7f2ff;
  --nav-active-border: #9fc6ff;
  --link: #0b75aa;
  --table-head: #eef6fa;
  --chart-bar: #2d6fe8;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Aptos", "Inter", "SF Pro Text", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

button {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  min-height: 36px;
}

button.primary,
.primary {
  background: var(--blue-strong);
  color: var(--primary-ink);
  border-color: var(--primary-border);
  font-weight: 740;
}

button.secondary,
.secondary {
  background: var(--panel-raised);
  color: var(--text);
  border-color: var(--line-strong);
}

button:hover {
  filter: brightness(1.08);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input,
select {
  min-height: 36px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--control);
  color: var(--text);
  padding: 0 10px;
}

input::placeholder {
  color: var(--placeholder);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(34, 75, 129, 0.12), transparent 38%),
    linear-gradient(rgba(94, 235, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 235, 255, 0.035) 1px, transparent 1px),
    var(--workspace);
  background-size: auto, 48px 48px, 48px 48px, auto;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(18, 31, 55, 0.7), rgba(5, 8, 19, 0.98)),
    var(--nav);
  color: var(--text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--nav-border);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 86px;
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(85, 255, 240, 0.12), rgba(139, 92, 255, 0.12)),
    var(--brand-mark-bg);
  color: var(--teal);
  border: 1px solid var(--brand-mark-border);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(94, 235, 255, 0.08),
    0 0 24px rgba(55, 180, 255, 0.18);
}

.brand-mark::before {
  content: none;
}

.brand-mark::after {
  content: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-name {
  font-family: "Aptos Display", "Inter", "SF Pro Display", ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1;
  font-weight: 820;
  text-transform: uppercase;
  background: linear-gradient(90deg, #f5f8ff 0%, #cfd7e5 46%, #51e7ff 72%, #8465ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 760;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-list {
  flex: 1;
  overflow: auto;
  padding: 10px 8px;
}

.nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin: 2px 0;
  padding: 9px 10px;
  color: var(--nav-text);
  background: transparent;
  border-color: transparent;
  border-radius: 8px;
  text-align: left;
}

.nav-item:hover {
  background: var(--nav-2);
  border-color: rgba(95, 149, 197, 0.22);
}

.nav-item.active {
  background: var(--nav-active);
  color: var(--text);
  border-color: var(--nav-active-border);
  box-shadow:
    inset 3px 0 0 var(--teal),
    0 0 20px rgba(47, 140, 255, 0.08);
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 620;
}

.nav-badge {
  min-width: 26px;
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 7px;
  text-align: center;
  background: rgba(154, 167, 255, 0.16);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.nav-item.active .nav-badge {
  background: var(--nav-badge-active-bg);
  color: var(--nav-badge-active-text);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.runtime-pill {
  min-height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(10, 19, 34, 0.5);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  background: transparent;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background:
    linear-gradient(90deg, rgba(9, 17, 31, 0.92), rgba(9, 17, 31, 0.7)),
    transparent;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  margin-top: 3px;
  font-family: "Aptos Display", "Inter", "SF Pro Display", ui-sans-serif, system-ui, sans-serif;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 780;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 430px;
}

.theme-toggle {
  min-width: 64px;
  padding: 0 12px;
  font-weight: 740;
}

.command-search {
  flex: 1;
  min-width: 260px;
  height: 38px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--control);
  padding: 0 10px;
  box-shadow: inset 0 1px 0 var(--inset-highlight);
}

.command-search input {
  border: 0;
  padding: 0;
  min-height: auto;
  outline: 0;
  background: transparent;
}

.connection-panel {
  margin: 14px 22px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(360px, 1fr);
  gap: 16px;
  box-shadow: var(--shadow);
}

.connection-panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

.connection-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.connection-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  padding: 14px 22px 0;
}

.metric-card {
  min-height: 76px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 44%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  display: grid;
  gap: 4px;
  min-width: 0;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--teal), var(--blue), var(--purple));
}

.metric-label {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  font-size: 24px;
  line-height: 1.05;
  font-weight: 780;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.metric-note {
  width: fit-content;
  max-width: 100%;
  color: var(--green);
  font-size: 12px;
  border: 1px solid var(--good-note-border);
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--good-note-bg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tone-danger::before,
.tone-danger .metric-note {
  color: var(--red);
  border-color: var(--danger-note-border);
  background: var(--danger-note-bg);
}

.tone-danger::before {
  background: var(--red);
}

.tone-warning::before,
.tone-warning .metric-note {
  color: var(--amber);
  border-color: var(--warning-note-border);
  background: var(--warning-note-bg);
}

.tone-warning::before {
  background: var(--amber);
}

.tone-ok::before {
  background: var(--green);
}

.tone-neutral::before {
  background: var(--blue);
}

.page-body {
  min-height: 0;
  padding: 14px 22px 22px;
}

.operation-board {
  min-height: 128px;
  display: grid;
  grid-template-columns: minmax(320px, 0.55fr) minmax(480px, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.operation-copy {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--operation-wash), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 48%),
    var(--panel);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.operation-kicker {
  color: var(--gold);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.operation-copy h2 {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.08;
}

.operation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.operation-meta span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: var(--chip-bg);
  font-size: 12px;
}

.backend-rail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%),
    var(--panel);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  box-shadow: var(--shadow-soft);
}

.backend-rail-item {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.backend-rail-top {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.backend-rail-top span,
.backend-rail-foot {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backend-rail-top span {
  color: var(--text);
  font-weight: 690;
}

.backend-rail-top strong {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.backend-rail-track {
  height: 6px;
  border-radius: 999px;
  background: var(--rail-track);
  overflow: hidden;
}

.backend-rail-track span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.backend-rail-foot {
  color: var(--subtle);
  font-size: 12px;
  text-transform: capitalize;
}

.status-degraded .backend-rail-track span {
  width: 48%;
  background: var(--amber);
}

.status-stale .backend-rail-track span {
  width: 26%;
  background: var(--red);
}

.status-unknown .backend-rail-track span {
  width: 38%;
  background: var(--blue);
}

.two-pane {
  display: grid;
  grid-template-columns: minmax(620px, 1.2fr) minmax(380px, 0.8fr);
  gap: 14px;
  height: calc(100vh - 320px);
  min-height: 520px;
}

.panel {
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}

.panel-header {
  min-height: 54px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(85, 255, 240, 0.055), transparent 42%),
    var(--panel-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: inset 0 -1px 0 var(--inset-highlight);
}

.panel-title {
  display: grid;
  gap: 3px;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 112px 122px 128px 132px 130px 120px;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--control);
}

.segmented button {
  border: 0;
  border-radius: 0;
  min-height: 32px;
  padding: 0 10px;
  background: var(--control);
  color: var(--text);
}

.segmented button.active {
  background: linear-gradient(90deg, var(--blue), var(--teal));
  color: var(--primary-ink);
  font-weight: 760;
}

.table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-head);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  box-shadow: inset 0 -1px 0 var(--line);
}

td {
  overflow-wrap: anywhere;
}

tbody tr:nth-child(even):not(.selected) {
  background: var(--row-even);
}

tr.row-click {
  cursor: pointer;
}

tr.row-click:hover {
  background: var(--row-hover);
}

tr.row-click.selected {
  background: var(--row-selected);
}

.issue-row {
  box-shadow: inset 3px 0 0 transparent;
}

.sev-row-s1 {
  box-shadow: inset 3px 0 0 var(--red);
}

.sev-row-s2 {
  box-shadow: inset 3px 0 0 var(--amber);
}

.sev-row-s3,
.sev-row-s4 {
  box-shadow: inset 3px 0 0 var(--blue);
}

.sev-row-s5 {
  box-shadow: inset 3px 0 0 var(--green);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 740;
  white-space: nowrap;
  border: 1px solid currentColor;
}

.severity-token {
  display: inline-flex;
  min-width: 42px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

.sev-s1,
.risk-critical {
  background: var(--red-soft);
  color: var(--red);
}

.sev-s2,
.risk-high,
.state-warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.sev-s3,
.sev-s4,
.state-info {
  background: var(--blue-soft);
  color: var(--blue);
}

.sev-s5,
.state-ok,
.risk-low {
  background: var(--green-soft);
  color: var(--green);
}

.state-muted,
.risk-medium {
  background: var(--purple-soft);
  color: var(--purple);
}

.state-danger {
  background: var(--red-soft);
  color: var(--red);
}

.state-text-ok {
  color: var(--green);
}

.state-text-warning {
  color: var(--amber);
}

.row-title {
  font-weight: 720;
  line-height: 1.35;
}

.backend-cell,
.target-name,
.age-cell {
  font-weight: 710;
}

.backend-cell {
  display: inline-flex;
  width: 100%;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  white-space: nowrap;
}

.backend-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.backend-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-pane {
  min-height: 0;
  overflow: auto;
}

.dossier-head {
  align-items: flex-start;
}

.dossier-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--dossier-wash);
}

.dossier-strip span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--dossier-border);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--dossier-text);
  font-size: 12px;
}

.detail-section {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
  border-bottom: 0;
}

.detail-section h3 {
  margin-bottom: 8px;
}

.detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.handoff-card {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: var(--handoff-bg);
  color: var(--text);
  padding: 10px 11px;
  line-height: 1.45;
}

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

.fact {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel-soft);
}

.fact-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.fact-value {
  margin-top: 4px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.label-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
  gap: 6px;
  font-size: 12px;
}

.label-key {
  color: var(--muted);
  font-weight: 700;
}

.label-value {
  color: var(--text);
  overflow-wrap: anywhere;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--text);
  font-weight: 640;
}

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

.notice-banner {
  min-height: 52px;
  margin-bottom: 14px;
  border: 1px solid var(--warning-note-border);
  border-radius: 8px;
  background: var(--warning-note-bg);
  color: var(--text);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notice-banner div {
  display: grid;
  gap: 3px;
}

.notice-banner span {
  color: var(--muted);
}

.span-4 {
  grid-column: span 4;
}

.span-6 {
  grid-column: span 6;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: 1 / -1;
}

.list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: var(--panel-soft);
  display: grid;
  gap: 8px;
  box-shadow: inset 0 1px 0 var(--inset-highlight);
}

.list-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

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

.circuit-item {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.circuit-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.graph-summary {
  flex: 1;
  min-height: 180px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.graph-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
}

.graph-summary strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.graph-summary span {
  color: var(--muted);
  font-weight: 720;
}

.progress-bar {
  height: 7px;
  background: var(--progress-track);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--teal), var(--blue));
  width: var(--value, 0%);
}

.mini-chart {
  height: 72px;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  align-items: end;
  gap: 4px;
  padding: 10px 12px 12px;
}

.mini-bar {
  min-height: 6px;
  border-radius: 3px 3px 0 0;
  background: var(--chart-bar);
  opacity: 0.82;
}

.empty-state {
  padding: 30px;
  color: var(--muted);
}

.icon-only {
  width: 38px;
  display: inline-grid;
  place-items: center;
}

.icon-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.nav-item .icon,
.topbar .icon,
.sidebar-footer .icon {
  color: var(--muted);
}

.nav-item.active .icon,
.nav-item:hover .icon {
  color: var(--teal);
  filter: drop-shadow(0 0 8px rgba(85, 255, 240, 0.34));
}

.issues-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 22 20H2L12 2Zm0 6-1 6h2l-1-6Zm-1 8v2h2v-2h-2Z'/%3E%3C/svg%3E"); }
.incidents-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4h16v4H4V4Zm0 6h16v10H4V10Zm3 3v2h10v-2H7Zm0 4h6v-2H7v2Z'/%3E%3C/svg%3E"); }
.advisor-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.74V18h8v-3.26A7 7 0 0 0 12 2Zm-3 18h6v2H9v-2Zm2-5v-3H8l5-6v4h3l-5 5Z'/%3E%3C/svg%3E"); }
.deploy-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 3 7v10l9 5 9-5V7l-9-5Zm0 2.3L17.7 7 12 9.8 6.3 7 12 4.3ZM5 8.6l6 3v7.8l-6-3.3V8.6Zm8 10.8v-7.8l6-3v7.5l-6 3.3Z'/%3E%3C/svg%3E"); }
.services-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 3h12v6H6V3Zm0 12h12v6H6v-6ZM3 10h18v3H3v-3Z'/%3E%3C/svg%3E"); }
.k8s-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 4 6v12l8 4 8-4V6l-8-4Zm0 3 5 2.5v3.2l-5-2.5-5 2.5V7.5L12 5Zm-5 8 4 2v4l-4-2v-4Zm6 6v-4l4-2v4l-4 2Z'/%3E%3C/svg%3E"); }
.cost-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3c5 0 9 2 9 4.5v9C21 19 17 21 12 21s-9-2-9-4.5v-9C3 5 7 3 12 3Zm0 3C8 6 5.5 7 5.5 7.5S8 9 12 9s6.5-1 6.5-1.5S16 6 12 6Zm6.5 5c-1.6.9-3.9 1.4-6.5 1.4S7.1 11.9 5.5 11v2c0 .5 2.5 1.5 6.5 1.5s6.5-1 6.5-1.5v-2Zm0 5c-1.6.9-3.9 1.4-6.5 1.4S7.1 16.9 5.5 16v.5C5.5 17 8 18 12 18s6.5-1 6.5-1.5V16Z'/%3E%3C/svg%3E"); }
.actions-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 2 4 14h7l-1 8 10-13h-7l0-7Z'/%3E%3C/svg%3E"); }
.health-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21C6 17 3 13.5 3 9a5 5 0 0 1 9-3 5 5 0 0 1 9 3c0 4.5-3 8-9 12Zm-1-6h2v-3h3v-2h-3V7h-2v3H8v2h3v3Z'/%3E%3C/svg%3E"); }
.settings-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.4 13.5c.1-.5.1-1 .1-1.5s0-1-.1-1.5l2-1.5-2-3.5-2.4 1a8 8 0 0 0-2.6-1.5L14 2h-4l-.4 2.5A8 8 0 0 0 7 6L4.6 5l-2 3.5 2 1.5c-.1.5-.1 1-.1 1.5s0 1 .1 1.5l-2 1.5 2 3.5 2.4-1a8 8 0 0 0 2.6 1.5L10 22h4l.4-2.5A8 8 0 0 0 17 18l2.4 1 2-3.5-2-1.5ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E"); }
.search-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3a7 7 0 1 0 4.4 12.4l4.1 4.1 1.5-1.5-4.1-4.1A7 7 0 0 0 10 3Zm0 2a5 5 0 1 1 0 10 5 5 0 0 1 0-10Z'/%3E%3C/svg%3E"); }
.refresh-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.7 6.3A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.8-4.3L13 11h8V3l-3.3 3.3Z'/%3E%3C/svg%3E"); }
.external-icon { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5h7v2H7v10h10v-5h2v7H5V5Zm9 0h5v5h-2V8.4l-6.3 6.3-1.4-1.4L15.6 7H14V5Z'/%3E%3C/svg%3E"); }

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .brand-block {
    justify-content: center;
  }

  .brand-block > div:not(.brand-mark),
  .nav-label,
  .nav-badge,
  .sidebar-footer {
    display: none;
  }

  .nav-item {
    grid-template-columns: 1fr;
    place-items: center;
  }

  .two-pane {
    grid-template-columns: 1fr;
    height: auto;
  }

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

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

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

  .nav-list {
    display: flex;
    overflow: auto;
  }

  .nav-item {
    min-width: 58px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    min-width: 0;
  }

  .status-strip,
  .grid-page {
    grid-template-columns: 1fr;
  }

  .connection-panel,
  .connection-form,
  .filter-grid,
  .circuit-grid,
  .graph-summary {
    grid-template-columns: 1fr;
  }

  .span-4,
  .span-6,
  .span-8,
  .span-12 {
    grid-column: 1 / -1;
  }
}

/* Frozen enterprise console skin: light-first, Option B visual baseline. */
:root[data-theme="light"] {
  --bg: #f7f9fc;
  --workspace: #f7f9fc;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --panel-raised: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --nav: #ffffff;
  --nav-2: #f8fafc;
  --blue: #2563eb;
  --blue-strong: #0f4c81;
  --blue-soft: #eff6ff;
  --teal: #0d9488;
  --teal-soft: #ccfbf1;
  --gold: #d97706;
  --gold-soft: #fffbeb;
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --purple: #7c4db8;
  --purple-soft: #f3e8ff;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-soft: none;
  --primary-ink: #ffffff;
  --primary-border: #0f4c81;
  --control: #ffffff;
  --placeholder: #94a3b8;
  --link: #0d9488;
  --nav-border: #e2e8f0;
  --brand-mark-bg: #06101f;
  --brand-mark-border: rgba(15, 76, 129, 0.22);
  --nav-text: #64748b;
  --nav-active: linear-gradient(135deg, rgba(13, 148, 136, 0.07), rgba(124, 77, 184, 0.07));
  --nav-active-border: rgba(13, 148, 136, 0.18);
  --nav-badge-active-bg: #dbeafe;
  --nav-badge-active-text: #0f4c81;
  --good-note-border: rgba(5, 150, 105, 0.22);
  --good-note-bg: #ecfdf5;
  --danger-note-border: rgba(220, 38, 38, 0.22);
  --danger-note-bg: #fef2f2;
  --warning-note-border: rgba(217, 119, 6, 0.24);
  --warning-note-bg: #fffbeb;
  --operation-wash: rgba(15, 76, 129, 0.035);
  --chip-bg: #ffffff;
  --rail-track: #e2e8f0;
  --table-head: #f8fafc;
  --row-even: rgba(15, 23, 42, 0.012);
  --row-hover: #f8fafc;
  --row-selected: #eff6ff;
  --dossier-wash: #f8fafc;
  --dossier-border: #e2e8f0;
  --dossier-text: #0f4c81;
  --handoff-bg: #ffffff;
  --progress-track: #e2e8f0;
  --chart-bar: #0f4c81;
  --inset-highlight: rgba(255, 255, 255, 0.75);
}

:root[data-theme="dark"] {
  --bg: #050915;
}

body::before {
  content: "";
  position: fixed;
  z-index: 500;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #0f4c81 40%, #8b5cff 70%, #7c4db8);
}

:root[data-theme="light"] body {
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] button:hover {
  filter: none;
}

:root[data-theme="light"] .app-shell {
  display: block;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(15, 76, 129, 0.022) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 76, 129, 0.022) 1px, transparent 1px),
    var(--workspace);
  background-size: 44px 44px;
}

:root[data-theme="light"] .sidebar {
  position: sticky;
  top: 3px;
  z-index: 100;
  height: 64px;
  min-height: 64px;
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow: hidden;
  background: #ffffff;
  color: var(--text);
  border-right: 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

:root[data-theme="light"] .brand-block {
  min-height: 64px;
  height: 64px;
  padding: 0 28px;
  gap: 11px;
  border-bottom: 0;
  flex: 0 0 auto;
}

:root[data-theme="light"] .brand-mark {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  box-shadow: 0 2px 8px rgba(12, 61, 107, 0.15);
}

:root[data-theme="light"] .brand-name {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: none;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

:root[data-theme="light"] .brand-subtitle {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

:root[data-theme="light"] .nav-list {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 1px;
  min-width: 0;
  height: 64px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

:root[data-theme="light"] .nav-item {
  width: auto;
  min-width: max-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-template-columns: none;
  gap: 0;
  margin: 0;
  padding: 0 13px;
  color: var(--muted);
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
}

:root[data-theme="light"] .nav-item .icon,
:root[data-theme="light"] .nav-badge {
  display: none;
}

:root[data-theme="light"] .nav-label {
  font-weight: inherit;
}

:root[data-theme="light"] .nav-item:hover {
  background: var(--panel-soft);
  color: var(--text);
  border-color: transparent;
}

:root[data-theme="light"] .nav-item.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.07), rgba(124, 77, 184, 0.07));
  color: var(--blue-strong);
  font-weight: 600;
  border-color: rgba(13, 148, 136, 0.18);
  box-shadow: none;
}

:root[data-theme="light"] .sidebar-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px 0 12px;
  border-top: 0;
}

:root[data-theme="light"] .runtime-pill {
  min-height: 28px;
  max-width: 168px;
  color: var(--green);
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

:root[data-theme="light"] .sidebar-footer .secondary {
  min-height: 30px;
  border-radius: 8px;
  color: var(--blue-strong);
  background: #ffffff;
  border-color: var(--line);
  font-size: 12px;
  font-weight: 700;
}

:root[data-theme="light"] .workspace {
  display: block;
  background: transparent;
}

:root[data-theme="light"] .topbar {
  min-height: 56px;
  padding: 10px 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}

:root[data-theme="light"] .eyebrow {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

:root[data-theme="light"] h1 {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

:root[data-theme="light"] .topbar-actions {
  min-width: min(430px, 45vw);
}

:root[data-theme="light"] .command-search {
  height: 38px;
  border-color: var(--line);
  background: var(--panel-soft);
  box-shadow: none;
}

:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .icon-only {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
  font-weight: 700;
}

:root[data-theme="light"] input,
:root[data-theme="light"] select {
  background: #ffffff;
  color: var(--text);
  border-color: var(--line);
}

:root[data-theme="light"] .connection-panel {
  max-width: 1480px;
  margin: 14px auto 0;
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: none;
}

:root[data-theme="light"] .status-strip,
:root[data-theme="light"] .page-body {
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

:root[data-theme="light"] .status-strip {
  gap: 11px;
  padding-top: 18px;
}

:root[data-theme="light"] .metric-card {
  min-height: 86px;
  background: #ffffff;
  border-color: var(--line);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: none;
}

:root[data-theme="light"] .metric-card:hover {
  box-shadow: 0 4px 16px rgba(15, 76, 129, 0.08);
  transform: translateY(-1px);
}

:root[data-theme="light"] .metric-card::before {
  inset: auto 14px 0 14px;
  width: auto;
  height: 2.5px;
  border-radius: 2px;
}

:root[data-theme="light"] .metric-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

:root[data-theme="light"] .metric-value {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

:root[data-theme="light"] .metric-note {
  margin: 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 10px;
  font-weight: 700;
}

:root[data-theme="light"] .page-body {
  padding-top: 16px;
}

:root[data-theme="light"] .operation-board {
  min-height: 116px;
  grid-template-columns: minmax(320px, 0.52fr) minmax(480px, 1fr);
}

:root[data-theme="light"] .operation-copy,
:root[data-theme="light"] .backend-rail,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .card {
  background: #ffffff;
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: none;
}

:root[data-theme="light"] .operation-copy {
  padding: 18px;
}

:root[data-theme="light"] .operation-kicker {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

:root[data-theme="light"] .operation-copy h2 {
  color: var(--text);
  font-size: 28px;
  letter-spacing: -0.03em;
}

:root[data-theme="light"] .operation-meta span,
:root[data-theme="light"] .chip {
  min-height: 25px;
  border-color: var(--line);
  background: #ffffff;
  color: var(--muted);
  font-weight: 700;
}

:root[data-theme="light"] .backend-rail {
  padding: 12px;
}

:root[data-theme="light"] .backend-rail-item,
:root[data-theme="light"] .list-item,
:root[data-theme="light"] .fact,
:root[data-theme="light"] .handoff-card {
  background: var(--panel-soft);
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: none;
}

:root[data-theme="light"] .backend-rail-top span,
:root[data-theme="light"] .row-title,
:root[data-theme="light"] .target-name,
:root[data-theme="light"] .fact-value {
  color: var(--text);
}

:root[data-theme="light"] .two-pane {
  grid-template-columns: minmax(620px, 1.75fr) minmax(360px, 1fr);
  gap: 14px;
  min-height: 560px;
}

:root[data-theme="light"] .panel-header {
  min-height: 54px;
  background: #ffffff;
  border-bottom-color: #f1f5f9;
  box-shadow: none;
  padding: 12px 14px;
}

:root[data-theme="light"] .panel-title h2,
:root[data-theme="light"] .card-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

:root[data-theme="light"] .panel-subtitle {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
}

:root[data-theme="light"] .filter-grid {
  background: #fbfdff;
  border-bottom-color: #f1f5f9;
}

:root[data-theme="light"] .segmented {
  background: var(--panel-soft);
  border-color: var(--line);
  border-radius: 6px;
}

:root[data-theme="light"] .segmented button {
  min-height: 30px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

:root[data-theme="light"] .segmented button.active {
  background: var(--blue-strong);
  color: #ffffff;
}

:root[data-theme="light"] th {
  background: var(--table-head);
  color: var(--subtle);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

:root[data-theme="light"] th,
:root[data-theme="light"] td {
  border-bottom-color: #f1f5f9;
}

:root[data-theme="light"] tr.row-click:hover {
  background: var(--row-hover);
}

:root[data-theme="light"] .severity-token,
:root[data-theme="light"] .badge {
  border-color: transparent;
  min-height: 24px;
  font-size: 11px;
}

:root[data-theme="light"] .severity-token {
  min-width: 36px;
  border-radius: 999px;
}

:root[data-theme="light"] .backend-dot {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

:root[data-theme="light"] .dossier-head,
:root[data-theme="light"] .dossier-strip {
  background: #ffffff;
}

:root[data-theme="light"] .dossier-strip {
  border-bottom: 1px solid #f1f5f9;
}

:root[data-theme="light"] .detail-section {
  border-top-color: #f1f5f9;
}

:root[data-theme="light"] .link-button,
:root[data-theme="light"] .tl-action {
  background: rgba(13, 148, 136, 0.04);
  border-color: rgba(13, 148, 136, 0.25);
  color: var(--teal);
}

:root[data-theme="light"] .grid-page {
  gap: 14px;
}

:root[data-theme="light"] .list {
  gap: 10px;
}

@media (max-width: 1180px) {
  :root[data-theme="light"] .app-shell {
    display: block;
  }

  :root[data-theme="light"] .sidebar {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    overflow: visible;
  }

  :root[data-theme="light"] .brand-block > div:not(.brand-mark),
  :root[data-theme="light"] .nav-label,
  :root[data-theme="light"] .sidebar-footer {
    display: initial;
  }

  :root[data-theme="light"] .brand-block {
    justify-content: flex-start;
  }

  :root[data-theme="light"] .nav-item {
    grid-template-columns: none;
  }

  :root[data-theme="light"] .nav-list {
    order: 3;
    flex-basis: 100%;
    height: 44px;
    padding: 0 18px;
    border-top: 1px solid var(--line);
  }

  :root[data-theme="light"] .status-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root[data-theme="light"] .sidebar {
    position: sticky;
    top: 3px;
    width: 100%;
    max-width: 100vw;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
  }

  :root[data-theme="light"] .brand-block {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    height: 58px;
    padding: 0 16px;
  }

  :root[data-theme="light"] .brand-mark {
    width: 40px;
    height: 40px;
  }

  :root[data-theme="light"] .brand-name {
    font-size: 17px;
  }

  :root[data-theme="light"] .nav-list {
    width: 100%;
    max-width: 100vw;
    flex-basis: auto;
    order: initial;
    height: 42px;
    padding: 0 12px;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: thin;
  }

  :root[data-theme="light"] .nav-item {
    flex: 0 0 auto;
    min-width: auto;
    min-height: 32px;
    padding: 0 11px;
  }

  :root[data-theme="light"] .sidebar-footer {
    display: none;
  }

  :root[data-theme="light"] .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
    padding: 14px 16px;
  }

  :root[data-theme="light"] .topbar-actions {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  :root[data-theme="light"] .topbar-actions .icon-only {
    display: none;
  }

  :root[data-theme="light"] .command-search {
    min-width: 0;
    width: 100%;
  }

  :root[data-theme="light"] .connection-panel {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin-left: 12px;
    margin-right: 12px;
    padding: 14px;
  }

  :root[data-theme="light"] .connection-panel,
  :root[data-theme="light"] .connection-panel > *,
  :root[data-theme="light"] .connection-form,
  :root[data-theme="light"] .connection-form label {
    min-width: 0;
  }

  :root[data-theme="light"] .connection-panel p {
    overflow-wrap: anywhere;
  }

  :root[data-theme="light"] .connection-form button {
    width: 100%;
  }

  :root[data-theme="light"] .status-strip,
  :root[data-theme="light"] .page-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  :root[data-theme="light"] .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :root[data-theme="light"] .operation-board,
  :root[data-theme="light"] .two-pane,
  :root[data-theme="light"] .connection-panel,
  :root[data-theme="light"] .connection-form,
  :root[data-theme="light"] .filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  :root[data-theme="light"] .operation-board,
  :root[data-theme="light"] .two-pane,
  :root[data-theme="light"] .panel,
  :root[data-theme="light"] .operation-copy,
  :root[data-theme="light"] .backend-rail {
    max-width: 100%;
    min-width: 0;
  }

  :root[data-theme="light"] .operation-copy h2 {
    font-size: 25px;
  }

  :root[data-theme="light"] .backend-rail {
    grid-template-columns: minmax(0, 1fr);
  }

  :root[data-theme="light"] .panel-header,
  :root[data-theme="light"] .filter-grid {
    align-items: stretch;
  }

  :root[data-theme="light"] .panel-header {
    flex-direction: column;
  }

  :root[data-theme="light"] .segmented {
    width: 100%;
    grid-auto-columns: 1fr;
  }

  :root[data-theme="light"] .table-wrap {
    overflow-x: auto;
  }

  :root[data-theme="light"] table {
    min-width: 680px;
  }
}

@media (max-width: 520px) {
  :root[data-theme="light"] {
    overflow-x: hidden;
  }

  :root[data-theme="light"] body,
  :root[data-theme="light"] .app-shell,
  :root[data-theme="light"] .workspace {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  :root[data-theme="light"] .sidebar,
  :root[data-theme="light"] .topbar,
  :root[data-theme="light"] .status-strip,
  :root[data-theme="light"] .page-body {
    width: 100vw;
    max-width: 100vw;
    margin-left: 0;
    margin-right: 0;
  }

  :root[data-theme="light"] .topbar-actions {
    display: block;
  }

  :root[data-theme="light"] .theme-toggle {
    display: none;
  }

  :root[data-theme="light"] .status-strip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  :root[data-theme="light"] .metric-card {
    min-width: 0;
    padding: 12px 8px;
  }

  :root[data-theme="light"] .metric-label {
    overflow-wrap: anywhere;
  }

  :root[data-theme="light"] .theme-toggle {
    min-width: 58px;
    padding: 0 9px;
  }

  :root[data-theme="light"] .icon-only {
    width: 38px;
  }
}
