/* Device Health & Identity — super-admin Devices expander (Phase C, 2026-06-24).
   Matches the platform dark theme (tokens.css): blue/grey, indigo accent.
   Mobile-first: the Identity/Health grid collapses to one column under 640px. */

/* ── per-row health dot (Devices table "Health" column) ── */
.dh-row-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dh-row-dot-ok      { background: var(--ok); }
.dh-row-dot-warn    { background: var(--warn); }
.dh-row-dot-crit    { background: var(--danger); }
.dh-row-dot-unknown { background: var(--text-faint); }

/* ── the expander cell (full-width <td> after the device row) ── */
.dh-expander {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
}
.dh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .dh-grid { grid-template-columns: 1fr; } }

.dh-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 14px;
}
.dh-block h3 {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 12px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.dh-trends { margin-top: 16px; }

/* ── identity key/values ── */
.dh-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 12px; margin: 0; }
.dh-kv dt { color: var(--text-muted); }
.dh-kv dd { margin: 0; color: var(--text-1); overflow-wrap: anywhere; }
.dh-kv dd.mono { font-family: var(--font-mono); }
.dh-kv dd.empty { color: var(--text-faint); }

/* ── NIC table ── */
.dh-nic-tbl { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 11px; }
.dh-nic-tbl th {
  text-align: left; color: var(--text-muted); font-weight: 500;
  border-bottom: 1px solid var(--border-subtle); padding: 4px 8px;
}
.dh-nic-tbl td { padding: 4px 8px; border-bottom: 1px solid var(--border-subtle); }
.dh-nic-tbl td.mono { font-family: var(--font-mono); }
.dh-nic-name { color: var(--text-1); }
.dh-nic-state { display: inline-block; padding: 1px 6px; border-radius: var(--r-pill); font-size: 10px; }
.dh-nic-state-up { background: var(--ok-dim); color: var(--ok); }
.dh-nic-state-down,
.dh-nic-state-disconnected { background: var(--bg-input); color: var(--text-muted); }
.dh-empty-note { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

/* ── status chip ── */
.dh-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600;
}
.dh-chip-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dh-chip-ok      { background: var(--ok-dim);     color: var(--ok); }
.dh-chip-ok      .dh-chip-dot { background: var(--ok); }
.dh-chip-warn    { background: var(--warn-dim);   color: var(--warn); }
.dh-chip-warn    .dh-chip-dot { background: var(--warn); }
.dh-chip-crit    { background: var(--danger-dim); color: var(--danger); }
.dh-chip-crit    .dh-chip-dot { background: var(--danger); }
.dh-chip-unknown { background: var(--bg-input);   color: var(--text-muted); }
.dh-chip-unknown .dh-chip-dot { background: var(--text-faint); }

/* ── gauges ── */
.dh-gauges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dh-gauge { background: var(--bg-input); border-radius: var(--r-sm); padding: 10px 12px; }
.dh-gauge-lab { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.dh-gauge-val { font-size: 18px; font-weight: 600; font-family: var(--font-mono); margin-top: 2px; color: var(--text-1); }
.dh-gauge-bar { height: 4px; border-radius: 2px; background: var(--border); margin-top: 8px; overflow: hidden; }
.dh-gauge-bar > i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.dh-gauge-bar > i.dh-fill-warn { background: var(--warn); }
.dh-gauge-bar > i.dh-fill-crit { background: var(--danger); }
.dh-throttle { font-size: 11px; color: var(--warn); margin-top: 10px; font-family: var(--font-mono); }
.dh-updated { font-size: 11px; color: var(--text-muted); margin-top: 10px; }

/* ── trends ── */
.dh-trend-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dh-trend-title { margin: 0 !important; }
.dh-range-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.dh-range-toggle button {
  background: none; border: none; color: var(--text-2);
  padding: 4px 12px; font-size: 11px; cursor: pointer;
}
.dh-range-toggle button.active { background: var(--accent-soft); color: var(--text-1); }
.dh-charts { margin-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.dh-chart-wrap { width: 100%; }
.dh-chart-title { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.dh-chart-fallback { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); }

/* ── states ── */
.dh-no-data { font-size: 12px; color: var(--text-muted); padding: 8px 0; margin: 0; }
.dh-inline-error {
  font-size: 12px; color: var(--danger);
  background: var(--danger-dim); border-radius: var(--r-sm);
  padding: 8px 10px; margin-top: 8px;
}
