/* Panel v3 Design System — 4SO WordPress Enterprise Console.
   Directly adapted and aligned with dbaas-enterprise design specification.
   Logical properties throughout (RTL first, Vazirmatn Persian typography).
   Dark mode support via :root[data-theme="dark"]. */

:root {
  --v3-canvas: #efefec;
  --v3-surface: #fafaf8;
  --v3-surface-2: #f4f4f1;
  --v3-surface-3: #e8e8e4;
  --v3-ink: #16191b;
  --v3-ink-2: #4a5054;
  --v3-ink-3: #7a8084;
  --v3-line: #dcddd8;
  --v3-line-strong: #c4c6c0;
  --v3-accent: #0a7c72;
  --v3-accent-strong: #075e57;
  --v3-accent-soft: #ddeeeb;
  --v3-ok: #2d7a3e;
  --v3-warn: #a8650a;
  --v3-bad: #b42e24;
  --v3-info: #4a6378;
  --v3-unknown: #8c9194;
  --v3-ok-soft: #e5efe6;
  --v3-warn-soft: #f5ece0;
  --v3-bad-soft: #f6e6e4;
  --v3-info-soft: #e7ecf0;
  --v3-unknown-soft: #ececea;

  --v3-s1: 4px;
  --v3-s2: 8px;
  --v3-s3: 12px;
  --v3-s4: 16px;
  --v3-s5: 20px;
  --v3-s6: 24px;
  --v3-s7: 32px;
  --v3-s8: 40px;
  --v3-r-sm: 6px;
  --v3-r: 10px;
  --v3-r-lg: 14px;
  --v3-e1: none;
  --v3-e2: 0 8px 24px rgba(20,24,31,.10);
  --v3-e3: 0 20px 48px rgba(20,24,31,.16);
  --v3-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --v3-sans: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --v3-ease: cubic-bezier(.2,.7,.2,1);

  /* Engine Identity */
  --eng-wp: #0a7c72;
  --eng-mysql: #00758f;
  --eng-valkey: #5a5fc4;
  --eng-ceph: #cf3a24;
  --eng-rke2: #326ce5;

  /* Re-point legacy and 4SO variables to v3 tokens */
  --bg: var(--v3-canvas);
  --surface: var(--v3-surface);
  --surface-subtle: var(--v3-surface-2);
  --surface-muted: var(--v3-surface-3);
  --surface-2: var(--v3-surface-2);
  --text: var(--v3-ink);
  --ink: var(--v3-ink);
  --ink-soft: var(--v3-ink-2);
  --muted: var(--v3-ink-3);
  --muted-2: var(--v3-ink-3);
  --line: var(--v3-line);
  --line-strong: var(--v3-line-strong);
  --primary: var(--v3-accent);
  --primary-strong: var(--v3-accent-strong);
  --primary-hover: var(--v3-accent-strong);
  --primary-soft: var(--v3-accent-soft);
  --accent: var(--v3-accent);
  --success: var(--v3-ok);
  --success-soft: var(--v3-ok-soft);
  --warning: var(--v3-warn);
  --warning-soft: var(--v3-warn-soft);
  --warn: var(--v3-warn);
  --warn-soft: var(--v3-warn-soft);
  --danger: var(--v3-bad);
  --danger-soft: var(--v3-bad-soft);
  --info: var(--v3-info);
  --info-soft: var(--v3-info-soft);
  --shadow: var(--v3-e2);
  --radius: var(--v3-r-lg);
  --radius-sm: var(--v3-r);
  --focus: var(--v3-accent);
}

:root[data-theme="dark"] {
  --v3-canvas: #0f1113;
  --v3-surface: #15181b;
  --v3-surface-2: #1a1e21;
  --v3-surface-3: #22272b;
  --v3-ink: #e7e5e0;
  --v3-ink-2: #abafae;
  --v3-ink-3: #7c8283;
  --v3-line: #262b2f;
  --v3-line-strong: #343a3f;
  --v3-accent: #45c3b3;
  --v3-accent-strong: #6fd6c8;
  --v3-accent-soft: #102a27;
  --v3-ok: #5dbb73;
  --v3-warn: #e0a040;
  --v3-bad: #f0705f;
  --v3-info: #8aa6bd;
  --v3-unknown: #6d7375;
  --v3-ok-soft: #142219;
  --v3-warn-soft: #2a2112;
  --v3-bad-soft: #2c1714;
  --v3-info-soft: #172129;
  --v3-unknown-soft: #1c2022;
  --v3-e1: none;
  --v3-e2: 0 10px 30px rgba(0,0,0,.5);
  --v3-e3: 0 24px 60px rgba(0,0,0,.6);

  --eng-wp: #45c3b3;
  --eng-mysql: #3aa6c2;
  --eng-valkey: #8f94f0;
  --eng-ceph: #ff6157;
  --eng-rke2: #4d9cf0;

  --bg: var(--v3-canvas);
  --surface: var(--v3-surface);
  --surface-subtle: var(--v3-surface-2);
  --surface-muted: var(--v3-surface-3);
  --surface-2: var(--v3-surface-2);
  --text: var(--v3-ink);
  --ink: var(--v3-ink);
  --ink-soft: var(--v3-ink-2);
  --muted: var(--v3-ink-3);
  --muted-2: var(--v3-ink-3);
  --line: var(--v3-line);
  --line-strong: var(--v3-line-strong);
  --primary: var(--v3-accent);
  --primary-strong: var(--v3-accent-strong);
  --primary-hover: var(--v3-accent-strong);
  --primary-soft: var(--v3-accent-soft);
  --accent: var(--v3-accent);
  --success: var(--v3-ok);
  --success-soft: var(--v3-ok-soft);
  --warning: var(--v3-warn);
  --warning-soft: var(--v3-warn-soft);
  --warn: var(--v3-warn);
  --warn-soft: var(--v3-warn-soft);
  --danger: var(--v3-bad);
  --danger-soft: var(--v3-bad-soft);
  --info: var(--v3-info);
  --info-soft: var(--v3-info-soft);
}

body {
  background: var(--v3-canvas) !important;
  color: var(--v3-ink) !important;
  font-variant-numeric: tabular-nums;
}

.v3-ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------------------------------------------------------------- Chips */
.v3-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--v3-line);
  background: var(--v3-surface-2);
  color: var(--v3-ink-2);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.v3-chip > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--v3-unknown);
  flex: none;
}
.v3-chip.ok > i {
  background: var(--v3-ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--v3-ok) 18%, transparent);
}
.v3-chip.warn > i { background: var(--v3-warn); }
.v3-chip.bad > i { background: var(--v3-bad); }
.v3-chip.info > i { background: var(--v3-info); }
.v3-chip.bad { color: var(--v3-bad); border-color: color-mix(in srgb, var(--v3-bad) 30%, var(--v3-line)); }
.v3-chip.warn { color: var(--v3-warn); border-color: color-mix(in srgb, var(--v3-warn) 30%, var(--v3-line)); }
.v3-chip.ok { color: var(--v3-ok); border-color: color-mix(in srgb, var(--v3-ok) 30%, var(--v3-line)); }
.v3-chip.info > i { animation: v3-blink 1.2s ease-in-out infinite; }
@keyframes v3-blink { 50% { opacity: .25; } }

/* ------------------------------------------------------------- Topbar */
.topbar {
  background: color-mix(in srgb, var(--v3-surface) 88%, transparent) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid var(--v3-line) !important;
  position: sticky;
  top: 0;
  z-index: 25;
}

.brand-mark {
  background: var(--v3-accent) !important;
  color: #fff !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

.release {
  background: var(--v3-surface-2) !important;
  border-color: var(--v3-line) !important;
  color: var(--v3-ink-3) !important;
}

.runtime-refresh-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border: 1px solid var(--v3-line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--v3-surface-2);
  color: var(--v3-ink-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.runtime-refresh-chip > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--v3-ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--v3-ok) 14%, transparent);
}
.runtime-refresh-chip.stale > i { background: var(--v3-warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v3-warn) 14%, transparent); }
.runtime-refresh-chip.unproven > i { background: var(--v3-unknown); box-shadow: none; }
.runtime-refresh-chip.failed > i { background: var(--v3-bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v3-bad) 14%, transparent); }

/* ----------------------------------------------------------- Navigation */
.sidebar {
  background: var(--v3-surface) !important;
  border-inline-end: 1px solid var(--v3-line) !important;
  padding: 14px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  transition: width .2s var(--v3-ease), transform .2s var(--v3-ease) !important;
}

.sidebar .brand { padding: 4px 8px 14px; }

.sidebar .primary-create {
  background: var(--v3-accent) !important;
  border: 0 !important;
  color: #fff !important;
  border-radius: var(--v3-r) !important;
  margin-bottom: 12px !important;
  font-weight: 650 !important;
  height: 38px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: none !important;
}
.sidebar .primary-create:hover {
  background: var(--v3-accent-strong) !important;
  transform: none !important;
}

.v3-nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 6px;
}
.v3-nav-primary { margin-top: 0; }

.v3-nav-caption, .v3-nav-toggle {
  font-size: 11px;
  font-weight: 700;
  color: var(--v3-ink-3);
  letter-spacing: 0;
  text-transform: none;
}
.v3-nav-caption { padding: 6px 10px 4px; }
.v3-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px 4px;
  cursor: pointer;
  border-radius: var(--v3-r-sm);
  font-family: inherit;
  color: var(--v3-ink-3);
}
.v3-nav-toggle:hover { color: var(--v3-ink); }
.v3-nav-toggle .v3-chev {
  width: 14px;
  height: 14px;
  transition: transform .18s var(--v3-ease);
  transform: rotate(90deg);
}
.v3-nav-group.collapsed .v3-chev { transform: rotate(0); }
html[dir="rtl"] .v3-nav-group.collapsed .v3-chev { transform: rotate(180deg); }
.v3-nav-group.collapsed .v3-nav-items { display: none !important; }

.v3-nav-items { display: flex; flex-direction: column; gap: 1px; }

.sidebar .v3-nav-item, .sidebar .nav-item {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 36px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  color: var(--v3-ink-2) !important;
  font-weight: 550 !important;
  font-size: 13.5px !important;
  border: 0 !important;
  background: transparent !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: none !important;
}
.sidebar .v3-nav-item:hover, .sidebar .nav-item:hover {
  background: var(--v3-surface-3) !important;
  color: var(--v3-ink) !important;
}
.sidebar .v3-nav-item.active, .sidebar .nav-item.active {
  background: var(--v3-accent-soft) !important;
  color: var(--v3-accent) !important;
  font-weight: 700 !important;
}
.sidebar .v3-nav-item.active::before, .sidebar .nav-item.active::before {
  content: "";
  position: absolute;
  inset-block: 7px;
  inset-inline-start: -10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--v3-accent);
}
html[dir="rtl"] .sidebar .v3-nav-item.active::before,
html[dir="rtl"] .sidebar .nav-item.active::before {
  border-radius: 3px 0 0 3px;
}
.sidebar .v3-nav-icon {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: inherit;
  flex: none;
}
.v3-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--v3-line) !important;
  margin-top: auto !important;
}

.v3-rail-toggle {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--v3-line);
  border-radius: 8px;
  background: var(--v3-surface);
  color: var(--v3-ink-2);
  cursor: pointer;
}
.v3-rail-toggle:hover {
  color: var(--v3-ink);
  background: var(--v3-surface-3);
}

@media(min-width: 861px) {
  html.v3-rail { --sidebar: 68px; }
  html.v3-rail .sidebar { width: 68px !important; padding-inline: 8px !important; align-items: center !important; }
  html.v3-rail .sidebar .sidebar-intro,
  html.v3-rail .sidebar .brand-copy,
  html.v3-rail .v3-nav-label,
  html.v3-rail .v3-nav-caption,
  html.v3-rail .v3-nav-toggle span,
  html.v3-rail .sidebar-footer small,
  html.v3-rail .sidebar-footer span,
  html.v3-rail .primary-create span {
    display: none !important;
  }
  html.v3-rail .sidebar .v3-nav-item,
  html.v3-rail .sidebar .nav-item {
    justify-content: center !important;
    padding: 6px !important;
    width: 44px !important;
  }
  html.v3-rail .v3-nav-toggle {
    justify-content: center !important;
    padding: 6px 0 !important;
    border-top: 1px solid var(--v3-line) !important;
    border-radius: 0 !important;
    margin-top: 4px !important;
  }
  html.v3-rail .sidebar-footer { flex-direction: column !important; }
  html.v3-rail .sidebar .primary-create {
    width: 44px !important;
    padding: 0 !important;
  }
}

/* ------------------------------------------------------------- Cards & Panels */
.panel, .panel-card, section.panel {
  background: var(--v3-surface) !important;
  border: 1px solid var(--v3-line) !important;
  border-radius: var(--v3-r-lg) !important;
  box-shadow: none !important;
}
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .panel-card,
:root[data-theme="dark"] section.panel {
  background: var(--v3-surface) !important;
  border-color: var(--v3-line) !important;
}

.cards article {
  background: var(--v3-surface-2) !important;
  border: 1px solid var(--v3-line) !important;
  border-radius: var(--v3-r) !important;
  box-shadow: none !important;
}
.cards article strong {
  color: var(--v3-ink) !important;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------- Metric Grid */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.metric-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.metric-card {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  background: var(--v3-surface-2);
  border-inline-start: 3px solid var(--v3-unknown);
}
.metric-card span { font-size: 11.5px; color: var(--v3-ink-3); margin-bottom: 4px; }
.metric-card strong { font-size: 22px; line-height: 1.1; color: var(--v3-ink); font-variant-numeric: tabular-nums; }
.metric-card small { font-size: 11px; color: var(--v3-ink-3); margin-top: 4px; }
.metric-card.ok, .metric-card.success { border-inline-start-color: var(--v3-ok); }
.metric-card.warn, .metric-card.warning { border-inline-start-color: var(--v3-warn); }
.metric-card.bad, .metric-card.danger { border-inline-start-color: var(--v3-bad); }
.metric-card.info { border-inline-start-color: var(--v3-accent); }

/* --------------------------------------------------------- Job Progress Track */
.job-progress-card {
  padding: 14px 18px;
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  background: var(--v3-surface-2);
  margin-bottom: 14px;
}
.job-progress-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.job-progress-heading strong { font-size: 13px; font-weight: 650; }
.job-progress-heading span { font-size: 13px; font-weight: 700; color: var(--v3-accent); }
.job-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--v3-surface-3);
  overflow: hidden;
  margin-bottom: 6px;
}
.job-progress-track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--v3-accent);
  transition: width .3s var(--v3-ease);
}
.job-progress-card small { color: var(--v3-ink-3); font-size: 12px; }

/* ------------------------------------------------------------- Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--v3-r);
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-inline-start: 3px solid var(--v3-unknown);
}
.timeline-item.success, .timeline-item.ok { border-inline-start-color: var(--v3-ok); }
.timeline-item.warning, .timeline-item.warn { border-inline-start-color: var(--v3-warn); }
.timeline-item.danger, .timeline-item.bad { border-inline-start-color: var(--v3-bad); }
.timeline-item.info { border-inline-start-color: var(--v3-accent); }
.timeline-item > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--v3-surface-3);
  font-weight: 700;
  font-size: 11px;
  flex: none;
}
.timeline-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.timeline-title strong { font-size: 13px; font-weight: 650; }

/* --------------------------------------------------------- Priority Badges */
.priority-badge {
  font-family: var(--v3-mono);
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  text-transform: uppercase;
}
.priority-p0 { background: var(--v3-bad-soft) !important; color: var(--v3-bad) !important; border: 1px solid color-mix(in srgb, var(--v3-bad) 35%, var(--v3-line)) !important; }
.priority-p1 { background: var(--v3-warn-soft) !important; color: var(--v3-warn) !important; border: 1px solid color-mix(in srgb, var(--v3-warn) 35%, var(--v3-line)) !important; }
.priority-p2 { background: var(--v3-info-soft) !important; color: var(--v3-info) !important; border: 1px solid color-mix(in srgb, var(--v3-info) 35%, var(--v3-line)) !important; }
.priority-p3 { background: var(--v3-surface-3) !important; color: var(--v3-ink-3) !important; border: 1px solid var(--v3-line) !important; }

/* ------------------------------------------------------ Callouts & Banners */
.callout {
  border-radius: var(--v3-r-sm);
  border: 1px solid var(--v3-line);
  border-inline-start: 3px solid var(--v3-ink-3);
  background: var(--v3-surface-2);
  padding: 12px 16px;
  margin-bottom: 14px;
}
.callout.warning { border-inline-start-color: var(--v3-warn); background: color-mix(in srgb, var(--v3-warn) 6%, var(--v3-surface)); }
.callout.danger, .callout.error { border-inline-start-color: var(--v3-bad); background: color-mix(in srgb, var(--v3-bad) 5%, var(--v3-surface)); }
.callout.info { border-inline-start-color: var(--v3-accent); background: var(--v3-surface-2); }
.callout.success { border-inline-start-color: var(--v3-ok); background: color-mix(in srgb, var(--v3-ok) 6%, var(--v3-surface)); }

/* Customer flows: operation tracker, DNS record card, site problem callout */
.op-track-dock { position: fixed; inset-block-end: 16px; inset-inline-start: 16px; z-index: 60; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.op-card { background: var(--v3-surface); border: 1px solid var(--v3-line-strong); border-inline-start: 3px solid var(--v3-info); border-radius: var(--v3-r-sm); padding: 12px 14px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.op-card.ok { border-inline-start-color: var(--v3-ok); }
.op-card.bad { border-inline-start-color: var(--v3-bad); }
.op-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.op-steps { list-style: none; display: flex; gap: 6px; margin: 8px 0; padding: 0; font-size: 12px; color: var(--v3-ink-3); flex-wrap: wrap; }
.op-steps li { padding: 2px 8px; border-radius: 10px; background: var(--v3-surface-3); }
.op-steps li.active { background: var(--v3-info-soft); color: var(--v3-ink); font-weight: 600; }
.op-steps li.done { background: var(--v3-ok-soft); color: var(--v3-ok); }
.op-steps li.fail { background: var(--v3-bad-soft); color: var(--v3-bad); font-weight: 600; }
.op-bar { height: 4px; border-radius: 2px; background: var(--v3-surface-3); overflow: hidden; margin: 6px 0; }
.op-bar > i { display: block; height: 100%; background: var(--v3-accent); }
.dns-record-card { border: 1px solid var(--v3-line); border-radius: var(--v3-r-sm); background: var(--v3-surface-2); padding: 12px 14px; margin: 8px 0; }
.dns-record-card dl { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; margin: 8px 0; }
.dns-record-card dt { color: var(--v3-ink-3); font-size: 12px; }
.dns-record-card dd { margin: 0; word-break: break-all; }
.dns-record-card ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13px; color: var(--v3-ink-2); }
.site-problem-callout { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.site-problem-callout ul { margin: 6px 0 0; padding-inline-start: 18px; }
.pitr-howto { margin: 8px 0 12px; font-size: 13px; color: var(--v3-ink-2); }
.pitr-howto ol { margin: 6px 0 0; padding-inline-start: 20px; }
.btn-disabled-reason { display: inline-flex; flex-direction: column; gap: 2px; }

/* ------------------------------------------------------------- Tables */
table {
  border-collapse: collapse;
  width: 100%;
}
th {
  background: var(--v3-surface-2) !important;
  color: var(--v3-ink-3) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid var(--v3-line) !important;
  padding: 10px 12px !important;
}
td {
  border-bottom: 1px solid var(--v3-line) !important;
  padding: 11px 12px !important;
  vertical-align: middle !important;
  color: var(--v3-ink) !important;
  font-variant-numeric: tabular-nums;
}
tbody tr:hover {
  background: var(--v3-surface-2) !important;
}

/* ------------------------------------------------------- Dialogs & Modals */
dialog {
  border: 1px solid var(--v3-line) !important;
  border-radius: var(--v3-r-lg) !important;
  background: var(--v3-surface) !important;
  color: var(--v3-ink) !important;
  box-shadow: var(--v3-e3) !important;
}
dialog::backdrop {
  background: rgba(10, 14, 20, .32) !important;
  backdrop-filter: blur(4px) !important;
}

/* -------------------------------------------------- Instrument Eyebrows */
.eyebrow {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--v3-ink-3) !important;
  letter-spacing: .02em;
}

/* ==========================================================================
   dbaas-enterprise Split-Screen Login Model
   ========================================================================== */
.auth-dialog[open] {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: var(--v3-canvas) !important;
  color: var(--v3-ink) !important;
  z-index: 999999 !important;
  overflow: hidden !important;
  display: block !important;
}
.auth-dialog::backdrop {
  background: rgba(10, 14, 20, 0.85) !important;
  backdrop-filter: blur(8px) !important;
}
.login-layout {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 18%, rgba(10, 124, 114, 0.08) 0%, transparent 60%), var(--v3-canvas);
  overflow-y: auto;
  padding: 24px;
}
:root[data-theme="dark"] .login-layout {
  background: radial-gradient(circle at 50% 18%, rgba(69, 195, 179, 0.12) 0%, transparent 60%), #0b0e14;
}
.login-card-container {
  width: 100%;
  max-width: 440px;
  margin: auto;
  position: relative;
  z-index: 10;
  animation: loginCardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes loginCardFadeIn {
  from { opacity: 0; transform: none; }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card {
  width: 100%;
  position: relative;
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.07);
}
:root[data-theme="dark"] .login-card {
  background: #121721;
  border-color: #232c3d;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.login-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0a7c72, #45c3b3);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(10, 124, 114, 0.35);
}
.login-brand-text strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--v3-ink);
  letter-spacing: -0.01em;
}
.login-brand-text span {
  font-size: 11px;
  color: var(--v3-ink-3);
}
.login-card-toggles {
  display: flex;
  align-items: center;
  gap: 6px;
}
.login-intro {
  margin-bottom: 20px;
}
.login-intro h2 {
  font-size: 20px;
  margin: 0 0 6px;
  font-weight: 800;
  color: var(--v3-ink);
}
.login-intro p {
  color: var(--v3-ink-3);
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
}
.login-cluster-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--v3-ok-soft);
  color: var(--v3-ok);
  border: 1px solid rgba(93, 187, 115, 0.25);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 16px;
}
.login-cluster-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--v3-ok);
  box-shadow: 0 0 6px var(--v3-ok);
  flex: none;
}
.login-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.login-remember-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--v3-ink-2);
  cursor: pointer;
  user-select: none;
}
.login-remember-wrap input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--v3-accent);
  cursor: pointer;
  margin: 0;
}
.auth-submit-btn {
  margin-top: 18px;
  width: 100%;
  padding: 12px !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  border-radius: 10px !important;
}
.auth-alt-methods {
  margin-top: 20px;
  text-align: center;
  position: relative;
}
.auth-alt-methods::before {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 1px;
  background: var(--v3-line);
  z-index: 0;
}
.alt-divider-text {
  position: relative;
  z-index: 1;
  background: var(--v3-surface);
  padding: 0 12px;
  font-size: 11px;
  color: var(--v3-ink-3);
}
:root[data-theme="dark"] .alt-divider-text {
  background: #121721;
}
.alt-buttons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.link-subtle {
  background: none;
  border: none;
  padding: 4px 8px;
  color: var(--v3-accent);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}
.link-subtle:hover {
  opacity: 0.8;
}
.dot-sep {
  color: var(--v3-ink-3);
  font-size: 12px;
}
.alt-back-btn {
  width: 100%;
  margin-top: 14px;
  font-size: 12px;
  color: var(--v3-accent);
}
.auth-quick-helper {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}
.quick-fill-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px dashed var(--v3-line-strong);
  background: var(--v3-canvas);
  color: var(--v3-ink-2);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quick-fill-chip:hover {
  border-color: var(--v3-accent);
  color: var(--v3-accent);
  background: var(--v3-surface-2);
}
.quick-fill-chip .chip-icon {
  font-size: 12px;
  color: var(--v3-accent);
}
.login-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--v3-line);
  font-size: 11px;
  color: var(--v3-ink-3);
}
@media (max-width: 900px) {
  .login-layout, html[dir="rtl"] .login-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
    overflow-y: auto !important;
  }
  .login-visual {
    padding: 28px 20px !important;
  }
  .login-pitch {
    margin: 20px 0 !important;
  }
  .login-pitch h1 {
    font-size: 24px !important;
  }
  .engine-chip-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .login-form-wrap {
    padding: 24px 16px !important;
  }
}

/* ==========================================================================
   Tenant & Project Workspace Styling (dbaas-enterprise model)
   ========================================================================== */
.topbar .organization-switcher,
.topbar .project-switcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 3px 8px;
  border: 1px solid var(--v3-line);
  border-radius: 8px;
  background: var(--v3-surface);
  font-size: 12px;
}
.topbar .organization-switcher > span,
.topbar .project-switcher > span {
  font-size: 10px;
  font-weight: 750;
  color: var(--v3-ink-3);
  white-space: nowrap;
}
.topbar .organization-switcher select,
.topbar .project-switcher select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--v3-ink);
  font-weight: 650;
  font-size: 12px;
  cursor: pointer;
}
.topbar .organization-switcher {
  border-color: color-mix(in srgb, var(--v3-accent) 26%, var(--v3-line));
  background: color-mix(in srgb, var(--v3-accent-soft) 40%, var(--v3-surface));
}

/* API Endpoints & Docs Extension */
.api-endpoint-card {
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  padding: 14px 16px;
  background: var(--v3-surface-2);
  margin-bottom: 10px;
}
.api-endpoint-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  margin-inline-end: 8px;
}
.api-method-get { background: #dcfce7; color: #15803d; }
.api-method-post { background: #dbeafe; color: #1d4ed8; }
.api-method-put { background: #fef3c7; color: #b45309; }
.api-method-delete { background: #fee2e2; color: #b91c1c; }
:root[data-theme="dark"] .api-method-get { background: #064e3b; color: #a7f3d0; }
:root[data-theme="dark"] .api-method-post { background: #1e3a8a; color: #bfdbfe; }
:root[data-theme="dark"] .api-method-put { background: #78350f; color: #fde68a; }
:root[data-theme="dark"] .api-method-delete { background: #7f1d1d; color: #fecaca; }

/* Cluster Sizing & Bootstrap Readiness */
.bootstrap-readiness-box {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--v3-r);
  border: 1px solid var(--v3-line);
  background: var(--v3-surface-2);
  font-size: 13px;
}
.bootstrap-readiness-box .readiness-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.bootstrap-readiness-box .readiness-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}
.bootstrap-readiness-box .stat-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
}
.bootstrap-readiness-box .stat-pill.ok {
  border-color: #22c55e;
  color: #15803d;
  background: color-mix(in srgb, #22c55e 10%, var(--v3-surface));
}
:root[data-theme="dark"] .bootstrap-readiness-box .stat-pill.ok {
  color: #86efac;
}
.bootstrap-readiness-box .stat-pill.warn {
  border-color: #eab308;
  color: #a16207;
  background: color-mix(in srgb, #eab308 10%, var(--v3-surface));
}
:root[data-theme="dark"] .bootstrap-readiness-box .stat-pill.warn {
  color: #fde047;
}
.bootstrap-readiness-box .stat-pill.danger {
  border-color: #ef4444;
  color: #b91c1c;
  background: color-mix(in srgb, #ef4444 10%, var(--v3-surface));
}
:root[data-theme="dark"] .bootstrap-readiness-box .stat-pill.danger {
  color: #fca5a5;
}
.role-preset-chips {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.role-preset-chips button.chip-preset {
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid var(--v3-line);
  background: var(--v3-surface-2);
  color: var(--v3-text);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.role-preset-chips button.chip-preset:hover {
  background: var(--v3-accent-soft);
  color: var(--v3-accent);
  border-color: var(--v3-accent);
}

/* ==========================================================================
   5-Step Site Provisioning Wizard (dbaas-enterprise inspired)
   ========================================================================== */
dialog.wizard-dialog {
  width: min(840px, 95vw) !important;
  max-width: 840px !important;
  max-height: 90vh !important;
  padding: 24px !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
dialog.wizard-dialog form {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  padding: 6px 10px;
  margin: 16px 0;
  overflow-x: auto;
}
.wizard-step-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: var(--v3-r-sm);
  color: var(--v3-ink-3);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--v3-ease);
}
.wizard-step-tab:hover {
  color: var(--v3-ink);
  background: var(--v3-surface-3);
}
.wizard-step-tab.active {
  background: var(--v3-accent);
  color: #fff;
  font-weight: 700;
}
.wizard-step-tab.completed {
  color: var(--v3-accent-strong);
  background: var(--v3-accent-soft);
}
.wizard-step-tab .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  font-size: 11px;
}
.wizard-step-tab.active .step-num {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 2px;
  min-height: 280px;
}
.wizard-pane {
  display: none;
}
.wizard-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.wizard-tip {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--v3-accent-soft);
  color: var(--v3-accent-strong);
  border-radius: var(--v3-r-sm);
  border-right: 3px solid var(--v3-accent);
  font-size: 12px;
  line-height: 1.6;
}
.plan-spec-preview {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
}
.preflight-status-card {
  padding: 14px;
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  margin-bottom: 14px;
}
.preflight-status-card h3 {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--v3-ink);
}
.preflight-checks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.preflight-checks-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--v3-ink-2);
  padding: 6px 10px;
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-sm);
}
.preflight-checks-list li .pf-icon {
  font-size: 14px;
}
.wizard-summary-card {
  padding: 14px;
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
}
.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--v3-line);
}
.wizard-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Support Bundle Card & Modal */
.support-bundle-panel {
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  padding: 18px;
  margin-top: 20px;
}
.support-bundle-panel .badge-redacted {
  background: var(--v3-ok-soft);
  color: var(--v3-ok);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* ==========================================================================
   PITR Visualizer & Timeline Components (dbaas-enterprise model)
   ========================================================================== */
.pitr-dialog-wide {
  max-width: 900px !important;
  width: min(900px, 96vw);
}

.pitr-meta-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background: var(--v3-surface-soft);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.pitr-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pitr-meta-item .meta-label {
  font-size: 11px;
  color: var(--v3-text-dim);
}
.pitr-meta-item select {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: var(--v3-r-sm);
  background: var(--v3-canvas);
  border: 1px solid var(--v3-line);
  color: var(--v3-text);
}

.pitr-visualizer-box {
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  padding: 18px;
  margin-bottom: 16px;
}

.pitr-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.pitr-timeline-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--v3-text);
}
.pitr-time-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.pitr-track-wrap {
  position: relative;
  margin: 28px 12px 14px 12px;
  height: 24px;
}
.pitr-timeline-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, #1e293b, #0f766e, #0d9488);
  border: 1px solid var(--v3-line);
  cursor: pointer;
}
.pitr-track-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.25);
  pointer-events: none;
}
.pitr-needle {
  position: absolute;
  top: -8px;
  left: 100%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  pointer-events: none;
  transition: left 0.05s ease-out;
}
.pitr-needle-pin {
  width: 16px;
  height: 26px;
  background: #38bdf8;
  border: 2px solid #ffffff;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}
.pitr-needle-label {
  position: absolute;
  top: -24px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  background: #0f172a;
  color: #38bdf8;
  border: 1px solid #38bdf8;
  padding: 1px 6px;
  border-radius: 4px;
}

.pitr-milestones-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pitr-milestone-dot {
  position: absolute;
  top: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: pointer;
  border: 2px solid var(--v3-surface);
  transition: transform 0.15s ease;
}
.pitr-milestone-dot:hover {
  transform: translateX(-50%) scale(1.3);
}
.pitr-milestone-dot.base-backup {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.8);
}
.pitr-milestone-dot.hourly-checkpoint {
  background: #14b8a6;
  width: 10px;
  height: 10px;
  top: 0px;
}
.pitr-milestone-dot.safe-head {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.pitr-slider-wrap {
  margin: 8px 0 16px 0;
}
.pitr-range-slider {
  width: 100%;
  accent-color: var(--v3-accent);
  cursor: pointer;
}

.pitr-presets-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: var(--v3-surface-soft);
  border-radius: var(--v3-r-sm);
  margin-bottom: 14px;
}
.presets-label {
  font-size: 11px;
  color: var(--v3-text-dim);
}
.presets-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pitr-preset-btn {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--v3-r-sm);
  border: 1px solid var(--v3-line);
  background: var(--v3-surface);
  color: var(--v3-text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.pitr-preset-btn:hover {
  border-color: var(--v3-accent);
  color: var(--v3-accent);
}
.pitr-preset-btn.active {
  background: var(--v3-accent-soft);
  border-color: var(--v3-accent);
  color: var(--v3-accent);
  font-weight: 700;
}

.pitr-controls-grid {
  margin-top: 10px;
}

.pitr-resolved-base-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--v3-r-sm);
}
.resolved-base-val {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pitr-architecture-flow {
  background: var(--v3-surface-soft);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.flow-header {
  margin-bottom: 10px;
}
.flow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.flow-step-card {
  display: flex;
  gap: 10px;
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-sm);
  padding: 10px;
}
.flow-step-card .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--v3-accent);
  color: #0f172a;
  font-weight: 800;
  font-size: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.flow-step-card .step-content strong {
  font-size: 12px;
  display: block;
  margin-bottom: 3px;
}
.flow-step-card .step-content p {
  font-size: 11px;
  line-height: 1.4;
  margin: 0;
  color: var(--v3-text-dim);
}

.pitr-preflight-card {
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r);
  padding: 12px 16px;
  margin-bottom: 14px;
}
.preflight-head {
  font-size: 12px;
  margin-bottom: 8px;
}
.preflight-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--v3-ok);
}
.pitr-confirm-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
  color: var(--v3-text);
  font-weight: 600;
}

/* --- Cluster Topology Visualizer & 3+ Node Grid (dbaas-enterprise model) --- */
.topology-tier-banner {
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-inline-start: 4px solid var(--v3-accent);
  border-radius: var(--v3-r-md, 8px);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tier-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.tier-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tier-badge {
  font-size: 15px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--v3-r-sm, 4px);
  background: var(--v3-accent);
  color: #fff;
  letter-spacing: 0.5px;
}
.tier-title-wrap h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
}
.tier-title-wrap p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--v3-ink-dim, #64748b);
}
.tier-banner-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--v3-line);
}
.tier-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tier-kpi-label {
  font-size: 11px;
  color: var(--v3-ink-dim, #64748b);
  font-weight: 600;
}
.tier-kpi-val {
  font-size: 13.5px;
  font-weight: 700;
}
.tier-kpi-val.ok { color: #16a34a; }
.tier-kpi-val.warn { color: #d97706; }
:root[data-theme="dark"] .tier-kpi-val.ok { color: #4ade80; }
:root[data-theme="dark"] .tier-kpi-val.warn { color: #fbbf24; }

/* --- Topology Controller Approval Inbox (ET-8) --- */
.topology-inbox-card {
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-inline-start: 4px solid var(--v3-warn, #f59e0b);
  border-radius: var(--v3-r-md, 8px);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.topology-inbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.topology-inbox-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
}
.topology-inbox-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--v3-warn-bg, rgba(245, 158, 11, 0.15));
  color: var(--v3-warn, #f59e0b);
}
.topology-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.topology-inbox-item {
  background: var(--v3-surface-1, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-sm, 6px);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.topology-inbox-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 300px;
}
.topology-inbox-item-title {
  font-weight: 600;
  font-size: 13.5px;
}
.topology-inbox-item-desc {
  font-size: 12px;
  color: var(--v3-ink-dim, #94a3b8);
}
.topology-inbox-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  margin-top: 2px;
}
.topology-inbox-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Node Detail Dialog */
.node-detail-dialog {
  max-width: 860px;
  width: 95vw;
}
.node-detail-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 4px 0;
}
.node-detail-section {
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 6px);
  padding: 12px 14px;
}
.node-detail-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--v3-ink);
}
.node-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.node-detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}
.node-detail-row span {
  color: var(--v3-ink-dim, #64748b);
  font-size: 11px;
}
.node-detail-row strong, .node-detail-row code {
  font-size: 12.5px;
}

/* Node Addition Guided Wizard (ET-6) */
.node-wizard-dialog {
  max-width: 840px;
  width: 95vw;
}
.node-wizard-stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--v3-line);
  padding-bottom: 14px;
  gap: 8px;
  overflow-x: auto;
}
.wizard-step-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--v3-ink-dim, #64748b);
  font-weight: 600;
  white-space: nowrap;
}
.wizard-step-badge.active {
  color: var(--v3-accent, #3b82f6);
  font-weight: 700;
}
.wizard-step-badge.completed {
  color: #16a34a;
}
:root[data-theme="dark"] .wizard-step-badge.completed {
  color: #4ade80;
}
.wizard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  font-size: 11px;
}
.wizard-step-badge.active .wizard-step-num {
  background: var(--v3-accent, #3b82f6);
  color: #fff;
  border-color: var(--v3-accent, #3b82f6);
}
.wizard-step-badge.completed .wizard-step-num {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
:root[data-theme="dark"] .wizard-step-badge.completed .wizard-step-num {
  background: #4ade80;
  color: #0f172a;
  border-color: #4ade80;
}
.wizard-role-suggestion-card {
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-inline-start: 4px solid var(--v3-accent);
  border-radius: var(--v3-r-md, 6px);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wizard-role-suggestion-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.wizard-role-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.wizard-role-preset-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wizard-progress-card {
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 6px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wizard-progress-card h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--v3-ink);
}
.wizard-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--v3-line);
  border-radius: 4px;
  overflow: hidden;
}
.wizard-progress-bar-fill {
  height: 100%;
  background: var(--v3-accent, #3b82f6);
  transition: width 0.3s ease;
}
.wizard-summary-card {
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 8px);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}


.topology-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.topology-kpi-item {
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 8px);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.topology-kpi-label {
  font-size: 11.5px;
  color: var(--v3-ink-dim, #64748b);
  font-weight: 600;
}
.topology-kpi-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--v3-ink, inherit);
}
.topology-kpi-val.ok { color: #16a34a; }
.topology-kpi-val.warn { color: #d97706; }
:root[data-theme="dark"] .topology-kpi-val.ok { color: #4ade80; }
:root[data-theme="dark"] .topology-kpi-val.warn { color: #fbbf24; }

.topology-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.topology-section-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.topology-actions {
  display: flex;
  gap: 8px;
}

.topology-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.topology-node-card {
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 8px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.topology-node-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.topology-node-card.is-voter {
  border-color: rgba(59, 130, 246, 0.4);
  background: color-mix(in srgb, #3b82f6 3%, var(--v3-surface));
}
.topology-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.node-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
}
.node-ip {
  font-size: 11px;
}
.topology-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  border-top: 1px dashed var(--v3-line);
  padding-top: 8px;
}
.node-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.node-roles-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.role-badge {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.role-badge.cp {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}
:root[data-theme="dark"] .role-badge.cp { color: #60a5fa; }
.role-badge.wk {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}
:root[data-theme="dark"] .role-badge.wk { color: #34d399; }
.role-badge.dt {
  background: rgba(168, 85, 247, 0.15);
  color: #9333ea;
}
:root[data-theme="dark"] .role-badge.dt { color: #c084fc; }

.topology-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--v3-ink-dim, #64748b);
  border-top: 1px solid var(--v3-line);
  padding-top: 8px;
}
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-indicator.ok { background: #22c55e; }
.status-indicator.pending { background: #eab308; }

.node-gauge-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 3px;
}
.node-gauge-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--v3-ink-dim, #64748b);
  font-weight: 500;
}
.node-gauge-bar {
  width: 100%;
  height: 5px;
  background: var(--v3-line, rgba(0,0,0,0.08));
  border-radius: 999px;
  overflow: hidden;
}
:root[data-theme="dark"] .node-gauge-bar {
  background: rgba(255, 255, 255, 0.08);
}
.node-gauge-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.node-gauge-fill.cpu {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}
.node-gauge-fill.mem {
  background: linear-gradient(90deg, #10b981, #14b8a6);
}
.node-gauge-fill.warn {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.workload-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
:root[data-theme="dark"] .workload-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}
.workload-badge.wp {
  background: rgba(33, 117, 155, 0.12);
  color: #135e96;
  border-color: rgba(33, 117, 155, 0.25);
}
:root[data-theme="dark"] .workload-badge.wp {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
}
.topology-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-inline-start: auto;
}

/* Docs search */
.docs-search-wrap {
  margin-right: auto;
  display: flex;
  align-items: center;
}
.docs-search-input {
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 8px);
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--v3-ink, inherit);
  width: 220px;
  outline: none;
  transition: all 0.2s ease;
}
.docs-search-input:focus {
  border-color: #3b82f6;
  width: 280px;
}

/* --- Multi-Tenancy & Project Hierarchy (dbaas-enterprise model) --- */
.tenant-hierarchy-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tenant-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 8px);
  padding: 10px 14px;
}
.tenant-stats-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--v3-ink-dim, #64748b);
}
.tenant-stats-bar strong {
  color: var(--v3-ink, inherit);
}
.tenant-search-wrap {
  display: flex;
  align-items: center;
}
.tenant-filter-input {
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 8px);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--v3-ink, inherit);
  width: 220px;
  outline: none;
  transition: all 0.2s ease;
}
.tenant-filter-input:focus {
  border-color: #3b82f6;
  width: 260px;
}
.tenant-org-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tenant-org-card {
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 8px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.tenant-org-card.is-active-scope {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), 0 2px 8px rgba(0,0,0,0.06);
}
.tenant-org-header {
  padding: 12px 16px;
  background: var(--v3-surface-2);
  border-bottom: 1px solid var(--v3-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.tenant-org-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tenant-org-icon {
  font-size: 20px;
}
.tenant-org-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.tenant-org-sub {
  font-size: 11px;
  color: var(--v3-ink-dim, #64748b);
}
.tenant-org-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tenant-scope-btn.active-scope {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.3);
  font-weight: 700;
}
:root[data-theme="dark"] .tenant-scope-btn.active-scope {
  color: #4ade80;
}
.tenant-org-body {
  padding: 14px 16px;
}
.tenant-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.tenant-empty-proj {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--v3-ink-dim, #64748b);
}
.tenant-project-card {
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 8px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tenant-project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.tenant-project-card.is-active-proj {
  border-color: #3b82f6;
  background: color-mix(in srgb, #3b82f6 5%, var(--v3-surface-2));
}
.tenant-proj-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.tenant-proj-icon {
  font-size: 16px;
}
.tenant-proj-title-wrap {
  display: flex;
  flex-direction: column;
}
.tenant-proj-title {
  font-size: 13px;
  font-weight: 700;
}
.tenant-proj-id {
  font-size: 10.5px;
}
.tenant-proj-metrics {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.metric-pill {
  font-size: 11px;
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--v3-ink-dim, #64748b);
}
.tenant-proj-footer {
  margin-top: auto;
  border-top: 1px dashed var(--v3-line);
  padding-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.tenant-focus-proj-btn.active-scope {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.tenant-org-branding-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 12px;
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-r-md, 6px);
  margin-bottom: 12px;
  font-size: 11.5px;
}
.brand-color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.tenant-proj-quota-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: 6px;
  padding: 8px 10px;
}
.tenant-quota-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tenant-quota-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--v3-ink-dim, #64748b);
  font-weight: 500;
}
.tenant-quota-bar {
  width: 100%;
  height: 5px;
  background: var(--v3-line, rgba(0,0,0,0.08));
  border-radius: 999px;
  overflow: hidden;
}
:root[data-theme="dark"] .tenant-quota-bar {
  background: rgba(255, 255, 255, 0.08);
}
.tenant-quota-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.tenant-quota-fill.normal {
  background: linear-gradient(90deg, #10b981, #059669);
}
.tenant-quota-fill.warn {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}
.tenant-quota-fill.crit {
  background: linear-gradient(90deg, #ef4444, #b91c1c);
}

/* ==========================================================================
   Modern Dashboard & Metric Cards V4
   ========================================================================== */
.overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--v3-surface) !important;
  border: 1px solid var(--v3-line) !important;
  border-radius: 14px !important;
  padding: 20px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
}
:root[data-theme="dark"] .metric-card {
  background: #141a24 !important;
  border-color: #232d3d !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--v3-accent) !important;
  box-shadow: 0 8px 24px rgba(10, 124, 114, 0.12) !important;
}
.metric-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--v3-ink-2);
}
.metric-icon {
  font-size: 18px;
}
.metric-card strong {
  font-size: 30px !important;
  font-weight: 850 !important;
  color: var(--v3-ink) !important;
  line-height: 1.15 !important;
  margin: 4px 0 !important;
  letter-spacing: -0.02em;
}
.metric-card small {
  font-size: 11.5px !important;
  color: var(--v3-ink-3) !important;
}

/* Quick Hub Grid */
.overview-quick-hub {
  background: var(--v3-surface);
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}
:root[data-theme="dark"] .overview-quick-hub {
  background: #141a24;
  border-color: #232d3d;
}
.quick-hub-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--v3-ink);
  margin-bottom: 14px;
}
.quick-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.quick-hub-btn {
  background: var(--v3-canvas);
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
}
:root[data-theme="dark"] .quick-hub-btn {
  background: #1a2230;
  border-color: #273449;
}
.quick-hub-btn:hover {
  background: var(--v3-surface-2);
  border-color: var(--v3-accent);
  transform: translateY(-2px);
}
.quick-hub-icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.quick-hub-btn strong {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--v3-ink);
}
.quick-hub-btn small {
  font-size: 11px;
  color: var(--v3-ink-3);
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quick-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .overview-metrics {
    grid-template-columns: 1fr;
  }
  .quick-hub-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Phase 4: Safe Update & VRT Engine --- */
.vrt-dialog, .sre-dialog, .dr-dialog {
  max-width: 760px;
  width: 95vw;
  background: var(--v3-surface);
  border: 1px solid var(--v3-line-strong);
  border-radius: var(--v3-r-lg);
  box-shadow: var(--v3-e3);
  padding: 24px;
}
.vrt-step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--v3-surface-2);
  border: 1px solid var(--v3-line);
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1;
  min-width: 120px;
  transition: all 0.2s ease;
}
.vrt-step-pill.active {
  background: var(--v3-accent-soft);
  border-color: var(--v3-accent);
}
.vrt-step-pill.passed {
  background: var(--v3-ok-soft);
  border-color: var(--v3-ok);
}
.vrt-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--v3-line);
  color: var(--v3-ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.vrt-step-pill.active .vrt-step-num {
  background: var(--v3-accent);
  color: #fff;
}
.vrt-step-pill.passed .vrt-step-num {
  background: var(--v3-ok);
  color: #fff;
}
.vrt-step-text {
  display: flex;
  flex-direction: column;
}
.vrt-step-text strong {
  font-size: 12px;
  color: var(--v3-ink);
}
.vrt-step-text small {
  font-size: 10px;
  color: var(--v3-ink-3);
}

/* --- Phase 5: SRE Runbooks --- */
.sre-runbook-card:hover {
  transform: translateY(-2px);
  border-color: var(--v3-accent) !important;
  box-shadow: var(--v3-e2);
}

/* --- Phase 6: DR Cutover Hub --- */
#dr-cutover-hub .metric-value {
  font-size: 20px;
  font-weight: 800;
}


/* Org brand bar: edit button aligned to the end (no inline style; CSP style-src self). */
.tenant-org-branding-bar [data-edit-org-brand] { margin-inline-start: auto; }
