:root {
  --bg: #07100f;
  --surface: #0d1817;
  --surface-2: #12211f;
  --line: #223532;
  --text: #f1f7f5;
  --muted: #8ea5a0;
  --lime: #c8f25a;
  --mint: #6ee7c0;
  --amber: #f7bd55;
  --red: #ff6b68;
  --blue: #65a8ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body.scope-onboarding .shell { display: block; }
body.scope-onboarding .sidebar,
body.scope-onboarding #workspace,
body.scope-onboarding #scope-picker,
body.scope-onboarding #device-picker,
body.scope-onboarding #command-palette-button { display: none !important; }
.scope-onboarding-card { max-width: 760px; margin: 32px auto; }
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background:
    radial-gradient(
      circle at 80% 0,
      rgba(110, 231, 192, 0.08),
      transparent 28rem
    ),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  background: rgba(7, 16, 15, 0.88);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.12;
  font-size: 14px;
}
.brand strong {
  color: var(--lime);
  font-weight: 650;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(200, 242, 90, 0.45);
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--bg);
  font-weight: 900;
  background: var(--lime);
  box-shadow: 0 0 30px rgba(200, 242, 90, 0.16);
}
nav {
  display: grid;
  gap: 7px;
  margin-top: 62px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 14px;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}
.nav-link.active {
  box-shadow: inset 2px 0 var(--lime);
}
.nav-group { display:grid; gap:3px; margin-top:4px; }
.nav-label { padding:8px 13px 3px; color:var(--text); font-size:10px; font-weight:750; text-transform:uppercase; letter-spacing:.1em; }
.nav-child { padding-left:26px; font-size:12px; }
.device-picker { display:grid; gap:5px; min-width:230px; color:var(--muted); font-size:11px; }
.device-picker select { min-height:38px; }
#agent-rows tr { cursor:pointer; }
#agent-rows tr:focus-visible { outline:2px solid var(--mint); outline-offset:-2px; }
.safety {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
}
.safety strong,
.safety small {
  display: block;
}
.safety strong {
  font-size: 13px;
}
.safety small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(110, 231, 192, 0.1);
}
main {
  padding: 0 42px 80px;
  min-width: 0;
}
.topbar {
  height: 112px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(7, 16, 15, 0.82);
  backdrop-filter: blur(18px);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 17px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 10px;
  font-weight: 700;
  color: var(--mint);
  margin-bottom: 7px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.scope-picker {
  display: grid;
  gap: 3px;
  margin: 0 8px 0 0;
}
.scope-picker[hidden] { display: none; }
.scope-picker span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.scope-picker select { min-width: 220px; padding: 7px 9px; font-size: 11px; }
.connection {
  font-size: 12px;
  color: var(--muted);
  padding-right: 8px;
}
.connection::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  background: var(--red);
}
.connection.online::before {
  background: var(--mint);
}
.button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.primary {
  background: var(--lime);
  color: #10190c;
}
.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.ghost {
  background: transparent;
  color: var(--muted);
}
.login-card {
  max-width: 900px;
  margin: 70px auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
}
.login-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
  margin-top: 12px;
  font-size: 14px;
}
label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.token-row {
  display: flex;
  gap: 8px;
}
input {
  width: 100%;
  min-width: 0;
  background: #081210;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
}
select {
  width: 100%; min-width: 0; background: #081210; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font: inherit;
}
select:focus { outline: 2px solid rgba(200, 242, 90, 0.35); border-color: var(--lime); }
input:focus {
  outline: 2px solid rgba(200, 242, 90, 0.35);
  border-color: var(--lime);
}
.error {
  color: var(--red) !important;
  min-height: 20px;
}
.auth-note {
  max-width: 34rem;
}
.user-account {
  position: relative;
}
.user-account[hidden],
.user-menu[hidden] {
  display: none;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  background: #0b8792;
  color: white;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 3px #e1f4f3;
  border: 0;
  cursor: pointer;
}
.user-avatar:hover,
.user-avatar[aria-expanded="true"] {
  background: #076f78;
}
.user-avatar:focus-visible {
  outline: 3px solid rgba(11, 135, 146, 0.28);
  outline-offset: 3px;
}
.user-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 12px);
  right: 0;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: 0 16px 42px rgba(21, 48, 57, 0.18);
}
.user-summary {
  display: grid;
  gap: 4px;
  padding: 10px 11px 12px;
  border-bottom: 1px solid var(--line);
}
.user-summary strong {
  color: var(--text);
  font-size: 13px;
}
.user-summary span {
  color: var(--muted);
  font-size: 11px;
}
.user-menu-action {
  width: 100%;
  margin-top: 6px;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #b23b46;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.user-menu-action:hover,
.user-menu-action:focus-visible {
  background: #fff0f1;
}
.section {
  padding-top: 42px;
  scroll-margin-top: 100px;
}
.section[hidden] {
  display: none;
}
.section-heading,
.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.read-only {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 9px;
  border-radius: 99px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.fleet-health-panel { margin-top:14px; }
.device-health-panel { margin-top:14px; }
.health-signal-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.health-signal { display:grid; gap:7px; padding:13px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.015); }
.health-signal-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.health-signal small { color:var(--muted); line-height:1.4; overflow-wrap:anywhere; }
.metric {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  padding: 20px;
}
.metric-label {
  color: var(--muted);
  font-size: 12px;
}
.metric-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-top: 12px;
}
.metric-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.dashboard-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 18px 0 14px;
}
.range-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #081210;
}
.range-button {
  border: 0;
  border-radius: 7px;
  padding: 8px 11px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.range-button.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}
.search-field {
  width: min(330px, 100%);
  margin: 0;
}
.search-field span {
  display: block;
  margin-bottom: 7px;
}
.search-field input {
  padding: 9px 11px;
  font-size: 12px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.7fr);
  gap: 14px;
}
.dashboard-grid .wide {
  grid-row: span 2;
}
.analytics-grid { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(280px,.7fr); gap:14px; margin-bottom:14px; }
.protocol-chart { display:grid; gap:16px; min-height:210px; align-content:center; }
.protocol-row { display:grid; gap:7px; }
.protocol-heading { display:flex; justify-content:space-between; gap:16px; font-size:12px; }
.protocol-heading span { color:var(--muted); font-size:10px; }
.protocol-track { height:9px; border-radius:99px; overflow:hidden; background:#1a2b28; }
.protocol-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--blue),var(--mint),var(--lime)); }
.readiness-list,.checklist,.inventory-list { display:grid; gap:10px; }
.readiness-item { display:grid; grid-template-columns:30px 1fr auto; gap:10px; align-items:center; padding:11px; border:1px solid var(--line); border-radius:10px; }
.readiness-item small { color:var(--muted); font-size:10px; }
.readiness-icon { width:25px; height:25px; display:grid; place-items:center; border-radius:50%; font-weight:800; }
.readiness-item.ready .readiness-icon { color:var(--bg); background:var(--mint); }
.readiness-item.pending .readiness-icon { color:var(--bg); background:var(--amber); }
.configuration-card { margin-top:14px; }
.configuration-card summary { cursor:pointer; font-weight:700; font-size:13px; }
.configuration-card[open] summary { margin-bottom:20px; color:var(--lime); }
.configuration-form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; align-items:end; }
.policy-form { grid-template-columns:repeat(3,minmax(0,1fr)); }
.configuration-form label { margin:0; }
.configuration-form label input,.configuration-form label select,.configuration-form label textarea { margin-top:7px; }
.configuration-form textarea { width:100%; resize:vertical; }
.configuration-form fieldset { border:1px solid var(--line); border-radius:12px; padding:12px; display:flex; flex-wrap:wrap; gap:10px; align-self:stretch; }
.configuration-form fieldset legend { color:var(--muted); padding:0 6px; }
.configuration-form fieldset .toggle-field { min-width:130px; }
.form-actions { grid-column:1/-1; display:flex; align-items:center; gap:12px; min-height:38px; }
.check-item { display:grid; grid-template-columns:64px 1fr; gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); font-size:12px; }
.check-item:last-child { border-bottom:0; }
.check-ok,.check-warn { border-radius:99px; padding:4px 7px; text-align:center; font-size:9px; text-transform:uppercase; letter-spacing:.06em; }
.check-ok { color:var(--mint); background:rgba(110,231,192,.1); }.check-warn { color:var(--amber); background:rgba(247,189,85,.1); }
.inventory-item { display:grid; grid-template-columns:1fr auto; gap:5px 10px; padding:10px 0; border-bottom:1px solid var(--line); font-size:12px; }
.inventory-item small { grid-column:1/-1; color:var(--muted); }
.configuration-guide { margin-top:14px; display:grid; grid-template-columns:240px 1fr; gap:30px; }
.configuration-guide ol { margin:0; padding-left:20px; columns:2; column-gap:40px; color:var(--muted); font-size:12px; line-height:1.65; }
.configuration-guide li { break-inside:avoid; margin-bottom:8px; }
.admin-forms { display:grid; gap:14px; }
.table-action { border:1px solid var(--line); background:var(--surface-2); color:var(--text); border-radius:7px; padding:6px 9px; font:600 10px inherit; cursor:pointer; margin-right:6px; }
.table-action:hover { border-color:var(--mint); color:var(--mint); }
.inventory-item .table-action { grid-column:2; grid-row:2; justify-self:end; }
.secret-output { grid-column:1/-1; white-space:pre-wrap; overflow-wrap:anywhere; padding:14px; border:1px solid rgba(247,189,85,.35); border-radius:9px; background:rgba(247,189,85,.06); color:var(--amber); font:11px ui-monospace,SFMono-Regular,Menlo,monospace; line-height:1.6; }
.toggle-field { display:flex; align-items:center; gap:9px; padding:10px 0; color:var(--text); }
.toggle-field input { width:auto; accent-color:var(--lime); }
.notice-card { display:flex; gap:10px; align-items:center; margin-bottom:14px; padding:15px 18px; border:1px solid rgba(101,168,255,.25); border-radius:12px; background:rgba(101,168,255,.06); font-size:12px; }
.notice-card strong { color:var(--blue); white-space:nowrap; }.notice-card span { color:var(--muted); }
.chart-panel {
  min-width: 0;
}
.legend {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}
.legend-swatch {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--lime);
}
.legend-swatch.current {
  background: var(--blue);
  margin-left: 7px;
}
.metric-switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #081210;
}
.metric-button {
  border: 0;
  border-radius: 6px;
  padding: 6px 9px;
  color: var(--muted);
  background: transparent;
  font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.metric-button.active { color: var(--bg); background: var(--lime); }
.chart {
  min-height: 290px;
  position: relative;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 250px;
}
.chart-gridline {
  stroke: rgba(142, 165, 160, 0.15);
  stroke-width: 1;
}
.chart-axis-label {
  fill: var(--muted);
  font-size: 10px;
}
.chart-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.peak-line { stroke: var(--lime); }
.current-line { stroke: var(--blue); stroke-width: 2; }
.chart-area { fill: rgba(200, 242, 90, 0.075); }
.chart-empty {
  position: absolute;
  inset: 42% 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.rank-list, .capacity-chart {
  display: grid;
  gap: 15px;
}
.rank-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
}
.rank-number {
  grid-row: span 2;
  color: var(--muted);
  font: 700 11px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.rank-copy strong, .rank-copy small { display: block; }
.rank-copy strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.rank-copy small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.rank-meter {
  grid-column: 2;
  height: 3px;
  border-radius: 9px;
  background: #1a2b28;
  overflow: hidden;
}
.rank-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--lime)); }
.capacity-row { display: grid; gap: 7px; }
.capacity-heading { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.capacity-heading span, .capacity-row small { color: var(--muted); font-size: 10px; }
.capacity-track { height: 9px; background: rgba(110, 231, 192, 0.08); border-radius: 99px; overflow: hidden; position: relative; }
.capacity-track span { position: absolute; inset: 0 auto 0 0; display: block; }
.capacity-used { background: rgba(101, 168, 255, 0.55); }
.capacity-attack { background: var(--red); }
.filter-summary { margin: -8px 0 10px; text-align: right; }
.detail-section-title { margin: 26px 0 14px; }
.response-plan-preview { margin-top: 26px; }
.response-plan-preview .detail-section-title { margin-top: 0; }
.response-plan-limitations { color: var(--muted); margin: 0; padding-left: 20px; }
.response-plan-limitations li + li { margin-top: 8px; }
.source-list { display: grid; gap: 12px; }
.source-row { display: grid; grid-template-columns: 210px 1fr; gap: 12px; align-items: center; }
.source-label strong, .source-label small { display: block; }
.source-label small { color: var(--muted); margin-top: 3px; }
.source-meter { height: 7px; background: #1a2b28; border-radius: 99px; overflow: hidden; }
.source-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--mint)); border-radius: inherit; }
.signal-list { display: flex; flex-wrap: wrap; gap: 7px; }
.signal-chip { padding: 6px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--amber); background: rgba(247, 189, 85, 0.07); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow);
}
.state-bars {
  display: grid;
  gap: 14px;
}
.state-row {
  display: grid;
  grid-template-columns: 120px 1fr 30px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.bar {
  width: 100%;
  height: 7px;
  border: 0;
  background: #1a2b28;
  border-radius: 99px;
  overflow: hidden;
}
.bar::-webkit-progress-bar {
  background: #1a2b28;
  border-radius: 99px;
}
.bar::-webkit-progress-value {
  background: linear-gradient(90deg, var(--mint), var(--lime));
  border-radius: 99px;
}
.bar::-moz-progress-bar {
  background: linear-gradient(90deg, var(--mint), var(--lime));
  border-radius: 99px;
}
.activity-list {
  display: grid;
  gap: 2px;
}
.activity {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.activity:last-child {
  border-bottom: 0;
}
.activity strong,
.activity small {
  display: block;
}
.activity small {
  color: var(--muted);
  margin-top: 4px;
}
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  background: rgba(101, 168, 255, 0.12);
  color: var(--blue);
}
.pill.danger {
  background: rgba(255, 107, 104, 0.12);
  color: var(--red);
}
.pill.warn {
  background: rgba(247, 189, 85, 0.12);
  color: var(--amber);
}
.pill.ok {
  background: rgba(110, 231, 192, 0.12);
  color: var(--mint);
}
.table-wrap {
  padding: 0;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(34, 53, 50, 0.65);
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr[data-id] {
  cursor: pointer;
}
tbody tr[data-id]:hover {
  background: var(--surface-2);
}
.empty {
  color: var(--muted);
  padding: 24px !important;
  text-align: center;
}
.icon-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
}
dialog {
  width: min(760px, calc(100vw - 32px));
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.detail-item {
  padding: 13px;
  background: var(--surface-2);
  border-radius: 9px;
}
.detail-item small,
.detail-item strong {
  display: block;
}
.detail-item small {
  color: var(--muted);
  margin-bottom: 6px;
}
.timeline {
  border-left: 1px solid var(--line);
  margin-left: 7px;
  padding-left: 22px;
}
.timeline-item {
  position: relative;
  padding: 0 0 20px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}
.timeline-item small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
@media (max-width: 980px) {
  .shell {
    grid-template-columns: 78px 1fr;
  }
  .sidebar {
    padding: 24px 12px;
  }
  .brand span:last-child,
  nav .nav-link,
  nav .nav-label,
  .safety div {
    display: none;
  }
  .brand {
    justify-content: center;
  }
  .safety {
    justify-content: center;
    padding: 14px 0;
  }
  main {
    padding-left: 24px;
    padding-right: 24px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-grid { grid-template-columns: 1fr; }
  .health-signal-grid { grid-template-columns:1fr 1fr; }
  .analytics-grid { grid-template-columns:1fr; }
  .configuration-form,.policy-form { grid-template-columns:1fr 1fr; }
  .configuration-guide { grid-template-columns:1fr; }
  .dashboard-grid .wide { grid-row: auto; }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  main {
    padding: 0 16px 60px;
  }
  .topbar {
    height: auto;
    padding: 18px 0;
    align-items: start;
    gap: 16px;
  }
  .top-actions {
    flex-wrap: wrap;
    justify-content: end;
  }
  .login-card {
    grid-template-columns: 1fr;
    margin: 40px 0;
    gap: 24px;
  }
  .metrics,
  .grid.two {
    grid-template-columns: 1fr;
  }
  .health-signal-grid { grid-template-columns:1fr; }
  .dashboard-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .range-switch { width: 100%; }
  .range-button { flex: 1; }
  .source-row { grid-template-columns: 1fr; gap: 6px; }
  .configuration-form,.policy-form { grid-template-columns:1fr; }
  .configuration-guide ol { columns:1; }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .connection {
    width: 100%;
    text-align: right;
  }
}

/* BringmeOnline platform design system — aligned with the CGNOS Central Console. */
:root {
  --bg: #f2f6f7;
  --surface: #ffffff;
  --surface-2: #f7fafb;
  --line: #dce5e8;
  --text: #102230;
  --muted: #71818d;
  --lime: #00a9b7;
  --mint: #00a9b7;
  --amber: #d88d23;
  --red: #e75e52;
  --blue: #3878e8;
  --violet: #7b66d9;
  --cyan-soft: #dff6f6;
  --nav: #0a2029;
  --shadow: 0 5px 18px rgba(21, 52, 59, 0.07);
  font-family: Arial, Helvetica, sans-serif;
}
body { background: var(--bg); color: var(--text); }
.shell { grid-template-columns: 246px 1fr; }
.sidebar { background: linear-gradient(180deg, #0c2731, #071b23); border: 0; color: #d9e8ec; padding: 28px 18px 20px; backdrop-filter: none; }
.brand { gap: 12px; padding: 0 8px 25px; color: white; }
.brand-mark { width: 36px; height: 36px; border: 0; border-radius: 10px; color: white; background: var(--mint); box-shadow: 0 0 26px rgba(0,169,183,.33); font-size: 20px; }
.brand b { display: block; font-size: 15px; letter-spacing: .1px; }
.brand small { display: block; color: #7fa0aa; margin-top: 3px; font-size: 11px; }
nav { gap: 4px; margin-top: 0; overflow-y: auto; scrollbar-width: thin; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; color: #93abb3; padding: 10px 13px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.nav-link > span { width: 18px; text-align: center; color: #6c8c96; font-size: 16px; }
.nav-link:hover, .nav-link.active { color: white; background: #173a44; }
.nav-link.active { box-shadow: none; }
.nav-link.active::before { content: ""; position: absolute; left: -18px; width: 3px; height: 24px; background: var(--mint); border-radius: 0 2px 2px 0; }
.nav-link.active > span { color: #25c3cd; }
.nav-group { border-top: 1px solid #21404a; margin-top: 8px; padding-top: 7px; }
.nav-label { color: #6f8f99; font-size: 9px; padding: 7px 13px 3px; }
.nav-child { padding-left: 43px; }
.safety { margin-top: auto; border: 0; border-top: 1px solid #21404a; border-radius: 0; padding: 18px 7px 4px; background: transparent; }
.safety strong { color: white; font-size: 12px; }
.safety small { color: #7fa0aa; font-size: 10px; }
.pulse { width: 8px; height: 8px; background: #32c489; box-shadow: 0 0 0 4px rgba(50,196,137,.13); }
main { padding: 0 38px 60px; }
.topbar { height: 92px; margin: 0 -38px; padding: 0 38px; border-color: var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.topbar h1 { color: var(--text); font-size: 23px; letter-spacing: -.5px; }
.eyebrow { color: #85959f; font-size: 9px; letter-spacing: 1.8px; margin-bottom: 6px; }
.platform-notice { margin: 0 -38px; padding: 9px 38px; background: #e8f6f5; color: #397078; border-bottom: 1px solid #d3e9e7; font-size: 11px; }
.platform-notice span { color: var(--mint); }
.connection { color: #51636e; padding-right: 17px; border-right: 1px solid var(--line); }
.connection::before { background: var(--red); }
.connection.online::before { background: #32c489; }
.button { border-radius: 7px; padding: 10px 14px; font-size: 11px; }
.primary { background: #0799a5; color: white; }
.secondary { background: white; color: #455c67; border-color: var(--line); }
.ghost { color: #687984; }
.section { padding-top: 34px; scroll-margin-top: 100px; }
.section-heading { align-items: flex-start; margin-bottom: 18px; }
.section-heading h2 { font-size: 22px; letter-spacing: -.35px; }
.panel-heading h3, h3 { font-size: 14px; }
.read-only, .status-pill { color: #148e9a; background: var(--cyan-soft); border: 0; border-radius: 14px; padding: 6px 9px; font-size: 9px; letter-spacing: 1px; font-weight: 800; }
.overview-hero { background: linear-gradient(105deg,#0d313a,#123f49); border-radius: 14px; padding: 28px 32px; color: white; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 13px 30px rgba(20,54,64,.09); margin-bottom: 18px; }
.overview-hero h2 { color: white; font-size: 25px; margin: 12px 0 8px; }
.overview-hero p { color: #a9c0c6; font-size: 12px; }
.hero-score { text-align: right; display: grid; min-width: 150px; }
.hero-score strong { font-size: 23px; color: white; }
.hero-score span { font-size: 10px; color: #9db5bc; margin-top: 5px; }
.metrics { gap: 14px; }
.metric { position: relative; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; box-shadow: var(--shadow); }
.metric::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--mint); }
.metric:nth-child(2)::before { background: var(--blue); }
.metric:nth-child(3)::before { background: var(--amber); }
.metric:nth-child(4)::before { background: var(--violet); }
.metric-label { color: #687984; font-size: 11px; }
.metric-value { color: var(--text); font-size: 24px; margin-top: 8px; }
.metric-note { color: #3f9e83; font-size: 9px; }
.panel, .configuration-card, .login-card { background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.panel { padding: 20px; }
.login-card { max-width: 920px; margin: 70px auto; background: white; border-top: 3px solid var(--mint); }
.login-card p:not(.eyebrow) { color: var(--muted); }
input, select, textarea { background: white; color: var(--text); border-color: #cfdadd; border-radius: 6px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0,169,183,.18); border-color: var(--mint); }
label { color: #687984; font-size: 10px; font-weight: 700; }
.range-switch { border-color: var(--line); background: #f3f7f8; }
.range-button { color: #687984; }
.range-button.active { color: white; background: #0799a5; }
.search-field input { background: white; }
.chart-panel, .table-wrap { background: white; }
.chart { background: repeating-linear-gradient(to bottom,transparent 0,transparent 40px,#edf2f3 41px); }
.chart-axis, .chart-label, .muted { color: var(--muted); }
.table-wrap { padding: 0; overflow: auto; }
table { color: var(--text); }
th { color: #71818d; background: #f7fafb; font-size: 9px; letter-spacing: .08em; }
td { color: #40545f; font-size: 10px; }
th, td { border-color: #edf1f2; }
tbody tr:hover { background: #f3f9f9; }
.pill { background: #edf2f3; color: #60727c; border: 0; }
.pill.ok { background: #e1f6ed; color: #299b72; }
.pill.warn { background: #fff1dc; color: #b6751a; }
.pill.danger { background: #fee8e6; color: #c84f46; }

.management-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  border: 0;
  border-radius: 18px;
  padding: 28px;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(9, 34, 48, .24);
}
.management-dialog::backdrop { background: rgba(9, 34, 48, .48); }
.device-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.device-detail-item { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 10px; background: #f3f7f8; }
.device-detail-item span { color: var(--muted); font-size: 12px; }
.device-detail-item strong { overflow-wrap: anywhere; }
@media (max-width: 640px) { .device-details { grid-template-columns: 1fr; } }
.configuration-card { background: white; }
.configuration-card summary { color: var(--text); }
.configuration-form { border-color: var(--line); }
.table-action { color: #148e9a; background: var(--cyan-soft); border-color: transparent; border-radius: 6px; }
.inventory-item, .readiness-item, .activity-item, .check-item { border-color: #edf1f2; background: white; }
.capacity-bar, .bar-track { background: #e9eff1; }
.bar-fill, .capacity-fill { background: linear-gradient(90deg,var(--mint),#38c4ce); }
.dialog-card, dialog { color: var(--text); background: white; border-color: var(--line); }
.error { color: var(--red) !important; }
@media (max-width: 1000px) {
  .shell { grid-template-columns: 76px 1fr; }
  .sidebar { padding: 24px 11px; }
  .brand { padding: 0 8px 28px; }
  .brand > span:last-child, .nav-link:not(.active) { font-size: 0; }
  .nav-link { justify-content: center; }
  .nav-link > span { font-size: 18px; }
  .nav-link.active { font-size: 0; }
  .nav-label, .nav-child:not(.active), .safety div { display: none; }
  .nav-child { padding-left: 13px; }
}
@media (max-width: 680px) {
  .shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; display: flex; flex-direction: row; align-items: center; padding: 10px; overflow: auto; }
  .brand { padding: 0; margin-right: 12px; }
  .brand-mark { width: 30px; height: 30px; }
  nav { display: flex; overflow: visible; }
  .nav-link { white-space: nowrap; padding: 9px; }
  .nav-link.active::before, .nav-group, .safety { display: none; }
  main { padding: 0 16px 40px; }
  .topbar { height: 75px; margin: 0 -16px; padding: 0 18px; }
  .platform-notice { margin: 0 -16px; padding: 8px 18px; }
  .connection { display: none; }
  .overview-hero { display: block; padding: 24px; }
  .hero-score { text-align: left; margin-top: 22px; }
}

.app-switcher { position: relative; }
.app-switcher summary { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px; color: #455c67; background: white; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 11px; font-weight: 700; list-style: none; }
.app-switcher summary::-webkit-details-marker { display: none; }
.app-switcher summary:focus-visible { outline: 2px solid rgba(0,169,183,.34); outline-offset: 2px; }
.app-switcher[open] summary { color: #0b707b; border-color: #7bcfd4; background: #f1fbfb; }
.app-switcher-icon { color: var(--mint); font-size: 15px; }
.app-switcher-chevron { color: #83939c; font-size: 13px; transition: transform .15s ease; }
.app-switcher[open] .app-switcher-chevron { transform: rotate(180deg); }
.app-switcher-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 10; display: grid; gap: 4px; width: 296px; padding: 7px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 35px rgba(16,34,48,.17); }
.app-switcher-card { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 60px; padding: 9px; color: var(--text); border-radius: 7px; text-decoration: none; }
.app-switcher-card:hover, .app-switcher-card:focus-visible { background: #edf9f9; outline: none; }
.app-switcher-card-icon { display: grid; place-items: center; width: 34px; height: 34px; color: #087d88; background: #dff6f6; border-radius: 8px; font-size: 16px; }
.app-switcher-card strong, .app-switcher-card small { display: block; }
.app-switcher-card strong { font-size: 12px; }
.app-switcher-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.app-switcher-card.current { background: #f4f7f8; cursor: default; }
.app-switcher-card em { padding: 4px 6px; color: #087d88; background: #dff6f6; border-radius: 10px; font-size: 9px; font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.app-switcher-open { color: #79909a; font-size: 16px; }
@media (max-width: 680px) { .app-switcher summary { min-height: 32px; padding: 0 8px; } .app-switcher-menu { position: fixed; top: 70px; right: 12px; width: min(296px, calc(100vw - 24px)); } }

.command-palette-button { white-space: nowrap; }
.command-palette-button kbd, .command-palette-hint kbd { padding: 2px 4px; color: #6e808a; background: #edf2f3; border: 1px solid #dce5e8; border-radius: 4px; font: inherit; font-size: 9px; }
.command-palette { width: min(560px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 70px rgba(9,34,48,.24); }
.command-palette::backdrop { background: rgba(9,34,48,.42); }
.command-palette-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.command-palette-head h2 { font-size: 20px; }
.command-palette-search { display: grid; gap: 6px; margin-top: 18px; }
.command-palette-search input { min-height: 42px; font-size: 14px; }
.command-palette-results { display: grid; gap: 4px; max-height: min(360px, 48vh); margin-top: 14px; overflow-y: auto; }
.command-palette-result { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px; color: var(--text); background: transparent; border: 0; border-radius: 8px; text-align: left; cursor: pointer; }
.command-palette-result:hover, .command-palette-result:focus-visible { background: #edf9f9; outline: none; }
.command-palette-result-icon { display: grid; place-items: center; width: 30px; height: 30px; color: #087d88; background: #dff6f6; border-radius: 7px; }
.command-palette-result strong, .command-palette-result small { display: block; }
.command-palette-result strong { font-size: 12px; }
.command-palette-result small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.command-palette-result-arrow { color: #75909a; font-size: 16px; }
.command-palette-empty { padding: 18px 10px; color: var(--muted); font-size: 12px; text-align: center; }
.command-palette-hint { margin-top: 14px; color: var(--muted); font-size: 10px; text-align: right; }
@media (max-width: 680px) { .command-palette-button { padding: 8px 10px; } .command-palette-button kbd { display: none; } .command-palette { width: min(100vw - 24px, 560px); padding: 18px; } }

/* Authentication is a dedicated page; application navigation appears only after sign-in. */
body.auth-pending {
  background: radial-gradient(circle at 70% 15%, rgba(0,169,183,.18), transparent 32rem), linear-gradient(135deg,#071b23,#0b3039);
}
body.auth-pending .shell {
  display: block;
}
body.auth-pending .sidebar,
body.auth-pending .topbar,
body.auth-pending .platform-notice {
  display: none;
}
body.auth-pending main {
  min-height: 100vh;
  padding: 32px;
  display: grid;
  place-items: center;
}
body.auth-pending .login-card {
  width: min(100%, 480px);
  max-width: 480px;
  margin: 0;
  padding: 38px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  border: 1px solid rgba(255,255,255,.12);
  border-top: 3px solid var(--mint);
  border-radius: 14px;
  box-shadow: 0 28px 75px rgba(0,0,0,.32);
}
.login-product {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}
.login-product strong,
.login-product small {
  display: block;
}
.login-product strong {
  color: var(--text);
  font-size: 15px;
}
.login-product small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.login-processing {
  min-height: 310px;
  text-align: center;
  align-content: center;
}
.login-processing .login-product {
  justify-content: center;
  margin-bottom: 38px;
}
.login-processing h2 {
  margin: 10px 0 0;
}
.login-spinner {
  width: 46px;
  height: 46px;
  display: inline-block;
  margin: 0 auto 24px;
  border: 4px solid rgba(0,169,183,.18);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: login-spin .8s linear infinite;
}
@keyframes login-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .login-spinner { animation-duration: 1.8s; } }
@media (max-width: 680px) {
  body.auth-pending main { padding: 18px; }
  body.auth-pending .login-card { padding: 28px 22px; }
}
