:root {
  color-scheme: dark;
  --bg: #070c12;
  --bg-soft: #0a1119;
  --panel: #101720;
  --panel-soft: #0c131c;
  --panel-hover: #141d28;
  --border: #202b38;
  --border-strong: #2b3948;
  --text: #eef4f8;
  --muted: #8295a8;
  --accent: #56dbc9;
  --accent-2: #70bfe8;
  --success: #55dfb0;
  --warning: #f3bd63;
  --danger: #ff7181;
  --info: #74b9ef;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --card-bg: var(--panel, #101720);
  --bg-input: #0c131c;
  --border-subtle: var(--border, #202b38);
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  background: linear-gradient(180deg, #081018 0, var(--bg) 240px);
  color: var(--text);
  font:
    14px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a {
  color: var(--accent);
}
code,
.mono {
  font-family: var(--mono);
}
.appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 12, 18, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.appbar-inner {
  max-width: 1360px;
  margin: auto;
  min-height: 66px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(86, 219, 201, 0.4);
  border-radius: 10px;
  color: var(--accent);
  font-weight: 800;
  box-shadow: 0 0 28px rgba(86, 219, 201, 0.12);
}
.brand-sub {
  color: #aebdca;
  font-weight: 500;
}
.main-nav {
  display: flex;
  align-self: stretch;
  gap: 2px;
  overflow: auto;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #93a6b8;
  padding: 0 11px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-item:hover {
  color: var(--text);
}
.nav-item.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.system-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.app-shell {
  max-width: 1360px;
  margin: auto;
  padding: 30px 24px 70px;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.banner {
  position: sticky;
  top: 66px;
  z-index: 40;
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 24px;
  background: #291820;
  border-bottom: 1px solid #59303b;
  color: #ffb8c1;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 8px 0 24px;
}
.page-head h1 {
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 6px;
  letter-spacing: -0.025em;
}
.page-head p {
  margin: 0;
  color: var(--muted);
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #70859a;
  font-weight: 700;
}
.btn {
  border: 1px solid var(--border-strong);
  background: #111a25;
  border-radius: 9px;
  padding: 9px 13px;
  color: #dbe5ed;
}
.btn:hover {
  background: #17212d;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06100f;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(86, 219, 201, 0.16);
}
.btn.ghost {
  background: transparent;
}
.btn.small {
  padding: 6px 9px;
  font-size: 12px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.inline-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.status-online,
.sev-info,
.job-completed {
  color: var(--success);
}
.status-offline,
.sev-error,
.job-failed,
.job-timeout {
  color: var(--danger);
}
.sev-warn,
.job-cancelled {
  color: var(--warning);
}
.job-queued,
.job-claimed,
.job-running {
  color: var(--info);
}
.status-badge,
.tag,
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #0c141d;
}
.tag {
  font-weight: 600;
  text-transform: none;
  color: #9fb2c4;
}
.source-badge {
  border-radius: 5px;
  color: var(--accent);
  font-family: var(--mono);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.metric-card,
.panel,
.host-card,
.chart-card,
.detail-card {
  background: linear-gradient(180deg, var(--panel), #0e151e);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.015);
}
.metric-card {
  padding: 16px;
  min-height: 112px;
}
.metric-label {
  font-size: 11px;
  color: #71869b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.metric-value {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-top: 10px;
}
.metric-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.panel {
  padding: 18px;
}
.section-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 16px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}
.section-title h2,
.section-title h3 {
  font-size: 15px;
  margin: 0;
}
.panel + .panel {
  margin-top: 16px;
}
.empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 28px;
}
.empty.compact {
  min-height: 70px;
}
.error-box {
  border: 1px solid #5f3340;
  background: #26151c;
  color: #ffb4bf;
  padding: 12px 14px;
  border-radius: 9px;
}
.success-box {
  border: 1px solid rgba(85, 223, 176, 0.35);
  background: rgba(85, 223, 176, 0.07);
  color: #a8efd4;
  padding: 12px 14px;
  border-radius: 9px;
}
.host-list {
  display: grid;
  gap: 12px;
}
.host-card {
  padding: 17px 18px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.host-card.clickable {
  cursor: pointer;
}
.host-card.clickable:hover {
  border-color: #355064;
  transform: translateY(-1px);
}
.host-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.host-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
}
.host-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.host-meta b {
  color: #bed0dc;
  font-family: var(--mono);
  font-weight: 500;
}
.host-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kebab {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #0c141d;
  border-radius: 8px;
  color: var(--muted);
}
.table-shell {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #1b2632;
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #111923;
  color: #71869a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}
tbody tr:last-child td {
  border-bottom: 0;
}
.cell-main {
  color: #dce6ed;
}
.cell-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.clip {
  max-width: 520px;
}
.clip-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.clip.open .clip-text {
  -webkit-line-clamp: unset;
}
.toggle-row {
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font-size: 11px;
  padding: 4px 0;
}
.code-output {
  font: 12px/1.5 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #b9cbd7;
  background: #070d13;
  border: 1px solid #192532;
  border-radius: 8px;
  padding: 11px;
  max-height: 320px;
  overflow: auto;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}
.filters input,
.filters select,
.field input,
.field select {
  background: #0a1119;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
}
.filters input {
  min-width: 220px;
  flex: 1;
}
.filters select {
  min-width: 145px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-size: 12px;
  color: #94a7b7;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.activity-list {
  display: grid;
}
.activity-row {
  display: grid;
  grid-template-columns: 110px 170px 86px minmax(120px, 180px) 72px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 2px;
  border-bottom: 1px solid #18232e;
  font-size: 12px;
}
.activity-row:last-child {
  border-bottom: 0;
}
.activity-event {
  font-family: var(--mono);
  color: #d8e6ee;
}
.activity-summary {
  color: #a9bac8;
  overflow-wrap: anywhere;
}
.chart-card {
  padding: 16px;
}
.chart-wrap {
  width: 100%;
  min-height: 250px;
  overflow: hidden;
}
.chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
}
.chart-grid {
  stroke: #1c2a36;
  stroke-width: 1;
}
.chart-axis {
  fill: #667b8f;
  font-size: 10px;
}
.chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.chart-completed {
  stroke: var(--accent);
  fill: none;
}
.chart-failed {
  stroke: var(--danger);
  fill: none;
}
.chart-timeout {
  stroke: var(--warning);
  fill: none;
}
.chart-point {
  stroke-width: 0;
  fill: currentColor;
}
.rank-list {
  display: grid;
  gap: 9px;
}
.rank-row {
  display: grid;
  grid-template-columns: minmax(130px, 210px) 1fr 90px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.rank-name {
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-track {
  height: 8px;
  border-radius: 999px;
  background: #182431;
  overflow: hidden;
}
.rank-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #73c7ef);
  border-radius: 999px;
}
.rank-value {
  text-align: right;
  color: #a9bbc9;
}
.error-list {
  display: grid;
  gap: 8px;
}
.error-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0d141d;
}
.error-count {
  font-size: 18px;
  color: var(--danger);
  font-weight: 750;
}
.client-headline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.client-title {
  font-size: 28px;
  margin: 0;
}
.detail-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin: 20px 0 16px;
  overflow: auto;
}
.detail-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 13px;
  border-bottom: 2px solid transparent;
}
.detail-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.detail-pane {
  display: none;
}
.detail-pane.active {
  display: block;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.kv-list {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 8px 14px;
}
.kv-list dt {
  color: var(--muted);
}
.kv-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.recent-stack {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.timeline {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.timeline-node {
  font-size: 10px;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #7890a4;
}
.timeline-node.on {
  border-color: rgba(86, 219, 201, 0.45);
  color: var(--accent);
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.settings-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.settings-card h2 {
  font-size: 15px;
  margin: 0 0 14px;
}
.config-table {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(100px, auto);
  gap: 8px 16px;
  font-size: 12px;
}
.config-table div:nth-child(odd) {
  color: var(--muted);
}
.agent-guide {
  margin-top: 16px;
}
.agent-guide details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0d141d;
}
.agent-guide summary {
  cursor: pointer;
  padding: 13px 15px;
  color: #b9cbd8;
}
.guide-body {
  padding: 0 15px 15px;
}
.guide-section {
  margin-top: 15px;
}
.guide-section h3 {
  font-size: 13px;
}
.copy-block {
  position: relative;
  margin: 8px 0;
}
.copy-block pre {
  margin: 0;
  padding: 12px 70px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #070d13;
  color: #8ce7d5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.55 var(--mono);
}
.copy-block .copy-btn {
  position: absolute;
  top: 7px;
  right: 7px;
}
.planned {
  opacity: 0.55;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(1, 5, 9, 0.78);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #0d141d;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  font-size: 18px;
  margin: 0;
}
.modal-body {
  padding: 18px;
}
.platform-picks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 14px 0;
}
.platform-pick {
  border: 1px solid var(--border);
  background: #0a1119;
  border-radius: 9px;
  padding: 12px;
  text-align: left;
}
.platform-pick.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.support {
  font-size: 10px;
  color: var(--success);
  text-transform: uppercase;
}
.support.planned {
  color: var(--muted);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.close-x {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}
.stat-layout {
  display: grid;
  gap: 16px;
}
.stats-duo {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 16px;
}
.stats-trio {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.host-summary-table td:first-child {
  font-family: var(--mono);
  color: var(--accent);
}
.small-note {
  font-size: 11px;
  color: var(--muted);
}
.nowrap {
  white-space: nowrap;
}
.spacer {
  height: 16px;
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}
@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .section-grid,
  .stats-duo {
    grid-template-columns: 1fr;
  }
  .activity-row {
    grid-template-columns: 90px 150px 70px 140px 60px 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .appbar-inner {
    padding: 0 14px;
    gap: 14px;
    flex-wrap: wrap;
    min-height: auto;
  }
  .brand {
    height: 56px;
  }
  .main-nav {
    order: 3;
    width: 100%;
    height: 42px;
  }
  .system-meta {
    font-size: 10px;
  }
  .app-shell {
    padding: 22px 14px 60px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-grid,
  .field-grid,
  .stats-trio {
    grid-template-columns: 1fr;
  }
  .activity-row {
    grid-template-columns: 90px 1fr 70px;
  }
  .activity-row .activity-client,
  .activity-row .activity-severity,
  .activity-row .activity-summary {
    grid-column: 2/-1;
  }
  .rank-row {
    grid-template-columns: 120px 1fr 70px;
  }
  .kv-list {
    grid-template-columns: 120px 1fr;
  }
  .banner {
    top: 98px;
    padding: 9px 14px;
  }
}
@media (max-width: 520px) {
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric-card {
    min-height: 96px;
    padding: 13px;
  }
  .metric-value {
    font-size: 23px;
  }
  .host-top {
    flex-direction: column;
  }
  .host-actions {
    width: 100%;
    justify-content: space-between;
  }
  .activity-row {
    grid-template-columns: 76px 1fr;
  }
  .activity-row .source-badge {
    grid-column: 1;
  }
  .activity-row .activity-client,
  .activity-row .activity-severity,
  .activity-row .activity-summary {
    grid-column: 2;
  }
  .platform-picks {
    grid-template-columns: 1fr;
  }
  .rank-row {
    grid-template-columns: 100px 1fr;
  }
  .rank-value {
    grid-column: 2;
  }
  .system-meta {
    display: none;
  }
}

/* HHC control-plane shell v2 */
body {
  background: #071018;
  min-height: 100vh;
}
.workspace-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 16px;
  background: linear-gradient(180deg, #0a121a 0%, #080e15 100%);
  border-right: 1px solid #1b2935;
  z-index: 60;
}
.content-shell {
  grid-column: 2;
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% -10%, rgba(61, 211, 192, 0.065), transparent 26%), #071018;
}
.sidebar .brand {
  width: 100%;
  height: 52px;
  padding: 0 9px 0 7px;
  border-radius: 10px;
  justify-content: flex-start;
}
.sidebar .brand:hover {
  background: #101a24;
}
.sidebar .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, #163932, #0d1b20);
  border-color: #2c756b;
  color: #75e7d8;
  font-size: 16px;
}
.brand-copy {
  display: grid;
  text-align: left;
  line-height: 1.05;
}
.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.08em;
}
.brand-copy small {
  margin-top: 5px;
  color: #62798d;
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.side-label {
  padding: 22px 11px 8px;
  color: #506579;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.sidebar .main-nav {
  display: grid;
  align-self: auto;
  gap: 4px;
  overflow: visible;
}
.sidebar .nav-item {
  height: 42px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  text-align: left;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #8196a8;
  font-size: 13px;
  font-weight: 600;
}
.sidebar .nav-item:hover {
  background: #0f1923;
  color: #dce7ed;
}
.sidebar .nav-item.active {
  color: #dffaf6;
  background: linear-gradient(90deg, rgba(67, 211, 191, 0.13), rgba(67, 211, 191, 0.035));
  border-color: rgba(67, 211, 191, 0.16);
  box-shadow: inset 3px 0 #4bd8c4;
}
.nav-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #6f899c;
  font-size: 15px;
}
.nav-item.active .nav-icon {
  color: #61e2d1;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #17242f;
  padding: 14px 8px 0;
}
.side-health {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #afc0cc;
}
.side-health div {
  display: grid;
}
.side-health b {
  font-size: 11px;
}
.side-health small {
  font-size: 10px;
  color: #61778a;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #58ddb8;
  box-shadow: 0 0 12px rgba(88, 221, 184, 0.7);
}
.side-version {
  margin-top: 11px;
  color: #435668;
  font: 9px var(--mono);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: rgba(7, 16, 24, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #172631;
}
.topbar-copy {
  display: grid;
}
.topbar-copy strong {
  font-size: 14px;
  letter-spacing: 0.01em;
}
.top-kicker {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4f667a;
  font-weight: 800;
  margin-bottom: 3px;
}
.topbar .system-meta {
  margin-left: 0;
  padding: 7px 10px;
  border: 1px solid #1d303d;
  border-radius: 9px;
  background: #0a131c;
  color: #788fa1;
}
.content-shell .banner {
  top: 72px;
  max-width: none;
  margin: 0;
  padding: 10px 28px;
}
.content-shell .app-shell {
  max-width: 1540px;
  margin: 0 auto;
  padding: 28px 30px 72px;
}
.page-head {
  margin: 0 0 22px;
  align-items: center;
}
.page-head h1 {
  font-size: 26px;
  font-weight: 720;
}
.page-head p {
  font-size: 12px;
  color: #6f8597;
}
.page-actions {
  gap: 8px;
}
.btn {
  min-height: 36px;
  background: #0d1822;
  border-color: #263746;
  border-radius: 8px;
  box-shadow: none;
}
.btn:hover {
  background: #12212d;
  border-color: #345064;
}
.btn.primary {
  background: #45cdb9;
  border-color: #45cdb9;
  color: #05100f;
  box-shadow: 0 7px 24px rgba(69, 205, 185, 0.12);
}
.metric-grid {
  gap: 10px;
  margin-bottom: 18px;
}
.metric-card {
  min-height: 100px;
  padding: 15px 16px;
  background: linear-gradient(180deg, #0e1822, #0b141d);
  border-color: #1b2b37;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.metric-card:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(67, 211, 191, 0.5), transparent 65%);
}
.metric-label {
  font-size: 9px;
  color: #5d7487;
  letter-spacing: 0.12em;
}
.metric-value {
  font-size: 25px;
  margin-top: 8px;
  color: #f2f7fa;
}
.metric-note {
  font-size: 11px;
  color: #647b8e;
}
.panel,
.host-card,
.chart-card,
.detail-card,
.settings-card {
  background: linear-gradient(180deg, #0e1822, #0b141d);
  border-color: #1b2b37;
  border-radius: 10px;
}
.panel {
  padding: 16px;
}
.section-title {
  margin-bottom: 12px;
}
.section-title h2,
.section-title h3 {
  font-size: 13px;
  letter-spacing: 0.01em;
}
.section-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.75fr);
  gap: 14px;
}
.host-list {
  gap: 9px;
}
.host-card {
  padding: 14px 15px;
}
.host-card.clickable:hover {
  border-color: #2c5b61;
  background: #101c26;
  transform: none;
}
.host-name {
  font-size: 14px;
}
.host-meta {
  margin-top: 9px;
  gap: 6px 11px;
  font-size: 10.5px;
}
.host-actions .tag {
  background: #0a141c;
}
.inline-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.status-dot {
  width: 6px;
  height: 6px;
}
.tag,
.source-badge {
  font-size: 9px;
  padding: 3px 7px;
}
.kebab {
  width: 29px;
  height: 29px;
}
.table-shell {
  border-color: #1a2a36;
  border-radius: 8px;
  background: #09121a;
}
th,
td {
  padding: 9px 11px;
  border-bottom-color: #172631;
}
th {
  background: #0e1821;
  color: #577084;
  font-size: 9px;
}
tbody tr:hover {
  background: #0d1923;
}
.cell-sub {
  font-size: 10px;
}
.filters {
  margin-bottom: 11px;
}
.filters input,
.filters select,
.field input,
.field select {
  background: #09131b;
  border-color: #1d2e3a;
  border-radius: 7px;
  padding: 8px 9px;
  font-size: 12px;
}
.activity-row {
  grid-template-columns: 92px 156px 76px minmax(110px, 160px) 64px 1fr;
  gap: 10px;
  padding: 8px 2px;
  border-bottom-color: #162530;
  font-size: 11px;
}
.activity-event {
  font-size: 10.5px;
}
.activity-summary {
  color: #8fa3b2;
}
.chart-card {
  padding: 15px;
}
.chart-wrap {
  min-height: 220px;
}
.rank-track {
  height: 6px;
  background: #14232e;
}
.error-item {
  padding: 8px;
  background: #0a141d;
  border-color: #1b2b37;
}
.error-count {
  font-size: 16px;
}
.detail-tabs {
  margin: 16px 0 14px;
}
.detail-tab {
  font-size: 11px;
  padding: 9px 12px;
}
.kv-list {
  font-size: 11px;
  grid-template-columns: 145px 1fr;
}
.code-output {
  background: #060c12;
  border-color: #172631;
}

.modal-backdrop {
  background: rgba(2, 7, 11, 0.84);
  backdrop-filter: blur(6px);
}
.modal {
  background: #0b151e;
  border-color: #263846;
  border-radius: 12px;
}
.modal-head {
  padding: 15px 17px;
}
.modal-body {
  padding: 17px;
}
.settings-grid {
  gap: 14px;
}
.settings-card {
  padding: 16px;
}
.config-table {
  font-size: 11px;
}
.copy-block pre {
  background: #060d13;
  border-color: #172733;
  color: #82dfd2;
}
@media (max-width: 1180px) {
  .workspace-shell {
    grid-template-columns: 206px minmax(0, 1fr);
  }
  .sidebar {
    width: 206px;
  }
  .content-shell {
    grid-column: 2;
  }
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .section-grid {
    grid-template-columns: 1fr;
  }
  .sidebar .nav-item {
    grid-template-columns: 28px 1fr;
  }
  .content-shell .app-shell {
    padding-left: 22px;
    padding-right: 22px;
  }
}
@media (max-width: 860px) {
  .workspace-shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid #1b2935;
  }
  .sidebar .brand {
    width: auto;
    height: 44px;
  }
  .brand-copy small,
  .side-label,
  .sidebar-foot {
    display: none;
  }
  .sidebar .main-nav {
    display: flex;
    gap: 2px;
    overflow: auto;
  }
  .sidebar .nav-item {
    height: 36px;
    display: flex;
    gap: 6px;
    padding: 0 9px;
    white-space: nowrap;
    box-shadow: none;
  }
  .sidebar .nav-item.active {
    box-shadow: inset 0 -2px #4bd8c4;
  }
  .nav-icon {
    width: 18px;
  }
  .content-shell {
    grid-column: auto;
  }
  .topbar {
    height: 58px;
    padding: 0 16px;
  }
  .topbar-copy .top-kicker {
    display: none;
  }
  .content-shell .banner {
    top: 102px;
    padding: 9px 16px;
  }
  .content-shell .app-shell {
    padding: 20px 15px 58px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .activity-row {
    grid-template-columns: 78px 1fr 68px;
  }
  .activity-row .activity-client,
  .activity-row .activity-severity,
  .activity-row .activity-summary {
    grid-column: 2/-1;
  }
}
@media (max-width: 560px) {
  .sidebar {
    grid-template-columns: auto 1fr;
  }
  .sidebar .brand-copy {
    display: none;
  }
  .sidebar .brand-mark {
    width: 32px;
    height: 32px;
  }
  .topbar-copy {
    display: none;
  }
  .topbar {
    justify-content: flex-end;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric-card {
    min-height: 88px;
  }
  .metric-value {
    font-size: 22px;
  }
  .content-shell .app-shell {
    padding: 16px 11px 50px;
  }
  .page-head h1 {
    font-size: 23px;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions .btn.primary {
    flex: 1;
  }
  .host-top {
    gap: 10px;
  }
  .activity-row {
    grid-template-columns: 70px 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard overflow / height correction */
.section-grid {
  align-items: start;
}
.section-grid > .panel {
  min-width: 0;
  height: auto;
  align-self: start;
}
.activity-list {
  min-width: 0;
  overflow: hidden;
}
.activity-row > * {
  min-width: 0;
}
.activity-summary {
  word-break: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.activity-list-compact {
  display: grid;
  gap: 0;
}
.activity-row-compact {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 1px;
  min-height: 48px;
  border-bottom: 1px solid #162530;
}
.activity-row-compact:last-child {
  border-bottom: 0;
}
.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.activity-compact-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.activity-compact-main .activity-event {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-compact-main .activity-client {
  color: #8197a8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
#view-dashboard .section-grid > .panel {
  max-height: 430px;
  overflow: hidden;
}
#view-dashboard .section-grid > .panel:first-child {
  max-height: none;
}
@media (max-width: 1180px) {
  #view-dashboard .section-grid > .panel {
    max-height: none;
  }
}

/* Stats/dashboard compact activity containment */
.section-grid,
.stats-trio,
.stats-duo {
  align-items: start;
}
.section-grid > .panel,
.stats-trio > .panel,
.stats-duo > .panel {
  min-width: 0;
}
.compact-activity {
  display: block;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}
.activity-row.compact {
  display: grid;
  grid-template-columns: 14px minmax(120px, 1fr) minmax(90px, 150px) 64px;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 8px 0;
}
.activity-row.compact .activity-status {
  font-size: 9px;
  line-height: 1;
}
.activity-row.compact .activity-event {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-row.compact .activity-client {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8ea4b5;
}
#view-dashboard .section-grid > .panel,
#view-stats .stats-trio > .panel {
  height: auto;
  align-self: start;
}
#view-stats .stats-trio {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}
#view-stats .stats-trio .table-shell {
  max-height: 420px;
}
@media (max-width: 1100px) {
  #view-stats .stats-trio {
    grid-template-columns: 1fr;
  }
  .compact-activity {
    max-height: 320px;
  }
}
@media (max-width: 560px) {
  .activity-row.compact {
    grid-template-columns: 12px minmax(0, 1fr) 58px;
  }
  .activity-row.compact .activity-client {
    display: none;
  }
}
.chart-bar-completed {
  fill: #55dfb0;
  background: #55dfb0;
}
.chart-bar-failed {
  fill: #ff7181;
  background: #ff7181;
}
.chart-bar-timeout {
  fill: #f3bd63;
  background: #f3bd63;
}

/* HHC product shell v3 — Sentinel-inspired, admin-capable */
.sentinel-shell {
  background: #070d13;
  min-height: 100vh;
}
.product-header {
  border-bottom: 1px solid #1b2732;
  background: #080f16;
}
.product-header-inner {
  max-width: 1240px;
  height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.product-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
}
.product-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #11312d;
  border: 1px solid #24675f;
  color: #65dfce;
  font-weight: 800;
}
.product-name {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 16px;
}
.product-name span {
  color: #9eb0bf;
  font-weight: 500;
}
.product-status {
  font-size: 11px;
  color: #71879a;
  padding: 7px 10px;
  border: 1px solid #1d2c38;
  border-radius: 8px;
  background: #0a131b;
}
.product-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 70px;
}
.product-intro {
  min-height: 105px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.product-intro h1 {
  font-size: 26px;
  letter-spacing: -0.025em;
  margin: 4px 0 0;
}
.header-health {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8196a7;
  font-size: 11px;
}
.product-nav {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #1b2935;
  margin-bottom: 24px;
  overflow: auto;
}
.product-nav .nav-item {
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #879bab;
  font-size: 12px;
  font-weight: 600;
}
.product-nav .nav-item:hover {
  color: #e2edf2;
}
.product-nav .nav-item.active {
  color: #e7f8f5;
  border-bottom-color: #52d6c3;
}
.product-content.app-shell {
  max-width: none;
  margin: 0;
  padding: 0;
}
.product-content .page-head {
  margin-top: 0;
}
.product-content .banner {
  position: static;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
}
.management-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #1b2935;
  margin: -4px 0 18px;
  overflow: auto;
}
.management-tab {
  border: 0;
  background: transparent;
  color: #7f94a5;
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.management-tab:hover {
  color: #dce8ee;
}
.management-tab.active {
  color: #e8f7f5;
  border-bottom-color: #52d6c3;
}
.management-body {
  min-width: 0;
}
.management-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 14px;
  align-items: start;
}
.management-wide {
  min-width: 0;
}
.tool-card-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.tool-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid #1b2b37;
  border-radius: 8px;
  background: #0a141d;
}
.security-note {
  padding: 12px;
  border: 1px solid #1d303b;
  border-radius: 8px;
  background: #09131b;
  color: #93a7b6;
  line-height: 1.6;
}
.chart-bar-completed {
  fill: var(--accent);
  background: var(--accent);
}
.chart-bar-failed {
  fill: var(--danger);
  background: var(--danger);
}
.chart-bar-timeout {
  fill: var(--warning);
  background: var(--warning);
}
@media (max-width: 900px) {
  .product-header-inner,
  .product-main {
    padding-left: 15px;
    padding-right: 15px;
  }
  .product-intro {
    min-height: 86px;
  }
  .management-grid {
    grid-template-columns: 1fr;
  }
  .product-status {
    display: none;
  }
}
@media (max-width: 560px) {
  .product-intro {
    align-items: flex-start;
    padding: 18px 0;
    min-height: auto;
  }
  .header-health {
    display: none;
  }
  .product-nav .nav-item {
    padding: 0 10px;
  }
  .product-main {
    padding-bottom: 45px;
  }
}

/* Product health summaries */
.control-strip {
  margin-top: 14px;
  padding: 15px 16px;
  border: 1px solid #1b2b37;
  border-radius: 10px;
  background: linear-gradient(180deg, #0d171f, #0a131b);
}
.control-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.control-strip-head h2 {
  font-size: 14px;
  margin: 2px 0 0;
}
.control-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #1a2934;
  border: 1px solid #1a2934;
  border-radius: 8px;
  overflow: hidden;
}
.control-health-item {
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  background: #0a141c;
  min-width: 0;
}
.control-health-item span {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60778a;
  font-weight: 700;
}
.control-health-item b {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.control-health-item small {
  font-size: 10px;
  color: #6f8496;
}
.host-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  border: 1px solid #1a2934;
  border-radius: 9px;
  overflow: hidden;
  background: #1a2934;
}
.host-overview > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: #0b151d;
}
.host-overview span {
  font-size: 10px;
  color: #687f91;
}
.host-overview b {
  font-size: 14px;
}
@media (max-width: 800px) {
  .control-health-grid,
  .host-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .control-strip-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .control-health-grid,
  .host-overview {
    grid-template-columns: 1fr;
  }
}
