/* ==========================================================================
   MCDRM theme - colorful, modern look on top of Bootstrap 5.3 (light + dark)
   ========================================================================== */

:root, [data-bs-theme=light] {
  --app-font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-family: var(--app-font);

  --grad-brand: linear-gradient(120deg, #4f46e5 0%, #7c3aed 48%, #db2777 100%);
  --grad-blue: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --grad-green: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  --grad-amber: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --grad-rose: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
  --grad-violet: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --grad-slate: linear-gradient(135deg, #64748b 0%, #6366f1 100%);

  --app-bg: #f4f5fb;
  --app-glow-1: rgba(99, 102, 241, .14);
  --app-glow-2: rgba(236, 72, 153, .10);
  --surface: #ffffff;
  --surface-muted: #f7f8fd;
  --border-soft: rgba(99, 102, 241, .13);
  --text-muted-soft: #64748b;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-md: 0 14px 34px -14px rgba(79, 70, 229, .35), 0 6px 14px -8px rgba(15, 23, 42, .15);
  --radius: 1rem;
  --radius-sm: .65rem;

  --chip-bg: rgba(99, 102, 241, .10);
  --chip-color: #4338ca;

  --bs-link-color: #4f46e5;
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color: #7c3aed;
  --bs-link-hover-color-rgb: 124, 58, 237;
}

[data-bs-theme=dark] {
  --app-bg: #0b1020;
  --app-glow-1: rgba(99, 102, 241, .22);
  --app-glow-2: rgba(236, 72, 153, .12);
  --surface: #121a2f;
  --surface-muted: #18213a;
  --border-soft: rgba(148, 163, 184, .14);
  --text-muted-soft: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, .7), 0 6px 14px -8px rgba(99, 102, 241, .3);

  --chip-bg: rgba(129, 140, 248, .16);
  --chip-color: #c7d2fe;

  --bs-body-bg: var(--app-bg);
  --bs-link-color: #a5b4fc;
  --bs-link-color-rgb: 165, 180, 252;
  --bs-link-hover-color: #d8b4fe;
  --bs-link-hover-color-rgb: 216, 180, 254;
}

/* ----- Base -------------------------------------------------------------- */

html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 15px; } }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--app-bg);
  background-image:
    radial-gradient(1100px 420px at 8% -8%, var(--app-glow-1), transparent 70%),
    radial-gradient(900px 380px at 95% -6%, var(--app-glow-2), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.app-main { flex: 1 0 auto; }

a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.icon {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -.15em;
  flex-shrink: 0;
}

.font-monospace { font-size: .9em; }
.text-soft { color: var(--text-muted-soft) !important; }

.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----- Navbar ------------------------------------------------------------ */

.app-navbar {
  background: var(--grad-brand);
  box-shadow: 0 8px 24px -12px rgba(79, 70, 229, .6);
  padding-top: .65rem;
  padding-bottom: .65rem;
}

.app-navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
}

.app-navbar .brand-logo {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: .7rem;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.app-navbar .brand-sub {
  display: block;
  font-size: .7rem;
  font-weight: 500;
  opacity: .8;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}

.app-navbar .nav-link {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: rgba(255, 255, 255, .85);
  font-weight: 500;
  border-radius: 999px;
  padding: .45rem .9rem !important;
  transition: background-color .15s ease, color .15s ease;
}

.app-navbar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .12); text-decoration: none; }
.app-navbar .nav-link.active { color: #fff; background: rgba(255, 255, 255, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }

.app-navbar .nav-link:focus-visible,
.app-navbar .navbar-brand:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: none;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  transition: background-color .15s ease, transform .2s ease;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .24); transform: rotate(15deg); }
.theme-toggle .icon-sun { display: none; }
[data-bs-theme=dark] .theme-toggle .icon-sun { display: inline; }
[data-bs-theme=dark] .theme-toggle .icon-moon { display: none; }

/* ----- Page header ------------------------------------------------------- */

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.75rem 0 1.5rem;
}

.page-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -.025em;
  margin: 0;
}

.page-subtitle { color: var(--text-muted-soft); margin: .25rem 0 0; }

.breadcrumb { --bs-breadcrumb-margin-bottom: .25rem; font-size: .85rem; }
.breadcrumb a { color: var(--text-muted-soft); }
.breadcrumb a:hover { color: var(--bs-link-color); }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  font-size: .85rem;
  color: var(--text-muted-soft);
}

/* ----- Cards ------------------------------------------------------------- */

.card {
  --bs-card-bg: var(--surface);
  --bs-card-border-color: var(--border-soft);
  --bs-card-border-radius: var(--radius);
  --bs-card-inner-border-radius: calc(var(--radius) - 1px);
  --bs-card-cap-bg: transparent;
  --bs-card-cap-padding-y: .95rem;
  --bs-card-cap-padding-x: 1.25rem;
  --bs-card-spacer-x: 1.25rem;
  --bs-card-spacer-y: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 650;
  border-bottom-color: var(--border-soft);
}

.card-header .card-header-actions { margin-left: auto; font-weight: 400; }

.icon-bubble {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .6rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .55);
}
.icon-bubble.lg { width: 3rem; height: 3rem; border-radius: .9rem; font-size: 1.3rem; }
.icon-bubble.round { width: 1.9rem; height: 1.9rem; border-radius: 50%; font-size: .85rem; }

.grad-brand { background: var(--grad-brand); }
.grad-blue { background: var(--grad-blue); }
.grad-green { background: var(--grad-green); }
.grad-amber { background: var(--grad-amber); }
.grad-rose { background: var(--grad-rose); }
.grad-violet { background: var(--grad-violet); }
.grad-cyan { background: var(--grad-cyan); }
.grad-slate { background: var(--grad-slate); }

/* ----- Stat tiles -------------------------------------------------------- */

.stat-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .18s ease, box-shadow .18s ease;
  isolation: isolate;
}

.stat-tile::before,
.stat-tile::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  z-index: -1;
}
.stat-tile::before { width: 9rem; height: 9rem; right: -2.5rem; top: -4rem; }
.stat-tile::after { width: 5rem; height: 5rem; right: 3.5rem; bottom: -3rem; background: rgba(255, 255, 255, .08); }

a.stat-tile:hover { color: #fff; text-decoration: none; transform: translateY(-3px); }
.stat-tile.active { outline: 3px solid rgba(255, 255, 255, .85); outline-offset: -6px; }

.stat-tile .stat-icon {
  display: inline-grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: .85rem;
  background: rgba(255, 255, 255, .2);
  font-size: 1.35rem;
}

.stat-tile .stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.stat-tile .stat-label { font-size: .8rem; font-weight: 600; opacity: .9; text-transform: uppercase; letter-spacing: .06em; margin-top: .3rem; }

/* ----- Toolbar / forms ---------------------------------------------------- */

.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border-soft);
  background-color: var(--surface);
  padding-top: .5rem;
  padding-bottom: .5rem;
}
[data-bs-theme=light] .form-control, [data-bs-theme=light] .form-select { border-color: #dfe2f1; }

.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 .25rem rgba(99, 102, 241, .2);
}

.form-control:disabled, .form-select:disabled { background-color: var(--surface-muted); opacity: .75; }

.form-label { font-weight: 600; font-size: .875rem; margin-bottom: .35rem; }
.form-text { color: var(--text-muted-soft); }

.input-icon { position: relative; }
.input-icon > .icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted-soft);
  pointer-events: none;
}
.input-icon > .form-control { padding-left: 2.5rem; }

select[multiple].form-select { padding: .35rem; }
select[multiple].form-select option { padding: .35rem .5rem; border-radius: .4rem; }

/* ----- Buttons ----------------------------------------------------------- */

.btn {
  --bs-btn-border-radius: var(--radius-sm);
  --bs-btn-font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease, background-color .15s ease;
}
.btn:not(:disabled):active { transform: translateY(1px); }
.btn-lg { --bs-btn-border-radius: .8rem; }

.btn-primary, .btn-success, .btn-warning, .btn-danger {
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-disabled-color: #fff;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-border-color: transparent;
  --bs-btn-focus-shadow-rgb: 99, 102, 241;
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .8);
}
.btn-primary:hover, .btn-success:hover, .btn-warning:hover, .btn-danger:hover { filter: brightness(1.08) saturate(1.1); box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .9); }
.btn-primary:disabled, .btn-success:disabled, .btn-warning:disabled, .btn-danger:disabled { opacity: .45; box-shadow: none; filter: grayscale(.3); }

.btn-primary { --bs-btn-bg: #6366f1; --bs-btn-hover-bg: #6366f1; --bs-btn-active-bg: #4f46e5; --bs-btn-disabled-bg: #6366f1; background-image: var(--grad-brand); }
.btn-success { --bs-btn-bg: #10b981; --bs-btn-hover-bg: #10b981; --bs-btn-active-bg: #059669; --bs-btn-disabled-bg: #10b981; background-image: var(--grad-green); box-shadow: 0 8px 18px -10px rgba(16, 185, 129, .9); }
.btn-warning { --bs-btn-bg: #f59e0b; --bs-btn-hover-bg: #f59e0b; --bs-btn-active-bg: #d97706; --bs-btn-disabled-bg: #f59e0b; background-image: var(--grad-amber); box-shadow: 0 8px 18px -10px rgba(245, 158, 11, .9); }
.btn-danger { --bs-btn-bg: #f43f5e; --bs-btn-hover-bg: #f43f5e; --bs-btn-active-bg: #e11d48; --bs-btn-disabled-bg: #f43f5e; background-image: var(--grad-rose); }

.btn-soft {
  --bs-btn-color: var(--chip-color);
  --bs-btn-bg: var(--chip-bg);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--chip-color);
  --bs-btn-hover-bg: rgba(99, 102, 241, .2);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: rgba(99, 102, 241, .28);
  --bs-btn-active-color: var(--chip-color);
  --bs-btn-disabled-color: var(--chip-color);
  --bs-btn-disabled-bg: var(--chip-bg);
  --bs-btn-disabled-border-color: transparent;
}

.btn-soft-danger {
  --bs-btn-color: #be123c;
  --bs-btn-bg: rgba(244, 63, 94, .12);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #f43f5e;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #e11d48;
}
[data-bs-theme=dark] .btn-soft-danger { --bs-btn-color: #fda4af; }

.btn-preset {
  --bs-btn-color: var(--text-muted-soft);
  --bs-btn-bg: var(--surface-muted);
  --bs-btn-border-color: var(--border-soft);
  --bs-btn-hover-color: var(--chip-color);
  --bs-btn-hover-bg: var(--chip-bg);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-padding-y: .2rem;
  --bs-btn-padding-x: .55rem;
  --bs-btn-font-size: .78rem;
  border-radius: 999px;
}

.btn-glass {
  --bs-btn-color: #fff;
  --bs-btn-bg: rgba(255, 255, 255, .15);
  --bs-btn-border-color: rgba(255, 255, 255, .32);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(255, 255, 255, .28);
  --bs-btn-hover-border-color: rgba(255, 255, 255, .5);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(255, 255, 255, .34);
  --bs-btn-active-border-color: rgba(255, 255, 255, .5);
  --bs-btn-disabled-color: rgba(255, 255, 255, .75);
  --bs-btn-disabled-bg: rgba(255, 255, 255, .06);
  --bs-btn-disabled-border-color: rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
}
.btn-glass.glass-green:not(:disabled) { --bs-btn-bg: rgba(16, 185, 129, .85); --bs-btn-hover-bg: rgba(16, 185, 129, 1); --bs-btn-border-color: rgba(255, 255, 255, .45); }
.btn-glass.glass-amber:not(:disabled) { --bs-btn-bg: rgba(245, 158, 11, .9); --bs-btn-hover-bg: rgba(245, 158, 11, 1); --bs-btn-border-color: rgba(255, 255, 255, .45); }

.btn-link { --bs-btn-color: var(--text-muted-soft); --bs-btn-hover-color: var(--bs-link-color); font-weight: 500; }

/* ----- Tables ------------------------------------------------------------ */

.table-modern {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(99, 102, 241, .06);
  --bs-table-border-color: var(--border-soft);
  margin-bottom: 0;
}

.table-modern > thead > tr > th {
  background: var(--surface-muted);
  color: var(--text-muted-soft);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  padding: .7rem .9rem;
  border-bottom-width: 1px;
}

.table-modern > tbody > tr > td,
.table-modern > tbody > tr > th { padding: .75rem .9rem; vertical-align: middle; }
.table-modern > tbody > tr:last-child > * { border-bottom: 0; }
.table-modern tr[data-href] { cursor: pointer; }

.cell-sub { display: block; font-size: .8rem; color: var(--text-muted-soft); }

.instance-name { display: flex; align-items: center; gap: .75rem; }
.instance-name a { font-weight: 650; color: var(--bs-body-color); }
.instance-name a:hover { color: var(--bs-link-color); }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: .7rem;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -8px rgba(15, 23, 42, .6);
}

/* ----- Chips & state pills ----------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-color);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip.mono { font-family: var(--bs-font-monospace); font-size: .78rem; }
.chip-blue { background: rgba(59, 130, 246, .14); color: #1d4ed8; }
.chip-green { background: rgba(16, 185, 129, .14); color: #047857; }
.chip-amber { background: rgba(245, 158, 11, .16); color: #b45309; }
.chip-rose { background: rgba(244, 63, 94, .14); color: #be123c; }
.chip-violet { background: rgba(139, 92, 246, .14); color: #6d28d9; }
.chip-cyan { background: rgba(6, 182, 212, .14); color: #0e7490; }
.chip-pink { background: rgba(236, 72, 153, .14); color: #be185d; }
.chip-slate { background: rgba(100, 116, 139, .15); color: #475569; }
[data-bs-theme=dark] .chip-blue { color: #93c5fd; }
[data-bs-theme=dark] .chip-green { color: #6ee7b7; }
[data-bs-theme=dark] .chip-amber { color: #fcd34d; }
[data-bs-theme=dark] .chip-rose { color: #fda4af; }
[data-bs-theme=dark] .chip-violet { color: #c4b5fd; }
[data-bs-theme=dark] .chip-cyan { color: #67e8f9; }
[data-bs-theme=dark] .chip-pink { color: #f9a8d4; }
[data-bs-theme=dark] .chip-slate { color: #cbd5e1; }

.tag-chip {
  display: inline-flex;
  border-radius: .55rem;
  overflow: hidden;
  font-size: .8rem;
  border: 1px solid var(--border-soft);
  max-width: 100%;
}
.tag-chip .tag-key { padding: .25rem .55rem; background: var(--grad-violet); color: #fff; font-weight: 600; white-space: nowrap; }
.tag-chip .tag-value { padding: .25rem .6rem; background: var(--surface-muted); word-break: break-all; }

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .26rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.2;
  text-transform: capitalize;
  white-space: nowrap;
}
.state-pill .dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.state-pill.lg { font-size: .9rem; padding: .35rem .9rem; }

.state-running { background: rgba(16, 185, 129, .15); color: #047857; }
.state-running .dot { box-shadow: 0 0 0 3px rgba(16, 185, 129, .25); }
.state-stopped { background: rgba(100, 116, 139, .16); color: #475569; }
.state-transition { background: rgba(245, 158, 11, .18); color: #b45309; }
.state-transition .dot { animation: pulse-dot 1.2s ease-in-out infinite; }
.state-terminated { background: rgba(244, 63, 94, .14); color: #be123c; }
.state-unknown { background: rgba(148, 163, 184, .18); color: #64748b; }
[data-bs-theme=dark] .state-running { color: #6ee7b7; }
[data-bs-theme=dark] .state-stopped { color: #cbd5e1; }
[data-bs-theme=dark] .state-transition { color: #fcd34d; }
[data-bs-theme=dark] .state-terminated { color: #fda4af; }
[data-bs-theme=dark] .state-unknown { color: #cbd5e1; }

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: .5; }
}

/* ----- Instance hero (details page) ------------------------------------- */

.hero {
  position: relative;
  border-radius: calc(var(--radius) + .25rem);
  padding: 1.6rem 1.75rem;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 1.5rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto -6rem -10rem auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  top: -7rem;
  left: 35%;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  z-index: -1;
}

.hero-title { font-size: 1.8rem; font-weight: 800; letter-spacing: -.025em; margin: 0; }
.stat-icon-hero {
  display: inline-grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  font-size: 1.6rem;
  flex-shrink: 0;
}
.hero-id { font-family: var(--bs-font-monospace); font-size: .9rem; opacity: .85; }
.hero .state-pill { background: rgba(255, 255, 255, .95); }
.hero .state-pill.state-stopped { color: #475569; }
.hero .state-pill.state-running { color: #047857; }
.hero .state-pill.state-transition { color: #b45309; }
.hero .state-pill.state-terminated { color: #be123c; }

.hero-facts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.hero-fact {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .8rem;
  border-radius: .75rem;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(6px);
  font-size: .85rem;
}
.hero-fact .label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; opacity: .8; line-height: 1.1; }
.hero-fact .value { font-weight: 650; }

/* ----- Key/value list ---------------------------------------------------- */

.kv-list { display: grid; grid-template-columns: minmax(9rem, 34%) 1fr; margin: 0; }
.kv-list dt, .kv-list dd { padding: .6rem 0; margin: 0; border-bottom: 1px dashed var(--border-soft); }
.kv-list dt { color: var(--text-muted-soft); font-weight: 500; font-size: .85rem; display: flex; align-items: center; gap: .5rem; }
.kv-list dd { font-weight: 500; word-break: break-word; }
.kv-list dt:nth-last-of-type(1), .kv-list dd:last-of-type { border-bottom: 0; }

/* ----- Timeline (recent activity) --------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: .8rem; padding: .7rem 1.25rem; border-bottom: 1px solid var(--border-soft); }
.timeline li:last-child { border-bottom: 0; }
.timeline .icon-bubble { width: 1.9rem; height: 1.9rem; border-radius: 50%; font-size: .85rem; }
.timeline .when { font-size: .78rem; color: var(--text-muted-soft); }

/* ----- Alerts ------------------------------------------------------------ */

.alert {
  --bs-alert-border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  border: 0;
  border-left: 4px solid currentColor;
  box-shadow: var(--shadow-sm);
}
.alert > .icon { margin-top: .15rem; font-size: 1.15rem; }
.alert.alert-dismissible { padding-right: 3rem; }
.alert-success { --bs-alert-bg: rgba(16, 185, 129, .12); --bs-alert-color: #047857; }
.alert-danger { --bs-alert-bg: rgba(244, 63, 94, .12); --bs-alert-color: #be123c; }
.alert-warning { --bs-alert-bg: rgba(245, 158, 11, .14); --bs-alert-color: #b45309; }
.alert-info { --bs-alert-bg: rgba(59, 130, 246, .12); --bs-alert-color: #1d4ed8; }
[data-bs-theme=dark] .alert-success { --bs-alert-color: #6ee7b7; }
[data-bs-theme=dark] .alert-danger { --bs-alert-color: #fda4af; }
[data-bs-theme=dark] .alert-warning { --bs-alert-color: #fcd34d; }
[data-bs-theme=dark] .alert-info { --bs-alert-color: #93c5fd; }

/* ----- Empty states / misc ---------------------------------------------- */

.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state .icon-bubble { margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.15rem; font-weight: 700; }

.step-number {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
}

.tip-list { list-style: none; padding: 0; margin: 0; }
.tip-list li { display: flex; gap: .7rem; padding: .55rem 0; font-size: .9rem; }
.tip-list li .icon-bubble { width: 1.75rem; height: 1.75rem; border-radius: .5rem; font-size: .8rem; }

.sg-preview-box {
  padding: .9rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
}

.firewall-section-title {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem 1.25rem;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border-soft);
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.modal-header, .modal-footer { border-color: var(--border-soft); }

.app-footer {
  flex-shrink: 0;
  margin-top: 3rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted-soft);
  font-size: .85rem;
}

.spinner-border-sm { --bs-spinner-width: .9rem; --bs-spinner-height: .9rem; --bs-spinner-border-width: .15em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
