/**
 * Restore Page Design (Final 10/10) - restore.html / restore-page.css
 * Apple + Linear + Stripe + Vercel Quality Guided Wizard Interface.
 *
 * COLOR TOKENS:
 * - Primary Green: #22C55E
 * - Green Glow: rgba(34, 197, 94, 0.30)
 * - Blue: #06B6D4
 * - Danger: #EF4444
 * - Danger Background: #3A1717
 * - Warning: #F59E0B
 * - Gray Text: #9CA3AF
 * - Primary White: #F9FAFB
 * - Interface Background: var(--app-bg-base)
 * - Card Background: var(--app-surface)
 * - Border: 1px solid rgba(255, 255, 255, 0.08)
 * - Border Radius: 18px
 * - Internal Padding: 28px
 * - Gap between cards: 24px
 */

/* ── Page Scope & Layout ───────────────────────────────────────────── */

.rst-page {
  max-width: 1400px;
  padding-left: 40px;
  padding-right: 40px;
  padding-top: 36px;
  padding-bottom: 64px;
  animation: rstFadeInUp 350ms cubic-bezier(0.16, 1, 0.3, 1) ease-out;
}

@keyframes rstFadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rst-section + .rst-section {
  margin-top: 48px;
}

/* ── Top Header (Phase 1 rebuild -- matches Connections/Backups' shared
   header pattern: glass icon box with color-mix() accent tokens, same
   title/pill sizing as bkp-header, same --app-accent-* custom properties
   instead of hardcoded hex) ───────────────────────────────────────────── */

.rst-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.rst-header-left {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex: 1 1 540px;
  min-width: 0;
}

.rst-header-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 16px;
  box-sizing: border-box;
  flex: 0 0 auto;
  border-radius: 18px;
  background: color-mix(in srgb, var(--app-accent-green) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-accent-green) 25%, transparent);
  color: var(--app-accent-green);
  box-shadow: 0 0 30px color-mix(in srgb, var(--app-accent-green) 20%, transparent);
}

.rst-header-icon-box svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.75;
}

.rst-header-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rst-title {
  margin: 0;
  font-family: var(--font-app-sans);
  font-size: 40px;
  font-weight: 700;
  color: var(--app-text-primary);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.rst-subtitle {
  margin: 0 0 2px;
  font-family: var(--font-app-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--app-text-muted);
  line-height: 1.5;
}

.rst-header-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rst-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-family: var(--font-app-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.rst-pill:hover {
  transform: translateY(-2px);
}

.rst-pill svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rst-pill-success {
  color: var(--app-accent-green);
  background: color-mix(in srgb, var(--app-accent-green) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-accent-green) 25%, transparent);
}

.rst-pill-success:hover {
  box-shadow: 0 4px 16px color-mix(in srgb, var(--app-accent-green) 30%, transparent);
}

.rst-pill-info {
  color: var(--app-accent-blue);
  background: color-mix(in srgb, var(--app-accent-blue) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-accent-blue) 25%, transparent);
}

.rst-pill-info:hover {
  box-shadow: 0 4px 16px color-mix(in srgb, var(--app-accent-blue) 30%, transparent);
}

.rst-pill-neutral {
  color: var(--app-text-muted);
  background: var(--app-surface-elevated);
  border: 1px solid var(--app-border);
}

.rst-pill-neutral:hover {
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

/* ── Header decorative graphic (purely visual, no data) ────────────────
   Stacked glass-box icons -- database (blue) + shield-check (purple)
   layered behind a larger restore/rotate-ccw box (green, same accent as
   the header's own icon box), each using the identical color-mix()
   glass-box treatment as every other icon box on this page. */

.rst-header-graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 150px;
  flex: 0 0 auto;
}

.rst-header-graphic-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--app-accent-green) 22%, transparent) 0%, transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.rst-header-graphic-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 18px;
}

.rst-header-graphic-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.75;
}

.rst-header-graphic-icon-db {
  width: 70px;
  height: 70px;
  padding: 18px;
  top: 6px;
  left: 14px;
  background: color-mix(in srgb, var(--app-accent-blue) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-accent-blue) 25%, transparent);
  color: var(--app-accent-blue);
  box-shadow: 0 0 24px 4px color-mix(in srgb, var(--app-accent-blue) 20%, transparent);
  transform: rotate(-8deg);
  z-index: 1;
}

.rst-header-graphic-icon-shield {
  width: 54px;
  height: 54px;
  padding: 13px;
  top: 0;
  right: 8px;
  background: color-mix(in srgb, var(--app-accent-purple) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-accent-purple) 25%, transparent);
  color: var(--app-accent-purple);
  box-shadow: 0 0 20px 4px color-mix(in srgb, var(--app-accent-purple) 20%, transparent);
  transform: rotate(10deg);
  z-index: 2;
}

.rst-header-graphic-icon-restore {
  width: 86px;
  height: 86px;
  padding: 20px;
  bottom: 6px;
  left: 56px;
  background: color-mix(in srgb, var(--app-accent-green) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-accent-green) 32%, transparent);
  color: var(--app-accent-green);
  box-shadow: 0 0 30px 6px color-mix(in srgb, var(--app-accent-green) 26%, transparent);
  z-index: 3;
}

@media (max-width: 1024px) {
  .rst-header-graphic {
    display: none;
  }
}

/* ── SECTION 2: 5 KPI STAT CARDS ROW (Phase 2 Rebuild) ─────────────── */

.rst-header-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1380px) {
  .rst-header-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .rst-header-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .rst-header-stats {
    grid-template-columns: 1fr;
  }
}

.rst-stat-card {
  min-height: 150px;
  padding: 24px;
  border-radius: 18px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease, box-shadow 200ms ease;
}

.rst-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.rst-stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rst-stat-card-title {
  font-family: var(--font-app-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94A3B8;
}

.rst-stat-card-icon-wrap {
  position: relative;
  flex: 0 0 auto;
  align-self: flex-start;
}

.rst-stat-card-icon-glow {
  position: absolute;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.rst-stat-card:hover .rst-stat-card-icon-glow {
  opacity: 0.5;
}

.rst-stat-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  flex: 0 0 auto;
}

.rst-stat-card-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.rst-stat-card-value {
  font-family: var(--font-app-sans);
  font-size: 38px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.rst-stat-card-value.is-text-value {
  font-size: 20px;
  font-weight: 600;
  color: #94A3B8;
  letter-spacing: normal;
}

.rst-stat-card-value.is-success {
  color: #10B981;
}

.rst-stat-card-value.is-danger {
  color: #EF4444;
}

.rst-stat-card-sub {
  font-family: var(--font-app-sans);
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rst-stat-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rst-stat-card-caption {
  font-family: var(--font-app-sans);
  font-size: 13px;
  color: #94A3B8;
}

/* ── Per-Card Accent Colors ── */
.rst-accent-green .rst-stat-card-icon {
  background: color-mix(in srgb, #10B981 15%, transparent);
  border: 1px solid color-mix(in srgb, #10B981 25%, transparent);
  color: #10B981;
  box-shadow: 0 0 22px 4px color-mix(in srgb, #10B981 18%, transparent);
}
.rst-accent-green .rst-stat-card-icon-glow { background: #10B981; }
.rst-accent-green:hover { border-color: color-mix(in srgb, #10B981 35%, transparent) !important; }

.rst-accent-cyan .rst-stat-card-icon {
  background: color-mix(in srgb, #06B6D4 15%, transparent);
  border: 1px solid color-mix(in srgb, #06B6D4 25%, transparent);
  color: #06B6D4;
  box-shadow: 0 0 22px 4px color-mix(in srgb, #06B6D4 18%, transparent);
}
.rst-accent-cyan .rst-stat-card-icon-glow { background: #06B6D4; }
.rst-accent-cyan:hover { border-color: color-mix(in srgb, #06B6D4 35%, transparent) !important; }

.rst-accent-purple .rst-stat-card-icon {
  background: color-mix(in srgb, #8B5CF6 15%, transparent);
  border: 1px solid color-mix(in srgb, #8B5CF6 25%, transparent);
  color: #8B5CF6;
  box-shadow: 0 0 22px 4px color-mix(in srgb, #8B5CF6 18%, transparent);
}
.rst-accent-purple .rst-stat-card-icon-glow { background: #8B5CF6; }
.rst-accent-purple:hover { border-color: color-mix(in srgb, #8B5CF6 35%, transparent) !important; }

.rst-accent-blue .rst-stat-card-icon {
  background: color-mix(in srgb, #3B82F6 15%, transparent);
  border: 1px solid color-mix(in srgb, #3B82F6 25%, transparent);
  color: #3B82F6;
  box-shadow: 0 0 22px 4px color-mix(in srgb, #3B82F6 18%, transparent);
}
.rst-accent-blue .rst-stat-card-icon-glow { background: #3B82F6; }
.rst-accent-blue:hover { border-color: color-mix(in srgb, #3B82F6 35%, transparent) !important; }

.rst-accent-amber .rst-stat-card-icon {
  background: color-mix(in srgb, #F59E0B 15%, transparent);
  border: 1px solid color-mix(in srgb, #F59E0B 25%, transparent);
  color: #F59E0B;
  box-shadow: 0 0 22px 4px color-mix(in srgb, #F59E0B 18%, transparent);
}
.rst-accent-amber .rst-stat-card-icon-glow { background: #F59E0B; }
.rst-accent-amber:hover { border-color: color-mix(in srgb, #F59E0B 35%, transparent) !important; }

/* ── Sparklines ── */
.rst-stat-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  margin-top: 6px;
  margin-bottom: 2px;
}
.rst-stat-sparkline-bar {
  flex: 1;
  min-width: 3px;
  max-width: 8px;
  border-radius: 1px;
  transition: height 0.3s ease, opacity 0.2s ease;
  opacity: 0.65;
}
.rst-stat-sparkline-bar:hover {
  opacity: 1;
}
.rst-stat-sparkline-muted {
  height: 22px;
  margin-top: 6px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
}
.rst-stat-sparkline-muted-line {
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Two-Column Layout ──────────────────────────────────────────────── */

.rst-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (min-width: 1024px) {
  .rst-grid {
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  }
}

.rst-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.rst-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  position: sticky;
  top: 88px;
}

@media (max-width: 1023px) {
  .rst-side {
    position: static;
  }
  .rst-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Card Base ───────────────────────────────────────────────────────── */

.rst-card {
  padding: 28px;
  border-radius: 18px;
  background: var(--app-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.rst-card:hover {
  border-color: rgba(34, 197, 94, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45), 0 0 20px rgba(34, 197, 94, 0.15);
}

.rst-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  font-family: var(--font-app-sans);
  font-size: 26px;
  font-weight: 700;
  color: #F9FAFB;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.rst-card-title svg {
  width: 24px;
  height: 24px;
  color: #22C55E;
  flex: 0 0 auto;
}

.rst-card-desc {
  margin: 0 0 20px;
  font-family: var(--font-app-sans);
  font-size: 16px;
  font-weight: 400;
  color: #9CA3AF;
  line-height: 1.5;
}

/* ── Horizontal 5-Step Progress Stepper (Phase 3 Rebuild) ────────────── */

.rst-stepper {
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--app-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  margin-bottom: 8px;
  transition: border-color 250ms ease, box-shadow 250ms ease;
  overflow: hidden;
}

.rst-stepper:hover {
  border-color: rgba(34, 197, 94, 0.25);
}

.rst-stepper-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.rst-stepper-item {
  display: flex;
  align-items: center;
  flex: 1 1 0%;
  min-width: 0;
  position: relative;
}

.rst-stepper-item:last-child {
  flex: 0 0 auto;
}

.rst-stepper-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px 6px;
  border-radius: 10px;
  cursor: pointer;
  color: inherit;
  font-family: var(--font-app-sans);
  transition: background-color 200ms ease, transform 150ms ease;
  outline: none;
  flex: 0 0 auto;
}

.rst-stepper-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.rst-stepper-btn:focus-visible {
  box-shadow: 0 0 0 2px #22C55E;
}

.rst-stepper-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-sizing: border-box;
}

.rst-stepper-num {
  line-height: 1;
}

.rst-stepper-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.rst-stepper-check svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

/* --- CURRENT State --- */
.rst-stepper-item.is-current .rst-stepper-circle {
  background: #22C55E;
  color: #FFFFFF;
  border: none;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.5), 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.rst-stepper-item.is-current .rst-stepper-num {
  display: block;
}

.rst-stepper-item.is-current .rst-stepper-check {
  display: none;
}

.rst-stepper-item.is-current .rst-stepper-label {
  color: #FFFFFF;
  font-weight: 700;
}

/* --- COMPLETED State --- */
.rst-stepper-item.is-completed .rst-stepper-circle {
  background: #22C55E;
  color: #FFFFFF;
  border: none;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.rst-stepper-item.is-completed .rst-stepper-num {
  display: none;
}

.rst-stepper-item.is-completed .rst-stepper-check {
  display: flex;
}

.rst-stepper-item.is-completed .rst-stepper-label {
  color: #F9FAFB;
  font-weight: 600;
}

/* --- UPCOMING State --- */
.rst-stepper-item.is-upcoming .rst-stepper-circle {
  background: var(--app-surface-elevated);
  border: 2px solid rgba(255, 255, 255, 0.16);
  color: #9CA3AF;
  box-shadow: none;
}

.rst-stepper-item.is-upcoming .rst-stepper-num {
  display: block;
}

.rst-stepper-item.is-upcoming .rst-stepper-check {
  display: none;
}

.rst-stepper-item.is-upcoming .rst-stepper-label {
  color: #9CA3AF;
  font-weight: 500;
}

/* --- Stepper Label --- */
.rst-stepper-label {
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* --- Connecting Line --- */
.rst-stepper-line {
  flex: 1 1 0%;
  height: 2px;
  margin: 0 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  transition: background-color 300ms ease, box-shadow 300ms ease;
  min-width: 12px;
}

.rst-stepper-item.is-completed .rst-stepper-line,
.rst-stepper-line.is-filled {
  background: #22C55E;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
}

@media (max-width: 1100px) {
  .rst-stepper {
    overflow-x: auto;
    padding: 14px 16px;
  }
  .rst-stepper-label {
    font-size: 11.5px;
  }
  .rst-stepper-line {
    margin: 0 4px;
    min-width: 6px;
  }
}

@media (max-width: 768px) {
  .rst-stepper-btn {
    gap: 4px;
    padding: 3px 4px;
  }
  .rst-stepper-circle {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
  .rst-stepper-label {
    font-size: 11px;
  }
}

/* ── Step Indicators ─────────────────────────────────────────────────── */

.rst-step-card {
  position: relative;
}

.rst-step-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rst-step-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--font-app-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #22C55E;
}

.rst-step-tag-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #22C55E;
  color: var(--app-bg-base);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.rst-step-tag-danger {
  color: #EF4444;
}

.rst-step-tag-danger .rst-step-tag-num {
  background: #EF4444;
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* ── Form Controls & Selectors ────────────────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-family: var(--font-app-sans);
  font-size: 14px;
  font-weight: 600;
  color: #F9FAFB;
}

.select,
.field select,
#rst-source-select,
#rst-target-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--app-surface-elevated);
  color: #F9FAFB;
  font-family: var(--font-app-sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2322C55E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

.select:hover,
.field select:hover {
  border-color: rgba(34, 197, 94, 0.4);
}

.select:focus,
.field select:focus {
  outline: none;
  border-color: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.rst-backup-filters-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 14px;
}

.rst-backup-search {
  position: relative;
  flex: 1;
}

.rst-backup-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9CA3AF;
  pointer-events: none;
}

.rst-backup-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--app-surface-elevated);
  color: #F9FAFB;
  font-family: var(--font-app-sans);
  font-size: 14px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.rst-backup-search input:focus {
  outline: none;
  border-color: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.rst-backup-filters {
  display: flex;
  gap: 12px;
}

.rst-backup-filters .rst-select {
  height: 48px;
  border-radius: 14px;
  background-color: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #F9FAFB;
  font-size: 14px;
  padding: 0 36px 0 16px;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%239CA3AF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  min-width: 150px;
}

.rst-backup-filters .rst-select:focus {
  outline: none;
  border-color: #22C55E;
}

.rst-backup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.rst-backup-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--app-surface-elevated);
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  text-align: left;
  width: 100%;
  font-family: var(--font-app-sans);
  position: relative;
}

.rst-backup-option:hover {
  border-color: rgba(34, 197, 94, 0.35);
  transform: translateY(-2px);
}

.rst-backup-option.is-selected {
  border: 2px solid #22C55E;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.1) 0%, var(--app-surface-elevated) 100%);
  box-shadow: 0 0 0 1px #22C55E, 0 10px 30px rgba(34, 197, 94, 0.2);
}

.rst-backup-option-radio {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: border-color 200ms ease, background 200ms ease;
}

.rst-backup-option.is-selected .rst-backup-option-radio {
  border-color: #22C55E;
  background: radial-gradient(circle, #22C55E 0 5px, transparent 6px);
}

.rst-backup-option-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rst-backup-option-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rst-backup-option-title {
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
}

.rst-backup-option-subtitle {
  font-size: 13px;
  color: #9CA3AF;
}

.rst-backup-option-meta {
  font-size: 13px;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rst-backup-option-dot {
  color: #4B5563;
}

.rst-backup-option-chevron {
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex: 0 0 auto;
}

.rst-backup-option-chevron svg {
  width: 20px;
  height: 20px;
}

.rst-backup-option-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.rst-backup-option-icon-box svg {
  width: 18px;
  height: 18px;
}

.rst-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.rst-chip-success {
  color: #22C55E;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.rst-chip-info {
  color: #06B6D4;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.rst-chip-danger {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Amber, distinct from -danger -- used for PITR's own 'pitr_replay_failed'
   status (base restore succeeded, replay failed: real data landed, not a
   clean failure) and for a "running" chip in the compact history list. */
.rst-chip-warning {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* History table status badge (Restore.statusBadge, restore-utils.js) for
   PITR's own distinct 'pitr_replay_failed' status -- same pill shape as
   .rst-chip, amber to read as "partial, real data landed" rather than
   the plain-failure red a generic badge would otherwise blend into. */
.rst-badge-status-pitr_replay_failed {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.rst-chip-neutral {
  color: #9CA3AF;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* ── Preview Action Card ──────────────────────────────────────────────── */

.rst-preview-export-row {
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 200ms ease, border-color 200ms ease;
}

.rst-preview-export-row:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.35);
}

.rst-preview-export-hint {
  margin: 0;
  font-size: 13px;
  color: #9CA3AF;
  line-height: 1.45;
}

/* ── STEP 2: Destination Cards & Timeline ────────────────────────────── */

.rst-destination-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 640px) {
  .rst-destination-grid {
    grid-template-columns: 1fr;
  }
}

.rst-destination-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--app-surface-elevated);
  cursor: pointer;
  min-height: 120px;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.rst-destination-option:hover {
  border-color: rgba(34, 197, 94, 0.35);
  transform: translateY(-2px);
}

.rst-destination-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.rst-destination-option-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.rst-destination-option-radio {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: border-color 200ms ease, background 200ms ease;
  margin-top: 6px;
}

.rst-destination-option.is-selected .rst-destination-option-radio {
  border-color: #22C55E;
  background: radial-gradient(circle, #22C55E 0 5px, transparent 6px);
}

.rst-destination-option.is-selected {
  border: 2px solid #22C55E;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.1) 0%, var(--app-surface-elevated) 100%);
  box-shadow: 0 0 0 1px #22C55E, 0 10px 30px rgba(34, 197, 94, 0.2);
}

.rst-destination-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #9CA3AF;
  transition: background 200ms ease, color 200ms ease;
}

.rst-destination-option-icon svg {
  width: 20px;
  height: 20px;
}

.rst-destination-option.is-selected .rst-destination-option-icon {
  background: rgba(34, 197, 94, 0.2);
  color: #22C55E;
}

.rst-destination-option-title {
  font-family: var(--font-app-sans);
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
  padding-right: 24px;
}

.rst-destination-option-desc {
  font-family: var(--font-app-sans);
  font-size: 13px;
  color: #9CA3AF;
  line-height: 1.45;
}

.rst-dest-recommended-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #22C55E;
  background: rgba(34, 197, 94, 0.16);
  vertical-align: middle;
  cursor: help;
}

/* ── STEP 2: "New Connection" CTA / destination metadata / health preview ── */

.rst-dest-new-cta {
  margin-top: 16px;
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: var(--app-surface-elevated);
  text-align: center;
}

.rst-dest-new-cta .rst-card-desc {
  margin: 10px 0 0;
}

.rst-dest-meta-card {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rst-dest-meta-heading {
  margin: 0 0 12px;
  font-family: var(--font-app-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9CA3AF;
}

.rst-dest-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-family: var(--font-app-sans);
  font-size: 13px;
  color: #D1D5DB;
}

.rst-dest-meta-row svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #6B7280;
}

.rst-dest-meta-row-label {
  flex: 0 0 auto;
  color: #9CA3AF;
  min-width: 90px;
}

.rst-dest-meta-row-value {
  flex: 1 1 auto;
  font-weight: 600;
  color: #F9FAFB;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rst-dest-health-preview {
  margin-top: 12px;
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.rst-dest-health-heading {
  margin: 0 0 10px;
  font-family: var(--font-app-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #06B6D4;
}

.rst-dest-health-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-family: var(--font-app-sans);
  font-size: 13px;
  font-weight: 600;
  color: #D1D5DB;
}

.rst-dest-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #9CA3AF;
}

.rst-dest-health-row.is-passed .rst-dest-health-dot { background: #22C55E; }
.rst-dest-health-row.is-failed .rst-dest-health-dot { background: #EF4444; }
.rst-dest-health-row.is-warning .rst-dest-health-dot { background: #F59E0B; }
.rst-dest-health-row.is-pending .rst-dest-health-dot { background: #9CA3AF; }

.rst-dest-health-hint {
  margin: 8px 0 0;
  font-family: var(--font-app-sans);
  font-size: 11.5px;
  font-style: italic;
  color: #6B7280;
}

/* Restore Path Preview: Source -> Encrypted Backup -> Destination ->
   Estimated Time (4 nodes, 3 arrows) -- wraps to 2 columns on narrow
   viewports rather than squeezing 4 nodes into an unreadable row. */
.rst-mapping {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  padding: 18px 24px;
  border-radius: 14px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 860px) {
  .rst-mapping {
    flex-direction: column;
    align-items: stretch;
  }

  .rst-mapping-arrow {
    transform: rotate(90deg);
    align-self: center;
  }
}

.rst-mapping-node {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
}

.rst-mapping-node-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9CA3AF;
}

.rst-mapping-node-value {
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rst-mapping-node-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.rst-mapping-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-app-sans);
  font-size: 12px;
  color: #9CA3AF;
}

.rst-mapping-meta-row svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.rst-mapping-arrow {
  color: #22C55E;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.rst-mapping-arrow svg {
  width: 20px;
  height: 20px;
}

/* ── STEP 3: Options & Selective Banner ──────────────────────────────── */

.rst-disclosure {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: var(--app-surface-elevated);
}

.rst-disclosure-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  border: none;
  background: var(--app-surface-elevated);
  color: #F9FAFB;
  font-family: var(--font-app-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 200ms ease;
}

.rst-disclosure-trigger:hover {
  background: color-mix(in srgb, var(--app-surface-elevated) 92%, #FFFFFF);
}

.rst-disclosure-trigger svg {
  width: 18px;
  height: 18px;
  color: #9CA3AF;
  transition: transform 250ms ease;
}

.rst-disclosure.is-open .rst-disclosure-trigger svg {
  transform: rotate(180deg);
}

.rst-disclosure-body {
  padding: 18px 20px;
  display: none;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rst-disclosure.is-open .rst-disclosure-body {
  display: flex;
  animation: rstFadeInUp 250ms ease;
}

.rst-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--app-surface);
  font-family: var(--font-app-sans);
  font-size: 14px;
  transition: border-color 200ms ease, transform 200ms ease;
}

.rst-option-row:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.rst-option-row-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #F9FAFB;
  font-weight: 600;
}

.rst-option-row-label svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  padding: 6px;
  box-sizing: content-box;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #9CA3AF;
}

.rst-option-row.is-available .rst-option-row-label svg {
  color: #22C55E;
  background: rgba(34, 197, 94, 0.16);
}

/* Blue Info Banner */
.rst-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #F9FAFB;
}

.rst-info-banner svg {
  width: 20px;
  height: 20px;
  color: #06B6D4;
  flex: 0 0 auto;
  margin-top: 2px;
}

.rst-info-banner p {
  margin: 0;
  font-size: 14px;
  color: #9CA3AF;
  line-height: 1.5;
}

/* ── STEP 4: Validation Component Cards ──────────────────────────────── */

.rst-validation-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rst-validation-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-app-sans);
  font-size: 14px;
  color: #F9FAFB;
  transition: transform 200ms ease, border-color 200ms ease;
}

.rst-validation-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
}

.rst-validation-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.rst-validation-icon svg {
  width: 14px;
  height: 14px;
}

.rst-validation-item.is-passed {
  border-color: rgba(34, 197, 94, 0.3);
}

.rst-validation-item.is-passed .rst-validation-icon {
  color: #22C55E;
  background: rgba(34, 197, 94, 0.18);
}

.rst-validation-item.is-failed {
  border-color: rgba(239, 68, 68, 0.3);
}

.rst-validation-item.is-failed .rst-validation-icon {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.18);
}

.rst-validation-item.is-warning {
  border-color: rgba(245, 158, 11, 0.3);
}

.rst-validation-item.is-warning .rst-validation-icon {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.18);
}

.rst-validation-item.is-pending .rst-validation-icon {
  color: #06B6D4;
  background: rgba(6, 182, 212, 0.18);
}

.rst-validation-item-label {
  flex: 1 1 auto;
  font-weight: 600;
}

.rst-validation-item-note {
  font-size: 13px;
  color: #9CA3AF;
}

.rst-validation-item-latency {
  font-size: 12px;
  color: #6B7280;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.rst-validation-pill {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rst-validation-pill.is-passed { color: #22C55E; background: rgba(34, 197, 94, 0.16); }
.rst-validation-pill.is-failed { color: #EF4444; background: rgba(239, 68, 68, 0.16); }
.rst-validation-pill.is-warning { color: #F59E0B; background: rgba(245, 158, 11, 0.16); }
.rst-validation-pill.is-pending { color: #9CA3AF; background: rgba(156, 163, 175, 0.14); }

/* ── STEP 4: Toolbar / Progress / Stats / Donut (real pre-flight checks) ── */

.rst-validation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.rst-validation-last-checked {
  font-size: 13px;
  color: #9CA3AF;
}

.rst-validation-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.rst-validation-progress-bar {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.rst-validation-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22C55E, #06B6D4);
  transition: width 300ms ease;
}

.rst-validation-progress-label {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: #F9FAFB;
  white-space: nowrap;
}

.rst-validation-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.rst-validation-stat-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rst-validation-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #06B6D4;
  background: rgba(6, 182, 212, 0.14);
}

.rst-validation-stat-icon svg {
  width: 16px;
  height: 16px;
}

.rst-validation-stat-label {
  margin: 0;
  font-size: 11px;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rst-validation-stat-value {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
}

.rst-validation-stat-tile.rst-risk-high .rst-validation-stat-value { color: #EF4444; }
.rst-validation-stat-tile.rst-risk-high .rst-validation-stat-icon { color: #EF4444; background: rgba(239, 68, 68, 0.14); }
.rst-validation-stat-tile.rst-risk-medium .rst-validation-stat-value { color: #F59E0B; }
.rst-validation-stat-tile.rst-risk-medium .rst-validation-stat-icon { color: #F59E0B; background: rgba(245, 158, 11, 0.14); }
.rst-validation-stat-tile.rst-risk-low .rst-validation-stat-value { color: #22C55E; }
.rst-validation-stat-tile.rst-risk-low .rst-validation-stat-icon { color: #22C55E; background: rgba(34, 197, 94, 0.14); }

.rst-validation-summary-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.rst-validation-donut-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
}

.rst-validation-donut {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.rst-validation-donut-bg,
.rst-validation-donut-segment {
  fill: none;
  stroke-width: 4;
}

.rst-validation-donut-bg {
  stroke: rgba(255, 255, 255, 0.08);
}

.rst-validation-donut-segment {
  stroke-linecap: butt;
  transition: stroke-dasharray 300ms ease, stroke-dashoffset 300ms ease;
}

.rst-validation-donut-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #F9FAFB;
}

.rst-validation-donut-legend {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px 16px;
  min-width: 200px;
}

.rst-validation-donut-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #D1D5DB;
}

.rst-validation-donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.rst-validation-donut-legend-label {
  flex: 1 1 auto;
}

.rst-validation-donut-legend-count {
  font-weight: 700;
  color: #F9FAFB;
}

.rst-validation-continue {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.rst-btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 26px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: #22C55E;
  font-family: var(--font-app-sans);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.rst-btn-continue svg {
  width: 16px;
  height: 16px;
}

.rst-btn-continue:hover:not(:disabled) {
  border-color: #22C55E;
  background: rgba(34, 197, 94, 0.22);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(34, 197, 94, 0.45);
}

.rst-btn-continue:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #9CA3AF;
}

/* ── Validation Timeline (sidebar card) ───────────────────────────────── */

.rst-validation-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rst-validation-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rst-validation-timeline-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #9CA3AF;
}

.rst-validation-timeline-item.is-passed .rst-validation-timeline-dot { background: #22C55E; }
.rst-validation-timeline-item.is-failed .rst-validation-timeline-dot { background: #EF4444; }
.rst-validation-timeline-item.is-warning .rst-validation-timeline-dot { background: #F59E0B; }

.rst-validation-timeline-body {
  flex: 1 1 auto;
  min-width: 0;
}

.rst-validation-timeline-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #F9FAFB;
}

.rst-validation-timeline-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: #9CA3AF;
}

/* ── Restore Timeline (sidebar) -- wizard steps + Verify/Restore/Completed ── */

.rst-timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rst-timeline-divider {
  height: 1px;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.08);
}

.rst-timeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #6B7280;
}

.rst-timeline-step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(156, 163, 175, 0.14);
}

.rst-timeline-step-dot svg {
  width: 12px;
  height: 12px;
}

.rst-timeline-step-label {
  font-weight: 500;
}

.rst-timeline-step.is-active {
  color: #F9FAFB;
}

.rst-timeline-step.is-active .rst-timeline-step-dot {
  color: #06B6D4;
  background: rgba(6, 182, 212, 0.18);
}

.rst-timeline-step.is-active .rst-timeline-step-dot svg {
  animation: rst-spin 1.4s linear infinite;
}

@keyframes rst-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rst-timeline-step.is-completed {
  color: #D1D5DB;
}

.rst-timeline-step.is-completed .rst-timeline-step-dot {
  color: #22C55E;
  background: rgba(34, 197, 94, 0.18);
}

.rst-timeline-step.is-failed {
  color: #D1D5DB;
}

.rst-timeline-step.is-failed .rst-timeline-step-dot {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.18);
}

/* PITR's own 'pitr_replay_failed' terminal status: base restore
   succeeded, WAL replay failed -- amber, distinct from is-failed's red,
   since real data landed on the destination (base-backup snapshot), not
   nothing. See backup/pg_restore_runner.py's own module docstring. */
.rst-timeline-step.is-warning {
  color: #D1D5DB;
}

.rst-timeline-step.is-warning .rst-timeline-step-dot {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.18);
}

/* ── STEP 5: Ready to Restore (Danger Panel #3A1717 / #EF4444) ───────── */

.rst-card-danger {
  border: 1px solid #EF4444;
  background: #3A1717;
  box-shadow: 0 16px 52px -10px rgba(239, 68, 68, 0.35);
  border-radius: 18px;
  padding: 32px;
}

.rst-confirm-headline {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.rst-confirm-headline-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.25);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.rst-confirm-headline-icon svg {
  width: 28px;
  height: 28px;
}

.rst-confirm-headline .rst-card-title {
  font-size: 26px;
  font-weight: 700;
  color: #F9FAFB;
}

.rst-confirm-headline-desc {
  margin-bottom: 0 !important;
}

.rst-impact-card {
  padding: 22px 26px;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.rst-impact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.25);
  color: #EF4444;
}

.rst-impact-icon svg {
  width: 20px;
  height: 20px;
}

.rst-impact-title {
  margin: 0 0 4px;
  font-family: var(--font-app-sans);
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
}

.rst-impact-desc {
  margin: 0;
  font-family: var(--font-app-sans);
  font-size: 14px;
  color: #9CA3AF;
  line-height: 1.55;
}

/* PITR's own 'pitr_replay_failed' case in the history drawer -- amber,
   not the base (red) .rst-impact-card: the base restore actually
   succeeded and the destination holds real data (the base-backup
   snapshot), so this reads as "needs attention" rather than "nothing
   happened, pure failure." */
.rst-impact-card.is-warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
}

.rst-impact-card.is-warning .rst-impact-icon {
  background: rgba(245, 158, 11, 0.25);
  color: #F59E0B;
}

.rst-warning-bullets {
  margin: 0;
  padding-left: 18px;
  font-family: var(--font-app-sans);
  font-size: 14px;
  color: #FCA5A5;
  line-height: 1.7;
}

.rst-warning-bullets li {
  margin: 0;
}

/* ── STEP 5: Restore Summary / Impact Summary / Validation Checklist ─── */

.rst-step5-section {
  margin-bottom: 24px;
}

.rst-step5-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-app-sans);
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
}

.rst-step5-section-title svg {
  width: 17px;
  height: 17px;
  color: #9CA3AF;
}

.rst-step5-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.rst-step5-summary-tile {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rst-step5-summary-label {
  margin: 0;
  font-size: 11px;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rst-step5-summary-value {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #F9FAFB;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rst-impact-bullets {
  margin: 0;
  padding-left: 18px;
  font-family: var(--font-app-sans);
  font-size: 14px;
  color: #D1D5DB;
  line-height: 1.8;
}

.rst-impact-bullets li {
  margin: 0;
}

@media (max-width: 720px) {
  .rst-step5-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.rst-confirm-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.rst-confirm-checkbox {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-app-sans);
  font-size: 14px;
  font-weight: 600;
  color: #F9FAFB;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.rst-confirm-checkbox:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}

.rst-confirm-checkbox has(:checked),
.rst-confirm-checkbox:has(input:checked) {
  border: 2px solid #22C55E;
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

.rst-confirm-checkbox input {
  margin: 0;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: #22C55E;
  cursor: pointer;
}

/* ── Action Buttons & Visual Hero ────────────────────────────────────── */

.rst-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Start Restore Hero Button */
.rst-btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 54px;
  padding: 0 32px;
  border: none;
  border-radius: 14px;
  background: #EF4444;
  color: #FFFFFF;
  font-family: var(--font-app-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 24px -6px rgba(239, 68, 68, 0.5);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease, opacity 200ms ease;
  overflow: hidden;
}

.rst-btn-primary svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  transition: transform 200ms ease;
}

.rst-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -8px rgba(239, 68, 68, 0.7);
  background: #DC2626;
}

.rst-btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Run Pre-flight Checks Secondary Outline Button */
.rst-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 28px;
  border-radius: 14px;
  border: 1px solid rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.08);
  color: #06B6D4;
  font-family: var(--font-app-sans);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.rst-btn-outline svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  transition: transform 200ms ease;
}

.rst-btn-outline:hover:not(:disabled) {
  border-color: #06B6D4;
  background: rgba(6, 182, 212, 0.18);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(6, 182, 212, 0.45);
}

.rst-btn-outline:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #9CA3AF;
}

/* ── RIGHT STICKY SIDEBAR CARDS ──────────────────────────────────────── */

.rst-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rst-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.rst-summary-row-label {
  font-family: var(--font-app-sans);
  font-size: 14px;
  font-weight: 600;
  color: #9CA3AF;
}

.rst-summary-row-value {
  font-family: var(--font-app-sans);
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Restore Health Apple-Style Status Widgets */
.rst-integrity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.rst-integrity-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 14px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.rst-integrity-item:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.rst-integrity-item-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-app-sans);
  font-size: 12px;
  font-weight: 700;
  color: #9CA3AF;
}

.rst-integrity-item-label svg {
  width: 14px;
  height: 14px;
  color: #22C55E;
}

.rst-integrity-item-value {
  font-family: var(--font-app-sans);
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
}

/* Restore Progress Status Panel */
.rst-progress-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 12px 10px;
}

.rst-progress-placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  color: #22C55E;
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
  animation: rstPulse 2s infinite ease-in-out;
}

@keyframes rstPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(34, 197, 94, 0.25); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(34, 197, 94, 0.4); }
}

.rst-progress-placeholder-icon svg {
  width: 26px;
  height: 26px;
}

.rst-progress-placeholder-title {
  margin: 0 0 6px;
  font-family: var(--font-app-sans);
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
}

.rst-progress-placeholder-desc {
  margin: 0;
  font-family: var(--font-app-sans);
  font-size: 13px;
  color: #9CA3AF;
  line-height: 1.5;
  max-width: 32ch;
}

/* Restore Progress -- active state (running/validating). Deliberately NO
   percentage ring/ETA/speed: pg_restore has no byte-level progress
   tracking on the backend, so those were always fabricated (RestoreOut
   carries no progress_percent/eta_seconds/speed_bytes_per_sec field --
   the UI used to always show 0% / "--" for a genuinely running restore,
   which reads as broken/misleading for a destructive operation). This is
   an honest indeterminate spinner instead -- visual feedback that
   something is happening, with no false precision claim. Real state
   (rst-progress-state) and real elapsed time (rst-progress-elapsed,
   computed from the real started_at timestamp) carry the actual signal. */
.rst-progress-active-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.rst-progress-ring-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
}

.rst-progress-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(34, 197, 94, 0.18);
  border-top-color: #22C55E;
  border-radius: 50%;
  animation: icon-spin 0.9s linear infinite;
}

.rst-progress-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.rst-progress-state {
  margin: 0;
  font-family: var(--font-app-sans);
  font-size: 15px;
  font-weight: 700;
  color: #F9FAFB;
}

.rst-progress-target {
  margin: 0;
  font-family: var(--font-app-sans);
  font-size: 13px;
  color: #9CA3AF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Vertical Activity Timeline Widget (Card 4) */
.rst-activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 8px;
  margin-top: 12px;
}

.rst-timeline-item {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.rst-timeline-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  bottom: -16px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.rst-timeline-item:last-child::before {
  display: none;
}

.rst-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #9CA3AF;
  flex: 0 0 auto;
  z-index: 1;
}

.rst-timeline-item.is-completed .rst-timeline-dot {
  background: #22C55E;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.rst-timeline-item.is-active .rst-timeline-dot {
  background: #06B6D4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.rst-timeline-label {
  font-family: var(--font-app-sans);
  font-size: 14px;
  font-weight: 600;
  color: #F9FAFB;
}

/* Documentation Shortcuts */
.rst-doc-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rst-doc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--app-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #F9FAFB;
  text-decoration: none;
  font-family: var(--font-app-sans);
  font-size: 14px;
  font-weight: 600;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.rst-doc-link:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.35);
  background: color-mix(in srgb, var(--app-surface-elevated) 92%, #06B6D4);
}

.rst-doc-link svg {
  width: 18px;
  height: 18px;
  color: #06B6D4;
  flex: 0 0 auto;
}

.rst-doc-link-arrow {
  margin-left: auto;
  color: #9CA3AF !important;
  transition: transform 200ms ease, color 200ms ease;
}

.rst-doc-link:hover .rst-doc-link-arrow {
  transform: translateX(3px);
  color: #06B6D4 !important;
}

/* ── Restore History Section ─────────────────────────────────────────── */

.rst-history-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.rst-history-search {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}

.rst-history-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9CA3AF;
}

.rst-history-search input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--app-surface-elevated);
  color: #F9FAFB;
  font-family: var(--font-app-sans);
  font-size: 14px;
  transition: border-color 200ms ease;
}

.rst-history-search input:focus {
  outline: none;
  border-color: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.rst-select {
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--app-surface-elevated);
  color: #F9FAFB;
  font-family: var(--font-app-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.rst-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-app-sans);
}

.rst-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9CA3AF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--app-surface-elevated);
}

.rst-table td {
  padding: 16px;
  font-size: 14px;
  color: #F9FAFB;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rst-table tbody tr {
  transition: background 150ms ease;
  cursor: pointer;
}

.rst-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* History Empty State */
.rst-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
}

.rst-empty-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  border-radius: 24px;
  background: #123B2D;
  color: #22C55E;
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
}

.rst-empty-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: #F9FAFB;
  margin: 0 0 8px;
}

.rst-empty-card p {
  font-size: 15px;
  color: #9CA3AF;
  max-width: 48ch;
  line-height: 1.55;
  margin: 0 0 24px;
}

.rst-empty-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ── Phase 3.9: light-first Restore Management IA ───────────────────── */

body.restore-theme-page {
  --rst-bg: #f7f9fc;
  --rst-surface: #ffffff;
  --rst-surface-soft: #f8fafc;
  --rst-border: #dce4ef;
  --rst-border-soft: #eef2f7;
  --rst-text: #071431;
  --rst-muted: #51617c;
  --rst-muted-strong: #31405c;
  --rst-green: #12b76a;
  --rst-blue: #2563eb;
  --rst-red: #ef4444;
  --rst-amber: #f59e0b;
  background: var(--rst-bg);
  overflow-x: hidden;
}

html:has(body.restore-theme-page) {
  overflow-x: clip;
}

body.restore-theme-page .app-main {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

:root[data-theme="dark"] body.restore-theme-page {
  --rst-bg: #07111f;
  --rst-surface: #0d1726;
  --rst-surface-soft: #111d2f;
  --rst-border: rgba(148, 163, 184, 0.24);
  --rst-border-soft: rgba(148, 163, 184, 0.16);
  --rst-text: #f8fafc;
  --rst-muted: #a8b3c7;
  --rst-muted-strong: #d4dcec;
}

body.restore-theme-page .rst-page {
  max-width: none;
  padding: 28px 32px 56px;
  background:
    radial-gradient(circle at 30% 0%, rgba(18, 183, 106, 0.08), transparent 28%),
    var(--rst-bg);
}

body.restore-theme-page .rst-section + .rst-section,
body.restore-theme-page .rst-section + .rst-panel,
body.restore-theme-page .rst-panel + .rst-section,
body.restore-theme-page .rst-panel + .rst-panel {
  margin-top: 24px;
}

body.restore-theme-page [data-rst-panel][hidden],
body.restore-theme-page .rst-step-card[hidden] {
  display: none !important;
}

body.restore-theme-page .rst-header {
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
}

body.restore-theme-page .rst-header-graphic {
  display: none;
}

body.restore-theme-page .rst-header-icon-box,
body.restore-theme-page .rst-backup-option-icon-box {
  border-radius: 16px;
  border: 1px solid rgba(18, 183, 106, 0.16);
  background: linear-gradient(135deg, rgba(18, 183, 106, 0.14), rgba(18, 183, 106, 0.04));
  color: var(--rst-green);
  box-shadow: none;
}

body.restore-theme-page .rst-title {
  color: var(--rst-text);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

body.restore-theme-page .rst-subtitle,
body.restore-theme-page .rst-card-desc,
body.restore-theme-page .rst-summary-row-label,
body.restore-theme-page .rst-table-muted,
body.restore-theme-page .text-muted {
  color: var(--rst-muted);
}

body.restore-theme-page .rst-pill {
  border-radius: 999px;
  box-shadow: none;
}

body.restore-theme-page .rst-tabs {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  min-height: 52px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--rst-border);
}

body.restore-theme-page .rst-tab {
  height: 52px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--rst-muted-strong);
  font-family: var(--font-app-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

body.restore-theme-page .rst-tab.is-active {
  color: var(--rst-green);
  border-bottom-color: var(--rst-green);
}

body.restore-theme-page .rst-tab:focus-visible,
body.restore-theme-page .rst-stepper-btn:focus-visible,
body.restore-theme-page .rst-btn-primary:focus-visible,
body.restore-theme-page .rst-btn-outline:focus-visible,
body.restore-theme-page .rst-select:focus-visible,
body.restore-theme-page input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

body.restore-theme-page .rst-card,
body.restore-theme-page .rst-stat-card,
body.restore-theme-page .rst-empty-card {
  border: 1px solid var(--rst-border);
  border-radius: 12px;
  background: var(--rst-surface);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.05);
}

body.restore-theme-page .rst-card:hover {
  transform: none;
  border-color: var(--rst-border);
}

body.restore-theme-page .rst-card-title,
body.restore-theme-page .rst-summary-row-value,
body.restore-theme-page .rst-progress-state,
body.restore-theme-page .rst-timeline-label,
body.restore-theme-page .rst-empty-card h2,
body.restore-theme-page .rst-table td,
body.restore-theme-page .rst-stat-card-value,
body.restore-theme-page .rst-stat-card-title {
  color: var(--rst-text);
}

body.restore-theme-page .rst-grid {
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: start;
}

body.restore-theme-page .rst-main,
body.restore-theme-page .rst-side {
  min-width: 0;
}

body.restore-theme-page .rst-side {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.restore-theme-page .rst-side-timeline-card,
body.restore-theme-page .rst-side-activity-card,
body.restore-theme-page .rst-side-docs-card {
  display: none;
}

body.restore-theme-page .rst-stepper {
  margin-bottom: 16px;
  border: 1px solid var(--rst-border);
  border-radius: 12px;
  background: var(--rst-surface);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.05);
}

body.restore-theme-page .rst-stepper-btn {
  min-width: 0;
}

body.restore-theme-page .rst-stepper-label {
  color: var(--rst-muted-strong);
  font-size: 13px;
}

body.restore-theme-page .rst-stepper-item.is-current .rst-stepper-circle {
  background: linear-gradient(135deg, #12b76a, #34d399);
  color: #ffffff;
}

body.restore-theme-page .rst-stepper-item.is-current .rst-stepper-label {
  color: var(--rst-text);
}

body.restore-theme-page .rst-step-card {
  min-height: 430px;
}

body.restore-theme-page .rst-history-toolbar,
body.restore-theme-page .rst-backup-filters-bar {
  border: 0;
  background: transparent;
}

body.restore-theme-page .rst-history-search input,
body.restore-theme-page .rst-backup-search input,
body.restore-theme-page .rst-select,
body.restore-theme-page .select {
  border-color: var(--rst-border);
  background: var(--rst-surface);
  color: var(--rst-text);
}

body.restore-theme-page .rst-table th {
  border-bottom-color: var(--rst-border);
  background: var(--rst-surface);
  color: var(--rst-muted-strong);
  letter-spacing: 0;
}

body.restore-theme-page .rst-table td {
  border-bottom-color: var(--rst-border-soft);
}

body.restore-theme-page .rst-table tbody tr:hover {
  background: var(--rst-surface-soft);
}

body.restore-theme-page #rst-history-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.restore-theme-page #rst-history-section {
  overflow: hidden;
}

body.restore-theme-page #rst-performance-card > div:first-child {
  gap: 12px;
}

body.restore-theme-page .rst-summary-row,
body.restore-theme-page .rst-option-row,
body.restore-theme-page .rst-dest-meta-card,
body.restore-theme-page .rst-dest-health-preview,
body.restore-theme-page .rst-mapping-node,
body.restore-theme-page .rst-info-banner,
body.restore-theme-page .rst-impact-card {
  border-color: var(--rst-border-soft);
  background: var(--rst-surface-soft);
}

body.restore-theme-page .rst-recovery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

body.restore-theme-page .rst-pitr-section {
  margin-top: 20px;
}

body.restore-theme-page .rst-bottom-panels {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.restore-theme-page .rst-doc-link {
  border-color: var(--rst-border);
  background: var(--rst-surface);
  color: var(--rst-text);
}

body.restore-theme-page .rst-doc-link:hover {
  background: var(--rst-surface-soft);
  border-color: rgba(18, 183, 106, 0.32);
}

@media (max-width: 1100px) {
  body.restore-theme-page .rst-grid,
  body.restore-theme-page .rst-recovery-grid {
    grid-template-columns: 1fr;
  }

  body.restore-theme-page .rst-side {
    position: static;
  }
}

@media (max-width: 820px) {
  body.restore-theme-page .rst-page {
    padding: 20px 16px 40px;
  }

  body.restore-theme-page .rst-header-left {
    gap: 14px;
  }

  body.restore-theme-page .rst-title {
    font-size: 24px;
  }

  body.restore-theme-page .rst-tabs {
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.restore-theme-page .rst-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body.restore-theme-page .rst-stepper-list {
    grid-template-columns: repeat(5, minmax(108px, 1fr));
    overflow-x: auto;
    scrollbar-width: thin;
  }

  body.restore-theme-page .rst-stepper-label {
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
  }

  body.restore-theme-page .rst-card {
    padding: 20px;
  }

  body.restore-theme-page .app-shell-body {
    max-width: 100%;
    overflow-x: clip;
  }

  body.restore-theme-page .app-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
  }

  body.restore-theme-page .rst-backup-filters-bar,
  body.restore-theme-page .rst-backup-filters,
  body.restore-theme-page .rst-history-toolbar,
  body.restore-theme-page #rst-performance-card > div:first-child {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }

  body.restore-theme-page .rst-backup-search,
  body.restore-theme-page .rst-backup-filters,
  body.restore-theme-page .rst-history-search,
  body.restore-theme-page .rst-select,
  body.restore-theme-page .select,
  body.restore-theme-page #rst-performance-card select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.restore-theme-page .rst-doc-link {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.restore-theme-page .rst-doc-link-arrow {
    margin-left: 0 !important;
  }

  body.restore-theme-page .rst-table,
  body.restore-theme-page .rst-table thead,
  body.restore-theme-page .rst-table tbody,
  body.restore-theme-page .rst-table tr,
  body.restore-theme-page .rst-table th,
  body.restore-theme-page .rst-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  body.restore-theme-page .rst-table thead {
    display: none;
  }

  body.restore-theme-page .rst-table tr {
    border: 1px solid var(--rst-border-soft);
    border-radius: 10px;
    background: var(--rst-surface-soft);
    overflow: hidden;
  }

  body.restore-theme-page .rst-table tr + tr {
    margin-top: 10px;
  }

  body.restore-theme-page .rst-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  body.restore-theme-page .rst-page {
    padding-inline: 12px;
  }

  body.restore-theme-page .rst-header-icon-box {
    width: 48px;
    height: 48px;
    padding: 12px;
  }

  body.restore-theme-page .rst-header-badges {
    gap: 8px;
  }
}

/* Final visual-quality remediation: Restore page light/dark primitives */

body.restore-theme-page {
  --rst-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.035);
  --rst-emerald-soft: var(--color-brand-soft, #ECFDF5);
  --rst-emerald-border: var(--color-brand-border, #A7F3D0);
  --rst-blue-soft: var(--color-info-soft, #EFF6FF);
  --rst-blue-border: var(--color-info-border, #BFDBFE);
  --rst-purple-soft: var(--color-purple-soft, #F5F3FF);
  --rst-amber-soft: var(--color-warning-soft, #FFFBEB);
  --rst-amber-border: var(--color-warning-border, #FDE68A);
  --rst-danger-soft: var(--color-danger-soft, #FEF2F2);
  --rst-danger-border: var(--color-danger-border, #FECACA);
  --rst-danger-text: var(--color-danger-text, #991B1B);
}

:root[data-theme="dark"] body.restore-theme-page {
  --rst-card-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

body.restore-theme-page .rst-card,
body.restore-theme-page .rst-stepper,
body.restore-theme-page .rst-stat-card,
body.restore-theme-page .rst-empty-card,
body.restore-theme-page #rst-history-section,
body.restore-theme-page .rst-card-danger {
  border-radius: 16px;
  border-color: var(--rst-border);
  background: var(--rst-surface);
  box-shadow: var(--rst-card-shadow);
}

body.restore-theme-page .rst-card-desc,
body.restore-theme-page .rst-confirm-headline-desc,
body.restore-theme-page .rst-impact-desc,
body.restore-theme-page .rst-validation-item-note,
body.restore-theme-page .rst-validation-last-checked,
body.restore-theme-page .rst-validation-stat-label,
body.restore-theme-page .rst-validation-donut-legend-label,
body.restore-theme-page .rst-validation-timeline-meta,
body.restore-theme-page .rst-step5-summary-label,
body.restore-theme-page .rst-integrity-item-label,
body.restore-theme-page .rst-progress-placeholder-desc,
body.restore-theme-page .rst-table-muted {
  color: var(--rst-muted);
}

body.restore-theme-page .rst-card-title,
body.restore-theme-page .rst-backup-option-title,
body.restore-theme-page .rst-validation-item-label,
body.restore-theme-page .rst-validation-progress-label,
body.restore-theme-page .rst-validation-stat-value,
body.restore-theme-page .rst-validation-donut-pct,
body.restore-theme-page .rst-step5-section-title,
body.restore-theme-page .rst-step5-summary-value,
body.restore-theme-page .rst-integrity-item-value,
body.restore-theme-page .rst-progress-placeholder-title,
body.restore-theme-page .rst-impact-title {
  color: var(--rst-text);
}

body.restore-theme-page .rst-backup-option,
body.restore-theme-page .rst-destination-option,
body.restore-theme-page .rst-option-row,
body.restore-theme-page .rst-validation-item,
body.restore-theme-page .rst-validation-stat-tile,
body.restore-theme-page .rst-validation-summary-row,
body.restore-theme-page .rst-step5-summary-tile,
body.restore-theme-page .rst-confirm-checkbox,
body.restore-theme-page .rst-integrity-item,
body.restore-theme-page .rst-history-toolbar,
body.restore-theme-page .rst-progress-placeholder,
body.restore-theme-page .rst-preview-export-row {
  border: 1px solid var(--rst-border);
  background: var(--rst-surface);
  color: var(--rst-text);
  box-shadow: none;
}

body.restore-theme-page .rst-backup-option:hover,
body.restore-theme-page .rst-destination-option:hover,
body.restore-theme-page .rst-option-row:hover,
body.restore-theme-page .rst-validation-item:hover,
body.restore-theme-page .rst-integrity-item:hover {
  border-color: var(--rst-border-strong, #CBD5E1);
  background: var(--rst-surface-soft);
  box-shadow: none;
  transform: translateY(-1px);
}

body.restore-theme-page .rst-backup-option.is-selected,
body.restore-theme-page .rst-destination-option.is-selected,
body.restore-theme-page .rst-confirm-checkbox:has(input:checked) {
  border-color: var(--rst-green);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.09), var(--rst-surface));
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.22), 0 8px 22px rgba(16, 185, 129, 0.08);
}

body.restore-theme-page .rst-backup-option-radio,
body.restore-theme-page .rst-destination-option-radio {
  border-color: var(--rst-border-strong, #CBD5E1);
  background: var(--rst-surface);
}

body.restore-theme-page .rst-backup-option-subtitle,
body.restore-theme-page .rst-backup-option-meta,
body.restore-theme-page .rst-option-row-desc,
body.restore-theme-page .rst-dest-option-desc,
body.restore-theme-page .rst-dest-meta-card,
body.restore-theme-page .rst-dest-health-preview,
body.restore-theme-page .rst-preview-export-hint {
  color: var(--rst-muted);
}

body.restore-theme-page .rst-backup-option-icon-box,
body.restore-theme-page .rst-validation-icon,
body.restore-theme-page .rst-validation-stat-icon,
body.restore-theme-page .rst-confirm-headline-icon,
body.restore-theme-page .rst-impact-icon,
body.restore-theme-page .rst-progress-placeholder-icon {
  border: 1px solid rgba(16, 185, 129, 0.18);
  background: var(--rst-emerald-soft);
  color: var(--rst-green);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.11);
}

body.restore-theme-page .rst-validation-item.is-passed,
body.restore-theme-page .rst-validation-pill.is-passed {
  border-color: var(--color-success-border, #BBF7D0);
}

body.restore-theme-page .rst-validation-item.is-passed .rst-validation-icon,
body.restore-theme-page .rst-validation-pill.is-passed {
  color: var(--color-success-text, #166534);
  background: var(--color-success-soft, #F0FDF4);
}

body.restore-theme-page .rst-validation-item.is-failed .rst-validation-icon,
body.restore-theme-page .rst-validation-pill.is-failed {
  color: var(--rst-danger-text);
  background: var(--rst-danger-soft);
}

body.restore-theme-page .rst-validation-item.is-warning .rst-validation-icon,
body.restore-theme-page .rst-validation-pill.is-warning {
  color: var(--color-warning-text, #92400E);
  background: var(--rst-amber-soft);
}

body.restore-theme-page .rst-validation-item.is-pending .rst-validation-icon,
body.restore-theme-page .rst-validation-pill.is-pending {
  color: var(--rst-muted-strong);
  background: var(--color-surface-secondary, #F8FAFC);
}

body.restore-theme-page .rst-validation-item-latency,
body.restore-theme-page .rst-validation-donut-legend-count {
  color: var(--rst-muted-strong);
}

body.restore-theme-page .rst-validation-progress-bar,
body.restore-theme-page .rst-progress-bar {
  background: var(--color-border-subtle, #F1F5F9);
  stroke: var(--color-border-default, #E2E8F0);
}

body.restore-theme-page .rst-progress-spinner {
  border-color: var(--color-border-subtle, #F1F5F9);
  border-top-color: var(--rst-green, #22C55E);
}

body.restore-theme-page .rst-info-banner {
  color: var(--rst-muted-strong);
  background: var(--rst-blue-soft);
  border-color: var(--rst-blue-border);
}

body.restore-theme-page .rst-info-banner p {
  color: var(--rst-muted-strong);
}

body.restore-theme-page .rst-card-danger {
  background: #FEF2F2;
  border-color: #FECACA;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.08);
}

body.restore-theme-page .rst-card-danger .rst-card-title,
body.restore-theme-page .rst-card-danger .rst-step5-section-title,
body.restore-theme-page .rst-card-danger .rst-confirm-checkbox {
  color: var(--rst-text);
}

body.restore-theme-page .rst-card-danger .rst-confirm-headline-icon,
body.restore-theme-page .rst-impact-icon {
  color: var(--rst-danger-text);
  background: #FEE2E2;
  border-color: var(--rst-danger-border);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.12);
}

body.restore-theme-page .rst-warning-bullets,
body.restore-theme-page .rst-impact-bullets {
  color: #991B1B;
}

body.restore-theme-page .rst-impact-card {
  background: #FFF7F7;
  border-color: #FECACA;
}

/* PITR's own 'pitr_replay_failed' amber variant -- overrides the red
   .rst-impact-card/.rst-impact-icon defaults just above (higher
   specificity via the .is-warning modifier), same reasoning as the base
   (dark) theme rule near .rst-impact-desc. */
body.restore-theme-page .rst-impact-card.is-warning {
  background: #FFFBEB;
  border-color: #FDE68A;
}

body.restore-theme-page .rst-impact-card.is-warning .rst-impact-icon {
  color: #B45309;
  background: #FEF3C7;
  border-color: #FDE68A;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.12);
}

body.restore-theme-page .rst-side-summary-card {
  border-color: color-mix(in srgb, var(--color-info, #2563EB) 24%, var(--rst-border));
  background: linear-gradient(180deg, var(--rst-blue-soft), var(--rst-surface) 46%);
}

body.restore-theme-page .rst-side-progress-card {
  padding-block: 18px;
}

body.restore-theme-page #rst-progress-idle {
  padding-block: 14px 4px;
}

body.restore-theme-page .rst-summary-row {
  border-bottom-color: var(--rst-border-soft);
}

body.restore-theme-page .rst-summary-row-label {
  color: var(--rst-muted);
}

body.restore-theme-page .rst-summary-row-value {
  color: var(--rst-text);
}

body.restore-theme-page .rst-stepper {
  padding: 22px 26px;
  overflow-x: auto;
  scrollbar-width: thin;
}

body.restore-theme-page .rst-stepper-list {
  align-items: flex-start;
  min-width: 620px;
}

body.restore-theme-page .rst-stepper-btn {
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  gap: 8px;
}

body.restore-theme-page .rst-stepper-btn:hover {
  background: var(--rst-surface-soft);
}

body.restore-theme-page .rst-stepper-circle {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

body.restore-theme-page .rst-stepper-check {
  display: none !important;
}

body.restore-theme-page .rst-stepper-item.is-completed .rst-stepper-num,
body.restore-theme-page .rst-stepper-item.is-current .rst-stepper-num,
body.restore-theme-page .rst-stepper-item.is-upcoming .rst-stepper-num {
  display: block;
}

body.restore-theme-page .rst-stepper-item.is-current .rst-stepper-circle,
body.restore-theme-page .rst-stepper-item.is-completed .rst-stepper-circle {
  color: #fff;
  background: var(--rst-green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12), 0 0 16px rgba(16, 185, 129, 0.14);
}

body.restore-theme-page .rst-stepper-item.is-upcoming .rst-stepper-circle {
  color: var(--rst-muted-strong);
  border-color: var(--rst-border-strong, #CBD5E1);
  background: var(--rst-surface);
}

body.restore-theme-page .rst-stepper-item.is-current .rst-stepper-label,
body.restore-theme-page .rst-stepper-item.is-completed .rst-stepper-label {
  color: var(--rst-text);
  font-weight: 750;
}

body.restore-theme-page .rst-stepper-item.is-upcoming .rst-stepper-label {
  color: var(--rst-muted-strong);
  font-weight: 650;
}

body.restore-theme-page .rst-stepper-line {
  height: 2px;
  margin-top: 16px;
  background: var(--rst-border);
  box-shadow: none;
}

body.restore-theme-page .rst-stepper-item.is-completed .rst-stepper-line,
body.restore-theme-page .rst-stepper-line.is-filled {
  background: var(--rst-green);
  box-shadow: none;
}

body.restore-theme-page .rst-select,
body.restore-theme-page .select,
body.restore-theme-page .field select,
body.restore-theme-page #rst-source-select,
body.restore-theme-page #rst-target-select,
body.restore-theme-page #restore-target-select,
body.restore-theme-page #pitr-target-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--rst-border);
  border-radius: 12px;
  background-color: var(--rst-surface);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--rst-muted-strong) 50%),
    linear-gradient(135deg, var(--rst-muted-strong) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--rst-text);
  font-weight: 650;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

body.restore-theme-page .rst-select:hover,
body.restore-theme-page .select:hover,
body.restore-theme-page .field select:hover {
  border-color: var(--rst-border-strong, #CBD5E1);
  background-color: var(--rst-surface-soft);
}

body.restore-theme-page .rst-select:focus,
body.restore-theme-page .select:focus,
body.restore-theme-page .field select:focus {
  border-color: var(--color-border-focus, #2563EB);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

body.restore-theme-page .rst-btn-outline:disabled,
body.restore-theme-page .rst-btn-primary:disabled {
  opacity: 1;
  color: var(--rst-muted);
  background: var(--color-disabled-bg, #F1F5F9);
  border-color: var(--color-disabled-border, #E2E8F0);
  box-shadow: none;
}

body.restore-theme-page .rst-backup-search input,
body.restore-theme-page .rst-history-search input,
body.restore-theme-page input[type="text"],
body.restore-theme-page input[type="password"],
body.restore-theme-page input[type="datetime-local"],
body.restore-theme-page textarea {
  border-color: var(--rst-border);
  background: var(--rst-surface);
  color: var(--rst-text);
}

body.restore-theme-page input::placeholder,
body.restore-theme-page textarea::placeholder {
  color: var(--rst-muted);
}

body.restore-theme-page .rst-history-toolbar,
body.restore-theme-page .rst-backup-filters-bar {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--rst-border);
  background: var(--rst-surface-soft);
}

body.restore-theme-page #rst-history-section {
  padding: 24px;
}

body.restore-theme-page #rst-history-section > .rst-history-toolbar,
body.restore-theme-page #rst-history-section > #rst-history-table-wrap,
body.restore-theme-page #rst-history-section > #rst-empty-state,
body.restore-theme-page #rst-history-section > #rst-history-pager {
  margin-inline: 0;
}

body.restore-theme-page #perf-chart-wrap {
  background: transparent !important;
  border: 1px dashed var(--rst-border);
}

:root[data-theme="dark"] body.restore-theme-page .rst-card,
:root[data-theme="dark"] body.restore-theme-page .rst-stepper,
:root[data-theme="dark"] body.restore-theme-page .rst-stat-card,
:root[data-theme="dark"] body.restore-theme-page .rst-empty-card,
:root[data-theme="dark"] body.restore-theme-page .rst-backup-option,
:root[data-theme="dark"] body.restore-theme-page .rst-destination-option,
:root[data-theme="dark"] body.restore-theme-page .rst-option-row,
:root[data-theme="dark"] body.restore-theme-page .rst-validation-item,
:root[data-theme="dark"] body.restore-theme-page .rst-validation-stat-tile,
:root[data-theme="dark"] body.restore-theme-page .rst-validation-summary-row,
:root[data-theme="dark"] body.restore-theme-page .rst-step5-summary-tile,
:root[data-theme="dark"] body.restore-theme-page .rst-confirm-checkbox,
:root[data-theme="dark"] body.restore-theme-page .rst-integrity-item,
:root[data-theme="dark"] body.restore-theme-page .rst-history-toolbar,
:root[data-theme="dark"] body.restore-theme-page .rst-progress-placeholder,
:root[data-theme="dark"] body.restore-theme-page #rst-history-section {
  background: var(--rst-surface);
  border-color: var(--rst-border);
}

:root[data-theme="dark"] body.restore-theme-page .rst-card-danger {
  background: #3A1717;
  border-color: rgba(239, 68, 68, 0.52);
}

:root[data-theme="dark"] body.restore-theme-page .rst-card-danger .rst-card-title,
:root[data-theme="dark"] body.restore-theme-page .rst-card-danger .rst-step5-section-title,
:root[data-theme="dark"] body.restore-theme-page .rst-card-danger .rst-confirm-checkbox,
:root[data-theme="dark"] body.restore-theme-page .rst-warning-bullets,
:root[data-theme="dark"] body.restore-theme-page .rst-impact-bullets {
  color: #F8FAFC;
}

:root[data-theme="dark"] body.restore-theme-page .rst-select,
:root[data-theme="dark"] body.restore-theme-page .select,
:root[data-theme="dark"] body.restore-theme-page .field select,
:root[data-theme="dark"] body.restore-theme-page input,
:root[data-theme="dark"] body.restore-theme-page textarea {
  background-color: var(--rst-surface-soft);
  color: var(--rst-text);
}
