/* page-home.css — extracted from style.css 2026-05-27 (UX-6 cut 4).
 *
 * Status-board card visuals for the home page (/). The home cards
 * each render a per-area widget — donut, sparkline, host grid,
 * capacity bars — instead of a wall of text. All `.cv-*` selectors
 * (cv = "card visual"), `.dom-*` for the domain band visuals, and
 * the home `.recent-*` extension classes.
 *
 * Originally style.css commit 2.22 (rewrite of the home page).
 *
 * Loaded AFTER style.css + components.css via base.html.
 */

/* ─── Status-board card visuals (home page) ─────────────────────────────────
   The home cards on / are visual-first: each one renders a per-area widget
   (donut, sparkline, host grid, capacity bars) instead of a wall of text.
   Click-throughs cover the whole card. Per Matt 2026-05-08:
   "visual with click through to important data is better." */

/* Whole-card click target. Inherit color so text doesn't go link-blue. */
.card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.card-link:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card-link:focus-visible {
  outline: 2px solid var(--accent, var(--brand));
  outline-offset: 2px;
}

/* Arrow affordance on the card header — slides right on hover. */
.card-arrow {
  margin-left: auto;
  font-size: 16px;
  color: var(--text-faint);
  transition: transform 0.15s ease, color 0.15s ease;
}
.card-link:hover .card-arrow {
  transform: translateX(3px);
  color: var(--brand);
}

/* Headline shown UNDER the visual when one is present — small, muted. */
.card-subline {
  margin: 0;
  font-size: 14px;
  color: var(--text-mute);
  line-height: 1.45;
}

/* Generic 2-column visual row for donut + meta stack. */
.cv-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 4px 0 6px;
}
.cv-row-spaced {
  justify-content: space-between;
}

/* Donut — pure CSS conic-gradient, sized for a card. Reuses the pattern
   from /system/vms (.vms-dash-donut) but styled for status board. */
.cv-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cv-donut {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--ring, var(--gray) 0deg 360deg));
  flex-shrink: 0;
}
.cv-donut::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--bg-elev);
}
.cv-donut-empty { background: var(--border-soft); }
.cv-donut-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.cv-donut-label-muted { color: var(--text-faint); font-weight: 500; }
.cv-donut-denom {
  font-size: 14px;
  color: var(--text-mute);
  font-weight: 500;
  margin-left: 2px;
}
.cv-donut-cap {
  font-size: 14px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Big-number block (Security card "blocks today" etc.) */
.cv-bignum {
  display: flex;
  flex-direction: column;
}
.cv-bignum-value {
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cv-bignum-label {
  font-size: 14px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 4px;
}

/* Stack of number + caption + meta (VMs card right column) */
.cv-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cv-stack-num {
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cv-stack-cap {
  font-size: 14px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.cv-stack-meta {
  font-size: 14px;
  color: var(--text-mute);
  margin-top: 2px;
}

/* Sparkline (24 vertical bars, fixed-width). 24h hourly bucket. */
.cv-spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 42px;
  flex: 0 0 auto;
  width: 130px;
}
.cv-spark-bar {
  flex: 1 1 auto;
  background: var(--brand-soft, var(--brand));
  opacity: 0.55;
  border-radius: 1px;
  min-height: 2px;
  transition: opacity 0.15s ease;
}
.cv-spark-bar:hover { opacity: 1; }

/* Compact issue list (under the chart) */
.cv-issues {
  list-style: none;
  margin: 6px 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cv-issue {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.4;
}
.cv-issue-red    { color: var(--red); }
.cv-issue-yellow { color: var(--yellow-deep, var(--yellow)); }
.cv-issue-green  { color: var(--text-mute); }

.cv-good {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--green-deep, var(--green));
  font-weight: 500;
}

/* VMs card legend — compact horizontal */
.cv-legend {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 14px;
  color: var(--text-mute);
}
.cv-legend li { display: inline-flex; align-items: center; gap: 5px; }
.cv-legend strong { color: var(--text); font-weight: 600; }
.cv-leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Hosting card host grid — pill-per-host with status dot inside. */
.cv-host-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 8px;
}
.cv-host-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 5px;
  border-radius: 12px;
  font-size: 14px;
  font-family: var(--mono);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  color: var(--text-2);
  line-height: 1.5;
}
.cv-host-pill-yellow { border-color: var(--yellow); }
.cv-host-pill-red    { border-color: var(--red); color: var(--red); }
.cv-host-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.cv-host-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--text-mute);
}
.cv-host-summary-item { display: inline-flex; align-items: center; gap: 5px; }

/* Security card — top attacker IPs panel */
.cv-attackers {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
}
.cv-attackers-label {
  font-size: 14px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 4px;
}
.cv-attackers-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}
.cv-attackers-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.cv-attackers-list code {
  background: transparent;
  font-size: 14px;
  color: var(--text-2);
}
.cv-attackers-count {
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 14px;
}

/* Storage card — placeholder capacity bars */
.cv-storage-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 8px;
}
.cv-storage-row {
  display: grid;
  grid-template-columns: 78px 1fr 30px;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.cv-storage-name {
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 14px;
}
.cv-storage-bar {
  background: var(--border-soft);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.cv-storage-bar-fill {
  background: var(--green);
  height: 100%;
  transition: width 0.2s ease;
}
.cv-storage-pct {
  text-align: right;
  font-family: var(--mono);
  font-size: 14px;
}
.cv-stub-note {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-mute);
  font-style: italic;
  line-height: 1.45;
}

/* Storage card — per-host severity-tinted bar fills (commit 2.33) */
.cv-storage-bar-fill-green  { background: var(--green); }
.cv-storage-bar-fill-yellow { background: var(--yellow, #b45309); }
.cv-storage-bar-fill-red    { background: var(--red); }
.cv-storage-bar-fill-gray   { background: var(--text-mute); }
.cv-storage-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; vertical-align: middle;
  flex-shrink: 0;
}
.cv-storage-dot-green  { background: var(--green); }
.cv-storage-dot-yellow { background: var(--yellow, #b45309); }
.cv-storage-dot-red    { background: var(--red); }
.cv-storage-dot-gray   { background: var(--text-mute); }
.cv-storage-row {
  grid-template-columns: 12px 100px 1fr 36px;  /* dot + name + bar + pct */
}
.cv-storage-row-red .cv-storage-name { color: var(--red); font-weight: 600; }
.cv-storage-err {
  font-size: 14px; margin-left: 6px; color: var(--red);
  font-style: italic;
}
.cv-storage-summary {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  padding: 4px 0 8px;
}
.cv-storage-summary .cv-bignum { font-size: 32px; line-height: 1; }
.cv-storage-summary .cv-bignum-unit { font-size: 18px; }
.cv-storage-summary .cv-bignum-label { font-size: 14px; color: var(--text-2); }
.cv-storage-summary .cv-bignum-sub { font-size: 14px; }

/* /system/storage — per-host card grid (commit 2.33, redesigned commit 2.34) */
.storage-host-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}

/* Donut size variants for the storage pages */
.cv-donut.cv-donut-md { width: 72px; height: 72px; }
.cv-donut.cv-donut-md .cv-donut-label { font-size: 17px; }
.cv-donut.cv-donut-lg { width: 110px; height: 110px; }
.cv-donut.cv-donut-lg .cv-donut-label { font-size: 26px; font-weight: 700; }

/* Mini per-pool bars inside a host card */
.storage-host-pool-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.storage-host-pool-mini {
  display: grid;
  grid-template-columns: 1fr auto 36px;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.storage-host-pool-mini-name {
  font-family: var(--mono);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.storage-host-pool-mini-bar {
  display: inline-block;
  width: 100px;
  height: 5px;
  background: var(--border-soft, var(--border));
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
}
.storage-host-pool-mini-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s ease;
}
.storage-host-pool-mini-pct {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-family: var(--mono);
  color: var(--text-2);
}

/* Per-host drilldown page */
.storage-hero {
  margin-bottom: 8px;
  padding: 20px 24px;
}
.storage-hero-top {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}
/* Full-width horizontal strip BELOW the donut. CSS Grid so the 5
   stat tiles share space evenly and wrap as whole units, not letter
   by letter (the original flex layout was squeezing each into a
   ~30px-wide column when room got tight). */
.storage-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.storage-hero-stat {
  text-align: center;
  padding: 4px 8px;
}
.storage-hero-stat-num {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.storage-hero-stat-cap {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pool cards — primary content on the host drilldown */
.storage-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.storage-pool-card {
  padding: 16px 18px;
}
.storage-pool-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.storage-pool-name {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  flex: 1;
  color: var(--text);
}
.storage-pool-status {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
}
.storage-pool-status-green { background: var(--green-bg, #ecfdf5); color: var(--green-deep, var(--green)); }
.storage-pool-status-red   { background: var(--red-bg, #fef2f2);   color: var(--red); }
.storage-pool-body {
  display: flex;
  align-items: center;
  gap: 18px;
}
.storage-pool-numbers {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.storage-pool-num-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.storage-pool-num {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text);
}
.storage-pool-num-sm {
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.storage-pool-unit {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
}
.storage-pool-foot {
  margin: 14px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}

/* 30-day capacity sparkline + meta — commit 2.38 */
.storage-pool-trend {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.storage-pool-trend svg {
  display: block;
  width: 100%;
}
.storage-pool-trend-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}
.storage-pool-trend-meta .muted {
  color: var(--text-3, var(--text-2));
}

/* Alert cards — proper card-shaped, severity rail on left, action footer */
.storage-alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.storage-alert {
  display: flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.storage-alert-rail {
  width: 6px;
  flex-shrink: 0;
  background: var(--text-mute);
}
.storage-alert-red    .storage-alert-rail { background: var(--red); }
.storage-alert-yellow .storage-alert-rail { background: var(--yellow, #b45309); }
.storage-alert-blue   .storage-alert-rail { background: var(--blue, #1d4ed8); }
.storage-alert-red    { border-color: rgba(220, 38, 38, 0.25); }
.storage-alert-yellow { border-color: rgba(180, 83, 9, 0.25); }
.storage-alert-body {
  flex: 1;
  padding: 14px 18px;
}
.storage-alert-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.storage-alert-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.storage-alert-level-text { font-size: 14px; }
.storage-alert-level-red    { background: var(--red-bg, #fef2f2);    color: var(--red); }
.storage-alert-level-yellow { background: var(--yellow-bg, #fffbeb); color: var(--yellow, #b45309); }
.storage-alert-level-blue   { background: var(--blue-bg, #eff6ff);   color: var(--blue, #1d4ed8); }
.storage-alert-klass {
  font-family: var(--mono);
  font-size: 14px;
  padding: 3px 9px;
  background: var(--bg-soft);
  border-radius: 4px;
  color: var(--text-2);
  font-weight: 500;
}
.storage-alert-when {
  margin-left: auto;
  font-size: 14px;
}
.storage-alert-message {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  font-weight: 400;
}
.storage-alert-foot {
  display: flex;
  gap: 10px;
  align-items: center;
}
.storage-alert-action {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 5px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.storage-alert-action:hover {
  background: var(--bg);
  border-color: var(--brand, #f97316);
}
.storage-alert-action-primary {
  background: var(--brand, #f97316);
  color: white;
  border-color: var(--brand, #f97316);
}
.storage-alert-action-primary:hover {
  background: var(--brand-deep, #ea580c);
  color: white;
}

/* Pool topology — vdev tree (commit 2.37) */
.storage-pool-detail-link {
  margin-left: auto;
  font-size: 14px;
  color: var(--brand, #f97316);
  text-decoration: none;
}
.storage-pool-detail-link:hover { text-decoration: underline; }
.storage-topology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}
.storage-topology-card { padding: 14px 18px; }
.storage-topology-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.storage-topology-pool {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  flex: 1;
}
.storage-vdev-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.storage-vdev {
  display: grid;
  grid-template-columns: 90px 70px 1fr;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--bg-soft);
  font-size: 14px;
}
.storage-vdev-green { border-left: 3px solid var(--green); }
.storage-vdev-red   { border-left: 3px solid var(--red); }
.storage-vdev-name { font-family: var(--mono); font-weight: 500; }
.storage-vdev-status {
  font-size: 14px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-align: center;
}
.storage-vdev-status-green { background: var(--green-bg, #ecfdf5); color: var(--green-deep, var(--green)); }
.storage-vdev-status-red   { background: var(--red-bg, #fef2f2);   color: var(--red); }
.storage-vdev-children {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 14px;
}
.storage-vdev-child {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.storage-vdev-child-green { color: var(--green-deep, var(--green)); border-color: rgba(22, 163, 74, 0.3); }
.storage-vdev-child-red   { color: var(--red); border-color: rgba(220, 38, 38, 0.4); background: var(--red-bg, #fef2f2); }
.storage-vdev-extras {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

/* Top dataset consumers (commit 2.37) */
.storage-dataset-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.storage-dataset-row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(150px, 3fr) 90px;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
}
.storage-dataset-name code {
  font-size: 14px;
  background: transparent;
  padding: 0;
}
.storage-dataset-bar {
  height: 8px;
  background: var(--border-soft, var(--border));
  border-radius: 4px;
  overflow: hidden;
}
.storage-dataset-bar-fill {
  height: 100%;
  background: var(--brand, #f97316);
  transition: width 0.3s ease;
}
.storage-dataset-size {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}

/* Disk inventory table (commit 2.37) */
.storage-disk-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elev);
}
.storage-disk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.storage-disk-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
  white-space: nowrap;
}
.storage-disk-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft, var(--border));
  vertical-align: middle;
}
.storage-disk-table tbody tr:last-child td { border-bottom: none; }
.storage-disk-table tbody tr:hover td { background: var(--bg-soft); }
.storage-disk-table code {
  font-size: 14px;
  background: transparent;
  padding: 0;
}

/* Scrub schedule list (commit 2.37) */
.storage-scrub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.storage-scrub-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
}
.storage-scrub-row code {
  font-weight: 600;
  background: transparent;
  padding: 0;
  min-width: 100px;
}
.storage-scrub-when {
  color: var(--text-2);
  font-size: 14px;
  flex: 1;
}

/* Data protection summary row */
.storage-protection-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.storage-protection-card {
  padding: 14px 16px;
  text-align: center;
}
.storage-protection-num {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.storage-protection-cap {
  font-size: 14px;
  color: var(--text-2);
  margin: 4px 0 8px;
}
.storage-protection-issue {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}
.storage-protection-link {
  font-size: 14px;
  color: var(--text-mute);
  text-decoration: none;
}
.storage-protection-link:hover { color: var(--brand, #f97316); text-decoration: underline; }

/* Reuse error-banner shape for the per-host "Host unreachable" panel */
.backup-scream-error {
  background: var(--red-bg, #fef2f2);
  color: var(--red);
  border: 1px solid var(--red);
}
.storage-host-card {
  display: block;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.storage-host-card:hover {
  border-color: var(--brand, #f97316);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.storage-host-card-red    { border-left: 4px solid var(--red); }
.storage-host-card-yellow { border-left: 4px solid var(--yellow, #b45309); }
.storage-host-card-green  { border-left: 4px solid var(--green); }
.storage-host-card-gray   { border-left: 4px solid var(--text-mute); }
.storage-host-card-head {
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.storage-host-card-title { margin: 0; font-size: 15px; font-weight: 600; flex: 1; }
.storage-host-card-meta { margin: 4px 0 0; font-size: 14px; }
.storage-host-card-role {
  margin: 6px 0 8px; font-size: 14px; color: var(--text-2);
  font-style: italic; line-height: 1.4;
}
.storage-host-card-err {
  margin: 8px 0; padding: 8px 10px;
  background: var(--red-bg, #fef2f2); color: var(--red);
  border-radius: 6px; font-size: 14px; line-height: 1.4;
}
.storage-host-card-pools {
  display: flex; flex-direction: column; gap: 8px;
  margin: 10px 0;
}
.storage-host-pool {
  font-size: 14px;
}
.storage-host-pool-row {
  display: flex; justify-content: space-between;
  font-weight: 500;
}
.storage-host-pool-name { font-family: var(--mono); font-size: 14px; }
.storage-host-pool-pct { font-variant-numeric: tabular-nums; }
.storage-host-pool-bar {
  height: 6px; background: var(--border-soft, var(--border));
  border-radius: 3px; overflow: hidden; margin: 3px 0;
}
.storage-host-pool-bar-fill {
  height: 100%; background: var(--green);
  transition: width 0.2s ease;
}
.storage-host-pool-bar-fill-yellow { background: var(--yellow, #b45309); }
.storage-host-pool-bar-fill-red    { background: var(--red); }
.storage-host-pool-meta { font-size: 14px; }
.storage-host-card-foot {
  margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 14px; color: var(--text-2);
  display: flex; gap: 6px; flex-wrap: wrap;
}

/* cv-dot variant for header use */
.cv-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}
.cv-dot-green  { background: var(--green); }
.cv-dot-yellow { background: var(--yellow, #b45309); }
.cv-dot-red    { background: var(--red); }
.cv-dot-gray   { background: var(--text-mute); }

/* Text-color utility classes used in storage templates */
.text-red    { color: var(--red); }
.text-yellow { color: var(--yellow, #b45309); }
.text-green  { color: var(--green); }
.text-gray   { color: var(--text-mute); }

/* /system/storage per-host drill-down — data table rows */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left; padding: 8px 10px;
  background: var(--bg-soft);
  border-bottom: 2px solid var(--border);
  font-weight: 600; font-size: 14px;
  color: var(--text-2);
}
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft, var(--border));
}
.data-table tr:hover td { background: var(--bg-soft); }
.data-table tr.row-red td   { background: var(--red-bg, #fef2f2); }
.data-table tr.row-yellow td{ background: var(--yellow-bg, #fffbeb); }



/* ─── Folded in by cut 4 (2026-05-27): home auto-refresh + recent-issues card. ─── */
/* ─── / Status home — auto-refresh + recent-issues card (commit 2.22) ─── */
.home-auto-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-mute);
}
.home-auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}
.home-auto-toggle input { margin: 0; }
.home-auto-countdown {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  min-width: 90px;
}
.recent-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
}
.recent-top-col { display: flex; flex-direction: column; gap: 4px; }
.recent-top-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  font-weight: 600;
}
.recent-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.recent-top-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  margin: 0 -8px;
  border-radius: 5px;
  text-decoration: none;
  color: inherit;
  font-size: 14px;
  transition: background 0.15s ease;
}
.recent-top-link:hover { background: var(--bg-soft); }
.recent-top-link code {
  background: transparent;
  font-size: 14px;
  color: var(--text-2);
}
.recent-top-link:hover code { color: var(--brand-deep, var(--brand)); }
.recent-top-count {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}


/* ─── Folded in by cut 4 (2026-05-27): recent panel header + materializer health badge. ─── */
/* ─── Recent panel header (home page) — title + tabs ─── */
.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}
.recent-tabs { display: flex; gap: 4px; }
.recent-tab {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-mute);
  background: transparent;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}
.recent-tab:hover { color: var(--text); background: var(--bg-soft); }
.recent-tab.active {
  color: var(--text);
  background: var(--bg-soft);
  border-color: var(--border);
  font-weight: 600;
}

/* ─── Materializer health badge (home page) — only shown when NOT OK ─── */
.mat-health {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 16px 0;
  border-radius: 8px;
  font-size: 14px;
  border-left: 4px solid;
}
.mat-health-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: mat-pulse 2.4s ease-in-out infinite;
}
@keyframes mat-pulse { 0%,100%{opacity:1} 50%{opacity:.45} }
.mat-health-never_run {
  background: var(--bg-soft);
  border-left-color: var(--text-mute);
}
.mat-health-never_run .mat-health-dot { background: var(--text-mute); }
.mat-health-lagging {
  background: #fef3c7;
  border-left-color: var(--yellow);
  color: #5a4400;
}
[data-theme="dark"] .mat-health-lagging { background: #422006; color: #fcd34d; }
.mat-health-lagging .mat-health-dot { background: var(--yellow); }
.mat-health-stuck {
  background: #fee2e2;
  border-left-color: var(--red);
  color: #7f1d1d;
}
[data-theme="dark"] .mat-health-stuck { background: #450a0a; color: #fca5a5; }
.mat-health-stuck .mat-health-dot { background: var(--red); }

/* ─── Customer Home — all-servers tree (#97) ────────────────────────────────
   A Blesta-SSO customer's hosting + VPS resources, grouped by the server they
   live on. Native <details> = expand/collapse with NO JS (CSP script-src
   'self' safe). Mobile-first, token-driven (no hardcoded colours/sizes). */
.ctree { margin: 0 0 var(--space-8); }
.ctree-grp {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.ctree-sum {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  min-height: 44px;
  box-sizing: border-box;
}
.ctree-sum::-webkit-details-marker { display: none; }
.ctree-sum:focus-visible { outline: 2px solid var(--accent, var(--brand)); outline-offset: -2px; }
.ctree-ico { flex: none; color: var(--text-mute); display: flex; }
.ctree-ico svg { width: 22px; height: 22px; }
.ctree-tt { flex: 1; min-width: 0; }
.ctree-tt .ttl { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.ctree-tt .sub { display: block; font-size: var(--fs-xs); color: var(--text-mute); margin-top: 2px; word-break: break-word; }
.ctree-chev { flex: none; color: var(--text-faint); display: flex; }
.ctree-chev svg { width: 18px; height: 18px; transition: transform 0.15s ease; }
details[open] > .ctree-sum .ctree-chev svg { transform: rotate(180deg); }
.ctree-body { border-top: 1px solid var(--border); }
.ctree-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--border-soft);
  min-height: 52px;
  box-sizing: border-box;
}
.ctree-row:first-child { border-top: none; }
.ctree-row:hover { background: var(--bg-soft); }
.ctree-rt { flex: 1; min-width: 0; }
.ctree-rt .dom { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--text); word-break: break-word; }
.ctree-rt .meta { display: block; font-size: var(--fs-xs); color: var(--text-mute); margin-top: 1px; }
.ctree-rt .meta.warn { color: var(--red-deep); font-weight: 700; }
.ctree-go { flex: none; color: var(--text-faint); display: flex; }
.ctree-go svg { width: 16px; height: 16px; }
.ctree-tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-mute);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 7px;
  margin-left: 6px;
}
.ctree-pill {
  flex: none;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
}
.ctree-pill.on { color: var(--green-deep); background: var(--green-bg); }
.ctree-pill.off { color: var(--text-mute); background: var(--bg-soft); }
.ctree-vbody {
  border-top: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.ctree-vmeta { flex: 1 1 auto; min-width: 0; font-size: var(--fs-xs); color: var(--text-mute); }
.ctree-btn {
  flex: none;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius);
  min-height: 44px;
  box-sizing: border-box;
  line-height: 22px;
  background: var(--orange-deep);
  color: #fff;
  text-decoration: none;
}
.ctree-empty {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: var(--text-mute);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
/* Per-server sub-header inside the Web Hosting category (shown only when a
   customer has sites on more than one server). */
.ctree-subhd {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-mute);
  background: var(--bg-soft);
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--border-soft);
}
.ctree-subhd:first-child { border-top: none; }

/* Tinted, rounded category icon chip (warmth + colour per resource type). */
.ctree-chip {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctree-chip svg { width: 22px; height: 22px; }
.ctree-chip.web { background: var(--orange-bg); color: var(--orange-deep); }
.ctree-chip.vps { background: var(--green-bg); color: var(--green-deep); }
.ctree-chip.dom { background: var(--bg-soft); color: var(--text-mute); }

/* Per-site health dot — green = healthy, amber = renewing soon. */
.ctree-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: var(--green);
}
.ctree-dot.warn { background: var(--orange); }

/* Hero: overview stat strip + plain-English health line. */
.chome-health {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text);
  margin-top: var(--space-3);
}
.chome-health .hdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.chome-health.ok .hdot { background: var(--green); }
.chome-health.warn .hdot { background: var(--orange); }
.chome-stats { display: flex; gap: var(--space-2); margin: 0 0 var(--space-6); }
.chome-stat {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
}
.chome-stat .num { font-size: var(--fs-xl); font-weight: 800; line-height: 1; color: var(--text); }
.chome-stat .lbl { font-size: var(--fs-xs); color: var(--text-mute); margin-top: var(--space-1); }

