:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --accent: #1e40af;
  --btn-primary-bg: #2f5f96;
  --btn-primary-bg-hover: #356188;
  --btn-primary-border: #3f6ea3;
  --btn-primary-text: #f4f8ff;
  --btn-height: 24px;
  --chip-height: 20px;
  --line: #c9d8ec;
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --ok-border: #86efac;
  --warn: #d97706;
  --warn-border: #fcd34d;
  --crit: #dc2626;
  --crit-bg: #fee2e2;
  --crit-border: #fca5a5;
  --kv-label-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  --kv-label-size: 11px;
  --kv-label-weight: 600;
  --kv-label-letter: 0;
  --kv-label-color: #1e293b;
  --kv-value-family: "IBM Plex Mono", monospace;
  --kv-value-size: 11px;
  --kv-value-weight: 700;
  --kv-value-color: #64748b;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background: #ffffff !important;
  min-height: 100vh;
  color: var(--text);
  font-size: 14px;
}

body[data-theme="dark"] {
  background: var(--bg) !important;
}
    min-height: var(--chip-height);
    padding: 0 8px;
  --bg: #0d1728;
  --panel: #111b2f;
  --text: #e6edf7;
  --muted: #9fb3cc;
  --line: #24344d;
  --accent: #3b82f6;
  --btn-primary-bg: #2b4b74;
  --btn-primary-bg-hover: #305372;
  --btn-primary-border: #4f78ac;
  --btn-primary-text: #dcecff;
  --kv-label-color: #c8dbf7;
    padding: 0 8px;
  color-scheme: dark;
  background: radial-gradient(circle at top left, #1b2b45 0%, var(--bg) 48%);
}

.kv-label {
  font-family: var(--kv-label-family);
  font-size: var(--kv-label-size);
  font-weight: var(--kv-label-weight);
    min-width: 14px;
  letter-spacing: var(--kv-label-letter);
    display: block;
  color: var(--kv-label-color);
}
  }

  .so-country-header .so-country-flag,
  .system-overview-toggle .so-country-flag,
  .so-country-filter-btn img {
    width: 14px;
    height: 10px;
    min-width: 14px;
    max-width: 14px;
    max-height: 10px;
    object-fit: cover;
    display: inline-block;
  font-family: var(--kv-value-family);
  font-size: var(--kv-value-size);
  font-weight: var(--kv-value-weight);
  color: var(--kv-value-color);
}

.login-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(30, 64, 175, 0.22) 0%, rgba(30, 64, 175, 0) 40%),
    radial-gradient(circle at 82% 82%, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0) 46%),
    rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 18px;
}

.login-card {
  width: min(470px, 100%);
  border: 1px solid #c9d8ec;
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  display: grid;
  gap: 10px;
}

.login-card h2,
.login-card h3 {
  margin: 2px 0 0;
}

.login-brand {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
}

.login-logo {
  width: 112px;
  height: 112px;
  margin: 0 auto;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.login-product-title {
  margin: 6px 0 10px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  color: #1e3a5f;
}

.login-card h2 {
  margin: 0;
  text-align: center;
}

.login-card .muted {
  margin: 0 0 4px;
  text-align: center;
}

  .login-ang-logo {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
  }

  .login-ang-logo img {
    height: 96px;
    width: auto;
    display: block;
    opacity: 0.85;
  }

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #334155;
}

.login-card input {
  border: 1px solid #cdd9eb;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
}

.change-password-card {
  width: min(520px, 100%);
}

.container {
  max-width: 1420px;
  margin: 12px auto;
  padding: 0 16px;
}

.brand-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #f0f6ff 0%, #e8f2ff 100%);
  border: 1px solid #c7d9f0;
  border-radius: 14px;
  padding: 1px 16px;
}

.brand-tools {
  margin-bottom: 10px;
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  padding: 6px 12px;
}

.brand-tools .btn-secondary,
.brand-tools .global-update-chip {
  min-height: var(--btn-height);
  padding: 0 14px;
  font-size: 12px;
  border-radius: 999px;
}

.btn-emoji-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  border: 1px solid #c8d5e6;
  color: #42526e;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.btn-emoji-pill:hover:not(:disabled) {
  background: #ffffff;
  border-color: #8fb0d0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

body[data-theme="dark"] .btn-emoji-pill {
  background: linear-gradient(180deg, #1b2b45 0%, #14233a 100%);
  border-color: #2a3c59;
  color: #d9e8ff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .btn-emoji-pill:hover:not(:disabled) {
  background: #213551;
  border-color: #5d8bc4;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.app-logo {
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
}

.app-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-text {
  min-width: 0;
  flex: 1;
}

.brand-partner-logo {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-partner-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-text h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.02;
  letter-spacing: 0.25px;
  font-weight: 900;
  white-space: nowrap;
}

.subtitle-meta {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.brand-platforms {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-platform-icon {
  width: calc(18px * 1.3);
  height: calc(18px * 1.3);
  display: block;
  object-fit: contain;
}

.brand-platform-separator {
  color: currentColor;
  font-weight: 700;
  line-height: 1;
}

.brand-version {
  margin-left: 0;
  white-space: nowrap;
}

.brand-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.brand-user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 20px;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.brand-user-badge::before {
  content: "👤";
  font-size: 11px;
}

.brand-logout-btn {
  background: #ffeaea;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  cursor: pointer;
}

.brand-logout-btn::before {
  content: none;
}

.brand-logout-btn:hover {
  background: #ffd7d7;
  border-color: #ef4444;
  color: #991b1b;
}

/* ── Dark Mode Toggle Switch ──────────────────────────────── */
.theme-toggle {
  display: inline-flex !important;
  visibility: visible;
  opacity: 1;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px solid #9fb8d8;
  border-radius: 999px;
  padding: 3px 10px 3px 4px;
  cursor: pointer;
  color: #2f4968;
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(30, 58, 95, 0.1);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.theme-toggle:hover {
  border-color: #6f97c8;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(30, 58, 95, 0.14);
}

.theme-toggle-track {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #c8d5e6;
  flex-shrink: 0;
  transition: background 200ms ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 200ms ease;
}

/* active = dark mode on */
.theme-toggle[aria-pressed="true"] .theme-toggle-track {
  background: #3b82f6;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(12px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

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

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.panel-actions #openUserSettingsButton {
  margin-left: auto;
}

.active-users-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
  color: var(--muted);
}

.active-users-bar-inline {
  margin: 0;
  justify-content: flex-end;
  width: 100%;
}

.active-users-bar-inline .active-users-label {
  letter-spacing: 0.02em;
  text-transform: none;
}

.active-users-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.active-users-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 600;
}

.active-user-chip.current {
  border-color: rgba(14, 116, 144, 0.28);
  background: rgba(6, 182, 212, 0.12);
  color: #0f766e;
}

.active-user-chip-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.12);
  color: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auto-refresh-status {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 4px;
}

.auto-refresh-interval-label {
  display: inline-flex;
  align-items: center;
}

.auto-refresh-interval-select {
  font-size: 11px;
  height: 24px;
  min-height: 24px;
  padding: 0 10px;
  line-height: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.auto-refresh-last-update {
  font-size: 11px;
  white-space: nowrap;
}

/* Summary strip */
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 14px 4px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.summary-strip .stat-chip-alert {
  background: var(--crit-bg);
  color: var(--crit);
  border-color: var(--crit-border);
  font-weight: 700;
}

.summary-strip .stat-chip-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-border);
  font-weight: 700;
}

.summary-strip .stat-chip-ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok-border);
}

/* Host item enhancements */
.host-item-favorite {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}

.host-item-favorite:hover {
  border-color: #d97706;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.18);
}

.host-status-bar {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0 0 10px 10px;
  transition: opacity 200ms ease;
}

.host-status-bar--ok {
  background: #64748b;
  opacity: 0.32;
}

.host-status-bar--warning {
  background: var(--warn);
}

.host-status-bar--critical {
  background: var(--crit);
}

/* Chart drill-down modal */
.chart-drill-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.chart-drill-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 36, 0.45);
  backdrop-filter: blur(4px);
}

.chart-drill-inner {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.chart-drill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f0f5ff 0%, #f8fbff 100%);
}

.chart-drill-title {
  font-size: 14px;
  font-weight: 700;
}

.chart-drill-close {
  font-size: 16px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}

.chart-drill-body {
  padding: 12px 16px 16px;
}

.chart-drill-svg-wrap svg {
  width: 100%;
  height: auto;
}

.chart-drill-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.host-meta-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.host-meta-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 36, 0.45);
  backdrop-filter: blur(4px);
}

.host-meta-modal-inner {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.host-meta-modal-body {
  display: grid;
  gap: 12px;
}

.host-meta-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.host-meta-modal-grid label,
.host-meta-new-customer label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #475569;
}

.host-meta-modal-grid input,
.host-meta-modal-grid select,
.host-meta-new-customer input {
  height: 34px;
}

.host-meta-new-customer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 10px;
  border: 1px dashed #c8d5e6;
  border-radius: 10px;
  background: #f8fbff;
}

.host-meta-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Mountpoint table toggle */
.mountpoint-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fs-focus-actions,
.large-files-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.large-files-panel .large-files-head-actions {
  padding-bottom: 4px;
}

.filesystem-visibility-inner {
  width: min(680px, 100%);
}

.filesystem-visibility-list {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 6px;
}

.filesystem-visibility-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.filesystem-visibility-item:hover {
  background: rgba(30, 64, 175, 0.08);
}

.filesystem-visibility-item input {
  margin: 0;
}

.filesystem-visibility-mount {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.filesystem-visibility-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.global-admin-ops-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.db-ops-progress {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.db-ops-progress.hidden { display: none; }
.db-ops-progress-bar-wrap {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: var(--border-color, #dde1e7);
  border-radius: 4px;
  overflow: hidden;
}
.db-ops-progress-bar {
  height: 100%;
  width: 0%;
  background: #3b82f6;
  border-radius: 4px;
  transition: width 0.25s ease;
}
.db-ops-progress-bar--indeterminate {
  width: 40% !important;
  animation: db-ops-slide 1.2s ease-in-out infinite;
}
@keyframes db-ops-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
.db-ops-progress-label {
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
}
.db-ops-progress-label.error { color: #dc2626; }
.db-ops-progress-label.success { color: #16a34a; }

.db-maintenance-panel {
  margin-top: 12px;
  border: 1px solid #d8e2f0;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px;
}

.db-maintenance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.db-maintenance-head h6 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.db-maintenance-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.db-maintenance-stats-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.db-maintenance-charts {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 8px;
}

@media (max-width: 1800px) {
  .db-maintenance-charts {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 1100px) {
  .db-maintenance-charts {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 700px) {
  .db-maintenance-charts {
    grid-template-columns: 1fr;
  }
}

.db-maintenance-chart-card {
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.db-maintenance-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.db-maintenance-chart-head strong {
  font-size: 12px;
  color: #0f172a;
}

.db-maintenance-chart-head span {
  font-size: 11px;
  color: #4b5563;
}

.db-chart-main-value {
  margin: 0 0 4px;
  font-weight: 700;
}

.db-trend-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.db-trend-chip.up {
  color: #166534;
  border-color: #86efac;
  background: #dcfce7;
}

.db-trend-chip.down {
  color: #9a3412;
  border-color: #fdba74;
  background: #ffedd5;
}

.db-trend-chip.flat {
  color: #334155;
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.db-maintenance-chart-svg {
  width: 100%;
  height: 120px;
  display: block;
}

.db-maintenance-chart-axis {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.db-maintenance-chart-grid {
  stroke: #e2e8f0;
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.db-maintenance-chart-label {
  fill: #64748b;
  font-size: 9px;
  font-weight: 600;
}

.db-maintenance-chart-label-x {
  font-size: 8px;
}

.db-chart-drill-wrap {
  padding: 4px 0 2px;
}

.db-maintenance-chart-svg-drill {
  width: 100%;
  height: 320px;
}

.db-maintenance-chart-svg-drill .db-maintenance-chart-label {
  font-size: 12px;
  font-weight: 700;
}

.db-maintenance-chart-svg-drill .db-maintenance-chart-label-x {
  font-size: 11px;
  font-weight: 600;
}

.db-maintenance-chart-svg-drill .db-maintenance-chart-line {
  stroke-width: 3;
}

.db-maintenance-chart-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.db-maintenance-history-wrap {
  margin-top: 10px;
  max-height: 320px;
}

.db-maintenance-history-table {
  min-width: 760px;
}

.delta-positive {
  color: #15803d;
  font-weight: 700;
}

.delta-negative {
  color: #b91c1c;
  font-weight: 700;
}

.delta-neutral {
  color: inherit;
}

.db-maintenance-stat {
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.db-maintenance-stat > span {
  font-size: 11px;
  color: #64748b;
}

.db-maintenance-stat > strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: #0f172a;
  line-height: 1.3;
}

#dbMaintenanceStatus.error {
  color: #dc2626;
}

#backupAutomationStatus.error {
  color: #dc2626;
}

.backup-automation-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.backup-automation-grid .settings-checkbox-inline {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 9px;
}

.backup-automation-grid .settings-field-wrap {
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 9px;
}

.backup-automation-grid .settings-field-wrap > span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: #64748b;
}

.backup-automation-sftp-head {
  margin-top: 10px;
}

.backup-automation-sftp-head h6 {
  margin: 0;
  font-size: 0.88rem;
}

.backup-automation-sftp-head p {
  margin: 2px 0 0;
}

.agent-update-admin-status {
  margin-top: 14px;
  border: 1px solid #d8e2f0;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px;
}

.agent-update-admin-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.agent-update-admin-status-head h6 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.agent-update-admin-table-wrap {
  margin-top: 8px;
  overflow: auto;
  max-height: 380px;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  background: #fff;
}

.agent-update-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  min-width: 1180px;
}

.agent-update-admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #edf3fb;
  color: #1f2e46;
  text-align: left;
  padding: 5px 6px;
  border-bottom: 1px solid #d8e2f0;
  white-space: nowrap;
}

.agent-update-admin-table tbody td {
  padding: 4px 6px;
  border-bottom: 1px solid #edf1f7;
  vertical-align: top;
  line-height: 1.2;
}

.agent-update-admin-table tbody tr:nth-child(2n) {
  background: #fbfdff;
}

.agent-update-admin-host {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.agent-update-admin-hostname {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: #4b5b73;
}

.agent-update-admin-message {
  max-width: 240px;
  word-break: break-word;
}

.agent-update-admin-group-row td {
  background: #eef3fb;
  color: #24456e;
  font-weight: 700;
  border-top: 1px solid #d1deef;
  border-bottom: 1px solid #d1deef;
}

/* Keep context columns visible when horizontally scrolling. */
.agent-update-admin-table thead th:nth-child(1),
.agent-update-admin-table tbody td:nth-child(1) {
  position: sticky;
  left: 0;
  min-width: 120px;
  max-width: 120px;
}

.agent-update-admin-table thead th:nth-child(2),
.agent-update-admin-table tbody td:nth-child(2) {
  position: sticky;
  left: 120px;
  min-width: 280px;
  max-width: 280px;
}

.agent-update-admin-table thead th:nth-child(1),
.agent-update-admin-table thead th:nth-child(2) {
  z-index: 4;
  background: #e8f0fb;
}

.agent-update-admin-table tbody td:nth-child(1),
.agent-update-admin-table tbody td:nth-child(2) {
  z-index: 2;
  background: #fff;
}

.agent-update-admin-table tbody tr:nth-child(2n) td:nth-child(1),
.agent-update-admin-table tbody tr:nth-child(2n) td:nth-child(2) {
  background: #fbfdff;
}

body[data-theme="dark"] .agent-update-admin-table-wrap {
  background: #0f1a2d;
  border-color: #2b3b56;
}

body[data-theme="dark"] .db-maintenance-panel {
  background: #111b2f;
  border-color: #2b3b56;
}

body[data-theme="dark"] .db-maintenance-stat {
  background: #15243c;
  border-color: #2b3b56;
}

body[data-theme="dark"] .db-maintenance-stat > span {
  color: #93a9c4;
}

body[data-theme="dark"] .db-maintenance-stat > strong {
  color: #dbeafe;
}

body[data-theme="dark"] .db-maintenance-chart-card {
  background: #15243c;
  border-color: #2b3b56;
}

body[data-theme="dark"] .db-maintenance-chart-head strong {
  color: #dbeafe;
}

body[data-theme="dark"] .db-maintenance-chart-head span {
  color: #93a9c4;
}

body[data-theme="dark"] .db-trend-chip {
  color: #cbd5e1;
  border-color: #475569;
  background: #1e293b;
}

body[data-theme="dark"] .db-trend-chip.up {
  color: #bbf7d0;
  border-color: #166534;
  background: #052e16;
}

body[data-theme="dark"] .db-trend-chip.down {
  color: #fed7aa;
  border-color: #9a3412;
  background: #431407;
}

body[data-theme="dark"] .db-trend-chip.flat {
  color: #cbd5e1;
  border-color: #64748b;
  background: #1f2937;
}

body[data-theme="dark"] .db-maintenance-chart-axis {
  stroke: #3f5677;
}

body[data-theme="dark"] .db-maintenance-chart-grid {
  stroke: #2b3b56;
}

body[data-theme="dark"] .db-maintenance-chart-label {
  fill: #8ba4c1;
}

body[data-theme="dark"] .db-maintenance-chart-line {
  stroke: #60a5fa;
}

body[data-theme="dark"] .backup-automation-grid .settings-checkbox-inline,
body[data-theme="dark"] .backup-automation-grid .settings-field-wrap {
  background: #15243c;
  border-color: #2b3b56;
}

body[data-theme="dark"] .backup-automation-grid .settings-field-wrap > span {
  color: #93a9c4;
}

body[data-theme="dark"] .delta-positive {
  color: #4ade80;
}

body[data-theme="dark"] .delta-negative {
  color: #f87171;
}

body[data-theme="dark"] .agent-update-admin-table thead th:nth-child(1),
body[data-theme="dark"] .agent-update-admin-table thead th:nth-child(2) {
  background: #213551;
}

body[data-theme="dark"] .agent-update-admin-table tbody td:nth-child(1),
body[data-theme="dark"] .agent-update-admin-table tbody td:nth-child(2) {
  background: #111b2f;
}

body[data-theme="dark"] .agent-update-admin-table tbody tr:nth-child(2n) td:nth-child(1),
body[data-theme="dark"] .agent-update-admin-table tbody tr:nth-child(2n) td:nth-child(2) {
  background: #15243c;
}

body[data-theme="dark"] .agent-update-admin-group-row td {
  background: #1b2d48;
  color: #dbeafe;
  border-top-color: #2b3b56;
  border-bottom-color: #2b3b56;
}

.agent-update-admin-table th,
.agent-update-admin-table td {
  white-space: nowrap;
}

.agent-update-admin-message {
  white-space: normal;
}

.mountpoint-table-header h4 {
  margin: 0;
}

.mountpoint-toggle-btn {
  flex-shrink: 0;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 8px;
  color: var(--muted);
}

.empty-state span {
  font-size: 28px;
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
  font-size: 13px;
  text-align: center;
}

.alarm-settings-panel {
  margin-top: 10px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faff;
}

.settings-view {
  margin-top: 12px;
}

.settings-page {
  border: 1px solid #d7e4f2;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
  padding: 14px;
}

.settings-page-header {
  display: grid;
  gap: 4px;
}

#globalView .settings-page-header {
  gap: 8px;
}

#globalView .settings-page-header > div {
  margin-bottom: 6px;
}

.settings-page-header h3 {
  margin: 0;
  font-size: 22px;
  color: #17365d;
}

.view-back-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #9ec5f0;
  background: linear-gradient(180deg, #f1f8ff 0%, #e5f1ff 100%);
  color: #1e4b7a;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 12px rgba(30, 75, 122, 0.12);
  transition: transform 120ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.view-back-chip:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  border-color: #7eb2e6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 6px 14px rgba(30, 75, 122, 0.16);
  transform: translateY(-1px);
}

.settings-subsection {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d7e4f2;
}

.settings-subsection:first-of-type {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}

.settings-subsection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-subsection h5 {
  margin: 0;
  font-size: 15px;
  color: #183b66;
}

.alarm-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  margin-top: 8px;
}

.alarm-settings-grid-span2 {
  grid-column: span 2;
}

.alarm-settings-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.alarm-settings-card {
  border: 1px solid #d0dde8;
  border-radius: 10px;
  padding: 11px 12px 13px;
  background: #f6f9fc;
  min-width: 0;
  overflow: hidden;
}

.alarm-settings-card--wide {
  grid-column: span 2;
}

.alarm-settings-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #183b66;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.alarm-settings-grid label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: #475569;
  min-width: 0;
}

.alarm-settings-grid input[type="number"],
.alarm-settings-grid input[type="text"],
.alarm-settings-grid input[type="email"],
.alarm-settings-grid input[type="password"],
.alarm-settings-grid input[type="time"],
.alarm-settings-grid select {
  border: 1px solid #cfd9e6;
  border-radius: 6px;
  padding: 5px 6px;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.alarm-settings-grid .checkbox-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-fieldset-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.host-interests-list {
  margin-top: 10px;
  border: 1px solid #d7e4f2;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  max-height: 320px;
  overflow: auto;
  padding: 8px;
}

.host-interest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
}

.host-interest-item:hover {
  background: #eef5ff;
}

.host-interest-name {
  font-weight: 600;
  color: #183b66;
}

.host-interest-customer {
  color: #6b4a16;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.host-interest-hostname {
  color: #64748b;
  font-size: 12px;
}

.host-interests-loaded-for {
  margin-top: 2px;
  opacity: 0.86;
}

.settings-fieldset-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.settings-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.settings-checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: normal;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
}

.settings-checkbox-group label:hover {
  background: #f1f5f9;
}

.settings-checkbox-group input[type="checkbox"] {
  cursor: pointer;
  width: 14px;
  height: 14px;
}

.alarm-settings-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-create-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.user-alert-subscription-grid {
  grid-template-columns: repeat(3, minmax(200px, 1fr));
}

.user-alert-host-cell {
  display: grid;
  gap: 2px;
}

.user-management-table-wrap {
  margin-top: 10px;
}

.admin-login-audit-details {
  border: 1px solid #c7d3e8;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}

.admin-login-audit-summary {
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: #1f3f6e;
  padding: 10px 14px;
  user-select: none;
}

.admin-login-audit-summary::-webkit-details-marker {
  display: none;
}

.admin-login-audit-summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.16s ease;
}

.admin-login-audit-details[open] .admin-login-audit-summary::before {
  transform: rotate(90deg);
}

.admin-login-audit-details .table-wrap {
  margin-top: 0;
  border-top: 1px solid #dbe5f3;
}

.user-management-table th,
.user-management-table td {
  vertical-align: middle;
}

.user-management-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.user-management-actions button {
  min-height: 28px;
  padding: 0 12px;
  font-size: 11px;
  line-height: 26px;
}

.user-flag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.user-flag-pill.on {
  background: #dcfce7;
  color: #166534;
}

.user-flag-pill.off {
  background: #e2e8f0;
  color: #475569;
}

.oauth-state-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}

.oauth-state-pill.connected {
  background: #dbeafe;
  color: #1d4ed8;
}

.oauth-state-pill.disconnected {
  background: #f1f5f9;
  color: #475569;
}

/* Admin alert subscriptions section */
.admin-alert-sub-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: end;
  margin-bottom: 10px;
}

.admin-alert-sub-controls label {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #475569;
}

.admin-alert-sub-controls input[type="text"],
.admin-alert-sub-controls select {
  min-width: 220px;
  height: 34px;
}

.admin-sub-bulk-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-sub-bulk-group button,
.admin-sub-row-bulk {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-alert-subscriptions-table td {
  vertical-align: top;
}

.admin-alert-subscriptions-table tr.has-change td {
  background: #eef6ff;
}

.admin-sub-country-row td {
  background: #f8fbff;
  border-top: 1px solid #d8e6f7;
  border-bottom: 1px solid #d8e6f7;
  padding-top: 8px;
  padding-bottom: 8px;
}

.admin-sub-country-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f3f73;
}

.admin-sub-country-count {
  margin-left: 8px;
  font-size: 11px;
  color: #64748b;
}

.admin-sub-host-cell strong {
  display: block;
}

.admin-sub-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-sub-user-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-sub-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-sub-user-chip.is-admin {
  background: #dbeafe;
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.admin-sub-user-chip.is-disabled {
  opacity: 0.65;
}

.admin-sub-user-chip.has-change {
  box-shadow: inset 0 0 0 2px #2563eb;
}

.admin-sub-row-hidden,
.admin-sub-chip-hidden {
  display: none !important;
}

.admin-sub-user-name {
  line-height: 1;
}

.admin-sub-cb {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #2563eb;
}

th.center,
td.center {
  text-align: center;
}

/* App footer */
.settings-helper-text {
  color: #64748b;
  font-size: 12px;
}

/* Explanation for override recipient fields */
.override-explanation {
  display: block;
  margin-top: 2px;
  color: #b00;
  font-size: 12px;
  font-style: italic;
}

.settings-logic-help {
  margin-top: 12px;
}

.settings-logic-help-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #dbe3ef;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7fd 100%);
}

.settings-logic-help-card h6 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #17324d;
}

.settings-logic-help-list {
  margin: 0;
  padding-left: 18px;
  color: #516579;
  font-size: 12px;
  line-height: 1.5;
}

.settings-logic-help-list li + li {
  margin-top: 4px;
}

.status-error {
  color: #b91c1c;
}

.agent-source-status-table {
  table-layout: auto;
  width: 100%;
  min-width: 1440px;
  margin-top: 4px;
}

.agent-source-status-table th,
.agent-source-status-table td {
  font-size: 11px;
  padding: 6px 8px;
  overflow: visible;
  text-overflow: clip;
}

.agent-source-status-table th {
  white-space: nowrap;
}

.agent-source-status-table td {
  white-space: normal;
  vertical-align: middle;
}

.agent-source-status-table th:nth-child(1),
.agent-source-status-table td:nth-child(1) {
  width: 6%;
  min-width: 72px;
}

.agent-source-status-table th:nth-child(2),
.agent-source-status-table td:nth-child(2) {
  width: 14%;
  min-width: 160px;
}

.agent-source-status-table th:nth-child(3),
.agent-source-status-table td:nth-child(3),
.agent-source-status-table th:nth-child(4),
.agent-source-status-table td:nth-child(4),
.agent-source-status-table th:nth-child(5),
.agent-source-status-table td:nth-child(5),
.agent-source-status-table th:nth-child(7),
.agent-source-status-table td:nth-child(7) {
  width: 15%;
  min-width: 180px;
}

.agent-source-status-table th:nth-child(6),
.agent-source-status-table td:nth-child(6) {
  width: 8%;
  min-width: 110px;
}

.agent-source-status-table th:nth-child(8),
.agent-source-status-table td:nth-child(8) {
  width: 12%;
  min-width: 150px;
}

.agent-source-status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.agent-source-status-badge.ok {
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
}

.agent-source-status-badge.pending {
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
}

.agent-source-mono {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.agent-source-cell-ok,
.agent-source-cell-bad {
  display: inline-block;
  width: 100%;
  border-radius: 6px;
  padding: 2px 6px;
}

.agent-source-cell-ok {
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
}

.agent-source-cell-bad {
  color: var(--crit);
  background: var(--crit-bg);
  border: 1px solid var(--crit-border);
}

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

@media (max-width: 980px) {
  .user-create-grid,
  .user-alert-subscription-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .alarm-settings-grid,
  .user-create-grid,
  .user-alert-subscription-grid {
    grid-template-columns: 1fr;
  }
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.hosts-column,
.reports-column {
  min-width: 0;
}

.hosts-column {
  align-self: start;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  border: 1px solid #cbdcf0;
  border-radius: 14px;
  padding: 12px 10px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 20px rgba(30, 58, 95, 0.1);
}

body[data-theme="dark"] .hosts-column {
  background: linear-gradient(180deg, #18283f 0%, #14233a 100%);
  border-color: #2a3d5a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.35);
}

.hosts-column-scroll {
  position: sticky;
  top: 16px;
  max-height: calc(100dvh - 180px);
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

/* Sidebar card header: title + count on same line */
.sidebar-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "title"
    "count";
  align-items: start;
  row-gap: 0;
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid #d8e4f2;
}

.sidebar-card-header h3 {
  grid-area: title;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #1f3555;
  letter-spacing: 0.01em;
}

.sidebar-card-header .count {
  grid-area: count;
  margin: 0;
  font-size: 11px;
  color: #5f7792;
  text-align: right;
  justify-self: end;
  align-self: end;
  line-height: 1.3;
  min-width: 0;
}

/* Sidebar filter section */
.sidebar-tools {
  margin-bottom: var(--space-2);
  padding: var(--space-2);
  border: 1px solid #d5e2f2;
  border-radius: 10px;
  background: linear-gradient(180deg, #fafdff 0%, #eef5ff 100%);
}

.sidebar-tools .host-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  margin-top: 0;
}

.sidebar-tools .host-search-box {
  min-width: 0;
  width: 100%;
  align-self: flex-start;
}

.sidebar-tools .search-input {
  background: #ffffff;
  border-color: #c6d8ee;
  color: #1f3555;
  border-radius: 8px;
  font-size: 12px;
}

.sidebar-tools .search-input::placeholder {
  color: #7b8fa7;
}

.sidebar-tools .search-input:focus {
  border-color: #7ca5d6;
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(93, 138, 194, 0.2);
}

.sidebar-tools .host-filter-control {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: #2f4968;
}

.sidebar-tools .host-filter-control > span:first-child {
  flex: 0 0 44px;
  text-align: left;
  color: #5f7792;
}

.sidebar-tools .host-filter-control select {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  padding: 4px 7px;
  border: 1px solid #c6d8ee;
  border-radius: 7px;
  background: #ffffff;
  color: #1f3555;
  cursor: pointer;
}

.sidebar-tools .host-filter-control select option {
  background: #ffffff;
  color: #1f3555;
}

.sidebar-tools .host-filter-control-icons {
  align-items: center;
}

.sidebar-tools .icon-filter-chips {
  flex: 1 1 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.sidebar-tools .icon-filter-chip {
  height: 28px;
  min-width: 28px;
  padding: 0 5px;
  font-size: 11px;
  background: #ffffff;
  border-color: #c3d6ec;
  color: #2b4a6d;
}

.sidebar-tools .icon-filter-chip:hover {
  background: #eef5ff;
  border-color: #8eb4de;
  color: #1f3f65;
}

.sidebar-tools .icon-filter-chip.active {
  background: #dceafc;
  border-color: #86add8;
  color: #173a63;
  box-shadow: none;
}

.sidebar-tools .icon-filter-chip img {
  width: 20px;
  height: 20px;
  background: none;
  border-radius: 0;
  padding: 0;
}

.sidebar-tools .btn-secondary {
  align-self: flex-start;
  min-height: 26px;
  padding: 0 10px;
  font-size: 11px;
  background: #ffffff;
  border: 1px solid #c3d6ec;
  color: #486688;
  border-radius: 7px;
}

.sidebar-tools .btn-secondary:hover:not(:disabled) {
  background: #f0f6ff;
  border-color: #8eb4de;
  color: #1f3f65;
  box-shadow: none;
}

/* Host group titles in sidebar */
.hosts-column .host-group-title {
  color: #617b99;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hosts-column .count {
  color: #6a829f;
}

/* Detail header card — same palette as the sidebar */
.section-head {
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  border: 1px solid #cbdcf0;
  border-radius: 14px;
  padding: 12px 16px 10px;
  margin-bottom: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 20px rgba(30, 58, 95, 0.1);
  color: #1f3555;
  position: relative;
}
.section-head .title-row h3 {
  color: #29466a;
  text-shadow: none;
}
.section-head .auto-refresh-status,
.section-head .auto-refresh-last-update {
  color: #5f7792;
}
.section-head .report-meta-row .count {
  color: #5f7792;
}
body[data-theme="dark"] .section-head {
  background: linear-gradient(180deg, #18283f 0%, #14233a 100%);
  border-color: #2a3d5a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.35);
  color: #d6e6fb;
}
body[data-theme="dark"] .section-head .title-row h3 {
  color: #d6e6fb;
  text-shadow: none;
}
body[data-theme="dark"] .section-head .auto-refresh-status,
body[data-theme="dark"] .section-head .auto-refresh-last-update {
  color: #9eb7d4;
}
body[data-theme="dark"] .section-head .report-meta-row .count {
  color: #9eb7d4;
}

body[data-theme="dark"] .report-count-inline {
  color: #9eb7d4;
}

body[data-theme="dark"] .title-tools-sep {
  background: #2e4a6a;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
}
.title-row h3 {
  flex-shrink: 0;
  margin-right: auto;
}
.title-row-tools {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.header-first-row-controls {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 6px;
}

.title-tools-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: #d1dce9;
  border-radius: 1px;
  flex-shrink: 0;
}

.title-row h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
}

button {
  border: 1px solid var(--btn-primary-border);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  min-height: var(--btn-height);
  padding: 0 12px;
  line-height: calc(var(--btn-height) - 2px);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(30, 58, 95, 0.12);
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

/* Secondary / ghost button */
.btn-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  color: #42526e;
  border: 1px solid #c8d5e6;
  border-radius: 999px;
  min-height: var(--btn-height);
  padding: 0 12px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.btn-secondary:hover:not(:disabled) {
  background: #ffffff;
  border-color: #8fb0d0;
  color: #1e293b;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.btn-secondary--compact {
  min-height: unset;
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  line-height: 22px;
}

.btn-secondary-pill-compact {
  min-height: 26px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 24px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

#exportHostReportsButton.btn-secondary--compact {
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  line-height: 22px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

/* Icon-only button (e.g. pencil) */
.btn-danger-outline {
  color: #b91c1c;
  border-color: #fca5a5;
  background: linear-gradient(180deg, #fff5f5 0%, #fff1f1 100%);
}

.btn-danger-outline:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #ef4444;
  color: #7f1d1d;
}

body[data-theme="dark"] .btn-danger-outline {
  color: #fca5a5;
  border-color: #7f1d1d;
  background: linear-gradient(180deg, #2a1010 0%, #1f0d0d 100%);
}

body[data-theme="dark"] .btn-danger-outline:hover:not(:disabled) {
  background: #3b1010;
  border-color: #ef4444;
  color: #fecaca;
}

/* Icon-only button (e.g. pencil) */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  min-width: 32px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 15px;
  line-height: 1;
  text-align: center;
}

.btn-icon--compact {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  font-size: 13px;
  border-radius: 8px;
}

.btn-icon:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--accent);
}

/* Delivery stats chips */
#deliveryStats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 0;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: #f8fbff;
  color: #315177;
  border: 1px solid #d7e1ef;
}

.stat-chip.live {
  background: #eefaf2;
  color: #1f6a3c;
  border-color: #b8e6c6;
}

.stat-chip.delayed {
  background: #fff7dd;
  color: #9a6411;
  border-color: #f2d588;
}

.delivery-calc-button {
  min-height: 28px;
  padding: 0 12px;
  font-size: 11px;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.analysis-panel table,
.alerts-panel table {
  table-layout: fixed;
}

#overviewConfigChangelogSection {
  padding: 6px 4px;
}

#overviewConfigChangelogSection .table-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
}

#overviewConfigChangelogSection table {
  table-layout: auto;
  width: 100%;
  font-size: 10px;
}

#overviewConfigChangelogSection td,
#overviewConfigChangelogSection th {
  padding: 3px 4px;
  font-size: 10px;
  word-break: break-word;
  white-space: normal;
}

#overviewConfigChangelogSection th {
  font-size: 10px;
  font-weight: 700;
}

#overviewConfigChangelogSection code {
  font-size: 10px;
  word-break: break-all;
}

#overviewDatabaseChangelogSection {
  padding: 6px 4px;
}

#overviewDatabaseChangelogSection .table-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
}

#overviewDatabaseChangelogSection table {
  table-layout: auto;
  width: 100%;
  font-size: 10px;
}

#overviewDatabaseChangelogSection td,
#overviewDatabaseChangelogSection th {
  padding: 3px 4px;
  font-size: 10px;
  word-break: break-word;
  white-space: normal;
}

#overviewDatabaseChangelogSection th {
  font-size: 10px;
  font-weight: 700;
}

#overviewDatabaseChangelogSection th:nth-child(1) { width: 24%; }
#overviewDatabaseChangelogSection th:nth-child(2) { width: 22%; }
#overviewDatabaseChangelogSection th:nth-child(3) { width: 16%; }
#overviewDatabaseChangelogSection th:nth-child(4) { width: 20%; }
#overviewDatabaseChangelogSection th:nth-child(5) { width: 18%; }

#overviewConfigChangelogSection th:nth-child(1) { width: 36%; }
#overviewConfigChangelogSection th:nth-child(2) { width: 24%; }
#overviewConfigChangelogSection th:nth-child(3) { width: 24%; }
#overviewConfigChangelogSection th:nth-child(4) { width: 16%; }

.report-subtable {
  table-layout: auto;
  width: 100%;
  border-collapse: collapse;
}

.path-cell {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.count {
  margin: 10px 0 0;
  color: var(--muted);
}

.count.compact {
  margin-top: 4px;
  font-size: 12px;
}

.view-tabs-shell,
.subview-tabs-shell {
  position: relative;
}

.view-tabs-shell {
  margin: 8px 0 14px;
  padding: 0;
  border: none;
  border-bottom: 2px solid #d4dff0;
  border-radius: 0;
  background: transparent;
}

.subview-tabs-shell {
  margin: 0 0 12px;
  padding: 0;
  border: none;
  border-bottom: 2px solid #d4dff0;
  border-radius: 0;
  background: transparent;
}

.view-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.subview-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.report-subview-tabs {
  gap: 5px;
}

/* reportCount + deliveryStats in one row */
.report-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 16px;
  margin-top: 4px;
  padding-left: 0;
}
.report-meta-row .count {
  margin: 0;
  order: 3;
  margin-left: auto;
}

.report-customer-chip-wrap {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  flex-shrink: 0;
  order: 1;
}

.selected-host-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  order: 2;
  gap: 6px;
  gap: 6px;
  flex-wrap: wrap;
}

.report-count-inline {
  margin: 0;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: #5f7792;
  line-height: 22px;
  height: 24px;
  min-height: 24px;
  margin-left: 0;
  text-align: right;
}

.report-header-os-logo-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.report-header-os-logo-wrap::before {
  content: "";
  position: absolute;
  width: 76%;
  height: 76%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(38, 77, 121, 0.16) 0%, rgba(38, 77, 121, 0.04) 62%, rgba(38, 77, 121, 0) 100%);
  filter: blur(4px);
  z-index: 0;
}

.report-header-os-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(30, 58, 95, 0.2));
  opacity: 0.9;
}

.title-row,
.report-meta-row {
  position: relative;
  z-index: 2;
}

@media (max-width: 1180px) {
  .report-header-os-logo-wrap {
    width: 52px;
    height: 52px;
  }

  .report-meta-row {
    padding-left: 120px;
  }
}

@media (max-width: 940px) {
  .report-header-os-logo-wrap {
    display: none;
  }

  .report-meta-row {
    padding-left: 0;
  }
}

.backup-run-link {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.backup-run-link:hover,
.backup-run-link:focus-visible {
  text-decoration: underline;
}

.selected-host-meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #d7e1ef;
  background: #f8fbff;
  color: #315177;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 22px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* subview-tabs + chart-range-control in one row */
.subview-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.subview-controls-row .subview-tabs-shell {
  margin: 0;
  flex: 1 1 auto;
}

.overview-controls {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.chart-range-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.chart-range-control select {
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  background: #fff;
  color: var(--text);
}

.chart-metrics-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.chart-metrics-control legend {
  display: none;
}

.chart-metrics-control label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.chart-metrics-control label:hover {
  background: #f1f5f9;
}

.chart-metrics-control input[type="checkbox"] {
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* ── Overview Sidebar Layout ── */
.overview-layout {
  display: flex;
  gap: 0;
  align-items: flex-start;
  min-height: 0;
}

.overview-sidebar {
  display: flex;
  flex-direction: column;
  width: 172px;
  flex-shrink: 0;
  padding: 8px;
  gap: 6px;
  border: 1px solid #d5e2f2;
  border-radius: 10px;
  background: linear-gradient(180deg, #fafdff 0%, #eef5ff 100%);
  margin-right: 14px;
  align-self: stretch;
}

.overview-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: #2f4968;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 7px;
  text-align: left;
  box-shadow: none;
  line-height: 1.15;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.overview-sidebar-item:hover {
  background: #f0f4f8;
  color: #3d5373;
}
.overview-sidebar-item.active {
  background: #e8eff9;
  color: #294b72;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #97b1d2;
}
.osi-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.admin-only-hint {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 0 5px;
  min-height: 14px;
  border-radius: 999px;
  border: 1px solid #d8e2ef;
  background: #f4f7fb;
  color: #667c99;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.overview-sidebar-divider {
  height: 1px;
  background: #d5e2f2;
  margin: 6px 2px 2px;
}

.overview-sidebar-range {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 2px 0;
  font-size: 11px;
  font-weight: 600;
  color: #5f7792;
}
.overview-sidebar-range select {
  font-size: 11px;
  padding: 4px 7px;
  border: 1px solid #c6d8ee;
  border-radius: 7px;
  background: #ffffff;
  color: #1f3555;
  cursor: pointer;
  width: 100%;
}

.overview-content {
  flex: 1;
  min-width: 0;
}

/* ── Overview Sidebar Dark Mode ── */
body[data-theme="dark"] .overview-sidebar {
  border-color: #2b3f5c;
  background: linear-gradient(180deg, #14253c 0%, #102036 100%);
}
body[data-theme="dark"] .overview-sidebar-item {
  color: #b9cde6;
}
body[data-theme="dark"] .overview-sidebar-item:hover,
body[data-theme="dark"] .overview-sidebar-item.active {
  background: #254152;
  color: #b8cde5;
}
body[data-theme="dark"] .overview-sidebar-item.active {
  background: #2a425f;
  box-shadow: inset 3px 0 0 #7899be;
}
body[data-theme="dark"] .admin-only-hint {
  border-color: #3e5573;
  background: #1b2a3d;
  color: #94a9c4;
}
body[data-theme="dark"] .overview-sidebar-divider {
  background: #2b3f5c;
}
body[data-theme="dark"] .overview-sidebar-range {
  color: #9eb7d4;
}
body[data-theme="dark"] .overview-sidebar-range select {
  background: #1a2e49;
  border-color: #355072;
  color: #d4e6fb;
}

/* ── Trend Card Progress Bar ── */
.trend-progress-bar {
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 4px;
}
.trend-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s ease;
}

body[data-theme="dark"] .trend-progress-bar {
  background: #1e2f45;
}

.overview-subsection {
  margin-bottom: 12px;
}

.overview-scroll-panel {
  max-height: clamp(360px, calc(100dvh - 310px), 820px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.tab-button {
  position: relative;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #48617f;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tab-button:hover:not(.active):not(.alert-active) {
  background: #fafcff;
  color: #607a98;
  border-color: #e5edf7;
  box-shadow: none;
}

.tab-button.active {
  background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
  color: #0f3470;
  border-color: #b8cbe6;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18), inset 0 1px 0 #ffffff;
}

.tab-button.alert-active:not(.active) {
  background: transparent;
  color: #b91c1c;
  border-color: #fecaca;
  box-shadow: none;
}

.tab-button.alert-active.active {
  background: transparent;
  color: #dc2626;
  border-color: #dc2626;
  box-shadow: none;
  font-weight: 800;
}

.tab-button.alert-active.active:hover {
  background: transparent;
  color: #b91c1c;
  border-color: #b91c1c;
}

/* First-level view tabs: underline-register style */
.view-tabs .tab-button {
  font-size: 13px;
  font-weight: 700;
  min-height: 38px;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #5a7496;
  padding: 8px 18px 7px;
  box-shadow: none;
  position: relative;
  bottom: -2px; /* sits flush on the border-bottom of the shell */
  transition: color 0.18s ease, border-color 0.18s ease;
}
.view-tabs .tab-button:hover:not(.active):not(.alert-active) {
  background: transparent;
  border-color: #c3d1e4;
  color: #537095;
  box-shadow: none;
}
.view-tabs .tab-button.active {
  background: transparent;
  color: #1a3a6e;
  border-color: #2563eb;
  box-shadow: none;
  font-weight: 800;
}

/* Second-level subview tabs: same underline style, slightly smaller */
.subview-tabs .tab-button {
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px 6px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #5a7496;
  box-shadow: none;
  position: relative;
  bottom: -2px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.subview-tabs .tab-button:hover:not(.active):not(.alert-active) {
  background: transparent;
  border-color: #c3d1e4;
  color: #537095;
  box-shadow: none;
}

.subview-tabs .tab-button.active {
  background: transparent;
  color: #1a3a6e;
  border-color: #2563eb;
  font-weight: 700;
  box-shadow: none;
}

.subview-tabs .tab-button.admin-only-tab {
  color: #9a3412;
  border-color: rgba(234, 88, 12, 0.2);
}

.subview-tabs .tab-button.admin-only-tab:hover:not(.active):not(.alert-active) {
  color: #b45309;
  border-color: #fdba74;
}

.subview-tabs .tab-button.admin-only-tab.active {
  color: #9a3412;
  border-color: #ea580c;
}

.admin-tab-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: #9a3412;
  font-size: 12px;
  font-weight: 600;
}

.admin-tab-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  flex: 0 0 auto;
}

.tab-button.tab-has-crit:not(.active),
.tab-button.tab-has-warn:not(.active) {
  background: transparent;
  border-color: transparent;
}

.tab-button.tab-has-crit:not(.active) {
  color: #9f1239;
}

.tab-button.tab-has-warn:not(.active) {
  color: #92400e;
}

.tab-button.tab-has-crit::after,
.tab-button.tab-has-warn::after {
  content: attr(data-alert-badge);
  position: absolute;
  top: 3px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.tab-button.tab-has-crit::after {
  background: #dc2626;
  color: #fff;
}

.tab-button.tab-has-warn::after {
  background: #f59e0b;
  color: #fff;
}

.hidden {
  display: none !important;
}

/* ── Critical Trends view ─────────────────────────────────── */

.critical-trends-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

#refreshCriticalTrendsButton,
#refreshInactiveHostsButton {
  min-height: 36px;
  padding: 0 14px;
}

.ct-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13px;
}

.ct-summary-label {
  color: var(--muted);
}

.ct-projection-horizon {
  margin-left: auto;
  color: var(--muted);
}

.ct-badge,
.ct-host-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ct-badge-crit {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.ct-badge-warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.ct-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.ct-empty-icon {
  font-size: 36px;
  color: #22c55e;
}

.ct-host-card {
  border: 1px solid #d4dfec;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.ct-host-card-crit {
  border-color: #fca5a5;
  box-shadow: 0 0 0 1px #fecaca, 0 4px 14px rgba(220, 38, 38, 0.1);
}

.ct-host-card-warn {
  border-color: #fde68a;
  box-shadow: 0 0 0 1px #fef3c7, 0 4px 14px rgba(245, 158, 11, 0.1);
}

.ct-host-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2eaf4;
  flex-wrap: wrap;
}

.ct-host-card-crit .ct-host-header {
  background: linear-gradient(180deg, #fff1f2 0%, #fff8f8 100%);
  border-bottom-color: #fecaca;
}

.ct-host-card-warn .ct-host-header {
  background: linear-gradient(180deg, #fffbeb 0%, #fffef5 100%);
  border-bottom-color: #fde68a;
}

.ct-hostname {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  font-family: "IBM Plex Mono", monospace;
}

.ct-host-title-block {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ct-host-customer {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  color: #1e293b;
}

.ct-hostname-sub {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  font-family: "IBM Plex Mono", monospace;
}

.ct-host-badge {
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
}

.ct-host-meta {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

.ct-rows {
  padding: 8px 0;
}

.ct-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto auto;
  align-items: center;
  gap: 6px 10px;
  padding: 7px 14px;
  border-bottom: 1px solid #f1f5fb;
  font-size: 12px;
}

.ct-row:last-child {
  border-bottom: none;
}

.ct-row-crit {
  background: #fffafa;
}

.ct-row-warn {
  background: #fffef8;
}

.ct-row-icon {
  font-size: 13px;
  text-align: center;
}

.ct-row-metric {
  font-weight: 600;
  color: #1e293b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-row-current {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.ct-row-arrow {
  color: #94a3b8;
  font-size: 12px;
}

.ct-row-projected {
  font-size: 12px;
  white-space: nowrap;
  font-weight: 600;
}

.ct-projected-crit {
  color: #b91c1c;
}

.ct-projected-warn {
  color: #92400e;
}

.ct-trend-arrow {
  font-style: normal;
  font-size: 13px;
  margin-right: 3px;
  vertical-align: middle;
  line-height: 1;
}

.ct-trend-up {}
.ct-trend-down {}
.ct-trend-flat {}

.ct-bar-wrap {
  grid-column: 1 / -1;
  height: 4px;
  background: #e2eaf4;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.ct-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 400ms ease;
}

.ct-bar-crit {
  background: linear-gradient(90deg, #f97316, #dc2626);
}

.ct-bar-warn {
  background: linear-gradient(90deg, #fbbf24, #d97706);
}

.ct-critical-eta {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 2px 8px;
  margin-top: 2px;
  width: fit-content;
}

.view-section.hidden {
  display: none;
}

.report-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}

.log-viewer {
  margin: 0;
  padding: 14px 20px 18px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #0f172a;
  color: #dbeafe;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
}

.terminal-token-comment {
  color: #64748b;
}

.terminal-token-muted {
  color: #dbeafe;
}

.terminal-token-heading {
  color: #f8fafc;
  font-weight: 700;
}

.terminal-token-field {
  color: #93c5fd;
  font-weight: 700;
}

.terminal-token-separator {
  color: #64748b;
}

.terminal-token-key {
  color: #93c5fd;
  font-weight: 700;
}

.terminal-token-system {
  color: #facc15;
  font-weight: 700;
}

.terminal-token-path {
  color: #7dd3fc;
}

.terminal-token-date {
  color: #fdba74;
}

.terminal-token-metric {
  color: #22d3ee;
  font-weight: 700;
}

.terminal-token-version {
  color: #f9a8d4;
}

.terminal-token-size {
  color: #c4b5fd;
}

.terminal-token-info {
  color: #38bdf8;
}

.terminal-token-good {
  color: #4ade80;
  font-weight: 700;
}

.terminal-token-warn {
  color: #fbbf24;
  font-weight: 700;
}

.terminal-token-bad {
  color: #f87171;
  font-weight: 700;
}

.agent-config-viewer {
  margin-bottom: 2px;
}

.terminal-viewer-section {
  padding: 4px 14px 14px;
}

.terminal-viewer-section > .count.compact {
  margin: 0 0 10px;
}

.agent-config-key {
  color: #93c5fd;
}

.agent-config-value {
  color: #e2e8f0;
}

.agent-config-secret {
  color: #94a3b8;
  font-style: italic;
}

.host-search-box {
  flex: 1 1 auto;
  min-width: 320px;
}

.host-filters {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-top: 8px;
}

.host-filters-header {
  margin-top: 0;
}

.host-tools {
  margin-top: 10px;
  border: 1px solid #d7e1ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  padding: 6px 8px 8px;
}

.host-tools > summary {
  cursor: pointer;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.host-tools > summary::-webkit-details-marker {
  display: none;
}

.host-filter-control {
  display: grid;
  gap: 6px;
  min-width: 132px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.host-filter-control-icons {
  min-width: 160px;
}

.host-filter-control select {
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
}

.icon-filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.icon-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #cfd9e6;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.icon-filter-chip:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.icon-filter-chip.active {
  border-color: #60a5fa;
  background: #dbeafe;
  color: #1e3a8a;
  box-shadow: inset 0 0 0 1px #60a5fa;
}

.icon-filter-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  background: transparent;
  pointer-events: none;
}

.search-input {
  width: 100%;
  border: 1px solid #cdd9eb;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  background: #ffffff;
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.search-input:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

.host-list-shell {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.host-list-header {
  margin-top: 12px;
  margin-bottom: 8px;
}

.global-update-chip {
  width: 100%;
  border-radius: 999px;
  min-height: var(--btn-height);
  padding: 0 12px;
  background: linear-gradient(135deg, #2b5f8f 0%, #3a6ea1 100%);
  color: #eef6ff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 10px rgba(35, 78, 126, 0.2);
}

.global-update-chip-inline {
  width: auto;
  min-width: 220px;
  margin-top: 0;
  flex: 0 1 auto;
}

.global-update-chip:hover:not(:disabled) {
  background: linear-gradient(135deg, #285884 0%, #356593 100%);
}

.global-update-chip:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.header-stat-chip {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 2px;
  border-radius: 12px;
  padding: 6px 8px;
  min-height: 56px;
  min-width: 150px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  border: 1px solid #cfd8e3;
  border-left-width: 4px;
  background: linear-gradient(180deg, #f7f9fb 0%, #eff3f7 100%);
  color: #1f3f5f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 8px rgba(22, 49, 86, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.header-stat-chip:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 6px 14px rgba(22, 49, 86, 0.14);
}

.header-chip-icon {
  font-size: 1.08rem;
  line-height: 1;
}

.header-chip-label {
  font-size: 9px;
  line-height: 1.1;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: #4a6687;
}

.header-chip-count {
  font-family: var(--kv-value-family);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.header-chip-scope {
  font-size: 10px;
  line-height: 1;
  opacity: 1;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #60748d;
}

.header-stat-chip-alert {
  border-left-color: #cf2f2f;
}

.header-stat-chip-warn {
  border-left-color: #c2790f;
}

.header-stat-chip-inactive {
  border-left-color: #2a74b5;
}

.header-stat-chip-db-reports {
  border-left-color: #2f9e44;
}

.header-stat-chip-db-reports-hour {
  border-left-color: #0f766e;
}

.header-stat-chip-db-size {
  border-left-color: #7c3aed;
}

.header-stat-chip-db-size-delta {
  border-left-color: #be123c;
}

#headerLicenseChip.header-stat-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-direction: row !important;
  align-self: stretch !important;
  height: auto !important;
  min-height: 56px !important;
  overflow: hidden !important;
  border-left-color: #fbbf24 !important;
  border-left-width: 4px !important;
  padding: 6px 8px !important;
  gap: 0 !important;
  flex-wrap: nowrap !important;
}

#headerLicenseChip {
  display: inline-flex !important;
  align-items: center !important;
  align-self: stretch !important;
  height: auto !important;
  min-height: 56px !important;
  border-left-color: #fbbf24 !important;
  border-left-width: 4px !important;
  padding-right: 30px !important;
}

#headerLicenseChip.hidden {
  display: none !important;
}

.header-stat-chip-license {
  border-left-color: #fbbf24 !important;
  border-left-width: 4px !important;
  min-width: 520px;
  cursor: default;
  height: 56px !important;
  min-height: 56px !important;
  padding: 6px 8px !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  border: 1px solid #cfd8e3 !important;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7f9fb 0%, #eff3f7 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 8px rgba(22, 49, 86, 0.08) !important;
}

.header-stat-chip-license:hover {
  transform: none;
}

.header-license-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #b6c6d8;
  border-radius: 999px;
  background: #f4f8fc;
  color: #42526e;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.header-license-copy-btn:hover:not(:disabled) {
  background: #ffffff;
  border-color: #8fb0d0;
}

.header-license-copy-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.header-license-copy-btn-floating {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.header-license-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px 18px;
  height: 100% !important;
  flex: 1;
}

.header-license-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  justify-content: space-around;
  height: 100%;
}

.header-license-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.header-license-label {
  font-size: 7px;
  line-height: 1;
  color: #4a6687;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-license-value {
  min-width: 0;
  font-size: 11px;
  line-height: 1;
  color: #1f3f5f;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "IBM Plex Mono", monospace;
}

.agent-update-status-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.agent-update-status-row {
  border: 1px solid #d6e0ec;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  padding: 8px 10px;
  display: grid;
  gap: 3px;
}

.agent-update-status-row strong {
  font-size: 12px;
  color: #1f2937;
}

.agent-update-status-row span {
  font-size: 11px;
  color: #64748b;
}

.agent-update-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}

.agent-update-status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.agent-update-status-badge.completed {
  background: #dcfce7;
  color: #166534;
}

.agent-update-status-badge.failed,
.agent-update-status-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.agent-update-status-badge.idle {
  background: #e2e8f0;
  color: #334155;
}

.host-list {
  display: grid;
  gap: var(--space-2);
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: var(--space-1);
  padding-right: 6px;
  scroll-padding-top: 8px;
  scrollbar-gutter: stable;
}

.host-group {
  display: grid;
  gap: var(--space-2);
}

.host-group-hidden {
  margin-top: 8px;
}

#hiddenHostsBody {
  display: grid;
  gap: var(--space-2);
}

#hiddenHostsBody.hidden {
  display: none;
}

.host-group-title {
  margin: 0;
  font-size: 12px;
  color: #475569;
  font-weight: 700;
}

.host-group-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.host-group-toggle {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.host-group-toggle:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.host-item {
  text-align: left;
  border: 1px solid #c8dbee;
  background:
    radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.11) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(30, 64, 175, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #f7fbff 0%, #eaf3ff 100%);
  color: var(--text);
  border-radius: 12px;
  padding: 6px 44px 6px 10px;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.host-item.host-item--env-prod {
  border-color: #9fbddd;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 52%),
    radial-gradient(circle at 0% 100%, rgba(30, 64, 175, 0.11) 0%, transparent 55%),
    linear-gradient(180deg, #e3effb 0%, #cfe2f5 100%);
}

/* SAP/HANA chips in the bottom actions row: inline flow */
.host-card-actions .host-value-chip {
  pointer-events: none;
}

.host-value-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 800;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-value-chip--sap,
.host-value-chip--hana,
.host-value-chip--sid {
  border-color: #9fb7cf;
  background: linear-gradient(180deg, #e9f1f9 0%, #d9e6f3 100%);
  color: #2f4f6f;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.1;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
}

.host-value-chip--env {
  min-height: 15px;
  font-size: 11px;
  padding: 1px 8px;
  line-height: 1.1;
  min-width: 52px;
  justify-content: center;
}

.host-value-chip--env-prod {
  border-color: #9fd7b8;
  background: #e9f8ef;
  color: #1d6a46;
}

.host-value-chip--env-test {
  border-color: #f1c28a;
  background: #fff2e2;
  color: #8a4c14;
}

.host-value-chip--customer {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
  max-width: 190px;
}

.host-value-chip--customer-title {
  border-color: rgba(0, 77, 104, 0.3);
  background: rgba(0, 98, 133, 0.38);
  color: #1e5a7a;
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  font-size: 13px;
  font-weight: 900;
  padding: 2px 10px;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
  justify-content: flex-start;
}

.host-value-chip--sap,
.host-value-chip--hana,
.host-value-chip--sid {
  border-color: #9fb7cf;
  background: linear-gradient(180deg, #e9f1f9 0%, #d9e6f3 100%);
  color: #2f4f6f;
  border-radius: 4px;
}

.host-card-footer--customer {
  padding: 4px 8px 0 0;
  background: transparent;
}

.host-customer-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 0 2px 0;
}

.host-customer-text-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.host-detail-line {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  word-break: break-word;
  padding-top: 5px;
}

.host-license-info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  opacity: 0.95;
  flex-shrink: 0;
  cursor: pointer;
}

.host-license-hover-popup {
  position: fixed;
  z-index: 1300;
  width: min(640px, calc(100vw - 24px));
  border: 1px solid #cfd8e3;
  border-left: 4px solid #fbbf24;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7f9fb 0%, #eff3f7 100%);
  box-shadow: 0 12px 30px rgba(15, 31, 56, 0.25);
  padding: 10px 12px;
}

.host-license-hover-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.host-license-hover-head strong {
  color: #15395f;
  font-size: 13px;
}

.host-license-hover-head > span {
  color: #4a6687;
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
}

.host-license-hover-head .header-license-copy-btn {
  margin-left: auto;
}

.host-license-hover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
}

.host-license-hover-item span {
  display: block;
  font-size: 9px;
  color: #4a6687;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.host-license-hover-item strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  color: #1f3f5f;
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-license-hover-item--holder strong {
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.host-license-hover-types {
  margin-top: 10px;
  border-top: 1px solid #d6e1ee;
  padding-top: 8px;
}

.host-license-hover-types-head {
  margin: 0 0 3px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}

.host-license-hover-type-count-label,
.host-license-hover-type-name-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f7895;
}

.host-license-hover-type-count-label {
  min-width: 40px;
  font-family: "IBM Plex Mono", monospace;
}

.host-license-hover-type-row {
  margin: 2px 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  color: #28486a;
  font-size: 12px;
}

.host-license-hover-type-count {
  min-width: 40px;
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
  color: #7c2d12;
  font-weight: 700;
}

.host-license-hover-type-name-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.host-license-hover-type-name {
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  color: #28486a;
}

.host-license-hover-type-raw {
  color: #6b7f97;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.host-customer-line {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #0f3f5f;
  word-break: break-word;
}

.host-item-hidden {
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
  border-style: dashed;
  opacity: 0.88;
}

.host-os-icon {
  position: absolute;
  top: 18px;
  right: 10px;
  width: 21px;
  height: 21px;
  object-fit: contain;
  opacity: 0.75;
  pointer-events: none;
  transform: translateY(-50%);
}

.host-flag-icon {
  position: absolute;
  top: calc(100% - 18px);
  right: 8px;
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: transparent;
  pointer-events: none;
  transform: translateY(-50%);
}

.host-item:hover {
  border-color: #9fbcde;
  box-shadow: 0 8px 18px rgba(30, 58, 95, 0.12);
  transform: translateY(-1px);
}

.host-item strong,
.host-item .host-title-line,
.host-item .host-title-line span {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  color: #4d617a;
}

.host-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-right: 28px;
  min-height: 26px;
}

.host-title-line span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.host-status-chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.host-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
  min-width: 0;
}

.host-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  min-height: 18px;
}

.host-card-footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.host-card-env-row {
  display: flex;
  align-items: center;
}

.host-alert-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid #f87171;
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  justify-self: end;
}

.host-alert-chip.critical {
  background: #fecaca;
  border-color: #ef4444;
}

.host-apikey-chip,
.host-mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 22px;
  box-sizing: border-box;
  vertical-align: middle;
  overflow: hidden;
}

.host-apikey-chip {
  cursor: default;
}

.host-apikey-chip.ok {
  background: #dcfce7;
  border-color: #4ade80;
  color: #166534;
}

.host-apikey-chip.grace {
  background: #ffedd5;
  border-color: #fb923c;
  color: #9a3412;
}

.host-apikey-chip.configured {
  background: #fef9c3;
  border-color: #facc15;
  color: #713f12;
}

.host-apikey-chip.missing {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.host-apikey-chip.off {
  background: transparent;
  border-color: #cbd5e1;
  color: #94a3b8;
}

.host-update-triangle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 14px;
  color: #d97706;
  cursor: default;
  line-height: 1;
}

.alert-mute-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
}
.alert-mute-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}
.alert-mute-btn.muted {
  opacity: 1;
  color: #f59e0b;
}

.alert-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.alert-ack-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 3px;
  border-radius: 4px;
  color: #64748b;
  opacity: 0.75;
  transition: opacity 0.15s, background 0.15s;
}

.alert-ack-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.alert-ack-btn.acknowledged {
  opacity: 1;
  color: #16a34a;
}

/* Close button (Abschliessen) */
.alert-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 3px;
  border-radius: 4px;
  color: #64748b;
  opacity: 0.65;
  transition: opacity 0.15s, background 0.15s;
}

.alert-close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.alert-close-btn.closed {
  opacity: 1;
  color: #b45309;
}

.alert-row-closed td {
  opacity: 0.55;
}

.alert-closed-meta {
  color: #b45309 !important;
}

.alert-row-muted td:last-child,
.alert-row-muted .alert-action-buttons,
.alert-row-muted .alert-mute-btn,
.alert-row-muted .alert-ack-btn {
  opacity: 1;
}

.ack-modal-inner {
  min-width: 340px;
  max-width: 500px;
  width: 90vw;
}

.ack-modal-note-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 12px;
  color: var(--text-muted, #64748b);
}

.ack-modal-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: var(--bg, #fff);
  color: var(--text, #1e293b);
  min-height: 68px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.alert-row-muted td {
  opacity: 0.45;
}

.host-muted-section {
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px dashed #cbd5e1;
}

.host-muted-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.host-muted-title {
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.host-muted-toggle {
  padding: 2px 8px;
  font-size: 10px;
}

.host-muted-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.host-muted-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.host-muted-path {
  color: #475569;
  font-size: 11px;
}

.host-unmute-action {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  width: 22px;
  height: 22px;
  line-height: 1;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.host-unmute-action:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.host-mini-action {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
}

.host-mini-action:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.host-mini-action.favorite.active {
  color: #a16207;
  background: #fef3c7;
  border-color: #f59e0b;
}

.host-mini-action.visibility {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #93c5fd;
}

.host-mini-action.visibility:hover {
  border-color: #60a5fa;
  background: #bfdbfe;
}

.host-mini-action.visibility.active {
  color: #1e40af;
  background: #c7d2fe;
  border-color: #818cf8;
}

.host-mini-action.update {
  color: #0f766e;
}

.host-mini-action.update:hover {
  border-color: #5eead4;
  background: #ccfbf1;
}

.host-context-menu {
  position: fixed;
  z-index: 1200;
  min-width: 220px;
  padding: 8px;
  border: 1px solid #d1dbe9;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

.host-context-menu-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  padding: 4px 8px 8px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.host-context-menu button {
  width: 100%;
  text-align: left;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
}

.host-context-menu button:hover {
  background: #fee2e2;
  border-color: #fecaca;
}

.host-item .host-meta-line span:not(.host-value-chip):not(.host-agent-mini-dot) {
  color: var(--muted);
  font-size: 11px;
}

.host-item .host-meta-line {
  font-size: 10px;
  line-height: 1.2;
  color: #6d829d;
}

.host-meta-line--primary {
  font-size: 11px;
}

.host-meta-line--with-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.host-agent-version {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: inherit;
}

.host-agent-version--compact {
  gap: 4px;
  font-size: 10px;
}

.host-agent-version-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  flex: 0 0 auto;
}

.host-agent-version-dot--compact {
  display: inline-block;
  width: 11px;
  height: 11px;
  vertical-align: middle;
}

.host-agent-version-dot--green {
  background: #22c55e;
  border-color: #16a34a;
}

.host-agent-version-dot--red {
  background: #f43f5e;
  border-color: #e11d48;
}

.host-agent-version-dot--unknown {
  background: #94a3b8;
  border-color: #64748b;
}

.host-last-report {
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
  vertical-align: middle;
}

.host-last-report-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.host-last-report-dot--inline {
  width: 11px;
  height: 11px;
  display: inline-block;
  vertical-align: middle;
}

.host-last-report-dot--ok {
  background: #22c55e;
  border-color: #16a34a;
}

.host-last-report-dot--warning {
  background: #fb923c;
  border-color: #ea580c;
}

.host-last-report-dot--critical {
  background: #f43f5e;
  border-color: #e11d48;
}

.host-last-report-dot--unknown {
  background: #94a3b8;
  border-color: #64748b;
}

.host-alert-chip--meta {
  flex: 0 0 auto;
}



.host-item.selected {
  border-color: #7fa4cf;
  background: linear-gradient(180deg, #f0f6ff 0%, #e7f0fc 100%);
  box-shadow: inset 0 0 0 1px #8ab0db, 0 10px 24px rgba(30, 58, 95, 0.16);
}
.host-item.host-item--env-prod.selected {
  border-color: #86a9cf;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.16) 0%, transparent 52%),
    radial-gradient(circle at 0% 100%, rgba(30, 64, 175, 0.14) 0%, transparent 56%),
    linear-gradient(180deg, #dbeaf8 0%, #c6dcef 100%);
  box-shadow: inset 0 0 0 1px #97b7da, 0 10px 24px rgba(30, 58, 95, 0.16);
}

.host-status-bar {
  display: block;
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
  width: 4px;
  height: auto;
  border-radius: 12px 0 0 12px;
}

.host-alert-side-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 4px;
  border-radius: 0 12px 12px 0;
  background: #f43f5e;
}

.host-version-side-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 4px;
  border-radius: 0 12px 12px 0;
}

.host-version-side-bar--ok {
  background: #22c55e;
}

.host-version-side-bar--warning {
  background: #fb923c;
}

.host-version-side-bar--critical {
  background: #f43f5e;
}

.host-version-side-bar--unknown {
  background: #94a3b8;
  opacity: 0.85;
}

.host-status-bar--ok {
  opacity: 0.3;
}

.host-status-bar--report-ok {
  background: #22c55e;
}

.host-status-bar--report-warning {
  background: #fb923c;
}

.host-status-bar--report-critical {
  background: #f43f5e;
}

.host-status-bar--report-unknown {
  background: #94a3b8;
  opacity: 0.85;
}

body[data-theme="dark"] .sidebar-card-header {
  border-bottom-color: #2b3f5c;
}

body[data-theme="dark"] .sidebar-card-header h3 {
  color: #d6e6fb;
}

body[data-theme="dark"] .sidebar-card-header .count,
body[data-theme="dark"] .hosts-column .count,
body[data-theme="dark"] .hosts-column .host-group-title {
  color: #9eb7d4;
}

body[data-theme="dark"] .sidebar-tools {
  border-color: #2b3f5c;
  background: linear-gradient(180deg, #14253c 0%, #102036 100%);
}

body[data-theme="dark"] .sidebar-tools .host-filter-control,
body[data-theme="dark"] .sidebar-tools .host-filter-control > span:first-child {
  color: #b9cde6;
}

body[data-theme="dark"] .sidebar-tools .search-input,
body[data-theme="dark"] .sidebar-tools .host-filter-control select,
body[data-theme="dark"] .sidebar-tools .icon-filter-chip,
body[data-theme="dark"] .sidebar-tools .btn-secondary {
  background: #1a2e49;
  border-color: #355072;
  color: #d4e6fb;
}

body[data-theme="dark"] .sidebar-tools .search-input::placeholder {
  color: #8ea8c6;
}

body[data-theme="dark"] .sidebar-tools .search-input:focus {
  border-color: #5683b8;
  box-shadow: 0 0 0 2px rgba(86, 131, 184, 0.25);
}

body[data-theme="dark"] .sidebar-tools .icon-filter-chip:hover,
body[data-theme="dark"] .sidebar-tools .btn-secondary:hover:not(:disabled) {
  background: #223a5c;
  border-color: #5d86b8;
}

body[data-theme="dark"] .sidebar-tools .icon-filter-chip.active {
  background: #2b4d78;
  border-color: #7098c8;
}

.pager {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pager-top {
  margin-top: 2px;
  margin-bottom: 8px;
}

.report-jump-row {
  display: flex;
  align-items: center;
  margin-top: 0;
  margin-bottom: 8px;
  gap: 6px;
}

.report-jump-left {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
}

#reportJumpHostUidChip {
  display: inline-flex;
  align-items: center;
}

.report-jump-host-id {
  height: 22px;
  min-height: 22px;
  line-height: 20px;
  font-size: 11px;
  max-width: 320px;
}

.report-jump-control {
  display: inline-block;
  flex: 0 0 auto;
}

.report-jump-control input {
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  padding: 3px 6px;
  font-size: 12px;
  min-height: 22px;
  width: 144px;
  background: #fff;
  color: var(--text);
}

.report-nav-btn {
  width: 80px;
  min-width: 80px;
  min-height: 22px;
  padding: 0 6px;
  line-height: 20px;
  font-size: 12px;
  text-align: center;
}

#reportJumpBounds {
  margin: 0;
  white-space: nowrap;
  font-size: 12px;
}

/* Hard override for report nav sizing to avoid cascade regressions. */
#reportsPrevButtonTop,
#reportsNextButtonTop,
#reportJumpLatestButton,
#reportsPrevButton,
#reportsNextButton {
  width: 80px !important;
  min-width: 80px !important;
  min-height: 22px !important;
  height: 22px !important;
  padding: 0 6px !important;
  line-height: 20px !important;
  font-size: 12px !important;
}

#reportJumpDateTimeInput {
  width: 144px !important;
  min-height: 22px !important;
  height: 22px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
}

#reportJumpBounds {
  margin-left: auto !important;
  max-width: 150px;
  white-space: normal !important;
  text-align: right;
  line-height: 1.2;
  font-size: 9px !important;
}

#reportJumpBounds .report-jump-label,
#reportJumpBounds .report-jump-value {
  display: block;
}

#reportJumpBounds .report-jump-label {
  font-size: 10px;
}

@media (max-width: 980px) {
  .report-jump-row {
    flex-wrap: wrap;
  }

  .report-jump-left {
    flex-wrap: wrap;
  }

  #reportJumpBounds {
    margin-left: 0 !important;
    text-align: left;
    max-width: none;
  }
}

.analysis-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: box-shadow 200ms ease;
}

#overviewFilesystemSection {
  border: 2px solid var(--line) !important;
  border-radius: 8px !important;
  margin-top: 10px;
  padding: 0 !important;
  background: #fcfdff !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08), 0 6px 16px rgba(0, 0, 0, 0.05);
  transition: box-shadow 200ms ease;
}

#overviewFilesystemSection .fs-focus-header {
  background: #f0f4fa;
  padding: 12px;
  margin: 0 !important;
  border-bottom: 1px solid var(--line);
}

#overviewFilesystemSection .fs-focus-header h4 {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  margin: 0 0 4px;
}

#overviewFilesystemSection .fs-focus-header .count {
  margin: 0;
}

#overviewFilesystemSection #filesystemCharts {
  padding: 12px 12px 0 12px;
}

#overviewFilesystemSection .detail-card {
  margin: 12px;
  margin-top: 12px;
}

#overviewFilesystemSection .detail-card h4 {
  margin: 0 0 4px;
  font-size: 13px;
}

.resource-charts {
  margin-top: 12px;
  margin-bottom: 10px;
  display: grid;
  gap: 10px;
}

.resource-chart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mini-chart-card {
  border: 1px solid #d4dfec;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
  padding: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.mini-chart-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.12);
}

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

.mini-chart-card header,
.mini-chart-card footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.mini-chart-card header strong {
  font-size: 12px;
}

.mini-chart-card header span,
.mini-chart-card footer span {
  font-size: 11px;
  color: var(--muted);
}

.sparkline {
  width: 100%;
  height: auto;
  display: block;
  margin: 6px 0;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 250, 255, 0.8) 100%);
}

.sparkline polyline {
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.18));
}

.chart-trend-line {
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
  opacity: 0.55;
  stroke-linecap: round;
}

.trend-warning-block {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fbbf24;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 4px;
  font-size: 12px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.trend-warning-block strong {
  font-size: 12px;
  color: #92400e;
  white-space: nowrap;
  flex-shrink: 0;
}

.trend-warning-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.trend-warning-block li {
  color: #78350f;
}

.trend-warning-block li.trend-alert-crit {
  color: #991b1b;
}

.trend-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.trend-alert-badge.trend-alert-warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.trend-alert-badge.trend-alert-crit {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.trend-alert-card-warn {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 1px #fde68a, 0 6px 18px rgba(245, 158, 11, 0.12) !important;
}

.trend-alert-card-crit {
  border-color: #fca5a5 !important;
  box-shadow: 0 0 0 1px #fecaca, 0 6px 18px rgba(220, 38, 38, 0.14) !important;
}

.chart-grid-line {
  stroke: #dbe5ef;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-axis-line {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.chart-axis-tick {
  stroke: #94a3b8;
  stroke-width: 1;
}

.chart-axis-label {
  fill: #64748b;
  font-size: 10px;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.chart-axis-label-x {
  font-size: 9px;
}

.chart-area {
  filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.08));
}

.chart-point {
  opacity: 0;
  transition: opacity 120ms ease;
}

.sparkline:hover .chart-point,
.combined-chart-svg:hover .chart-point,
.chart-point:hover {
  opacity: 0.9;
}

.resource-trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.fs-focus-header {
  margin-top: 4px;
}

.filesystem-charts {
  margin: 10px 0 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.large-files-panel {
  margin-bottom: 12px;
}

.large-files-panel #largeFilesMeta {
  font-size: 11px;
  white-space: nowrap;
}

.large-files-body {
  display: grid;
  gap: 8px;
}

.large-files-fs {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.large-files-fs > summary {
  cursor: pointer;
  padding: 8px 10px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.large-files-fs > summary span {
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}

.large-files-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.large-files-table th:first-child {
  width: 100%;
}

.large-files-table td.lf-row-cell {
  padding-top: 8px;
  padding-bottom: 8px;
}

.large-file-path {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.4;
}

.large-file-path-dir {
  color: var(--muted);
}

.large-file-path-name {
  color: var(--text);
  font-weight: 700;
}

.large-file-meta-row {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--muted);
}

.large-file-meta-row strong {
  color: var(--text);
  font-weight: 600;
}

.fs-chart-card {
  border: 1px solid #d4dfec;
  border-radius: 10px;
  background: radial-gradient(circle at 0% 0%, #edf7ff 0%, #ffffff 44%);
  padding: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.fs-chart-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 12px 26px rgba(30, 64, 175, 0.14);
}

.fs-chart-card header,
.fs-chart-card footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.fs-chart-card header strong {
  font-size: 12px;
}

.fs-chart-card header span,
.fs-chart-card footer span {
  font-size: 11px;
  color: var(--muted);
}

.trend-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  padding: 10px;
  display: grid;
  gap: 4px;
}

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

.trend-card strong {
  font-size: 12px;
}

.trend-card span {
  font-size: 11px;
  color: var(--muted);
}

.trend-ai-btn {
  min-height: 24px;
  padding: 0 10px;
  font-size: 11px;
  white-space: nowrap;
}

.trend-current {
  white-space: nowrap;
}

.trend-card .trend-stand {
  font-size: 9px;
  color: #90a0b2;
  font-weight: 400;
  opacity: 0.85;
  white-space: nowrap;
}

.trend-hint {
  margin-top: 4px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #fffbea;
  border: 1px solid #f0c040;
  color: #7a5c00;
  font-size: 10px;
  line-height: 1.5;
}

.trend-hint code {
  background: rgba(0,0,0,0.07);
  border-radius: 3px;
  padding: 1px 3px;
  font-size: 9.5px;
  font-family: monospace;
}

.ai-troubleshoot-inner {
  width: min(980px, 100%);
}

.ai-troubleshoot-body {
  display: grid;
  gap: 10px;
}

.ai-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-block h5 {
  margin: 0 0 6px;
  font-size: 13px;
}

.ai-block p,
.ai-block li {
  font-size: 12px;
  line-height: 1.45;
}

.ai-block ul {
  margin: 0;
  padding-left: 18px;
}

.ai-code-grid {
  display: grid;
  gap: 8px;
}

.ai-code-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 8px;
}

.ai-code-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.ai-code-card header span {
  font-size: 11px;
  color: var(--muted);
}

.ai-code-card p {
  margin: 0 0 6px;
}

.ai-code-card pre {
  margin: 0;
  border-radius: 6px;
  padding: 8px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
}

.ai-code-card code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.alerts-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  margin-bottom: 14px;
}

.global-alerts-panel {
  background: linear-gradient(180deg, #f6fbff 0%, #f0f8ff 100%);
}

.global-alerts-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.global-alerts-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
}

.global-alerts-controls select {
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  background: #fff;
}

.alerts-panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.global-host-cell {
  display: grid;
  gap: 2px;
}

.global-host-label {
  font-size: 13px;
  font-weight: 400;
  color: #1e293b;
  line-height: 1.1;
}

.global-host-customer {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.1;
}

.global-hostname-sub {
  font-size: 11px;
  color: #64748b;
  line-height: 1.1;
}

.host-config-changes-wrap table th:nth-child(1),
.host-config-changes-wrap table td:nth-child(1) {
  width: 18%;
  min-width: 120px;
}

.host-config-changes-wrap table th:nth-child(2),
.host-config-changes-wrap table td:nth-child(2) {
  width: 38%;
  min-width: 240px;
}

.host-config-changes-wrap table th:nth-child(3),
.host-config-changes-wrap table td:nth-child(3) {
  width: 22%;
  min-width: 160px;
}

.host-config-changes-wrap table th:nth-child(4),
.host-config-changes-wrap table td:nth-child(4) {
  width: 22%;
  min-width: 160px;
}

.host-config-changes-wrap table td:nth-child(3),
.host-config-changes-wrap table td:nth-child(4) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.host-config-main-value {
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.host-config-main-value strong {
  line-height: 1.15;
}

.host-config-changes-wrap table tbody tr {
  height: auto;
}

.host-config-changes-wrap table td {
  padding: 3px 6px;
  vertical-align: top;
  line-height: 1.2;
  font-size: 12px;
}

.host-config-change-subline {
  display: block;
  margin-top: 0;
  font-size: 11px;
  color: #64748b;
  font-weight: normal;
  white-space: normal;
  line-height: 1.15;
}

.host-config-changes-groups {
  display: grid;
  gap: 10px;
}

.host-config-change-group {
  border: 1px solid #d9e5f2;
  border-radius: 10px;
  background: #f9fbff;
}

.host-config-change-summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.host-config-change-summary::before {
  content: "▶";
  display: inline-block;
  width: 16px;
.brand-session-badge {
  background: #e0f2fe;
  color: #0c4a6e;
  border: 1px solid #bae6fd;
  min-width: 150px;
  justify-content: center;
}
.brand-session-badge::before {
  content: "⏳";
}
  font-size: 10px;
  text-align: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
body[data-theme="dark"] .brand-session-badge {
  background: #0f2f44;
  color: #cbe9ff;
  border-color: #1d4f6c;
}
}

.host-config-change-group[open] > .host-config-change-summary::before {
  transform: rotate(90deg);
}

.host-config-change-summary::-webkit-details-marker {
  display: none;
}

.host-config-change-summary::marker {
  content: "";
}

.host-config-change-count {
  margin-left: auto;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.host-config-change-group .host-config-changes-wrap {
  padding: 0 8px 8px;
}

.host-config-change-subline {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}

.host-config-change-date-group {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f1f5f9;
  margin-bottom: 12px;
}

.host-config-change-date-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  background: #e2e8f0;
  border-radius: 8px;
}

.host-config-change-date-summary::before {
  content: "▼";
  display: inline-block;
  width: 16px;
  font-size: 10px;
  text-align: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.host-config-change-date-group[open] > .host-config-change-date-summary::before {
  transform: rotate(180deg);
}

.host-config-change-date-summary::-webkit-details-marker {
  display: none;
}

.host-config-change-date-summary::marker {
  content: "";
}

.host-config-date-label {
  color: #1e293b;
  font-size: 13px;
}

.host-config-date-count {
  margin-left: auto;
  font-size: 11px;
  color: #475569;
}

.host-config-date-group-content {
  padding: 8px;
  display: grid;
  gap: 8px;
}

.host-config-country-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 4px;
  padding: 0;
}

.host-config-country-flag {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.22);
}

.alert-id-sub {
  color: #94a3b8;
  font-style: italic;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-open {
  color: #9a3412;
  background: #ffedd5;
}

.status-resolved {
  color: #475569;
  background: #e2e8f0;
}

.severity-warning {
  color: #854d0e;
  background: #fef3c7;
}

.severity-critical {
  color: #991b1b;
  background: #fee2e2;
}

/* Sticky panel headers within scroll areas */
.overview-scroll-panel .analysis-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fbff;
  padding-top: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.overview-scroll-panel .analysis-panel .analysis-header {
  background: #f3f8ff;
}

.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.analysis-header h4 {
  margin: 0;
  font-size: 14px;
}

.delta-up {
  color: #c2410c;
  font-weight: 600;
}

.delta-down {
  color: #1d4ed8;
  font-weight: 600;
}

.pager button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.report-subtable {
  table-layout: fixed;
}

.report-subtable td:last-child,
.report-subtable th:last-child {
  width: 44%;
}

.sap-addon-subtable th {
  font-family: var(--kv-label-family);
  font-size: var(--kv-label-size);
  font-weight: var(--kv-label-weight);
  letter-spacing: var(--kv-label-letter);
  color: var(--kv-label-color);
}

.sap-addon-subtable td {
  font-family: var(--kv-label-family);
  font-size: 11px;
  font-weight: 400;
  color: var(--text);
}

.sap-addon-subtable td:last-child {
  font-family: var(--kv-value-family);
  font-size: var(--kv-value-size);
  font-weight: var(--kv-value-weight);
  color: var(--kv-value-color);
}

.containers-table {
  table-layout: auto;
  width: 100%;
}

.containers-table th:nth-child(1),
.containers-table td:nth-child(1) { width: 12%; }

.containers-table th:nth-child(2),
.containers-table td:nth-child(2) { width: 26%; word-break: break-all; }

.containers-table th:nth-child(3),
.containers-table td:nth-child(3) { width: 9%; }

.containers-table th:nth-child(4),
.containers-table td:nth-child(4) { width: 9%; }

.containers-table th:nth-child(5),
.containers-table td:nth-child(5) { width: 9%; text-align: center; }

.containers-table th:nth-child(6),
.containers-table td:nth-child(6) { width: 35%; }

.report-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.report-header-meta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  align-self: center;
}

.report-sap-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 0;
  align-self: center;
  width: 100%;
}

.report-sap-kpi-card {
  border: 1px solid #c9d6e6;
  border-radius: 12px;
  background: linear-gradient(180deg, #f3f5f7 0%, #eceff3 100%);
  padding: 7px 10px;
  min-height: 62px;
  box-sizing: border-box;
}

.report-sap-kpi-card h4 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #607892;
  line-height: 1;
}

.report-sap-kpi-card p {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  color: #16324e;
}


@media (max-width: 980px) {
  .report-header {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .report-sap-kpi-row {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    width: 100%;
  }

  .report-header-meta {
    align-items: flex-start;
  }

  .report-sap-kpi-card p {
    font-size: 20px;
  }

}

@media (max-width: 760px) {
  .report-sap-kpi-row {
    grid-template-columns: 1fr;
  }

  .report-sap-kpi-card {
    min-height: 58px;
  }

  .report-sap-kpi-card p {
    font-size: 18px;
  }

}

.report-license-panel {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #b9d7f7;
  border-radius: 10px;
  background: linear-gradient(180deg, #f5faff 0%, #eef6ff 100%);
  align-self: flex-start;
}

.report-license-title {
  display: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4f91;
  margin-bottom: 4px;
}

.report-license-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
}

.report-license-column {
  display: grid;
  gap: 3px;
}

.report-license-item {
  margin: 0;
  display: flex;
  gap: 1px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.report-license-item strong {
  flex: 0 0 96px;
  font-size: 9px;
  font-weight: 500;
  color: #3e5f8d;
  white-space: nowrap;
}

.report-license-item span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #122038;
  font-size: 9px;
  font-weight: 700;
}

.report-license-panel--header {
  padding: 10px 12px;
}

.report-license-meta {
  margin: 3px 0 0;
  font-size: 8px;
  color: #5f78a0;
}

.report-license-meta span {
  font-weight: 600;
}

.sap-hana-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.sap-b1-chip {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #ea580c;
}

.hana-chip {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #ea580c;
}

.hana-sid-chip {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #ea580c;
}

body[data-theme="dark"] .sap-b1-chip {
  background: rgba(234, 88, 12, 0.15);
  color: #fb923c;
  border-color: #ea580c;
}

body[data-theme="dark"] .hana-chip {
  background: rgba(234, 88, 12, 0.15);
  color: #fb923c;
  border-color: #ea580c;
}

body[data-theme="dark"] .hana-sid-chip {
  background: rgba(234, 88, 12, 0.15);
  color: #fb923c;
  border-color: #ea580c;
}

body[data-theme="dark"] .report-license-panel {
  border-color: #345c85;
  background: linear-gradient(180deg, #102033 0%, #0d1a2b 100%);
}

body[data-theme="dark"] .report-sap-kpi-card {
  border-color: #355072;
  background: linear-gradient(180deg, #1a2e49 0%, #14263f 100%);
}

body[data-theme="dark"] .report-sap-kpi-card h4 {
  color: #9db3cc;
}

body[data-theme="dark"] .report-sap-kpi-card p {
  color: #d4e6fb;
}

body[data-theme="dark"] .report-license-title {
  color: #8ec1f1;
}

body[data-theme="dark"] .report-license-item strong {
  color: #9ec3ea;
}

body[data-theme="dark"] .report-license-item span {
  color: #d8e4f3;
}

body[data-theme="dark"] .report-license-meta {
  color: #94b0d1;
}

@media (max-width: 1100px) {
  .mini-chart-grid,
  .resource-trend-grid,
  .filesystem-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .brand-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .brand-text h1 {
    white-space: normal;
  }

  .brand-user {
    width: 100%;
    order: 3;
    justify-content: flex-end;
  }

  .overview-controls {
    justify-content: stretch;
  }

  .chart-range-control {
    width: 100%;
    justify-content: space-between;
  }

  .chart-range-control select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .app-logo {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }

  .brand-partner-logo {
    width: 80px;
    height: 80px;
    flex-basis: 80px;
  }

  .filesystem-charts {
    grid-template-columns: 1fr;
  }
}

.delivery-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  vertical-align: middle;
  border: 1px solid transparent;
}

.delivery-chip.live {
  color: #0f766e;
  background: #ccfbf1;
  border-color: #5eead4;
}

.delivery-chip.delayed {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fdba74;
}

.report-time {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.18;
  text-align: right;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.report-time-date,
.report-time-clock {
  display: block;
}

.report-time-clock {
  font-size: 10px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 4px 16px;
  margin-bottom: 8px;
}

.meta-grid p {
  margin: 0;
  display: flex;
  gap: 8px;
  line-height: 1.25;
}

.meta-grid strong {
  min-width: 90px;
  color: var(--muted);
  font-size: 12px;
}

.meta-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.meta-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  --meta-chip-bg: #e8edf5;
  --meta-chip-text: #4a5568;
}

.meta-groups .meta-group:nth-child(1) {
  --meta-chip-bg: #dbeafe;
  --meta-chip-text: #1e40af;
}

.meta-groups .meta-group:nth-child(2) {
  --meta-chip-bg: #d1fae5;
  --meta-chip-text: #065f46;
}

.meta-groups .meta-group:nth-child(3) {
  --meta-chip-bg: #dcfce7;
  --meta-chip-text: #166534;
}

.meta-groups .meta-group:nth-child(4) {
  --meta-chip-bg: #ede9fe;
  --meta-chip-text: #5b21b6;
}

.meta-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-group-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-group-item {
  margin: 0;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  column-gap: 6px;
  align-items: start;
  line-height: 1.25;
  font-size: 13px;
}

.meta-group-item strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--kv-value-color);
  font-family: var(--kv-value-family);
  font-size: var(--kv-value-size);
  font-weight: var(--kv-value-weight);
  letter-spacing: normal;
  min-width: 0;
}

body[data-theme="dark"] .meta-groups .meta-group:nth-child(1) {
  --meta-chip-bg: #1e3a8a;
  --meta-chip-text: #bfdbfe;
}

body[data-theme="dark"] .meta-groups .meta-group:nth-child(2) {
  --meta-chip-bg: #064e3b;
  --meta-chip-text: #a7f3d0;
}

body[data-theme="dark"] .meta-groups .meta-group:nth-child(3) {
  --meta-chip-bg: #14532d;
  --meta-chip-text: #bbf7d0;
}

body[data-theme="dark"] .meta-groups .meta-group:nth-child(4) {
  --meta-chip-bg: #4c1d95;
  --meta-chip-text: #ddd6fe;
}

.meta-group-item > span {
  min-width: 0;
}

@media (max-width: 1100px) {
  .meta-group-item {
    grid-template-columns: 124px minmax(0, 1fr);
  }
}

.meta-group-item span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  font-family: var(--kv-value-family);
  font-size: var(--kv-value-size);
  font-weight: var(--kv-value-weight);
  color: var(--kv-value-color);
}

.meta-group-item span strong {
  font-size: inherit;
  color: inherit;
}

.detail-cards {
  display: grid;
  gap: 12px;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: box-shadow 200ms ease;
}

.detail-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.06);
}

.detail-card h4 {
  margin: 0 0 4px;
  font-size: 13px;
}

.report-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.report-section-head h4 {
  margin: 0;
}

.report-section-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-card-collapsible {
  padding: 0;
  overflow: hidden;
}

.detail-card-collapsible > summary {
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-card-collapsible > summary::before {
  content: "▶";
  font-size: 10px;
  color: #64748b;
  transition: transform 0.18s ease;
  display: inline-block;
}

.detail-card-collapsible[open] > summary::before {
  transform: rotate(90deg);
}

.detail-card-collapsible[open] > summary {
  border-bottom: 1px solid var(--line);
}

.detail-card-collapsible > *:not(summary) {
  padding: 10px;
}

.report-card h4 {
  margin: 6px 0 4px;
  font-size: 13px;
}

.sap-b1-card {
  border: 1px solid #93c5fd;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.sap-hana-databases-card {
  display: flex;
  flex-direction: column;
}

.sap-b1-scroll-region {
  max-height: min(72vh, 860px);
  overflow-y: auto;
  padding-right: 4px;
}

.sap-hana-databases-scroll {
  max-height: min(60vh, 720px);
  overflow-y: auto;
  padding-right: 4px;
}

.sap-hana-databases-discovery {
  border: 1px solid #d4e4f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  overflow: hidden;
  margin-top: 8px;
}

.sap-hana-databases-discovery > summary {
  cursor: pointer;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a5f;
  user-select: none;
  list-style: none;
}

.sap-hana-databases-discovery > summary::-webkit-details-marker {
  display: none;
}

.sap-hana-databases-discovery > summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 8px;
  font-size: 10px;
  color: #64748b;
  transform: translateY(-1px);
}

.sap-hana-databases-discovery[open] > summary::before {
  content: "▼";
}

.sap-b1-grid {
  display: grid;
  gap: 10px;
}

.sap-b1-item {
  border: 1px solid #d4e4f7;
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.sap-b1-item header {
  font-size: 12px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 6px;
}

.sap-b1-path {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #334155;
  word-break: break-word;
}

.sap-b1-raw-output {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d4e4f7;
  background: #f8fbff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.sap-b1-inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.sap-b1-inline-badge.ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.sap-b1-inline-badge.warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.sap-b1-inline-badge.muted {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}

.sap-path-full {
  white-space: normal;
}

.sap-path-dir {
  color: #64748b;
}

.sap-path-name {
  color: #0f172a;
  font-weight: 700;
  background: #e0ecff;
  border-radius: 4px;
  padding: 0 4px;
}

.sap-b1-size-row {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.sap-b1-size-label {
  font-family: var(--kv-label-family);
  font-size: var(--kv-label-size);
  font-weight: var(--kv-label-weight);
  letter-spacing: var(--kv-label-letter);
  color: var(--kv-label-color);
}

.sap-b1-size-label--bold {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.sap-b1-size-value {
  font-family: var(--kv-value-family);
  font-size: var(--kv-value-size);
  font-weight: var(--kv-value-weight);
  color: var(--kv-value-color);
}

.sap-b1-size-value--bold {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.cron-details {
  border: 1px solid #d4e4f7;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  overflow: hidden;
  margin-top: 4px;
}

.cron-details summary {
  font-size: 12px;
  font-weight: 600;
  color: #1e3a5f;
  padding: 4px 10px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cron-details summary::before {
  content: "▶";
  font-size: 10px;
  color: #64748b;
  transition: transform 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  transform-origin: center;
}

.cron-details[open] summary::before {
  transform: rotate(90deg);
}

.cron-content {
  margin: 0;
  border-top: 1px solid #d4e4f7;
  font-size: 12px;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow-y: auto;
}

[data-theme="dark"] .cron-details {
  border-color: #2d4a6e;
  background: #1a2744;
}

[data-theme="dark"] .cron-content {
  border-color: #2d4a6e;
}

.sap-b1-raw-details {
  border: 1px solid #d4e4f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  overflow: hidden;
}

.sap-b1-admin-only-subsection {
  border-left: 3px solid #f59e0b;
}

.sap-b1-admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #9a4f07;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* Inside the combined card: flush dividers, no inner card borders */
.sap-b1-combined-card .sap-b1-raw-details {
  border: none;
  border-top: 1px solid #e2ecf8;
  border-radius: 0;
  background: transparent;
}

.sap-b1-combined-card .sap-b1-raw-details:first-of-type {
  margin-top: 8px;
}

.sap-b1-combined-card .sap-b1-sub-details {
  margin-left: 14px;
}

.sap-b1-combined-card .sap-b1-sub-details > .sap-b1-raw-summary {
  padding-left: 10px;
}

.sap-b1-combined-card .sap-b1-raw-details .sap-b1-raw-output {
  border-top: 1px solid #e2ecf8;
  border-radius: 0;
}

.sap-b1-raw-summary {
  font-size: 12px;
  font-weight: 700;
  color: #1e3a5f;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sap-b1-raw-summary::-webkit-details-marker {
  display: none;
}

.sap-b1-raw-summary::marker {
  content: "";
}

.sap-b1-raw-summary::before {
  content: "▶";
  font-size: 10px;
  color: #64748b;
  transition: transform 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  transform-origin: center;
}

.sap-b1-raw-details[open] .sap-b1-raw-summary::before {
  transform: rotate(90deg);
}

.sap-b1-raw-details .sap-b1-raw-output {
  margin: 0;
  border: none;
  border-top: 1px solid #d4e4f7;
  border-radius: 0 0 8px 8px;
}

.sap-b1-raw-details > .terminal-viewer-section {
  border-top: 1px solid #d4e4f7;
}

.sap-b1-combined-card .sap-b1-raw-details > .terminal-viewer-section {
  border-top-color: #e2ecf8;
}

.sap-b1-raw-details > .terminal-viewer-section .count.compact {
  margin-top: 2px;
}

.sap-vmap-terminal-section {
  padding-top: 6px;
}

.sap-vmap-terminal-wrap {
  margin: 0;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #050b1a;
  max-height: 420px;
  overflow: auto;
}

.sap-vmap-terminal-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.45;
  color: #dbeafe;
}

.sap-vmap-terminal-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  background: #0b1326;
  color: #93c5fd;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  border-bottom: 1px solid #1e293b;
}

.sap-vmap-terminal-table tbody td {
  padding: 6px 12px;
  border-bottom: 1px solid #1e293b;
  white-space: nowrap;
  color: #dbeafe;
}

.sap-vmap-terminal-table tbody tr:nth-child(odd) td {
  background: #0b1428;
}

.sap-vmap-terminal-table tbody tr:nth-child(even) td {
  background: #0d1730;
}

.sap-vmap-terminal-table tbody tr:last-child td {
  border-bottom: none;
}

.sap-vmap-terminal-table .sap-vmap-col-build {
  color: #f472b6;
  font-weight: 700;
}

.sap-vmap-terminal-table .sap-vmap-col-feature {
  color: #bfdbfe;
}

.sap-vmap-terminal-table .sap-vmap-col-patch {
  color: #93c5fd;
}

.sap-vmap-terminal-table .sap-vmap-col-release {
  color: #fb923c;
}

.sap-license-list-wrap {
  padding: 8px 12px 10px;
  border-top: 1px solid #e2ecf8;
}

.sap-license-list {
  display: grid;
  gap: 4px;
}

.sap-license-list-item {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sap-license-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.15;
  min-width: 2.2em;
  text-align: right;
  flex-shrink: 0;
}

.sap-license-list-item strong {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: inherit;
  line-height: 1.15;
}

.sap-license-raw-type {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: #94a3b8;
}

.sap-license-list-meta {
  margin: 6px 0 10px;
  font-size: 10px;
  color: #5f78a0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sap-license-list-meta span {
  font-weight: 600;
}

.sap-license-location-hint {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.35;
  color: #6f86a7;
}

.sap-license-location-hint p {
  margin: 4px 0 0;
}

.sap-license-location-hint strong {
  color: #5f78a0;
  font-weight: 700;
}

.sap-license-location-hint code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: #516b8f;
}

.sap-vmap-copy-btn {
  float: right;
  margin-left: 12px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  line-height: 1.6;
}

.sap-vmap-copy-btn:hover {
  background: #dbeafe;
}

.sap-vmap-table td.sap-vmap-build {
  font-family: monospace;
  font-size: 12px;
}

.sap-vmap-table td.sap-vmap-date {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.vmap-input {
  border: 1px solid #c8d9ec;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 12px;
  background: #f8fbff;
  color: #1a2e44;
}

.vmap-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
}

.vmap-del-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  padding: 0 4px;
}

.vmap-del-btn:hover {
  opacity: 1;
}

.customer-notif-panel {
  margin-top: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 10px 14px;
  background: #f8fafc;
}

.customer-notif-panel summary {
  list-style: none;
  user-select: none;
}

.customer-notif-panel summary::-webkit-details-marker {
  display: none;
}

.alarm-settings-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.alarm-settings-group .settings-label {
  flex: 0 0 260px;
  font-size: 12px;
  color: #475569;
}

.alarm-settings-group .settings-input {
  flex: 1;
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: #1e293b;
  box-sizing: border-box;
}

.fs-table {
  margin-top: 0;
  table-layout: auto;
}

.fs-table .fs-col-mountpoint {
  width: 16%;
  min-width: 140px;
}

.fs-table .fs-col-filesystem {
  width: 13%;
  min-width: 115px;
}

.fs-table .fs-col-type {
  width: 6%;
  min-width: 50px;
}

.fs-table .fs-col-size {
  width: 10%;
  min-width: 95px;
}

.fs-table .fs-col-usage {
  width: 17%;
  min-width: 155px;
}

.fs-bar-cell {
  min-width: 150px;
}

.fs-bar-wrap {
  display: inline-block;
  width: 110px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 4px;
}

body[data-theme="dark"] .fs-bar-wrap {
  background: #334155;
}

.fs-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.fs-pct-label {
  font-size: 11px;
  color: var(--muted);
  vertical-align: middle;
}

.fs-size-cell,
.fs-avail-cell {
  white-space: nowrap;
}

/* ---- Database section ---- */
.db-instance-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 10px;
  font-size: 12px;
}
.db-meta-item {
  color: var(--kv-value-color);
  font-family: var(--kv-value-family);
  font-size: var(--kv-value-size);
  font-weight: var(--kv-value-weight);
}

.db-meta-item > strong,
.db-diag-item > strong {
  font-family: var(--kv-label-family);
  font-size: var(--kv-label-size);
  font-weight: var(--kv-label-weight);
  letter-spacing: var(--kv-label-letter);
  color: var(--kv-label-color);
}
.db-diag-info {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--bg-alt);
  border-left: 3px solid #8b5cf6;
  border-radius: 2px;
  font-size: 11px;
}
.db-diag-label {
  margin: 0 0 6px 0;
  font-weight: 600;
  color: #8b5cf6;
}
.db-diag-collapsible > .db-diag-label {
  cursor: pointer;
  list-style: none;
  margin: 0;
}
.db-diag-collapsible > .db-diag-label::-webkit-details-marker {
  display: none;
}
.db-diag-collapsible > .db-diag-label::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transition: transform 120ms ease;
}
.db-diag-collapsible[open] > .db-diag-label::before {
  transform: rotate(90deg);
}
.db-diag-collapsible > .db-diag-item:first-of-type {
  margin-top: 6px;
}
.db-diag-item {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}
.db-diag-item code {
  background: var(--bg);
  padding: 1px 4px;
  border-radius: 2px;
  font-family: "Monaco", "Courier New", monospace;
  font-size: 10px;
}
.db-diag-snippet-label {
  margin: 10px 0 5px 0;
  font-weight: 600;
  color: var(--text);
}
.db-diag-sql {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 86%, #000 14%);
  overflow: auto;
}
.db-diag-sql code {
  display: block;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre;
  tab-size: 2;
  color: var(--text);
}
.db-size-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.db-size-hint-title {
  margin: 0 0 3px;
  font-weight: 600;
  color: var(--text);
}
.db-size-hint-text {
  margin: 0 0 6px;
}
.db-size-hint .terminal-viewer-section {
  padding: 2px 0 0;
}
.db-size-hint-terminal {
  padding: 10px 12px 12px;
  font-size: 11px;
  max-height: none;
}
.db-status-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.db-status-ok   { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.db-status-warn { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
.db-conn-error  { font-size: 12px; color: var(--muted); }
.db-sys-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}
.db-table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 12px; }
.db-table th { padding: 6px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.db-table td { padding: 5px 10px; border-bottom: 1px solid var(--line); }
.db-table .db-row-system td { color: var(--muted); }
.db-table .db-state-warn td { color: #b45309; }
.db-size-cell { white-space: nowrap; text-align: right; }
.db-bk-cell   { white-space: nowrap; font-size: 11px; }

.hana-db-table {
  table-layout: fixed;
}

.hana-db-table .hana-db-col-name {
  width: 35%;
}

.hana-db-table .hana-db-col-company {
  width: 45%;
}

.hana-db-table .hana-db-col-loc {
  width: 20%;
}

body[data-theme="dark"] .db-status-ok   { background: #14532d; color: #86efac; border-color: #166534; }
body[data-theme="dark"] .db-status-warn { background: #451a03; color: #fcd34d; border-color: #78350f; }
body[data-theme="dark"] .db-sys-badge   { background: #1e1b4b; color: #a5b4fc; }

.muted {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 7px 10px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  color: var(--text);
  background: #f0f4fa;
  font-weight: 600;
  padding: 9px 10px;
}

body[data-theme="dark"] th {
  background: #1a2540;
  color: var(--text);
}

@media (max-width: 760px) {
  .meta-groups {
    grid-template-columns: 1fr;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-actions {
    justify-content: flex-start;
  }

  .sidebar-card-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title title"
      "reset count";
  }

  .layout {
    grid-template-columns: 1fr;
  }

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

  .brand-tools {
    padding: 8px 10px;
  }

  .host-search-box {
    min-width: 0;
  }

  .host-filter-control {
    min-width: 0;
  }

  .host-filter-control-icons {
    min-width: 0;
  }

  .icon-filter-chips {
    gap: 5px;
  }

  .hosts-column-scroll {
    position: static;
    top: auto;
    max-height: none;
  }

  .host-list-shell,
  .host-list {
    min-height: auto;
  }

  .host-list {
    overflow: visible;
    padding-right: 0;
  }

  .overview-scroll-panel {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .report-header {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .report-license-columns {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .report-license-item strong {
    flex-basis: 96px;
  }

  .analysis-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .resource-trend-grid {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    width: 100%;
  }

  .panel-actions .header-stat-chip {
    min-width: 126px;
    min-height: 56px;
    padding: 6px 8px;
  }

  .panel-actions .header-stat-chip-license {
    min-width: 100%;
    height: 56px !important;
    min-height: 56px !important;
    padding: 6px 8px !important;
    display: flex !important;
    border-left-color: #fbbf24 !important;
  }

  .header-license-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 12px;
  }

  .header-chip-count {
    font-size: 1.45rem;
  }

  .alarm-settings-grid {
    grid-template-columns: 1fr;
  }

  .alarm-settings-grid-span2 {
    grid-column: span 1;
  }

  .alarm-settings-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alarm-settings-card--wide {
    grid-column: span 2;
  }

  .global-alerts-controls {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-license-grid {
    grid-template-columns: 1fr;
  }

  .alarm-settings-cards {
    grid-template-columns: 1fr;
  }

  .alarm-settings-card--wide {
    grid-column: span 1;
  }

  .alarm-settings-grid-span2 {
    grid-column: span 1;
  }
}

/* ── Custom scrollbars (thin & subtle) ──────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.inactive-hosts-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: #f5f9ff;
  border-radius: 8px;
}

.search-input-compact {
  flex: 1;
  max-width: 300px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid #c9d8ec;
  border-radius: 4px;
  background: white;
  color: #1f2937;
}

.search-input-compact::placeholder {
  color: #94a3b8;
}

.btn-secondary-compact {
  padding: 4px 10px;
  font-size: 12px;
  height: auto;
  min-height: 24px;
}

.inactive-hosts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ih-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.ih-empty-icon {
  font-size: 36px;
  color: #22c55e;
}

.ih-host-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--panel);
  align-items: start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10), 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: box-shadow 180ms ease, transform 180ms ease;
  cursor: pointer;
}

.ih-host-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14), 0 16px 36px rgba(0, 0, 0, 0.10);
  transform: translateY(-3px);
}

.ih-host-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.ih-host-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.ih-host-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.ih-host-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ih-hostname {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.ih-hostname-sub {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.ih-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.ih-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ih-last-seen {
  color: var(--text);
  font-weight: 500;
}

.ih-hours-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.ih-hours-badge.critical {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.ih-alerts-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #c0cfe0;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #8fa3bc;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #c0cfe0 transparent;
}

body[data-theme="dark"] th {
  background: #1a2540;
  color: var(--text);
}

body[data-theme="dark"] .brand-header {
  background: linear-gradient(135deg, #18273f 0%, #142238 100%);
  border-color: #2a3c59;
}

body[data-theme="dark"] .brand-tools,
body[data-theme="dark"] .alarm-settings-panel,
body[data-theme="dark"] .settings-page,
body[data-theme="dark"] .subview-tabs-shell,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .report-card,
body[data-theme="dark"] .meta-group,
body[data-theme="dark"] .detail-card,
body[data-theme="dark"] .trend-card,
body[data-theme="dark"] .alerts-panel,
body[data-theme="dark"] .brand-tools,
body[data-theme="dark"] .host-tools,
body[data-theme="dark"] .host-interests-list,
body[data-theme="dark"] .agent-update-status-row,
body[data-theme="dark"] .sap-b1-raw-details,
body[data-theme="dark"] .cron-details {
  background: linear-gradient(180deg, #152035 0%, #111b2f 100%);
  border-color: #2a3c59;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .sap-b1-admin-only-subsection {
  border-left-color: #f59e0b;
}

body[data-theme="dark"] .sap-b1-admin-badge {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.22);
  color: #fdba74;
}

body[data-theme="dark"] .sap-b1-card {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #10233f 0%, #0f1d34 100%);
}

body[data-theme="dark"] .sap-license-list-wrap {
  border-top-color: #2d4a6e;
}

body[data-theme="dark"] .sap-license-list-item strong {
  color: #9ec3ea;
}

body[data-theme="dark"] .sap-license-count {
  color: #d8e4f3;
}

body[data-theme="dark"] .sap-license-raw-type {
  color: #6b8aad;
}

body[data-theme="dark"] .sap-license-list-meta {
  color: #94b0d1;
}

body[data-theme="dark"] .sap-license-location-hint {
  color: #7f95b5;
}

body[data-theme="dark"] .sap-license-location-hint strong {
  color: #a9c2e4;
}

body[data-theme="dark"] .sap-license-location-hint code {
  color: #c0d3ee;
}

body[data-theme="dark"] .sap-b1-item {
  border-color: #334155;
  background: linear-gradient(180deg, #152035 0%, #0b1628 100%);
}

body[data-theme="dark"] .sap-hana-databases-discovery {
  border-color: #2d4a6e;
  background: linear-gradient(180deg, #12213a 0%, #0f1c31 100%);
}

body[data-theme="dark"] .sap-hana-databases-discovery > summary {
  color: #d4e6fb;
}

body[data-theme="dark"] .sap-hana-databases-discovery > summary::before {
  color: #9eb7d4;
}

body[data-theme="dark"] .sap-b1-raw-summary {
  color: #d4e6fb;
}

body[data-theme="dark"] .sap-b1-raw-summary::before {
  color: #9eb7d4;
}

body[data-theme="dark"] .sap-b1-item header {
  color: #bfdbfe;
}

body[data-theme="dark"] .sap-b1-path {
  color: #cbd5e1;
}

body[data-theme="dark"] .sap-path-dir {
  color: #94a3b8;
}

body[data-theme="dark"] .sap-path-name {
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.28);
}

body[data-theme="dark"] .sap-b1-size-label {
  color: #94a3b8;
}

body[data-theme="dark"] .sap-b1-size-value {
  color: #e2e8f0;
}

body[data-theme="dark"] .terminal-token-comment {
  color: #7c93b6;
}

body[data-theme="dark"] .terminal-token-muted {
  color: #dbeafe;
}

body[data-theme="dark"] .terminal-token-heading {
  color: #f8fafc;
}

body[data-theme="dark"] .terminal-token-field {
  color: #93c5fd;
}

body[data-theme="dark"] .terminal-token-separator {
  color: #7c93b6;
}

body[data-theme="dark"] .terminal-token-key {
  color: #93c5fd;
}

body[data-theme="dark"] .terminal-token-system {
  color: #facc15;
}

body[data-theme="dark"] .terminal-token-path {
  color: #67e8f9;
}

body[data-theme="dark"] .terminal-token-date {
  color: #fdba74;
}

body[data-theme="dark"] .terminal-token-metric {
  color: #22d3ee;
}

body[data-theme="dark"] .terminal-token-version {
  color: #f9a8d4;
}

body[data-theme="dark"] .terminal-token-size {
  color: #c4b5fd;
}

body[data-theme="dark"] .terminal-token-info {
  color: #38bdf8;
}

body[data-theme="dark"] .terminal-token-good {
  color: #4ade80;
}

body[data-theme="dark"] .terminal-token-warn {
  color: #fbbf24;
}

body[data-theme="dark"] .terminal-token-bad {
  color: #f87171;
}

body[data-theme="dark"] .sap-b1-raw-details > .terminal-viewer-section {
  border-top-color: #2d4a6e;
}

body[data-theme="dark"] .sap-b1-combined-card .sap-b1-raw-details > .terminal-viewer-section {
  border-top-color: #2a3c59;
}

body[data-theme="dark"] .sap-vmap-terminal-wrap {
  border-color: #2d4a6e;
  background: #050b1a;
}

body[data-theme="dark"] .sap-vmap-terminal-table thead th {
  background: #081125;
  border-bottom-color: #233a5f;
}

body[data-theme="dark"] .sap-vmap-terminal-table tbody td {
  border-bottom-color: #233a5f;
  color: #dbeafe;
}

body[data-theme="dark"] .sap-vmap-terminal-table tbody tr:nth-child(odd) td {
  background: #0b1428;
}

body[data-theme="dark"] .sap-vmap-terminal-table tbody tr:nth-child(even) td {
  background: #0d1730;
}

body[data-theme="dark"] .detail-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .settings-page {
  background: linear-gradient(180deg, #131f34 0%, #101a2c 100%);
}

body[data-theme="dark"] .settings-page-header h3,
body[data-theme="dark"] .settings-subsection h5,
body[data-theme="dark"] .subtitle-meta,
body[data-theme="dark"] .auto-refresh-status,
body[data-theme="dark"] .count,
body[data-theme="dark"] .settings-helper-text,
body[data-theme="dark"] .chart-range-control,
body[data-theme="dark"] .alarm-settings-grid label,
body[data-theme="dark"] .login-card label,
body[data-theme="dark"] th {
  color: var(--muted);
}

body[data-theme="dark"] .settings-fieldset-label {
  color: #7fa0c0;
}

body[data-theme="dark"] .settings-logic-help-card {
  border-color: #2a3c59;
  background: linear-gradient(180deg, #162437 0%, #122033 100%);
}

body[data-theme="dark"] .settings-logic-help-card h6 {
  color: #d7e6f5;
}

body[data-theme="dark"] .settings-logic-help-list {
  color: #9db3c9;
}

body[data-theme="dark"] .settings-checkbox-group label:hover {
  background: #1a2b42;
}

body[data-theme="dark"] .login-card {
  border-color: #2a3c59;
  background: linear-gradient(180deg, #17253d 0%, #101a2d 100%);
  color: var(--text);
}

body[data-theme="dark"] .auto-refresh-interval-select {
  background: #17253d;
  border-color: #2a3c59;
  color: var(--text);
}

body[data-theme="dark"] .summary-strip {
  background: var(--panel);
  border-bottom-color: var(--line);
}

body[data-theme="dark"] .host-item-favorite {
  border-color: #d97706;
  background: linear-gradient(180deg, #1f1a08 0%, #181408 100%);
}

body[data-theme="dark"] .host-item-favorite:hover {
  border-color: #f59e0b;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.18);
}

body[data-theme="dark"] .chart-drill-header {
  background: linear-gradient(180deg, #162136 0%, #111b2f 100%);
  border-bottom-color: #2a3c59;
}

body[data-theme="dark"] .chart-drill-inner {
  background: #111b2f;
  border-color: #2a3c59;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] .login-card input,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background: #0f1829;
  color: var(--text);
  border-color: #355174;
}

body[data-theme="dark"] .header-stat-chip-alert {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

body[data-theme="dark"] .header-stat-chip-warn {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

body[data-theme="dark"] .header-stat-chip-inactive {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.4);
}

body[data-theme="dark"] .header-stat-chip-db-reports {
  background: rgba(74, 222, 128, 0.16);
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.34);
}

body[data-theme="dark"] .header-stat-chip-db-reports-hour {
  background: rgba(45, 212, 191, 0.16);
  color: #99f6e4;
  border-color: rgba(45, 212, 191, 0.34);
}

body[data-theme="dark"] .header-stat-chip-db-size {
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.34);
}

body[data-theme="dark"] .header-stat-chip-db-size-delta {
  background: rgba(251, 113, 133, 0.16);
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.34);
}

body[data-theme="dark"] .btn-secondary {
  background: linear-gradient(180deg, #1b2b45 0%, #14233a 100%);
  border-color: #345178;
  color: #d9e8ff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

body[data-theme="dark"] .btn-secondary:hover:not(:disabled) {
  background: #274168;
  border-color: #5d8bc4;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .btn-secondary-pill-compact {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

body[data-theme="dark"] .view-back-chip {
  border-color: #3f6493;
  background: linear-gradient(180deg, #203454 0%, #1a2b46 100%);
  color: #cbe4ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 14px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .view-back-chip:hover:not(:disabled) {
  border-color: #5d8bc4;
  background: linear-gradient(180deg, #274168 0%, #1f3453 100%);
}

@media (max-width: 760px) {
  .view-back-chip {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }
}

body[data-theme="dark"] .btn-icon:hover {
  background: #1e3352;
  border-color: #335987;
  color: #9cc3ff;
}

body[data-theme="dark"] .stat-chip {
  background: #13233a;
  color: #b8d0ec;
  border-color: #2f4a6e;
}

body[data-theme="dark"] .stat-chip.live {
  background: #103225;
  color: #89ddb4;
  border-color: #226948;
}

body[data-theme="dark"] .stat-chip.delayed {
  background: #3b2f12;
  color: #f7d083;
  border-color: #7f611f;
}

body[data-theme="dark"] .delivery-calc-button {
  border-color: #3f5f8a;
}

body[data-theme="dark"] .user-flag-pill.off,
body[data-theme="dark"] .oauth-state-pill.disconnected {
  background: #1f2f46;
  color: #a9bfd9;
}

body[data-theme="dark"] .view-tabs-shell {
  background: transparent;
  border-color: #2a3c59;
}
body[data-theme="dark"] .view-tabs .tab-button {
  color: #6888a8;
}
body[data-theme="dark"] .view-tabs .tab-button:hover:not(.active):not(.alert-active) {
  background: transparent;
  border-color: #4a6f9f;
  color: #9fb8d8;
  box-shadow: none;
}
body[data-theme="dark"] .view-tabs .tab-button.active {
  background: transparent;
  color: #93c5fd;
  border-color: #3b82f6;
  box-shadow: none;
}
body[data-theme="dark"] .overview-scroll-panel .analysis-header,
body[data-theme="dark"] .overview-scroll-panel .analysis-panel .analysis-header {
  background: #16253b;
}

body[data-theme="dark"] table,
body[data-theme="dark"] th,
body[data-theme="dark"] td,
body[data-theme="dark"] .ih-host-card {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .ih-host-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 16px 36px rgba(0, 0, 0, 0.35);
}

/* ── Dark Mode: Host list items ───────────────────────────── */
body[data-theme="dark"] .host-item {
  border-color: #334d6e;
  background: linear-gradient(180deg, #1e3050 0%, #172543 100%);
}
body[data-theme="dark"] .host-item.host-item--env-prod {
  border-color: #4d6f97;
  background:
    radial-gradient(circle at 100% 0%, rgba(96, 165, 250, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(15, 23, 42, 0.35) 0%, transparent 55%),
    linear-gradient(180deg, #223a5d 0%, #1a2d4a 100%);
}

body[data-theme="dark"] .host-item-hidden {
  background: linear-gradient(180deg, #141e2f 0%, #111828 100%);
  border-color: #3d5578;
  border-style: dashed;
  opacity: 0.75;
}

body[data-theme="dark"] .host-item:hover {
  border-color: #5a82b8;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
}

body[data-theme="dark"] .host-item.selected {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #1a2f4a 0%, #162641 100%);
  box-shadow: inset 0 0 0 1px #3b82f6;
}
body[data-theme="dark"] .host-item.host-item--env-prod.selected {
  border-color: #4f91f8;
  background:
    radial-gradient(circle at 100% 0%, rgba(96, 165, 250, 0.24) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(15, 23, 42, 0.4) 0%, transparent 58%),
    linear-gradient(180deg, #26436a 0%, #1f3353 100%);
  box-shadow: inset 0 0 0 1px #4f91f8;
}

body[data-theme="dark"] .host-group-title {
  color: #7a9bbf;
}
.selected-host-meta-chip--env {
  font-weight: 900;
}
.selected-host-meta-chip--env-prod {
  border-color: #9fd7b8;
  background: #e9f8ef;
  color: #1d6a46;
}
.selected-host-meta-chip--env-test {
  border-color: #f1c28a;
  background: #fff2e2;
  color: #8a4c14;
}

body[data-theme="dark"] .host-group-toggle {
  border-color: #2a3c59;
  background: #111b2f;
  color: #a9c2dc;
}

body[data-theme="dark"] .host-group-toggle:hover {
  border-color: #4a6f9f;
  background: #1a2b42;
}

body[data-theme="dark"] .host-context-menu {
  background: #14223a;
  border-color: #2a3c59;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
}

body[data-theme="dark"] .host-context-menu-label {
  color: #a9bfd9;
  border-bottom-color: #2a3c59;
}

body[data-theme="dark"] .host-context-menu button {
  background: #1e1212;
  color: #f87171;
}

body[data-theme="dark"] .host-context-menu button:hover {
  background: #2e1a1a;
  border-color: #7f1d1d;
}

body[data-theme="dark"] .admin-sub-user-chip {
  background: #1e3352;
  color: #93c5fd;
}

body[data-theme="dark"] .admin-sub-user-chip.is-admin {
  box-shadow: inset 0 0 0 1px #3b5f8a;
}

body[data-theme="dark"] .host-value-chip--sap,
body[data-theme="dark"] .host-value-chip--hana,
body[data-theme="dark"] .host-value-chip--sid {
  border-color: rgba(147, 197, 253, 0.45);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.24) 0%, rgba(30, 64, 175, 0.28) 100%);
  color: #dbeafe;
}

body[data-theme="dark"] .host-value-chip--customer-title {
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

body[data-theme="dark"] .host-customer-line {
  color: #bfdbfe;
}

body[data-theme="dark"] .host-detail-line {
  color: #8fa8c4;
}

body[data-theme="dark"] .host-license-info-badge {
  opacity: 0.9;
}

body[data-theme="dark"] .host-license-hover-popup {
  border-color: #355171;
  border-left-color: #f59e0b;
  background: linear-gradient(180deg, #12253a 0%, #0f1f33 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

body[data-theme="dark"] .host-license-hover-head strong {
  color: #dbeafe;
}

body[data-theme="dark"] .host-license-hover-head > span,
body[data-theme="dark"] .host-license-hover-item span {
  color: #93aeca;
}

body[data-theme="dark"] .host-license-hover-item strong {
  color: #e5f0ff;
}

body[data-theme="dark"] .host-license-hover-types {
  border-top-color: #30455f;
}

body[data-theme="dark"] .host-license-hover-type-count-label,
body[data-theme="dark"] .host-license-hover-type-name-label {
  color: #93aeca;
}

body[data-theme="dark"] .host-license-hover-type-row {
  color: #b9cfe8;
}

body[data-theme="dark"] .host-license-hover-type-name {
  color: #b9cfe8;
}

body[data-theme="dark"] .host-license-hover-type-count {
  color: #fbbf24;
}

body[data-theme="dark"] .host-license-hover-type-raw {
  color: #8da7c3;
}

body[data-theme="dark"] .admin-alert-subscriptions-table tr.has-change td {
  background: #132235;
}

body[data-theme="dark"] .admin-sub-country-row td {
  background: #12233a;
  border-top-color: #274263;
  border-bottom-color: #274263;
}

body[data-theme="dark"] .admin-sub-country-title {
  color: #bfdbfe;
}

body[data-theme="dark"] .admin-sub-country-count {
  color: #94a3b8;
}

body[data-theme="dark"] .admin-alert-sub-controls label {
  color: #94a3b8;
}

body[data-theme="dark"] .admin-sub-cb {
  accent-color: #60a5fa;
}

body[data-theme="dark"] .host-meta-modal-grid label,
body[data-theme="dark"] .host-meta-new-customer label {
  color: #9fb3cc;
}

body[data-theme="dark"] .host-meta-new-customer {
  border-color: #2a3c59;
  background: #112036;
}

body[data-theme="dark"] .host-mini-action {
  border-color: #2a3c59;
  background: #111b2f;
  color: #7a9bbf;
}

body[data-theme="dark"] .host-mini-action:hover {
  border-color: #4a6f9f;
  background: #1e3352;
}

body[data-theme="dark"] .host-mini-action.favorite.active {
  color: #fbbf24;
  background: #2c2512;
  border-color: #d97706;
}

body[data-theme="dark"] .host-mini-action.visibility {
  color: #93c5fd;
  background: #10213c;
  border-color: #2f4c75;
}

body[data-theme="dark"] .host-mini-action.visibility:hover {
  border-color: #527fb8;
  background: #163258;
}

body[data-theme="dark"] .host-mini-action.visibility.active {
  color: #bfdbfe;
  background: #1d3b66;
  border-color: #5b8ccc;
}

body[data-theme="dark"] .chart-metrics-control {
  color: #a9bfd9;
}

body[data-theme="dark"] .chart-metrics-control label:hover {
  background: #1a2b42;
}

body[data-theme="dark"] .host-unmute-action {
  border-color: #2a3c59;
  background: #111b2f;
  color: #a9bfd9;
}

body[data-theme="dark"] .host-unmute-action:hover {
  border-color: #4a6f9f;
  background: #1e3352;
}

body[data-theme="dark"] .host-muted-section {
  border-top-color: #2a3c59;
}

body[data-theme="dark"] .host-muted-title {
  color: #9fb3cc;
}

/* ── Dark Mode: Host filters & search ─────────────────────── */
body[data-theme="dark"] .host-tools {
  background: #111b2f;
  border-color: #2a3c59;
}

body[data-theme="dark"] .host-tools > summary {
  color: #a9bfd9;
}

body[data-theme="dark"] .host-filter-control {
  color: #9fb3cc;
}

body[data-theme="dark"] .icon-filter-chip {
  border-color: #2a3c59;
  background: #111b2f;
  color: #a9bfd9;
}

body[data-theme="dark"] .icon-filter-chip:hover {
  border-color: #4a6f9f;
  background: #1a2b42;
}

body[data-theme="dark"] .icon-filter-chip.active {
  border-color: #3b82f6;
  background: #1a2f4a;
  color: #93c5fd;
  box-shadow: inset 0 0 0 1px #3b82f6;
}

body[data-theme="dark"] .search-input {
  background: #0f1829;
  border-color: #2a3c59;
}

body[data-theme="dark"] .search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ── Dark Mode: Analysis & chart panels ───────────────────── */
body[data-theme="dark"] .analysis-panel {
  background: linear-gradient(180deg, #131f34 0%, #101c30 100%);
  border-color: #2a3c59;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] #overviewFilesystemSection {
  background: #111b2f !important;
  border-color: #2a3c59 !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.25) !important;
}

body[data-theme="dark"] #overviewFilesystemSection .fs-focus-header {
  background: #1a2540;
  border-color: #2a3c59;
}

body[data-theme="dark"] #overviewFilesystemSection .fs-focus-header h4 {
  color: var(--text);
}

body[data-theme="dark"] #overviewFilesystemSection .detail-card {
  background: #151f35;
  border-color: #2a3c59;
}

body[data-theme="dark"] .alerts-panel {
  background: #111b2f;
  border-color: #2a3c59;
}

body[data-theme="dark"] .global-alerts-panel {
  background: linear-gradient(180deg, #131f34 0%, #101c30 100%);
}

body[data-theme="dark"] .global-alerts-controls {
  color: #9fb3cc;
}

body[data-theme="dark"] .mini-chart-card {
  background: linear-gradient(180deg, #131f34 0%, #111b2f 100%);
  border-color: #2a3c59;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .mini-chart-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.15);
}

body[data-theme="dark"] .sparkline {
  background: linear-gradient(180deg, rgba(19, 31, 52, 0.95) 0%, rgba(16, 24, 42, 0.8) 100%);
}

body[data-theme="dark"] .fs-chart-card {
  background: radial-gradient(circle at 0% 0%, #162136 0%, #111b2f 44%);
  border-color: #2a3c59;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .fs-chart-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.15);
}

body[data-theme="dark"] .trend-card {
  background: #131f34;
  border-color: #2a3c59;
}

body[data-theme="dark"] .large-files-fs {
  background: #131f34;
  border-color: #2a3c59;
}

body[data-theme="dark"] .trend-hint {
  background: #2a2200;
  border-color: #7a5c00;
  color: #ffd866;
}

body[data-theme="dark"] .trend-hint code {
  background: rgba(255,255,255,0.1);
}

body[data-theme="dark"] .chart-grid-line {
  stroke: #1e2f49;
}

body[data-theme="dark"] .chart-axis-line {
  stroke: #2a3c59;
}

body[data-theme="dark"] .chart-axis-label {
  fill: #7a9bbf;
}

/* ── Dark Mode: Critical Trends ───────────────────────────── */
body[data-theme="dark"] .ct-host-card {
  border-color: #2a3c59;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .ct-host-card-crit {
  border-color: #7f1d1d;
  box-shadow: 0 0 0 1px #991b1b, 0 4px 14px rgba(220, 38, 38, 0.15);
}

body[data-theme="dark"] .ct-host-card-warn {
  border-color: #78350f;
  box-shadow: 0 0 0 1px #92400e, 0 4px 14px rgba(245, 158, 11, 0.15);
}

body[data-theme="dark"] .ct-host-header {
  background: #131f34;
  border-bottom-color: #2a3c59;
}

body[data-theme="dark"] .ct-host-card-crit .ct-host-header {
  background: linear-gradient(180deg, #1f1212 0%, #1a1010 100%);
  border-bottom-color: #7f1d1d;
}

body[data-theme="dark"] .ct-host-card-warn .ct-host-header {
  background: linear-gradient(180deg, #1f1a0c 0%, #1a1508 100%);
  border-bottom-color: #78350f;
}

body[data-theme="dark"] .ct-hostname {
  color: #d9e8ff;
}

body[data-theme="dark"] .ct-row {
  border-bottom-color: #1e2f49;
}

body[data-theme="dark"] .ct-row-crit {
  background: #1a1010;
}

body[data-theme="dark"] .ct-row-warn {
  background: #1a1a0c;
}

body[data-theme="dark"] .ct-row-metric {
  color: #d9e8ff;
}

body[data-theme="dark"] .ct-bar-wrap {
  background: #1e2f49;
}

body[data-theme="dark"] .ct-critical-eta {
  color: #f87171;
  background: #2a1010;
  border-color: #7f1d1d;
}

/* ── Dark Mode: Tabs ──────────────────────────────────────── */
body[data-theme="dark"] .tab-button {
  color: #7a9bbf;
}

body[data-theme="dark"] .tab-button:hover:not(.active):not(.alert-active) {
  background: #1a2838;
  color: #9cb3cd;
  border-color: #2a3d54;
}

body[data-theme="dark"] .tab-button.active {
  background: linear-gradient(180deg, #1e3352 0%, #172843 100%);
  color: #93c5fd;
  border-color: #3b5f8a;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body[data-theme="dark"] .tab-button.alert-active:not(.active) {
  background: transparent;
  color: #f87171;
  border-color: #7f1d1d;
}

body[data-theme="dark"] .tab-button.tab-has-crit:not(.active) {
  color: #f87171;
}

body[data-theme="dark"] .tab-button.tab-has-warn:not(.active) {
  color: #fbbf24;
}

body[data-theme="dark"] .subview-tabs-shell {
  background: transparent;
  border-color: #2a3c59;
}
body[data-theme="dark"] .subview-tabs .tab-button {
  color: #6888a8;
  background: transparent;
  box-shadow: none;
}
body[data-theme="dark"] .subview-tabs .tab-button:hover:not(.active):not(.alert-active) {
  background: transparent;
  border-color: #4a6f9f;
  color: #9fb8d8;
  box-shadow: none;
}
body[data-theme="dark"] .subview-tabs .tab-button.active {
  background: transparent;
  color: #93c5fd;
  border-color: #3b82f6;
  box-shadow: none;
}

body[data-theme="dark"] .subview-tabs .tab-button.admin-only-tab {
  color: #fdba74;
  border-color: rgba(249, 115, 22, 0.32);
}

body[data-theme="dark"] .subview-tabs .tab-button.admin-only-tab:hover:not(.active):not(.alert-active) {
  color: #fed7aa;
  border-color: #f97316;
}

body[data-theme="dark"] .subview-tabs .tab-button.admin-only-tab.active {
  color: #fdba74;
  border-color: #f97316;
}

body[data-theme="dark"] .admin-tab-legend {
  color: #fdba74;
}

body[data-theme="dark"] .admin-tab-legend-swatch {
  background: linear-gradient(180deg, #fb923c 0%, #c2410c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ── Dark Mode: Brand / header elements ───────────────────── */
body[data-theme="dark"] .brand-user-badge {
  background: #1e3352;
  color: #93c5fd;
}

body[data-theme="dark"] .brand-logout-btn {
  background: #1f1212;
  color: #f87171;
  border-color: #7f1d1d;
}

body[data-theme="dark"] .brand-logout-btn:hover {
  background: #2e1a1a;
  border-color: #ef4444;
  color: #fca5a5;
}

body[data-theme="dark"] .theme-toggle {
  border-color: #3b5c84;
  background: linear-gradient(180deg, #1c3150 0%, #172a45 100%);
  color: #d4e6fb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .theme-toggle:hover {
  border-color: #5d86b8;
  background: #223a5c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

/* ── Dark Mode: Settings & misc ───────────────────────────── */
body[data-theme="dark"] .settings-subsection {
  border-top-color: #2a3c59;
}

body[data-theme="dark"] .alarm-settings-card {
  background: #152035;
  border-color: #2a3c59;
}

body[data-theme="dark"] .alarm-settings-card-title {
  color: #93c5fd;
}

body[data-theme="dark"] .host-interests-list {
  border-color: #2a3c59;
  background: #111b2c;
}

body[data-theme="dark"] .host-interest-item:hover {
  background: #1a2a42;
}

body[data-theme="dark"] .host-interest-name {
  color: #d9e8ff;
}

body[data-theme="dark"] .host-interest-customer {
  color: #fdba74;
  background: rgba(234, 88, 12, 0.15);
  border-color: rgba(234, 88, 12, 0.55);
}

body[data-theme="dark"] .host-interest-hostname {
  color: #8fa8c4;
}

body[data-theme="dark"] .host-interests-loaded-for {
  opacity: 0.92;
}

body[data-theme="dark"] .agent-update-status-row {
  background: #131f34;
  border-color: #2a3c59;
}

body[data-theme="dark"] .agent-update-status-row strong {
  color: #d9e8ff;
}

body[data-theme="dark"] .agent-update-status-row span {
  color: var(--muted);
}

body[data-theme="dark"] .global-host-label {
  color: #d9e8ff;
}

body[data-theme="dark"] .global-host-customer {
  color: #d9e8ff;
}

body[data-theme="dark"] .host-config-changes-wrap table td {
  color: #d9e8ff;
}

body[data-theme="dark"] .host-config-change-group {
  border-color: #2a3c59;
  background: #0f1829;
}

body[data-theme="dark"] .host-config-change-count {
  color: #9fb8d8;
}

body[data-theme="dark"] .host-config-change-subline {
  color: #8fa8c4;
}

body[data-theme="dark"] .host-filter-control select,
body[data-theme="dark"] .chart-range-control select,
body[data-theme="dark"] .global-alerts-controls select {
  background: #0f1829;
  border-color: #2a3c59;
  color: var(--text);
}

/* ── Dark Mode: Scrollbars ────────────────────────────────── */
body[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #2a3c59;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #3d567a;
}

/* ── Directory Listings ────────────────────────────────────── */
.dir-listings-card {
  min-width: 0;
}

.dir-listing-entry {
  margin-bottom: 18px;
}

.dir-listing-entry:last-child {
  margin-bottom: 0;
}

.dir-listing-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}

.dir-listing-path {
  font-size: 13px;
  font-weight: 600;
  font-family: monospace;
  color: #334155;
  word-break: break-all;
}

.dir-listing-pattern {
  font-size: 11px;
  font-family: monospace;
  color: #64748b;
}

.dir-listing-table td.dir-item-icon {
  width: 24px;
  text-align: center;
  padding-right: 0;
}

.dir-listing-table {
  table-layout: auto;
  width: 100%;
}

.dir-listing-table td.dir-item-name {
  font-family: monospace;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-item-name-path {
  color: #64748b;
  font-weight: 400;
}

.dir-item-name-leaf {
  font-weight: 400;
}

.dir-item-name-leaf--zip {
  font-weight: 700;
}

.dir-listing-table td.dir-item-name.dir-item-name--zip {
  padding-left: 18px;
}

.dir-listing-table th.dir-item-size-head,
.dir-listing-table td.dir-item-size {
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
  color: #475569;
}

.dir-listing-table td.dir-item-date {
  white-space: nowrap;
  font-size: 12px;
  color: #64748b;
  text-align: right;
}

.dir-listing-table th.dir-item-date-head {
  text-align: right;
}

.dir-item-today {
  background: #ecfdf3;
}

.dir-item-today td {
  border-top: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
}

.dir-item-today-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.dir-status-badge {
  display: inline-flex;
  align-items: center;
  margin: 2px 0 8px 0;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.dir-status-badge.ok {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.dir-status-badge.missing {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

body[data-theme="dark"] .dir-listing-path {
  color: #94a3b8;
}

body[data-theme="dark"] .dir-listing-pattern {
  color: #64748b;
}

body[data-theme="dark"] .dir-listing-table td.dir-item-size {
  color: #94a3b8;
}

body[data-theme="dark"] .dir-item-name-path {
  color: #94a3b8;
}

body[data-theme="dark"] .dir-listing-table td.dir-item-date {
  color: #64748b;
}

body[data-theme="dark"] .dir-item-today {
  background: rgba(34, 197, 94, 0.12);
}

body[data-theme="dark"] .dir-item-today td {
  border-top-color: rgba(74, 222, 128, 0.45);
  border-bottom-color: rgba(74, 222, 128, 0.45);
}

body[data-theme="dark"] .dir-item-today-chip {
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.45);
  border-color: rgba(74, 222, 128, 0.45);
}

body[data-theme="dark"] .dir-status-badge.ok {
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.45);
  border-color: rgba(74, 222, 128, 0.45);
}

body[data-theme="dark"] .dir-status-badge.missing {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.45);
  border-color: rgba(248, 113, 113, 0.45);
}

.dir-deep-subdir {
  margin-top: 12px;
  border-left: 3px solid #e2e8f0;
  padding-left: 10px;
}

.dir-deep-subdir:first-child {
  margin-top: 6px;
}

.dir-deep-subdir > summary {
  list-style: none;
}
.dir-deep-subdir > summary::-webkit-details-marker {
  display: none;
}

.dir-deep-subdir-title {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.25;
}

.dir-deep-subdir-title .muted {
  display: inline-flex;
  align-items: center;
}

.dir-deep-subdir-title .dir-status-badge {
  margin: 0 0 0 6px;
  align-self: center;
}

.dir-deep-subdir-title::before {
  content: "▶";
  font-size: 10px;
  color: #94a3b8;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.dir-deep-subdir[open] > .dir-deep-subdir-title::before {
  transform: rotate(90deg);
}

body[data-theme="dark"] .dir-deep-subdir {
  border-left-color: #2d3e55;
}

body[data-theme="dark"] .dir-deep-subdir-title {
  color: #94a3b8;
}

body[data-theme="dark"] .dir-deep-subdir-title::before {
  color: #4a6080;
}

/* Backup Status View */
.backup-status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
}

.customer-overview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
}

.customer-overview-card {
  border: 1px solid #d9e4f2;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.customer-overview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fbff;
  border-bottom: 1px solid #dce7f5;
  cursor: pointer;
  list-style: none;
}

.customer-overview-head::-webkit-details-marker {
  display: none;
}

.customer-overview-title {
  font-weight: 800;
  color: #0f172a;
}

.customer-overview-project {
  font-size: 12px;
  color: #475569;
}

.customer-overview-chip {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}

.customer-overview-chip.warn {
  background: #ffedd5;
  color: #9a3412;
}

.customer-overview-chip.ok {
  background: #dcfce7;
  color: #166534;
}

.customer-overview-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s;
  margin-left: auto;
  flex-shrink: 0;
}

.customer-overview-edit-btn:hover {
  opacity: 1;
  background: #f1f5f9;
}

.customer-overview-table .customer-overview-host-title {
  font-weight: 700;
}

.customer-overview-host-country {
  font-weight: 700;
  color: #1d4ed8;
}

.customer-overview-backup {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.customer-overview-backup.is-ok {
  background: #dcfce7;
  color: #166534;
}

.customer-overview-backup.is-missing {
  background: #fee2e2;
  color: #b91c1c;
}

.backup-host-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.backup-customer-group {
  border: 1px solid #d9e4f2;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.backup-customer-group > summary {
  list-style: none;
  cursor: pointer;
}

.backup-customer-group > summary::-webkit-details-marker {
  display: none;
}

.backup-customer-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #dce7f5;
}

.backup-customer-summary::before {
  content: "▶";
  color: #64748b;
  font-size: 11px;
  transition: transform 0.2s ease;
  width: 12px;
  display: inline-flex;
  justify-content: center;
}

.backup-customer-group[open] > .backup-customer-summary::before {
  transform: rotate(90deg);
}

.backup-customer-summary--ok {
  background: #f8fbff;
}

.backup-customer-summary--missing {
  background: #fff7ed;
}

.backup-customer-name {
  font-weight: 800;
  color: #0f172a;
}

.backup-customer-project {
  font-size: 12px;
  color: #475569;
}

.backup-customer-chip {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}

.backup-customer-chip--ok {
  background: #dcfce7;
  color: #166534;
}

.backup-customer-chip--missing {
  background: #fee2e2;
  color: #991b1b;
}

.backup-customer-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: #f8fbff;
}

.backup-host-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
}

.backup-host-details > summary {
  list-style: none;
  cursor: pointer;
}

.backup-host-details > summary::-webkit-details-marker {
  display: none;
}

.backup-host-details > summary::before {
  content: "▶";
  color: #64748b;
  font-size: 11px;
  margin-right: 2px;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  transform-origin: center;
}

.backup-host-details[open] > summary::before {
  transform: rotate(90deg);
}

.backup-host-body {
  border-top: 1px solid #dbe3ef;
}

.backup-host-header--ok {
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
}

.backup-host-header--missing {
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
}

.backup-host-name {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}

.backup-host-hostname {
  font-size: 12px;
}

.backup-host-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.backup-host-count {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.backup-host-count--ok {
  background: #dcfce7;
  color: #166534;
}

.backup-host-count--missing {
  background: #fee2e2;
  color: #991b1b;
}

.backup-status-stale {
  font-size: 11px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 4px;
}

.backup-status-table td {
  padding: 5px 8px;
  font-size: 12px;
  vertical-align: top;
}

.backup-status-table {
  width: 100%;
  table-layout: fixed;
}

.backup-status-table--default .backup-col-dir {
  width: 28%;
}

.backup-status-table--default .backup-col-newest {
  width: 28%;
}

.backup-status-table--default .backup-col-mod {
  width: 14%;
}

.backup-status-table--default .backup-col-size {
  width: 10%;
}

.backup-status-table--default .backup-col-status {
  width: 20%;
}

.backup-status-table--sql .backup-col-dir {
  width: 38%;
}

.backup-status-table--sql .backup-col-newest {
  width: 26%;
}

.backup-status-table--sql .backup-col-mod {
  width: 12%;
}

.backup-status-table--sql .backup-col-size {
  width: 8%;
}

.backup-status-table--sql .backup-col-status {
  width: 16%;
}

.backup-status-dir-name {
  font-weight: 500;
  color: #334155;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-status-newest {
  color: #475569;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backup-status-newest-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-status-newest-path {
  display: block;
  margin-bottom: 1px;
  color: #94a3b8;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-status-table--sql .backup-status-dir-name,
.backup-status-table--sql .backup-status-newest,
.backup-status-table--sql .backup-status-newest-name,
.backup-status-table--sql .backup-status-newest-path {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.backup-status-table--sql td {
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.4;
}

.backup-status-table--sql .backup-status-dir-name {
  display: block;
}

.backup-status-table--sql .backup-status-dir-name .backup-source-chip {
  margin-right: 6px;
  vertical-align: middle;
}

.backup-status-table--sql .backup-status-badge-cell {
  text-align: left;
}

.backup-status-mod {
  color: #64748b;
  white-space: nowrap;
}

.backup-status-badge-cell {
  text-align: right;
  white-space: nowrap;
}

.backup-status-filters {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.backup-filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #334155;
}

.backup-filter-country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
}

.backup-filter-country select {
  min-width: 84px;
}

.backup-host-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.backup-host-tag--sql {
  background: #dbeafe;
  color: #1d4ed8;
}

.backup-host-tag--hana {
  background: #ede9fe;
  color: #5b21b6;
}

.backup-host-tag--country {
  background: transparent;
  padding: 0;
}

.backup-country-flag {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.22);
}

.backup-status-dir-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.backup-source-chip {
  display: inline-block;
  min-width: 38px;
  padding: 1px 6px;
  border-radius: 999px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.backup-source-chip--sql {
  background: #dbeafe;
  color: #1e40af;
}

.backup-source-chip--hana {
  background: #ede9fe;
  color: #6d28d9;
}

.backup-source-chip--fs {
  background: #e2e8f0;
  color: #334155;
}

.backup-row--sql td {
  background: #f8fbff;
}

.backup-row--hana td {
  background: #faf5ff;
}

body[data-theme="dark"] .backup-host-card {
  border-color: #2d3e55;
}

body[data-theme="dark"] .backup-customer-group {
  border-color: #2d3e55;
  background: #0f172a;
}

body[data-theme="dark"] .backup-customer-summary {
  border-bottom-color: #2d4364;
}

body[data-theme="dark"] .backup-customer-summary::before {
  color: #7c93b5;
}

body[data-theme="dark"] .backup-customer-summary--ok {
  background: #13253f;
}

body[data-theme="dark"] .backup-customer-summary--missing {
  background: #2d1a0d;
}

body[data-theme="dark"] .backup-customer-name {
  color: #e2e8f0;
}

body[data-theme="dark"] .backup-customer-project {
  color: #9fb3cc;
}

body[data-theme="dark"] .backup-customer-chip {
  background: #1f2d40;
  color: #d1d5db;
}

body[data-theme="dark"] .backup-customer-chip--ok {
  background: #064e3b;
  color: #86efac;
}

body[data-theme="dark"] .backup-customer-chip--missing {
  background: #7f1d1d;
  color: #fecaca;
}

body[data-theme="dark"] .backup-customer-body {
  background: #0b1628;
}

body[data-theme="dark"] .customer-overview-card {
  border-color: #2d3e55;
  background: #0f172a;
}

body[data-theme="dark"] .customer-overview-head {
  background: #13253f;
  border-bottom-color: #2d4364;
}

body[data-theme="dark"] .customer-overview-title {
  color: #e2e8f0;
}

body[data-theme="dark"] .customer-overview-project {
  color: #9fb3cc;
}

body[data-theme="dark"] .customer-overview-chip {
  background: #1f2d40;
  color: #d1d5db;
}

body[data-theme="dark"] .backup-host-header--ok {
  background: #0d2d1a;
  border-bottom-color: #166534;
}

body[data-theme="dark"] .backup-host-header--missing {
  background: #2d1a0d;
  border-bottom-color: #92400e;
}

body[data-theme="dark"] .backup-host-name {
  color: #e2e8f0;
}

body[data-theme="dark"] .backup-host-details > summary::before {
  color: #7c93b5;
}

body[data-theme="dark"] .backup-host-count--ok {
  background: #064e3b;
  color: #86efac;
}

body[data-theme="dark"] .backup-host-count--missing {
  background: #7f1d1d;
  color: #fecaca;
}

body[data-theme="dark"] .backup-status-stale {
  background: #3d2a00;
  color: #fbbf24;
}

body[data-theme="dark"] .backup-filter-checkbox,
body[data-theme="dark"] .backup-filter-country {
  color: #cbd5e1;
}

body[data-theme="dark"] .backup-host-tag--sql,
body[data-theme="dark"] .backup-source-chip--sql {
  background: #1e3a8a;
  color: #bfdbfe;
}

body[data-theme="dark"] .backup-host-tag--hana,
body[data-theme="dark"] .backup-source-chip--hana {
  background: #4c1d95;
  color: #ddd6fe;
}

body[data-theme="dark"] .backup-host-tag--country,
body[data-theme="dark"] .backup-source-chip--fs {
  background: #334155;
  color: #e2e8f0;
}

body[data-theme="dark"] .backup-host-tag--country {
  background: transparent;
}

body[data-theme="dark"] .backup-row--sql td {
  background: #0d1d38;
}

body[data-theme="dark"] .backup-row--hana td {
  background: #24113a;
}

/* System overview hierarchy layout */
.system-overview-tree {
  display: grid;
  gap: 12px;
}

.system-overview-country-group,
.system-overview-os-group {
  display: grid;
  gap: 8px;
}

.system-overview-toggle {
  width: 100%;
  border: 1px solid #c7d9f0;
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
  color: #1f3b63;
  border-radius: 10px;
  min-height: var(--btn-height);
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.system-overview-toggle:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
  border-color: #9fb8d8;
}

.system-overview-toggle .system-overview-chevron {
  width: 12px;
  text-align: center;
  color: #1e40af;
  flex: 0 0 12px;
}

.system-overview-toggle--customer {
  width: auto;
  max-width: calc(100% - 24px);
  padding: 0 10px;
  border-radius: 8px;
  border-color: #d5e0ee;
  background: rgba(245, 249, 255, 0.65);
  box-shadow: none;
}

.system-overview-toggle--customer:hover:not(:disabled) {
  background: rgba(250, 252, 255, 0.9);
  border-color: #bfd0e6;
}

.so-customer-data-indicators {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  font-size: 12px;
}

.system-overview-os-list,
.system-overview-customer-list {
  display: block;
  gap: 10px;
}

.system-overview-os-list {
  margin-left: 8px;
}

.system-overview-customer-list {
  margin-left: 12px;
}

.system-overview-customer-list.hidden,
.system-overview-os-list.hidden {
  display: none !important;
}

.system-overview-customer-list.hidden {
  display: none !important;
}

.system-overview-customer-block {
  border: 1px solid #d7e3f2;
  border-radius: 10px;
  background: #f9fbff;
  padding: 8px;
}

.system-overview-customer-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 6px;
}

.system-overview-table {
  margin-top: 0;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.system-overview-country-filter {
  display: flex;
  align-items: center;
}

#systemOverviewStats {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.system-overview-stat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cfd9e6;
  background: #f8fbff;
  color: #1f3b63;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.system-overview-stat-chip.is-primary {
  border-color: #b9cbe3;
  background: #eef5ff;
  color: #17324d;
  font-weight: 700;
}

.so-country-filter-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.so-country-filter-btn {
  border: 1px solid #cfd9e6;
  background: #f8fbff;
  color: #1f3b63;
  border-radius: 999px;
  min-height: var(--btn-height);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.so-country-filter-btn:hover {
  border-color: #9fb8d8;
  background: #eef5ff;
}

.so-country-filter-btn.active {
  border-color: #1d4ed8;
  background: #dbeafe;
  color: #1e3a8a;
}

.so-country-filter-flag {
  width: 14px;
  height: 10px;
  min-width: 14px;
  max-width: 14px;
  max-height: 10px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

.so-country-header .so-country-flag,
.system-overview-toggle .so-country-flag,
.so-country-filter-btn img {
  width: 14px;
  height: 10px;
  min-width: 14px;
  max-width: 14px;
  max-height: 10px;
  object-fit: cover;
  display: inline-block;
}

.system-overview-table th,
.system-overview-table td {
  padding: 7px 6px;
  text-align: left;
  border-bottom: 1px solid #e5ecf5;
}

.system-overview-table th:nth-child(1),
.system-overview-table td:nth-child(1) { width: 24%; min-width: 220px; padding-right: 3px; }

.system-overview-table th:nth-child(2),
.system-overview-table td:nth-child(2) { width: 26%; min-width: 280px; padding-left: 3px; }

.system-overview-table th:nth-child(3),
.system-overview-table td:nth-child(3) { width: 20%; min-width: 190px; }

.system-overview-table th:nth-child(4),
.system-overview-table td:nth-child(4) { width: 12%; min-width: 110px; }

.system-overview-table th:nth-child(5),
.system-overview-table td:nth-child(5) { width: 12%; min-width: 150px; }

.system-overview-table th:nth-child(6),
.system-overview-table td:nth-child(6) { width: 6%; min-width: 90px; }

.system-overview-table tr {
  vertical-align: top;
}

.system-overview-table th {
  background: #f0f5fa;
  font-weight: 700;
  font-size: 12px;
  color: #334155;
}

.system-overview-table td {
  font-size: 12px;
  color: #1e293b;
}

.so-host-cell {
  /* normal flow */
}

.so-host-title {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.so-host-short {
  margin-top: 3px;
  font-size: 12px;
  color: #334155;
  line-height: 1.3;
}

.so-host-spacer {
  display: none;
}

.so-host-addons {
  margin-top: 8px;
}

.so-os-license {
  margin-top: 8px;
}

.so-cpu-license-types {
  margin-top: 8px;
}

.so-os-spacer {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.3;
  visibility: hidden;
}

.so-cell-main {
  line-height: 1.35;
}

.so-cell-sub {
  margin-top: 3px;
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}

.so-addon-details {
  margin-top: 6px;
  border: 1px solid #d8e2ef;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
  font-size: 11px;
}

.so-addon-details > summary {
  cursor: pointer;
  padding: 4px 6px;
  font-weight: 600;
  color: #1f3b63;
  user-select: none;
}

.so-addon-grid {
  display: block;
  padding: 4px 6px 6px;
}

.so-addon-col {
  min-width: 0;
}

.so-addon-col + .so-addon-col {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #d8e2ef;
}

.so-addon-col h6 {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.so-addon-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

.so-addon-list li {
  display: block;
  line-height: 1.2;
}

.so-addon-more {
  margin-top: 2px;
}

.so-addon-more details {
  display: block;
}

.so-addon-more summary {
  cursor: pointer;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  user-select: none;
}

.so-addon-list-nested {
  margin-top: 4px;
  padding-left: 10px;
}

.so-addon-version {
  color: #64748b;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.so-addon-empty,
.so-addon-rest {
  margin: 0;
  color: #64748b;
  font-size: 10px;
}

.so-license-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

.so-license-list li {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  color: inherit;
}

.so-license-type-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.so-license-type-count {
  min-width: 2.2em;
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.2;
  flex-shrink: 0;
}

.so-license-type-name {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: inherit;
  line-height: 1.2;
}

.so-license-type-raw {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: #64748b;
}

.so-license-label {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: inherit;
}

.so-license-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

body[data-theme="dark"] .so-addon-details {
  border-color: #304762;
  background: linear-gradient(180deg, #1a2f47 0%, #13243a 100%);
}

body[data-theme="dark"] .so-addon-details > summary {
  color: #c8dbf7;
}

body[data-theme="dark"] .so-addon-col + .so-addon-col {
  border-top-color: #304762;
}

body[data-theme="dark"] .so-addon-col h6,
body[data-theme="dark"] .so-addon-version,
body[data-theme="dark"] .so-addon-empty,
body[data-theme="dark"] .so-addon-rest {
  color: #9fb3cc;
}

body[data-theme="dark"] .so-addon-more summary {
  color: #9fb3cc;
}

body[data-theme="dark"] .so-license-list li,
body[data-theme="dark"] .so-license-label,
body[data-theme="dark"] .sap-license-list-item strong {
  color: inherit;
}

body[data-theme="dark"] .so-license-value,
body[data-theme="dark"] .sap-license-list-item span {
  color: #9fb3cc;
}

body[data-theme="dark"] .so-license-type-count,
body[data-theme="dark"] .so-license-type-raw {
  color: #9fb3cc;
}

.so-row-clickable {
  cursor: pointer;
}

.so-row-clickable:hover td {
  background: #f8fbff;
}

.so-status-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.so-status-ok {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.so-status-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.so-status-critical,
.so-status-offline {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.so-center {
  text-align: center;
}

.so-right {
  text-align: right;
}

body[data-theme="dark"] .system-overview-toggle {
  border-color: #2a3c59;
  background: linear-gradient(180deg, #1a2b42 0%, #142339 100%);
  color: #dbeafe;
}

body[data-theme="dark"] .system-overview-toggle:hover:not(:disabled) {
  border-color: #4a6f9f;
  background: linear-gradient(180deg, #203550 0%, #17304d 100%);
}

body[data-theme="dark"] .system-overview-toggle .system-overview-chevron {
  color: #93c5fd;
}

body[data-theme="dark"] .system-overview-toggle--customer {
  border-color: #355274;
  background: rgba(24, 40, 63, 0.78);
  box-shadow: none;
}

body[data-theme="dark"] .system-overview-toggle--customer:hover:not(:disabled) {
  border-color: #45678f;
  background: rgba(28, 46, 72, 0.9);
}

body[data-theme="dark"] .so-customer-data-indicators {
  opacity: 0.95;
}

body[data-theme="dark"] .system-overview-customer-block {
  border-color: #2a3c59;
  background: #0f1829;
}

body[data-theme="dark"] .system-overview-customer-title {
  color: #bfd3ea;
}

body[data-theme="dark"] .so-country-filter-btn {
  border-color: #2a3c59;
  background: #142339;
  color: #c7dbf5;
}

body[data-theme="dark"] .so-country-filter-btn:hover {
  border-color: #4a6f9f;
  background: #17304d;
}

body[data-theme="dark"] .so-country-filter-btn.active {
  border-color: #60a5fa;
  background: #1e3a5f;
  color: #dbeafe;
}

body[data-theme="dark"] .so-host-title {
  color: #e2e8f0;
}

body[data-theme="dark"] .so-host-short {
  color: #cbd5e1;
}

body[data-theme="dark"] .so-cell-main {
  color: #e2e8f0;
}

body[data-theme="dark"] .so-cell-sub {
  color: #94a3b8;
}

body[data-theme="dark"] .so-row-clickable:hover td {
  background: #13233a;
}

body[data-theme="dark"] .so-status-ok {
  background: #2b5d3b;
  color: #a8e6b8;
  border-color: #4a8a5f;
}

body[data-theme="dark"] .so-status-warning {
  background: #5d4d1f;
  color: #ffd966;
  border-color: #8a7a3d;
}

body[data-theme="dark"] .so-status-critical,
body[data-theme="dark"] .so-status-offline {
  background: #7a3e3e;
  color: #ffb3b3;
  border-color: #a85c5c;
}

/* System Overview Card Styles */
.so-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 380px));
  gap: 16px;
  padding: 12px 0;
  justify-content: start;
}

@media (max-width: 1200px) {
  .so-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 360px));
  }
}

@media (max-width: 900px) {
  .so-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 340px));
  }
}

@media (max-width: 600px) {
  .so-card-grid {
    grid-template-columns: 1fr;
  }
}

.so-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 16px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  min-height: 420px;
}

.so-card-clickable {
  cursor: pointer;
}

.so-card-clickable:hover {
  border-color: #0084c8;
  box-shadow: 0 4px 8px rgba(0, 132, 200, 0.15);
  transform: translateY(-2px);
}

body[data-theme="dark"] .so-card {
  background-color: #1e1e1e;
  border-color: #333;
}

body[data-theme="dark"] .so-card-clickable:hover {
  border-color: #0084c8;
  box-shadow: 0 4px 8px rgba(0, 132, 200, 0.25);
}

.so-card-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}

body[data-theme="dark"] .so-card-header {
  border-bottom-color: #333;
}

.so-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.so-card-status {
  font-size: 1.2em;
  flex-shrink: 0;
}

.so-card-hostname {
  font-weight: 600;
  font-size: 1.05em;
  word-break: break-word;
  color: #1a1a1a;
}

body[data-theme="dark"] .so-card-hostname {
  color: #e8e8e8;
}

.so-card-os-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
  color: #666;
}

body[data-theme="dark"] .so-card-os-row {
  color: #aaa;
}

.so-card-os-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.so-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}

.so-card-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.so-card-section-title {
  font-weight: 600;
  font-size: 0.95em;
  color: #1a1a1a;
  margin-bottom: 4px;
}

body[data-theme="dark"] .so-card-section-title {
  color: #e0e0e0;
}

.so-card-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9em;
  gap: 8px;
}

.so-card-line-model {
  flex-wrap: wrap;
}

.so-card-label {
  font-weight: 500;
  color: #555;
  flex-shrink: 0;
}

body[data-theme="dark"] .so-card-label {
  color: #999;
}

.so-card-value {
  text-align: right;
  color: #1a1a1a;
  word-break: break-word;
  flex: 1;
}

body[data-theme="dark"] .so-card-value {
  color: #d0d0d0;
}

.so-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #e8e8e8;
  font-size: 0.85em;
  gap: 8px;
  flex-wrap: wrap;
}

body[data-theme="dark"] .so-card-footer {
  border-top-color: #333;
}

.so-card-timestamp {
  color: #666;
  flex-shrink: 0;
}

body[data-theme="dark"] .so-card-timestamp {
  color: #aaa;
}

.so-card-alert {
  flex: 1;
  text-align: right;
}

.so-card-alert-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85em;
  white-space: nowrap;
}

.so-card-alert-badge-ok {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

body[data-theme="dark"] .so-card-alert-badge-ok {
  background-color: #2b5d3b;
  color: #a8e6b8;
  border-color: #4a8a5f;
}

.so-card-alert-badge-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

body[data-theme="dark"] .so-card-alert-badge-warning {
  background-color: #5d4d1f;
  color: #ffd966;
  border-color: #8a7a3d;
}

.so-card-alert-badge-critical {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

body[data-theme="dark"] .so-card-alert-badge-critical {
  background-color: #7a3e3e;
  color: #ff9999;
  border-color: #a85c5c;
}

/* Country and OS headers */
.so-country-flag {
  height: 24px;
  width: auto;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: middle;
}

.so-country-header,
.so-os-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.so-os-icon {
  height: 20px;
  width: auto;
  max-width: 20px;
  max-height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: middle;
}

.so-customer-section {
  margin-bottom: 16px;
}

.so-customer-title {
  font-size: 1.05em;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 10px;
  padding: 0 8px;
}

body[data-theme="dark"] .so-customer-title {
  color: #d0d0d0;
}

body[data-theme="dark"] .inactive-hosts-toolbar {
  background: #1a2847;
}

body[data-theme="dark"] .search-input-compact {
  background: #111b2f;
  border-color: #24344d;
  color: #e6edf7;
}

body[data-theme="dark"] .search-input-compact::placeholder {
  color: #64748b;
}

/* App-wide clean enterprise unification */
.analysis-panel,
.alerts-panel,
.settings-subsection,
.alarm-settings-card,
.settings-logic-help-card,
.system-overview-customer-block,
.ct-host-card,
.ih-host-card,
.backup-host-card,
.host-config-change-group,
.table-wrap {
  border: 1px solid #cbdcf0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  box-shadow: 0 8px 18px rgba(30, 58, 95, 0.08);
}

.analysis-header,
.settings-subsection-head,
.host-config-change-summary,
.host-config-change-date-summary {
  border-bottom: 1px solid #d8e4f2;
}

.analysis-panel,
.alerts-panel,
.settings-subsection,
.alarm-settings-card,
.settings-logic-help-card,
.system-overview-customer-block,
.ct-host-card,
.ih-host-card,
.backup-host-card,
.host-config-change-group {
  padding: var(--space-3);
}

.btn-secondary,
.view-back-chip,
.global-update-chip,
.host-group-toggle,
.icon-filter-chip,
.stat-chip,
.selected-host-meta-chip,
.agent-update-status-badge,
.agent-source-status-badge,
.host-alert-chip,
.so-card-alert-badge,
.so-country-filter-btn,
.system-overview-toggle {
  min-height: var(--chip-height);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-secondary,
.view-back-chip,
.global-update-chip,
.host-group-toggle,
.icon-filter-chip,
.so-country-filter-btn,
.system-overview-toggle {
  min-height: var(--btn-height);
}

/* Top status elements use card styling and should not be normalized as tiny chips. */
.panel-actions .header-stat-chip {
  min-height: 56px;
  min-width: 150px;
  border-radius: 12px;
}

.stat-chip,
.selected-host-meta-chip,
.agent-update-status-badge,
.agent-source-status-badge,
.so-card-alert-badge {
  border: 1px solid #c3d6ec;
  background: #ffffff;
  color: #315177;
}

.host-alert-chip {
  border-color: #ef9f9f;
  background: #fff0f0;
  color: #9f2a2a;
}

.host-alert-chip.critical,
.so-card-alert-badge-critical {
  border-color: #ea7b7b;
  background: #ffe5e5;
  color: #a82525;
}

.header-stat-chip-alert,
.header-stat-chip-warn,
.header-stat-chip-inactive,
.header-stat-chip-db-reports,
.header-stat-chip-db-reports-hour,
.header-stat-chip-db-size,
.header-stat-chip-db-size-delta,
.header-stat-chip-license {
  border-color: #cfd8e3;
  background: linear-gradient(180deg, #f7f9fb 0%, #eff3f7 100%);
  color: #1f3f5f;
}

.stat-chip.delayed,
.so-card-alert-badge-warning {
  border-color: #efc171;
  background: #fff6e4;
  color: #9a6411;
}

.so-card-alert-badge-ok,
.stat-chip.live {
  border-color: #9ed8b8;
  background: #edf9f2;
  color: #1f6a3c;
}

.header-stat-chip-alert {
  border-left-color: #cf2f2f;
}

.header-stat-chip-warn {
  border-left-color: #c2790f;
}

.header-stat-chip-inactive {
  border-left-color: #2a74b5;
}

.header-stat-chip-db-reports {
  border-left-color: #2f9e44;
}

.header-stat-chip-db-reports-hour {
  border-left-color: #0f766e;
}

.header-stat-chip-db-size {
  border-left-color: #7c3aed;
}

.header-stat-chip-db-size-delta {
  border-left-color: #be123c;
}

.header-stat-chip-license {
  border-left-color: #c2790f;
}

.table-wrap {
  padding: 0;
  overflow: auto;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #eef4fd;
  color: #29466a;
  font-weight: 700;
}

tbody tr:nth-child(odd) td {
  background: #fcfeff;
}

tbody tr:nth-child(even) td {
  background: #f7fbff;
}

body[data-theme="dark"] .analysis-panel,
body[data-theme="dark"] .alerts-panel,
body[data-theme="dark"] .settings-subsection,
body[data-theme="dark"] .alarm-settings-card,
body[data-theme="dark"] .settings-logic-help-card,
body[data-theme="dark"] .system-overview-customer-block,
body[data-theme="dark"] .ct-host-card,
body[data-theme="dark"] .ih-host-card,
body[data-theme="dark"] .backup-host-card,
body[data-theme="dark"] .host-config-change-group,
body[data-theme="dark"] .table-wrap {
  border-color: #2b3f5c;
  background: linear-gradient(180deg, #14253c 0%, #102036 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .analysis-header,
body[data-theme="dark"] .settings-subsection-head,
body[data-theme="dark"] .host-config-change-summary,
body[data-theme="dark"] .host-config-change-date-summary {
  border-bottom-color: #2b3f5c;
}

body[data-theme="dark"] .stat-chip,
body[data-theme="dark"] .selected-host-meta-chip,
body[data-theme="dark"] .agent-update-status-badge,
body[data-theme="dark"] .agent-source-status-badge,
body[data-theme="dark"] .so-card-alert-badge {
  border-color: #355072;
  background: #1a2e49;
  color: #d4e6fb;
}
body[data-theme="dark"] .selected-host-meta-chip--env-prod {
  border-color: #3ea26f;
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}
body[data-theme="dark"] .selected-host-meta-chip--env-test {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.2);
  color: #fdba74;
}

body[data-theme="dark"] .host-alert-chip {
  border-color: #bd5a5a;
  background: #4a1f1f;
  color: #ffd3d3;
}

body[data-theme="dark"] .host-alert-chip.critical,
body[data-theme="dark"] .so-card-alert-badge-critical {
  border-color: #d66767;
  background: #5a2020;
  color: #ffc1c1;
}

body[data-theme="dark"] .header-stat-chip-alert,
body[data-theme="dark"] .header-stat-chip-warn,
body[data-theme="dark"] .header-stat-chip-inactive,
body[data-theme="dark"] .header-stat-chip-db-reports,
body[data-theme="dark"] .header-stat-chip-db-reports-hour,
body[data-theme="dark"] .header-stat-chip-db-size,
body[data-theme="dark"] .header-stat-chip-db-size-delta,
body[data-theme="dark"] .header-stat-chip-license {
  border-color: #355072;
  background: linear-gradient(180deg, #1a2e49 0%, #14263f 100%);
  color: #d4e6fb;
}

body[data-theme="dark"] .header-stat-chip-alert {
  border-left-color: #d66767;
}

body[data-theme="dark"] .header-stat-chip-warn {
  border-left-color: #c79a45;
}

body[data-theme="dark"] .header-stat-chip-inactive {
  border-left-color: #4f9cd0;
}

body[data-theme="dark"] .header-stat-chip-db-reports {
  border-left-color: #52c97a;
}

body[data-theme="dark"] .header-stat-chip-db-reports-hour {
  border-left-color: #5ad0be;
}

body[data-theme="dark"] .header-stat-chip-db-size {
  border-left-color: #b69cf9;
}

body[data-theme="dark"] .header-stat-chip-db-size-delta {
  border-left-color: #f39ab0;
}

body[data-theme="dark"] .header-stat-chip-license {
  border-left-color: #c79a45;
}

body[data-theme="dark"] .header-chip-scope {
  color: #9db3cc;
}

body[data-theme="dark"] .header-chip-label {
  color: #9db3cc;
}

body[data-theme="dark"] .header-license-label {
  color: #9db3cc;
}

body[data-theme="dark"] .header-license-value {
  color: #d4e6fb;
}

body[data-theme="dark"] .stat-chip.delayed,
body[data-theme="dark"] .so-card-alert-badge-warning {
  border-color: #c79a45;
  background: #4e3a16;
  color: #ffd890;
}

body[data-theme="dark"] .so-card-alert-badge-ok,
body[data-theme="dark"] .stat-chip.live {
  border-color: #3e8a61;
  background: #163a28;
  color: #b6f3d4;
}

body[data-theme="dark"] th {
  background: #1f3552;
  color: #d4e6fb;
}

body[data-theme="dark"] tbody tr:nth-child(odd) td {
  background: #12263e;
}

body[data-theme="dark"] tbody tr:nth-child(even) td {
  background: #102238;
}

/* System overview: plain, no chip/pill framing */
#systemOverviewView .system-overview-toggle,
#systemOverviewView .system-overview-toggle--customer {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  min-height: 22px;
  height: auto;
  padding: 0 4px;
}

#systemOverviewView .system-overview-toggle:hover:not(:disabled),
#systemOverviewView .system-overview-toggle--customer:hover:not(:disabled) {
  border: none;
  background: transparent;
  box-shadow: none;
}

#systemOverviewView .system-overview-toggle .system-overview-chevron {
  color: currentColor;
}

body[data-theme="dark"] #systemOverviewView .system-overview-toggle,
body[data-theme="dark"] #systemOverviewView .system-overview-toggle--customer,
body[data-theme="dark"] #systemOverviewView .system-overview-toggle:hover:not(:disabled),
body[data-theme="dark"] #systemOverviewView .system-overview-toggle--customer:hover:not(:disabled) {
  border: none;
  background: transparent;
  box-shadow: none;
}

body[data-theme="dark"] .system-overview-stat-chip {
  border-color: #304762;
  background: #13243a;
  color: #c8dbf7;
}

body[data-theme="dark"] .system-overview-stat-chip.is-primary {
  border-color: #35547a;
  background: #1a2f47;
  color: #e2eefc;
}

/* Dark-mode readability safety net:
   ensures text that was hard-coded for light mode remains readable in dark mode. */
body[data-theme="dark"] :where(
  .analysis-panel,
  .alerts-panel,
  .settings-subsection,
  .alarm-settings-card,
  .settings-logic-help-card,
  .system-overview-customer-block,
  .ct-host-card,
  .ih-host-card,
  .backup-host-card,
  .host-config-change-group,
  .hosts-column,
  .section-head,
  .overview-sidebar,
  .overview-content,
  .table-wrap,
  .agent-update-admin-status,
  .db-maintenance-head
) :where(h1, h2, h3, h4, h5, h6, p, label, legend, small, span, li, td, th, strong, a):not(.stat-chip):not(.selected-host-meta-chip):not(.agent-update-status-badge):not(.agent-source-status-badge):not(.agent-source-cell-ok):not(.agent-source-cell-bad):not(.host-alert-chip):not(.so-card-alert-badge):not(.db-status-badge):not(.db-sys-badge):not(.tab-button):not(.header-stat-chip) {
  color: #d4e6fb;
}

body[data-theme="dark"] .brand-text h1 {
  color: #dbeafe;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .agent-source-cell-ok {
  color: #14532d;
  background: #bbf7d0;
  border-color: #4ade80;
}

body[data-theme="dark"] .agent-source-cell-bad {
  color: #7f1d1d;
  background: #fecaca;
  border-color: #f87171;
}

body[data-theme="dark"] .muted,
body[data-theme="dark"] .count,
body[data-theme="dark"] .auto-refresh-last-update,
body[data-theme="dark"] .auto-refresh-status {
  color: #9eb7d4;
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #8fa8c4;
}

@media (min-width: 1200px) {
  .panel-actions > .header-stat-chip:first-of-type {
    margin-left: clamp(300px, 22vw, 430px);
  }

  .hosts-column {
    margin-top: -108px;
  }
}

#headerDbSizeDeltaChip,
.header-stat-chip-db-size-delta {
  display: none !important;
}
