/* ═════════════════════════════════════════════════════════════════════
   SPECTRA /// SHARED — Base
   Reset, typography defaults, scrollbars, selection, reduced motion,
   focus-visible. Every product imports this without modification.
   ═════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--bg); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-hi);
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--fg-faint); background-clip: padding-box; }

/* ── Focus-visible — one ring for the whole suite ─────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Reduced motion — global override ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Preloader — three orbiting dots, canonical structure ────────── */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#preloader .loader-container { position: relative; width: 120px; height: 120px; }
#preloader .loader-orbit {
  position: absolute;
  inset: 0;
  animation: pl-rotate 2s linear infinite;
}
#preloader .loader-circle {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  top: 50%; left: 50%;
  margin-top: -8px; margin-left: -8px;
}
@keyframes pl-rotate { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  #preloader .loader-container { width: 80px; height: 80px; }
  #preloader .loader-circle {
    width: 12px; height: 12px;
    margin-top: -6px; margin-left: -6px;
  }
}

/* ── Toast stack — one canonical implementation ──────────────────── */
.toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--card-bg-solid);
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  opacity: 0;
  transform: translateX(120%);
  transition: opacity 0.24s var(--ease-out), transform 0.24s var(--ease-out);
  pointer-events: auto;
  min-width: 300px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.out { opacity: 0; transform: translateX(120%); }
.toast .toast-ic {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.toast .toast-ic svg { width: 13px; height: 13px; stroke-width: 2; }
.toast-ok .toast-ic { background: var(--green-soft); color: var(--green); }
.toast-info .toast-ic { background: var(--accent-soft); color: var(--accent); }
.toast-warn .toast-ic { background: var(--amber-soft); color: var(--amber); }
.toast-err .toast-ic { background: var(--red-soft); color: var(--red); }
.toast-product .toast-ic { background: var(--product-soft, var(--accent-soft)); color: var(--product, var(--accent)); }
.toast-body { flex: 1; min-width: 0; }
.toast-body .toast-t { font-weight: 600; color: var(--fg-bright); }
.toast-body .toast-d {
  color: var(--fg-mute);
  font-size: 11.5px;
  margin-top: 2px;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toast .toast-close {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--fg-faint);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.toast .toast-close:hover { background: var(--card-bg); color: var(--fg-bright); }
.toast .toast-close svg { width: 12px; height: 12px; stroke-width: 2.2; }

/* ── Modal backdrop — one canonical shell ────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 260;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.modal-backdrop.show { display: flex; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card-bg-solid);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.22s var(--ease-out);
}
.modal.lg { max-width: 900px; }
.modal.xl { max-width: 1200px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.modal-head .mh-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-bright);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-head .mh-title svg { width: 15px; height: 15px; stroke-width: 1.9; color: var(--product, var(--accent)); }
.modal-head .mh-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--fg-mute);
  cursor: pointer;
  transition: all 0.15s;
}
.modal-head .mh-close:hover { background: var(--red-soft); color: var(--red); }
.modal-body { flex: 1; overflow-y: auto; padding: 20px; }
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ── Confirm dialog — canonical shape ────────────────────────────── */
.confirm-modal {
  background: var(--card-bg-solid);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  padding: 26px 24px 22px;
  max-width: 440px;
  width: 100%;
  animation: modalIn 0.22s var(--ease-out);
}
.confirm-modal .confirm-ic {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.confirm-modal .confirm-ic svg { width: 20px; height: 20px; }
.confirm-modal .confirm-ic.warn { background: var(--amber-soft); color: var(--amber); }
.confirm-modal .confirm-ic.danger { background: var(--red-soft); color: var(--red); }
.confirm-modal .confirm-ic.ok { background: var(--green-soft); color: var(--green); }
.confirm-modal .confirm-ic.info { background: var(--accent-soft); color: var(--accent); }
.confirm-modal h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-bright);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.confirm-modal p {
  font-size: 12.5px;
  color: var(--fg-dim);
  line-height: 1.6;
  margin-bottom: 20px;
}
.confirm-modal .confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Buttons — canonical shapes ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
  height: 32px;
}
.btn svg { width: 13px; height: 13px; stroke-width: 1.85; flex-shrink: 0; }
.btn-primary {
  background: var(--product, var(--accent));
  color: var(--bg);
  border-color: var(--product, var(--accent));
}
.btn-primary:hover {
  background: var(--product-dim, var(--accent-dim));
  border-color: var(--product-dim, var(--accent-dim));
}
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--fg-dim);
  border-color: var(--border-hi);
}
.btn-ghost:hover {
  color: var(--product, var(--accent));
  border-color: var(--product-line, var(--accent-line));
  background: var(--product-soft, var(--accent-soft));
}
.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.30);
}
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-success {
  background: var(--green);
  color: var(--bg);
  border-color: var(--green);
}
.btn-success:hover { filter: brightness(0.95); }
.btn-2p {
  background: transparent;
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.30);
}
.btn-2p:hover { background: var(--amber-soft); border-color: var(--amber); }
.btn-sm { padding: 4px 10px; font-size: 11.5px; height: 26px; }
.btn-sm svg { width: 12px; height: 12px; }
.btn-icon { padding: 0; width: 32px; height: 32px; }
.btn-sm.btn-icon { width: 26px; height: 26px; }
.btn-block { width: 100%; }

/* ── Split button ───────────────────────────────────────────────── */
.btn-split {
  display: inline-flex;
  border-radius: var(--r-md);
  overflow: hidden;
  height: 32px;
}
.btn-split .main {
  background: var(--product, var(--accent));
  color: var(--bg);
  border: 1px solid var(--product, var(--accent));
  border-right: none;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-split .main:hover { background: var(--product-dim, var(--accent-dim)); }
.btn-split .trigger {
  background: var(--product, var(--accent));
  color: var(--bg);
  border: 1px solid var(--product, var(--accent));
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  border-left: 1px solid rgba(0, 0, 0, 0.18);
}
.btn-split .trigger:hover { background: var(--product-dim, var(--accent-dim)); }

/* ── Pills / tags / mini-pills ───────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.7;
}
.pill .pip { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill.online { background: var(--green-soft); color: var(--green); }
.pill.online .pip { box-shadow: 0 0 6px var(--green); }
.pill.offline { background: rgba(91, 100, 114, 0.14); color: var(--fg-mute); }
.pill.idle { background: var(--amber-soft); color: var(--amber); }
.pill.crit { background: var(--red-soft); color: var(--red); }
.pill.crit .pip { box-shadow: 0 0 6px var(--red); animation: pipPulse 1.4s infinite; }
.pill.high { background: var(--orange-soft); color: var(--orange); }
.pill.med { background: var(--amber-soft); color: var(--amber); }
.pill.low { background: var(--blue-soft); color: var(--blue); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.mint { background: var(--mint-soft); color: var(--mint); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.pink { background: var(--pink-soft); color: var(--pink); }
.pill.pending { background: var(--amber-soft); color: var(--amber); }
.pill.pending .pip { box-shadow: 0 0 6px var(--amber); animation: pipPulse 1.6s infinite; }
.pill.2p { background: var(--amber-soft); color: var(--amber); }
.pill.product {
  background: var(--product-soft, var(--accent-soft));
  color: var(--product, var(--accent));
}
.pill.product .pip {
  box-shadow: 0 0 6px var(--product, var(--accent));
  animation: pipPulse 1.6s infinite;
}
@keyframes pipPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--fg-dim);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.tag svg { width: 10px; height: 10px; stroke-width: 2; }
.tag.accent {
  color: var(--product, var(--accent));
  border-color: var(--product-line, var(--accent-line));
  background: var(--product-soft, var(--accent-soft));
}
.tag.os-win { color: var(--blue); border-color: rgba(96, 165, 250, 0.28); background: rgba(96, 165, 250, 0.06); }
.tag.os-lin { color: var(--amber); border-color: rgba(251, 191, 36, 0.28); background: rgba(251, 191, 36, 0.06); }
.tag.os-mac { color: var(--purple); border-color: rgba(167, 139, 250, 0.28); background: rgba(167, 139, 250, 0.06); }

.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--fg-dim);
}
.mini-pill.on { background: var(--green-soft); color: var(--green); border-color: rgba(52, 211, 153, 0.25); }
.mini-pill.off { background: rgba(91, 100, 114, 0.14); color: var(--fg-mute); }
.mini-pill.warn { background: var(--amber-soft); color: var(--amber); border-color: rgba(251, 191, 36, 0.25); }
.mini-pill.crit { background: var(--red-soft); color: var(--red); border-color: rgba(248, 113, 113, 0.25); }
.mini-pill.info {
  background: var(--product-soft, var(--accent-soft));
  color: var(--product, var(--accent));
  border-color: var(--product-line, var(--accent-line));
}

/* ── Spinner ─────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--product-soft, var(--accent-soft));
  border-top-color: var(--product, var(--accent));
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state — canonical shape ───────────────────────────────── */
.empty-state {
  padding: 56px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.empty-state .ico {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-hi);
  display: grid; place-items: center;
  color: var(--fg-mute);
  margin-bottom: 4px;
}
.empty-state .ico svg { width: 22px; height: 22px; stroke-width: 1.5; }
.empty-state .title { font-size: 15px; font-weight: 500; color: var(--fg-bright); }
.empty-state .sub {
  font-size: 12.5px;
  color: var(--fg-mute);
  line-height: 1.55;
  max-width: 400px;
}
.empty-state .actions { display: flex; gap: 8px; margin-top: 6px; }

/* ── Page head — canonical shape ─────────────────────────────────── */
.page-head {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.page-head .title-block { min-width: 0; flex: 1; }
.page-head .eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-head .eyebrow .mode-chip {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--product-soft, var(--accent-soft));
  color: var(--product, var(--accent));
  border: 1px solid var(--product-line, var(--accent-line));
}
.page-head h1 {
  font-size: 22px;
  font-weight: 300;
  color: var(--fg-bright);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-head h1 svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.75;
  color: var(--product, var(--accent));
}
.page-head .ph-desc {
  font-size: 12.5px;
  color: var(--fg-mute);
  line-height: 1.55;
  max-width: 640px;
}
.page-head .page-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── Card head — canonical shape ─────────────────────────────────── */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.card-head .ttl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-head .ttl svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
  color: var(--product, var(--accent));
}

/* ── Section head — the clean >_ in product color ────────────────── */
.sect { margin-bottom: 26px; }
.sect-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.sect-head h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sect-head h2 svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
  color: var(--product, var(--accent));
  flex-shrink: 0;
}
.sect-head .sect-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
}
.sect-head .sect-actions { display: flex; gap: 8px; }

/* ── Inputs — canonical shape ────────────────────────────────────── */
.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg-3);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  outline: none;
  font-size: 13px;
  font-family: var(--font);
  color: var(--fg);
  transition: all 0.15s;
  height: 34px;
}
/* Native option popups ignore the select's own colors on several
   platforms — force theme colors so options never render as light
   text on the UA white background. */
.select option,
.select-sender option,
.field-sender .select-sender option {
  background: var(--bg-2);
  color: var(--fg-bright);
}
.input.mono,
.select.mono,
.textarea.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.input::placeholder,
.textarea::placeholder { color: var(--fg-faint); }
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--product, var(--accent));
  box-shadow: 0 0 0 3px var(--product-soft, var(--accent-soft));
}
.textarea { resize: vertical; min-height: 120px; line-height: 1.6; height: auto; padding: 11px 13px; }

.field { margin-bottom: 14px; }
.field > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 500;
  margin-bottom: 7px;
}
.field > label .req { color: var(--red); margin-left: 4px; }
.field .hint {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-mute);
  margin-top: 6px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-row.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
  .field-row,
  .field-row.three { grid-template-columns: 1fr; }
}

/* ── Data table — canonical RMM grammar ──────────────────────────── */
.dt-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.dt-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}
.dt-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--fg-mute);
  pointer-events: none;
}
.dt-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--fg);
  height: 32px;
  transition: all 0.15s;
}
.dt-search input:focus {
  border-color: var(--product, var(--accent));
  box-shadow: 0 0 0 3px var(--product-soft, var(--accent-soft));
}
.dt-spacer { flex: 1; }
.dt-scroll { overflow-x: auto; }

.dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.dt thead th {
  text-align: left;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.dt tbody tr {
  border-bottom: 1px solid var(--border-2);
  transition: background 0.1s;
}
.dt tbody tr:hover { background: var(--card-bg); }
.dt tbody tr:last-child { border-bottom: none; }
.dt tbody td { padding: 11px 14px; vertical-align: middle; }
.dt .cell-mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.dt .cell-name { font-weight: 500; color: var(--fg-bright); }
.dt .cell-muted { color: var(--fg-mute); }
.dt .cell-right { text-align: right; }
.dt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  gap: 12px;
  flex-wrap: wrap;
}
.dt-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dt-pagination .pg {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--fg-dim);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: 11.5px;
}
.dt-pagination .pg:hover { border-color: var(--border-hi); color: var(--fg-bright); }
.dt-pagination .pg.active {
  background: var(--product-soft, var(--accent-soft));
  border-color: var(--product-line, var(--accent-line));
  color: var(--product, var(--accent));
  font-weight: 600;
}

/* ── Metric cards — canonical across suite ───────────────────────── */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .metrics { grid-template-columns: 1fr; } }

.metric {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s;
}
.metric::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--metric-accent, var(--product, var(--accent)));
  opacity: 0.85;
}
.metric:hover { border-color: var(--metric-accent, var(--product, var(--accent))); }
.metric.c-green  { --metric-accent: var(--green); }
.metric.c-amber  { --metric-accent: var(--amber); }
.metric.c-red    { --metric-accent: var(--red); }
.metric.c-blue   { --metric-accent: var(--blue); }
.metric.c-purple { --metric-accent: var(--purple); }
.metric .lbl {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}
.metric .lbl svg { width: 12px; height: 12px; stroke-width: 1.9; flex-shrink: 0; }
.metric .val {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--fg-bright);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.metric .val .unit { font-size: 11px; color: var(--fg-dim); font-weight: 400; }
.metric .sub {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.metric .sub svg { width: 11px; height: 11px; stroke-width: 2; }
.metric .sub.up { color: var(--green); }
.metric .sub.down { color: var(--red); }

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
}
.card.solid { background: var(--card-bg-solid); }
.card.hoverable { transition: border-color 0.15s, transform 0.2s var(--ease-out); }
.card.hoverable:hover {
  border-color: var(--product-line, var(--accent-line));
  transform: translateY(-1px);
}

/* ── Banners — canonical tones ───────────────────────────────────── */
.banner {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  border: 1px solid transparent;
  align-items: flex-start;
  line-height: 1.5;
  margin-bottom: 14px;
}
.banner svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; stroke-width: 1.9; }
.banner.info    { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.banner.warn    { background: var(--amber-soft);  color: var(--amber);  border-color: rgba(251, 191, 36, 0.25); }
.banner.error   { background: var(--red-soft);    color: var(--red);    border-color: rgba(248, 113, 113, 0.25); }
.banner.success { background: var(--green-soft);  color: var(--green);  border-color: rgba(52, 211, 153, 0.25); }
.banner.product {
  background: var(--product-soft, var(--accent-soft));
  color: var(--product, var(--accent));
  border-color: var(--product-line, var(--accent-line));
}
.banner strong { color: inherit; font-weight: 600; }
.banner code {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(0, 0, 0, 0.28);
  padding: 1px 5px;
  border-radius: 3px;
}