/* Hermes Hub Web Client — Dark Theme & Cockpit Design System */

:root {
  --bg-base: #061916;
  --bg-sidebar: #08221E;
  --bg-header: #071B18;
  --bg-statusbar: #061512;
  --bg-modal-backdrop: rgba(2, 11, 9, 0.85);

  --surface: #0B2520;
  --surface-hover: #12342C;
  --surface-active: #194535;
  --surface-selected: #173B2E;
  --surface-muted: #091E1A;

  --border: #36513B;
  --border-subtle: #203A2D;
  --border-accent: #B78525;
  --border-hover: #537456;

  --text-primary: #F8F0DC;
  --text-secondary: #D1C7AE;
  --text-muted: #8FA395;
  --text-accent: #E0B84E;

  --accent: #C89A2B;
  --accent-hover: #E0B84E;
  --accent-pressed: #A9781E;
  --accent-dim: rgba(200, 154, 43, 0.15);

  --status-healthy: #72C943;
  --status-warning: #E1A62B;
  --status-error: #E45C4F;
  --status-info: #4C8DD8;
  --status-disabled: #708078;

  --prov-antigravity: #74A9FF;
  --prov-codex: #46BE8A;
  --prov-opencode: #F39A50;
  --prov-claude: #DF9C63;
  --prov-grok: #3B82F6;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --font-ui: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-title: "Cinzel", "Segoe UI", serif, sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;

  --header-height: 58px;
  --sidebar-width: 230px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography & Utilities ── */
.text-healthy { color: var(--status-healthy); }
.text-warning { color: var(--status-warning); }
.text-error { color: var(--status-error); }
.text-info { color: var(--status-info); }
.text-accent { color: var(--text-accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ── App Layout ── */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.brand {
  padding: 16px 18px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  font-size: 22px;
  color: var(--accent);
}

.brand-title {
  display: block;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--text-accent);
}

.brand-subtitle {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.nav-menu {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--surface-selected);
  color: var(--text-accent);
  border-color: var(--border-accent);
}

.nav-icon {
  font-size: 15px;
  display: inline-flex;
  width: 18px;
}

.nav-label {
  flex: 1;
}

.nav-badge {
  background-color: var(--surface-muted);
  color: var(--text-muted);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-disabled);
  display: inline-block;
}

.status-dot.healthy { background-color: var(--status-healthy); box-shadow: 0 0 6px var(--status-healthy); }
.status-dot.warning { background-color: var(--status-warning); }
.status-dot.error { background-color: var(--status-error); }

.version-tag {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Main Area ── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-base);
}

/* ── Top Header ── */
.top-header {
  height: var(--header-height);
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.header-readiness-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: #061916;
  border-color: var(--border-accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 11px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Content Scroll Area ── */
.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.view-pane {
  display: none;
}

.view-pane.active {
  display: block;
}

.view-header-note {
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 16px;
}

/* ── Toolbar & Filters ── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  width: 340px;
}

.search-icon {
  font-size: 13px;
  color: var(--text-muted);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12px;
  width: 100%;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-filter {
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.select-filter:focus {
  border-color: var(--border-accent);
}

.toolbar-stats {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Provider Group & Account Cards Grid ── */
.provider-group {
  margin-bottom: 24px;
}

.provider-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.provider-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.provider-group-count {
  font-size: 11px;
  color: var(--text-muted);
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 10px;
}

/* ── Compact Account Card (164px Fixed Height) ── */
.account-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  height: 164px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.account-card:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.account-card.main-account {
  border-color: var(--border-accent);
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-provider-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
}

.account-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
}

.badge-plan {
  background-color: var(--accent-dim);
  color: var(--text-accent);
  border: 1px solid var(--border-accent);
}

.badge-status {
  background-color: var(--surface-muted);
  color: var(--text-secondary);
}

.badge-status.healthy { color: var(--status-healthy); }
.badge-status.warning { color: var(--status-warning); }
.badge-status.quota_exhausted { color: var(--status-error); }
.badge-status.auth_required { color: var(--status-warning); }
.badge-status.disabled { color: var(--status-disabled); }

.account-identity-row {
  margin: 2px 0;
}

.account-email {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Quota Cells Grid (Up to 4 pools) ── */
.account-quota-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin-top: 4px;
}

.account-quota-grid.single-cell {
  grid-template-columns: 1fr;
}

.quota-cell {
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quota-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
}

.quota-cell-title {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.quota-cell-value {
  font-family: var(--font-mono);
  font-weight: 700;
}

.quota-bar-track {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin: 3px 0 2px;
}

.quota-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.quota-cell-reset {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Overview KPI Grid ── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Section Cards ── */
.section-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Route Diagram ── */
.route-diagram-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 0;
}

.diagram-column {
  flex: 1;
  min-width: 220px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.diagram-column-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-accent);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

.diagram-node {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 8px;
}

.diagram-node.active {
  border-color: var(--status-healthy);
  box-shadow: 0 0 8px rgba(114, 201, 67, 0.2);
}

/* ── Providers Grid ── */
.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.provider-summary-card {
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.provider-summary-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.provider-summary-stats {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.provider-models-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background-color: var(--bg-base);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  word-break: break-all;
}

/* ── Routing Pipelines List ── */
.routing-pipelines-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pipeline-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pipeline-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.pipeline-chain-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pipeline-node-chip {
  background-color: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
}

.pipeline-node-chip.active {
  border-color: var(--status-healthy);
  background-color: var(--surface-hover);
}

.pipeline-arrow {
  color: var(--accent);
  font-weight: bold;
}

/* ── Team Cards Grid ── */
.team-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.team-agent-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.team-agent-card.orchestrator {
  border-color: var(--border-accent);
}

/* ── Settings Card ── */
.settings-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  max-width: 800px;
}

.settings-group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
}

.setting-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.setting-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.input-text {
  background-color: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  outline: none;
  width: 260px;
}

.input-text:focus {
  border-color: var(--border-accent);
}

.settings-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* ── Modal Layer ── */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  background-color: var(--surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  width: 680px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: modalAppear 0.2s ease-out;
}

@keyframes modalAppear {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.modal-feedback {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 14px;
}

.modal-feedback.error {
  background-color: rgba(228, 92, 79, 0.15);
  border: 1px solid var(--status-error);
  color: #FFD8D2;
}

.modal-feedback.success {
  background-color: rgba(114, 201, 67, 0.15);
  border: 1px solid var(--status-healthy);
  color: #E2F8D5;
}

.modal-feedback.info {
  background-color: rgba(76, 141, 216, 0.15);
  border: 1px solid var(--status-info);
  color: #D2E5FA;
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  background-color: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: toastSlideIn 0.2s ease-out;
  pointer-events: auto;
}

.toast.success { border-color: var(--status-healthy); }
.toast.error { border-color: var(--status-error); }
.toast.warning { border-color: var(--status-warning); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Scrollbars ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-muted);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ── Data Tables (Analytics) ── */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.data-table th {
  background-color: var(--surface-muted);
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.data-table tr:hover td {
  background-color: var(--surface-hover);
}

.cell-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.cell-bar-track {
  flex: 1;
  height: 6px;
  background: var(--surface-muted);
  border-radius: 3px;
  overflow: hidden;
}

.cell-bar-fill {
  height: 100%;
  border-radius: 3px;
}

/* ── Readiness Banner (Health) ── */
.readiness-banner {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--status-healthy);
}

.readiness-banner.degraded {
  border-left-color: var(--status-warning);
}

.readiness-banner.critical {
  border-left-color: var(--status-error);
}

.readiness-banner.limited {
  border-left-color: var(--status-info);
}

.readiness-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.readiness-banner-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.readiness-banner-summary {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.readiness-banner-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.readiness-banner-stats strong {
  color: var(--text-primary);
}

/* ── Host Resources Grid (Health) ── */
.host-resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 14px;
}

.host-resource-card {
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.host-resource-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.host-resource-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.host-resource-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.host-resource-bar {
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.host-resource-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.host-resource-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Warnings List (Health) ── */
.warnings-list {
  padding: 14px;
}

.warning-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: rgba(225, 166, 43, 0.08);
  border: 1px solid var(--status-warning);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-primary);
}

.warning-item:last-child {
  margin-bottom: 0;
}

.warning-icon {
  font-size: 14px;
  color: var(--status-warning);
  line-height: 1.2;
}

/* ── Logs Feed (Events) ── */
.logs-container {
  max-height: 620px;
  overflow-y: auto;
  padding: 8px;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
}

.log-entry:hover {
  background-color: var(--surface-hover);
}

.log-timestamp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 65px;
}

.log-badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  min-width: 54px;
  text-align: center;
}

.log-badge.info { background: rgba(76, 141, 216, 0.2); color: var(--status-info); border: 1px solid var(--status-info); }
.log-badge.success { background: rgba(114, 201, 67, 0.2); color: var(--status-healthy); border: 1px solid var(--status-healthy); }
.log-badge.warning { background: rgba(225, 166, 43, 0.2); color: var(--status-warning); border: 1px solid var(--status-warning); }
.log-badge.error { background: rgba(228, 92, 79, 0.2); color: var(--status-error); border: 1px solid var(--status-error); }

.log-category {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.log-content {
  flex: 1;
}

.log-message {
  color: var(--text-primary);
  font-weight: 500;
}

.log-details {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: var(--font-mono);
  word-break: break-all;
}

/* ── Settings View ── */
.mono-path {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--surface-muted);
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  display: inline-block;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  background: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.badge.healthy {
  background: rgba(114, 201, 67, 0.15);
  border-color: var(--status-healthy);
  color: var(--status-healthy);
}

/* ── Light Theme Override ── */
body[data-theme="light"], body.theme-light {
  --bg-base: #F4F6F8;
  --bg-sidebar: #E9ECEF;
  --bg-header: #FFFFFF;
  --bg-statusbar: #DEE2E6;
  --surface: #FFFFFF;
  --surface-hover: #F1F3F5;
  --surface-active: #E9ECEF;
  --surface-selected: #E2E6EA;
  --surface-muted: #F8F9FA;
  --border: #CED4DA;
  --border-subtle: #DEE2E6;
  --border-accent: #B78525;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6C757D;
}
