/* ==========================================================================
   BaseCloud Boost — Premium Admin Interface v9
   Brand: BaseCloud | Green #4ade80 · Purple #8b5cf6 · Blue #3b82f6
   Design: token-driven light/dark theming. `:root` holds the DARK values;
   `body.bcboost-mode-light` re-declares the neutral tokens (accents come from
   the user's Appearance choices via inline :root CSS, so the light block must
   only override NEUTRALS + derive readable accent inks with color-mix()).
   ========================================================================== */

/* ── Google Fonts — Space Grotesk (display) + Inter (UI) ─────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens (dark) ────────────────────────────────────────────────── */
:root {
  color-scheme: dark; /* native selects/scrollbars/pickers match the theme */
  --bcboost-green:          #4ade80;
  --bcboost-green-dark:     #22c55e;
  --bcboost-green-dim:      #166534;
  --bcboost-green-glow:     rgba(74, 222, 128, 0.25);
  --bcboost-green-glow-lg:  rgba(74, 222, 128, 0.5);
  --bcboost-purple:         #8b5cf6;
  --bcboost-purple-dark:    #7c3aed;
  --bcboost-purple-light:   #a78bfa;
  --bcboost-blue:           #3b82f6;
  --bcboost-blue-light:     #60a5fa;
  --bcboost-cyan:           #22d3ee;
  --bcboost-bg-deep:        #020408;
  --bcboost-bg-base:        #050810;
  --bcboost-glass:          rgba(255, 255, 255, 0.04);
  --bcboost-glass-md:       rgba(255, 255, 255, 0.07);
  --bcboost-glass-high:     rgba(255, 255, 255, 0.10);
  --bcboost-glass-border:   rgba(255, 255, 255, 0.09);
  --bcboost-glass-border-md:rgba(255, 255, 255, 0.14);
  --bcboost-glass-green:    rgba(74, 222, 128, 0.08);
  --bcboost-glass-purple:   rgba(139, 92, 246, 0.08);
  --bcboost-glass-blue:     rgba(59, 130, 246, 0.08);
  --bcboost-border-green:   rgba(74, 222, 128, 0.30);
  --bcboost-border-purple:  rgba(139, 92, 246, 0.30);
  --bcboost-border-blue:    rgba(59, 130, 246, 0.30);
  --bcboost-text:           #cbd5e1;
  --bcboost-text-bright:    #f1f5f9;
  --bcboost-text-muted:     #64748b;
  --bcboost-text-dim:       #94a3b8;
  --bcboost-danger:         #ef4444;
  --bcboost-danger-light:   rgba(239, 68, 68, 0.15);
  --bcboost-warning:        #f59e0b;
  --bcboost-warning-light:  rgba(245, 158, 11, 0.15);
  --bcboost-success-light:  rgba(74, 222, 128, 0.10);
  /* Accent inks: accent-tinted FOREGROUND text. Dark mode can use the raw
     accents; light mode re-mixes them toward ink for 4.5:1 contrast. */
  --bcboost-green-ink:      var(--bcboost-green);
  --bcboost-purple-ink:     var(--bcboost-purple-light);
  --bcboost-blue-ink:       var(--bcboost-blue-light);
  --bcboost-warning-ink:    var(--bcboost-warning);
  /* Neutral surfaces for native-feeling controls */
  --bcboost-control-bg:     rgba(255, 255, 255, 0.04);
  --bcboost-control-border: rgba(255, 255, 255, 0.14);
  --bcboost-track:          rgba(255, 255, 255, 0.06);
  --bcboost-track-border:   rgba(255, 255, 255, 0.08);
  --bcboost-knob:           rgba(255, 255, 255, 0.35);
  --bcboost-veil:           rgba(5, 8, 16, 0.72);
  --bcboost-scrim:          rgba(2, 4, 8, 0.80);
  --bcboost-card-sheen:     rgba(255, 255, 255, 0.10);
  --bcboost-on-accent:      #051209;
  --bcboost-blur:           20px;
  --bcboost-blur-sm:        12px;
  --bcboost-radius:         16px;
  --bcboost-radius-sm:      10px;
  --bcboost-radius-xs:      6px;
  --bcboost-radius-pill:    100px;
  --bcboost-sidebar-w:      228px;
  --bcboost-adminbar-h:     32px;
  --bcboost-transition:     .22s cubic-bezier(0.4, 0, 0.2, 1);
  --bcboost-spring:         .35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --bcboost-font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bcboost-font-display:   'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bcboost-font-mono:      'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --bcboost-shadow-card:    0 4px 24px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.06) inset;
  --bcboost-shadow-glow-g:  0 0 32px rgba(74,222,128,0.15), 0 4px 24px rgba(0,0,0,0.5);
  --bcboost-shadow-glow-p:  0 0 32px rgba(139,92,246,0.15), 0 4px 24px rgba(0,0,0,0.5);
  --bcboost-shadow-glow-b:  0 0 32px rgba(59,130,246,0.15), 0 4px 24px rgba(0,0,0,0.5);
}

/* ── Animations ─────────────────────────────────────────────────────────── */

@keyframes bcboost-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bcboost-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bcboost-scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes bcboost-glow-pulse {
  0%, 100% { box-shadow: 0 0 10px var(--bcboost-green-glow); }
  50%       { box-shadow: 0 0 28px var(--bcboost-green-glow-lg), 0 0 50px rgba(74,222,128,0.18); }
}

@keyframes bcboost-glow-text {
  0%, 100% { text-shadow: 0 0 10px rgba(74,222,128,0.5); }
  50%       { text-shadow: 0 0 24px rgba(74,222,128,0.9), 0 0 48px rgba(74,222,128,0.4); }
}

@keyframes bcboost-scan {
  0%   { top: -2px; opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.5; }
  100% { top: 100%; opacity: 0; }
}

@keyframes bcboost-rocket-boost {
  0%   { transform: translateY(0) scale(1);     opacity: 1; }
  30%  { transform: translateY(-8px) scale(1.1); opacity: 1; }
  70%  { transform: translateY(-32px) scale(0.9); opacity: 0.6; }
  100% { transform: translateY(-64px) scale(0.5); opacity: 0; }
}

@keyframes bcboost-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes bcboost-dot-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

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

@keyframes bcboost-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}

@keyframes bcboost-progress-shine {
  0%   { background-position: -300px center; }
  100% { background-position: 400px center; }
}

/* ── Full-Screen WordPress Override ──────────────────────────────────────── */
/* Applied only on BCB pages (CSS is conditionally enqueued) */

html, body { height: 100%; }

body {
  background: var(--bcboost-bg-base) !important;
  font-family: var(--bcboost-font) !important;
}

#adminmenu,
#adminmenuback,
#adminmenushadow {
  display: none !important;
}

#wpcontent,
#wpbody {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

#wpbody-content {
  padding-bottom: 0 !important;
  overflow: visible !important;
}

/* Admin bar – glassmorphic dark */
#wpadminbar {
  background: rgba(2, 4, 8, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

#wpadminbar * { font-family: var(--bcboost-font) !important; }

/* Hide WP standard notices (plugin handles its own feedback) */
#wpbody-content > .notice,
#wpbody-content > .updated,
#wpbody-content > .update-nag,
#wpbody-content > .error {
  display: none !important;
}

/* ── Appearance: theme picker + colour controls ────────────────────────────── */

.bcboost-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.bcboost-theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--bcboost-radius-sm);
  background: var(--bcboost-glass);
  border: 1px solid var(--bcboost-glass-border);
  cursor: pointer;
  transition: border-color var(--bcboost-transition), box-shadow var(--bcboost-transition), transform var(--bcboost-transition);
}
.bcboost-theme-card:hover { transform: translateY(-2px); border-color: var(--bcboost-glass-border-md); }
.bcboost-theme-card--active {
  border-color: var(--bcboost-border-green);
  box-shadow: var(--bcboost-shadow-glow-g);
}
.bcboost-theme-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.bcboost-theme-card input[type="radio"]:focus-visible ~ .bcboost-theme-name {
  outline: 2px solid var(--bcboost-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.bcboost-theme-swatch {
  display: block;
  height: 64px;
  border-radius: 8px;
  border: 1px solid var(--bcboost-glass-border);
  background: var(--bcboost-bg-deep);
}
.bcboost-theme-swatch--dark {
  background:
    radial-gradient(ellipse 70% 60% at 70% 20%, rgba(74,222,128,0.14) 0%, transparent 70%),
    radial-gradient(ellipse 60% 70% at 15% 85%, rgba(139,92,246,0.14) 0%, transparent 70%),
    #050810;
}
.bcboost-theme-swatch--light {
  background:
    radial-gradient(ellipse 70% 60% at 70% 20%, rgba(74,222,128,0.16) 0%, transparent 70%),
    radial-gradient(ellipse 60% 70% at 15% 85%, rgba(139,92,246,0.10) 0%, transparent 70%),
    #f6f7fa;
  border-color: rgba(15,23,42,0.12);
}
.bcboost-theme-swatch--classic {
  background:
    radial-gradient(circle at 20% 30%, var(--bcboost-green-glow) 0 2px, transparent 3px),
    radial-gradient(circle at 55% 65%, rgba(139,92,246,0.5) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 25%, var(--bcboost-green-glow) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 40% 85%, rgba(139,92,246,0.4) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% 50%, var(--bcboost-green-glow) 0 1px, transparent 2px),
    #050810;
}

.bcboost-theme-swatch--video {
  width: 100%;
  height: 64px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--bcboost-glass-border);
  background: var(--bcboost-bg-deep);
}

.bcboost-theme-name  { font-weight: 700; color: var(--bcboost-text-bright); font-size: 14px; }
.bcboost-theme-desc  { font-size: 12px; line-height: 1.55; color: var(--bcboost-text-muted); }

/* ── Ambient video backdrop (video-* themes) ───────────────────────────────── */

.bcboost-bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  /* Dimmed + slightly desaturated so glass cards and text keep contrast on
     any footage; the dark base shows through for a cinematic look. */
  opacity: 0.45;
  filter: saturate(0.9) brightness(0.8);
  animation: bcboost-video-fade 1.2s ease both;
}
@keyframes bcboost-video-fade { from { opacity: 0; } to { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) {
  .bcboost-bg-video { animation: none; }
}

.bcboost-field--color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}
.bcboost-color-input-pair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.bcboost-color-swatch-input {
  width: 46px;
  height: 44px;              /* comfortable touch target */
  padding: 3px;
  border: 1px solid var(--bcboost-glass-border-md);
  border-radius: 10px;
  background: var(--bcboost-glass);
  cursor: pointer;
}
.bcboost-color-swatch-input:focus-visible {
  outline: 2px solid var(--bcboost-cyan);
  outline-offset: 2px;
}
.bcboost-color-hex {
  width: 96px;
  font-family: var(--bcboost-font-mono);
  font-size: 13px;
  text-transform: lowercase;
}

/* ── Classic Particles Background Canvas ───────────────────────────────────── */

#bcboost-ballpit-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.82;                 /* ambient — sits behind the glass UI */
  animation: bcboost-canvas-fade 1.2s ease both;
}

@keyframes bcboost-canvas-fade {
  from { opacity: 0; }
  to   { opacity: 0.82; }
}

@media (prefers-reduced-motion: reduce) {
  #bcboost-ballpit-canvas { animation: none; }
}

/* ── Background layer ────────────────────────────────────────────────────── */

#wpwrap {
  background: var(--bcboost-bg-base) !important;
}

#wpbody-content::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 70% 10%, rgba(74,222,128,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(139,92,246,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 90% 70%, rgba(59,130,246,0.05) 0%, transparent 60%),
    var(--bcboost-bg-base);
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.bcboost-sidebar {
  position: fixed;
  top: var(--bcboost-adminbar-h);
  left: 0;
  width: var(--bcboost-sidebar-w);
  height: calc(100vh - var(--bcboost-adminbar-h));
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--bcboost-veil);
  backdrop-filter: blur(var(--bcboost-blur));
  -webkit-backdrop-filter: blur(var(--bcboost-blur));
  border-right: 1px solid var(--bcboost-glass-border);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
  padding: 20px 0 24px;
  animation: bcboost-fade-in .4s ease;
}

.bcboost-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74,222,128,0.4), rgba(139,92,246,0.3), transparent);
}

/* Sidebar logo — wordmark only (v8) */
.bcboost-sidebar-logo {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  padding: 0 20px 22px;
  border-bottom: 1px solid var(--bcboost-glass-border);
  margin-bottom: 8px;
  text-decoration: none;
}

.bcboost-sidebar-brand {
  display: block;
  font-family: var(--bcboost-font-display);
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--bcboost-text-bright) 30%, var(--bcboost-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.6px;
  line-height: 1.1;
}

.bcboost-sidebar-product {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--bcboost-green);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Sidebar navigation */
.bcboost-nav {
  flex: 1;
  padding: 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bcboost-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--bcboost-radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--bcboost-text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    color var(--bcboost-transition),
    background var(--bcboost-transition),
    border-color var(--bcboost-transition),
    box-shadow var(--bcboost-transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.bcboost-nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--bcboost-transition);
}

.bcboost-nav-item:hover {
  color: var(--bcboost-text);
  background: var(--bcboost-glass-md);
  border-color: var(--bcboost-glass-border);
}

.bcboost-nav-item:hover svg { opacity: 0.9; }

.bcboost-nav-item--active {
  color: var(--bcboost-green);
  background: rgba(74,222,128,0.09);
  border-color: rgba(74,222,128,0.2);
  box-shadow: inset 0 0 16px rgba(74,222,128,0.05);
  font-weight: 600;
}

.bcboost-nav-item--active svg { opacity: 1; color: var(--bcboost-green); }

.bcboost-nav-item--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--bcboost-green);
  box-shadow: 0 0 8px var(--bcboost-green-glow);
}

/* Sidebar footer */
.bcboost-sidebar-footer {
  padding: 16px 16px 0;
  border-top: 1px solid var(--bcboost-glass-border);
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bcboost-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  padding: 4px 10px;
  border: 1px solid var(--bcboost-border-green);
  color: var(--bcboost-green);
  background: rgba(74,222,128,0.06);
  border-radius: var(--bcboost-radius-xs);
  text-transform: uppercase;
  width: fit-content;
}

/* ── Main content area ───────────────────────────────────────────────────── */

.bcboost-wrap {
  margin-left: var(--bcboost-sidebar-w);
  min-height: calc(100vh - var(--bcboost-adminbar-h));
  padding: 28px 32px 64px;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  max-width: none;
  background: transparent;
  font-family: var(--bcboost-font);
  color: var(--bcboost-text);
  animation: bcboost-fade-up .4s ease;
}

.bcboost-wrap * { box-sizing: border-box; }

/* Page header inside main area */
.bcboost-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bcboost-glass-border);
}

.bcboost-page-title {
  font-family: var(--bcboost-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--bcboost-text-bright);
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1.2;
}

.bcboost-page-subtitle {
  font-size: 13px;
  color: var(--bcboost-text-muted);
  margin-top: 4px;
  font-weight: 400;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.bcboost-card {
  background: var(--bcboost-glass);
  backdrop-filter: blur(var(--bcboost-blur));
  -webkit-backdrop-filter: blur(var(--bcboost-blur));
  border: 1px solid var(--bcboost-glass-border);
  border-radius: var(--bcboost-radius);
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--bcboost-shadow-card);
  animation: bcboost-fade-up .35s ease both;
}

.bcboost-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bcboost-card-sheen), transparent);
  opacity: 0;
  transition: opacity var(--bcboost-transition);
}

.bcboost-card:hover::before { opacity: 1; }

.bcboost-card h3 {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bcboost-text-bright);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bcboost-glass-border);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bcboost-section-icon {
  opacity: 0.8;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bcboost-glass-md);
  border: 1px solid var(--bcboost-glass-border);
}

.bcboost-card--accent-green { border-left: 2px solid var(--bcboost-green); }
.bcboost-card--accent-purple { border-left: 2px solid var(--bcboost-purple); }
.bcboost-card--accent-blue { border-left: 2px solid var(--bcboost-blue); }

.bcboost-card--glass-green {
  background: rgba(74,222,128,0.04);
  border-color: rgba(74,222,128,0.18);
  box-shadow: var(--bcboost-shadow-glow-g);
}

.bcboost-card--glass-purple {
  background: rgba(139,92,246,0.04);
  border-color: rgba(139,92,246,0.18);
  box-shadow: var(--bcboost-shadow-glow-p);
}

/* Card entrance stagger */
.bcboost-card:nth-child(2) { animation-delay: .05s; }
.bcboost-card:nth-child(3) { animation-delay: .10s; }
.bcboost-card:nth-child(4) { animation-delay: .15s; }
.bcboost-card:nth-child(5) { animation-delay: .20s; }

/* ── Stats Grid ──────────────────────────────────────────────────────────── */

.bcboost-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.bcboost-stat-card {
  background: var(--bcboost-glass);
  backdrop-filter: blur(var(--bcboost-blur));
  -webkit-backdrop-filter: blur(var(--bcboost-blur));
  border: 1px solid var(--bcboost-glass-border);
  border-radius: var(--bcboost-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--bcboost-shadow-card);
  transition:
    border-color var(--bcboost-transition),
    box-shadow var(--bcboost-transition),
    transform var(--bcboost-transition);
  animation: bcboost-fade-up .4s ease both;
}

.bcboost-stat-card:nth-child(2) { animation-delay: .06s; }
.bcboost-stat-card:nth-child(3) { animation-delay: .12s; }
.bcboost-stat-card:nth-child(4) { animation-delay: .18s; }

.bcboost-stat-card:hover {
  border-color: rgba(74,222,128,0.25);
  box-shadow: var(--bcboost-shadow-glow-g);
  transform: translateY(-2px);
}

.bcboost-stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bcboost-green), var(--bcboost-blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.bcboost-stat-card:hover::after { transform: scaleX(1); }

.bcboost-stat-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74,222,128,0.10);
  border: 1px solid var(--bcboost-border-green);
  border-radius: var(--bcboost-radius-sm);
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(74,222,128,0.1);
}

.bcboost-stat-icon-wrap--purple {
  background: rgba(139,92,246,0.10);
  border-color: var(--bcboost-border-purple);
  box-shadow: 0 0 14px rgba(139,92,246,0.1);
}

.bcboost-stat-icon-wrap--blue {
  background: rgba(59,130,246,0.10);
  border-color: var(--bcboost-border-blue);
  box-shadow: 0 0 14px rgba(59,130,246,0.1);
}

.bcboost-stat-icon {
  font-size: 22px;
  width: 22px;
  height: 22px;
  color: var(--bcboost-green);
}

.bcboost-stat-icon--purple { color: var(--bcboost-purple-light); }
.bcboost-stat-icon--blue   { color: var(--bcboost-blue-light); }

.bcboost-stat-value {
  font-family: var(--bcboost-font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--bcboost-text-bright);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.bcboost-stat-value--active   { color: var(--bcboost-green); animation: bcboost-glow-text 3s ease infinite; }
.bcboost-stat-value--inactive { color: var(--bcboost-danger); }

.bcboost-stat-label {
  font-size: 11px;
  color: var(--bcboost-text-muted);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}

/* ── Metrics Grid ────────────────────────────────────────────────────────── */

.bcboost-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.bcboost-card--metrics { }

/* Hit Rate Ring */
.bcboost-hit-rate-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.bcboost-hit-rate-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.bcboost-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.bcboost-ring-track {
  fill: none;
  stroke: var(--bcboost-track);
  stroke-width: 8;
}

.bcboost-ring-fill {
  fill: none;
  stroke: var(--bcboost-green);
  stroke-width: 8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(74,222,128,0.6));
  transition: stroke-dasharray .8s ease;
}

.bcboost-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bcboost-ring-value {
  font-family: var(--bcboost-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--bcboost-text-bright);
  letter-spacing: -0.5px;
  line-height: 1;
}

.bcboost-ring-desc {
  font-size: 10px;
  color: var(--bcboost-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 3px;
  font-weight: 600;
}

.bcboost-hit-rate-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.bcboost-hrd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.bcboost-hrd-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bcboost-hrd-dot--green  { background: var(--bcboost-green);  box-shadow: 0 0 6px var(--bcboost-green-glow); }
.bcboost-hrd-dot--purple { background: var(--bcboost-purple); box-shadow: 0 0 6px rgba(139,92,246,0.4); }
.bcboost-hrd-dot--blue   { background: var(--bcboost-blue);   box-shadow: 0 0 6px rgba(59,130,246,0.4); }

.bcboost-hrd-key {
  flex: 1;
  color: var(--bcboost-text-muted);
  font-size: 12px;
}

.bcboost-hrd-val {
  font-weight: 700;
  color: var(--bcboost-text-bright);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

/* Bytes saved bars */
.bcboost-bytes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bcboost-bytes-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.bcboost-bytes-label {
  width: 30px;
  font-weight: 700;
  color: var(--bcboost-text-muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.bcboost-bytes-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bcboost-track);
  border-radius: var(--bcboost-radius-pill);
  overflow: hidden;
  border: 1px solid var(--bcboost-track-border);
}

.bcboost-bytes-bar {
  display: block;
  height: 100%;
  border-radius: var(--bcboost-radius-pill);
  transition: width .8s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}

.bcboost-bytes-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  background-size: 300px 100%;
  animation: bcboost-shimmer 2.5s linear infinite;
}

.bcboost-bytes-bar--green  { background: linear-gradient(90deg, var(--bcboost-green-dark), var(--bcboost-green)); }
.bcboost-bytes-bar--blue   { background: linear-gradient(90deg, var(--bcboost-blue), var(--bcboost-blue-light)); }
.bcboost-bytes-bar--purple { background: linear-gradient(90deg, var(--bcboost-purple-dark), var(--bcboost-purple)); }

.bcboost-bytes-val {
  width: 60px;
  text-align: right;
  font-weight: 600;
  color: var(--bcboost-text-dim);
  font-size: 11px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.bcboost-bytes-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--bcboost-glass-border);
  font-size: 13px;
  color: var(--bcboost-text-muted);
}

.bcboost-bytes-total strong {
  color: var(--bcboost-green);
  font-size: 14px;
  font-weight: 800;
}

/* Webhook status mini */
.bcboost-webhook-status-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--bcboost-glass-border);
  font-size: 12px;
  color: var(--bcboost-text-muted);
}

.bcboost-webhook-status-mini .dashicons {
  color: var(--bcboost-blue-light);
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* ── Feature Grid ────────────────────────────────────────────────────────── */

.bcboost-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.bcboost-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bcboost-glass);
  border: 1px solid var(--bcboost-glass-border);
  border-radius: var(--bcboost-radius-sm);
  font-size: 12.5px;
  transition:
    border-color var(--bcboost-transition),
    background var(--bcboost-transition),
    transform var(--bcboost-transition);
  cursor: default;
}

.bcboost-feature-item:hover { transform: translateY(-1px); }

.bcboost-feature-item--enabled {
  border-color: rgba(74,222,128,0.18);
  background: rgba(74,222,128,0.04);
}

.bcboost-feature-item--enabled:hover {
  border-color: rgba(74,222,128,0.3);
  background: rgba(74,222,128,0.07);
}

.bcboost-feature-item .dashicons {
  font-size: 15px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.bcboost-feature-item--enabled  .dashicons { color: var(--bcboost-green); }
.bcboost-feature-item--disabled .dashicons { color: rgba(255,255,255,0.2); }

.bcboost-feature-label {
  flex: 1;
  font-weight: 500;
  color: var(--bcboost-text);
}

.bcboost-feature-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 3px 7px;
  text-transform: uppercase;
  border-radius: var(--bcboost-radius-xs);
}

.bcboost-feature-item--enabled  .bcboost-feature-badge {
  background: rgba(74,222,128,0.12);
  color: var(--bcboost-green);
  border: 1px solid rgba(74,222,128,0.25);
}

.bcboost-feature-item--disabled .bcboost-feature-badge {
  background: rgba(255,255,255,0.04);
  color: var(--bcboost-text-muted);
  border: 1px solid var(--bcboost-glass-border);
}

/* ── Quick Actions ───────────────────────────────────────────────────────── */

.bcboost-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ── Rocket Banner ───────────────────────────────────────────────────────── */

.bcboost-rocket-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: linear-gradient(135deg, rgba(74,222,128,0.06) 0%, rgba(139,92,246,0.05) 50%, rgba(59,130,246,0.04) 100%);
  border: 1px solid rgba(74,222,128,0.18);
  border-radius: var(--bcboost-radius);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(74,222,128,0.06);
}

.bcboost-rocket-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74,222,128,0.5), transparent);
}

.bcboost-rocket-tagline {
  font-size: 14px;
  font-weight: 700;
  color: var(--bcboost-green);
  letter-spacing: 0.3px;
}

.bcboost-rocket-emoji {
  font-size: 26px;
  display: inline-block;
  transition: transform var(--bcboost-transition);
  animation: bcboost-float 3s ease-in-out infinite;
}

.bcboost-rocket-emoji.bcboost-rocket-launch {
  animation: bcboost-rocket-boost .8s ease forwards;
}

/* ── Progress Bar ────────────────────────────────────────────────────────── */

.bcboost-progress-bar {
  height: 8px;
  background: var(--bcboost-track);
  border-radius: var(--bcboost-radius-pill);
  overflow: hidden;
  border: 1px solid var(--bcboost-track-border);
}

.bcboost-progress-fill {
  height: 100%;
  border-radius: var(--bcboost-radius-pill);
  background: linear-gradient(90deg, var(--bcboost-green-dark), var(--bcboost-green), var(--bcboost-cyan));
  background-size: 300px 100%;
  animation: bcboost-progress-shine 2s linear infinite;
  transition: width .5s ease;
  box-shadow: 0 0 12px rgba(74,222,128,0.5);
}

.bcboost-progress-label {
  font-size: 12px;
  color: var(--bcboost-text-muted);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.bcboost-current-url {
  font-size: 11px;
  color: var(--bcboost-text-muted);
  font-family: var(--bcboost-font-mono);
  margin-top: 4px;
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Preloader status dot */
.bcboost-preloader-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--bcboost-text-dim);
}

.bcboost-preloader-status--running { color: var(--bcboost-green); }

.bcboost-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bcboost-green);
  box-shadow: 0 0 8px var(--bcboost-green-glow);
  animation: bcboost-dot-blink 1.2s ease-in-out infinite;
}

/* ── Notices ─────────────────────────────────────────────────────────────── */

.bcboost-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--bcboost-radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid;
  backdrop-filter: blur(var(--bcboost-blur-sm));
}

.bcboost-notice--warning {
  background: rgba(245,158,11,0.07);
  border-color: rgba(245,158,11,0.25);
  color: var(--bcboost-warning);
}

.bcboost-notice--success {
  background: rgba(74,222,128,0.07);
  border-color: rgba(74,222,128,0.25);
  color: var(--bcboost-green);
}

.bcboost-notice--error {
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.25);
  color: var(--bcboost-danger);
}

/* ── Feedback ────────────────────────────────────────────────────────────── */

.bcboost-feedback {
  padding: 12px 16px;
  border-radius: var(--bcboost-radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
  backdrop-filter: blur(var(--bcboost-blur-sm));
}

.bcboost-feedback--success {
  background: rgba(74,222,128,0.08);
  border-color: rgba(74,222,128,0.3);
  color: var(--bcboost-green);
}

.bcboost-feedback--error {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.3);
  color: var(--bcboost-danger);
}

/* ── Form Fields ─────────────────────────────────────────────────────────── */

.bcboost-field {
  margin-bottom: 18px;
}

.bcboost-field:last-child { margin-bottom: 0; }

.bcboost-field--toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--bcboost-glass-border);
}

.bcboost-field--toggle:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bcboost-field--toggle > label:first-child {
  flex: 1;
  cursor: default;
}

.bcboost-field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--bcboost-text-bright);
}

.bcboost-field-desc {
  font-size: 13px;
  color: var(--bcboost-text-muted);
  margin: 4px 0 0;
  line-height: 1.6;
}

.bcboost-field-warning {
  color: var(--bcboost-warning);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* ── Toggle Switch ───────────────────────────────────────────────────────── */

.bcboost-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

.bcboost-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.bcboost-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bcboost-glass-md);
  border: 1px solid var(--bcboost-control-border);
  border-radius: 28px;
  transition:
    background var(--bcboost-transition),
    border-color var(--bcboost-transition);
}

.bcboost-toggle-slider::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bcboost-knob);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  transition:
    transform var(--bcboost-spring),
    background var(--bcboost-transition);
}

.bcboost-toggle input:checked + .bcboost-toggle-slider {
  background: rgba(74,222,128,0.18);
  border-color: var(--bcboost-green);
  animation: bcboost-glow-pulse 2.5s ease infinite;
}

.bcboost-toggle input:checked + .bcboost-toggle-slider::before {
  transform: translateX(22px);
  background: var(--bcboost-green);
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
}

.bcboost-toggle input:focus-visible + .bcboost-toggle-slider {
  outline: 2px solid var(--bcboost-green);
  outline-offset: 2px;
}

.bcboost-toggle input:disabled + .bcboost-toggle-slider {
  opacity: .4;
  cursor: not-allowed;
  animation: none;
}

/* ── Inputs ──────────────────────────────────────────────────────────────── */

.bcboost-input,
.bcboost-textarea,
.bcboost-select {
  width: 100%;
  max-width: 360px;
  padding: 10px 14px;
  background: var(--bcboost-control-bg);
  border: 1px solid var(--bcboost-control-border);
  border-radius: var(--bcboost-radius-sm);
  font-size: 13px;
  color: var(--bcboost-text);
  font-family: var(--bcboost-font);
  outline: none;
  transition:
    border-color var(--bcboost-transition),
    box-shadow var(--bcboost-transition),
    background var(--bcboost-transition);
}

.bcboost-input--wide,
.bcboost-textarea {
  max-width: 100%;
}

.bcboost-textarea {
  width: 100%;
  resize: vertical;
  min-height: 90px;
  font-family: var(--bcboost-font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.bcboost-input:focus,
.bcboost-textarea:focus,
.bcboost-select:focus {
  border-color: rgba(74,222,128,0.5);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.08);
  background: rgba(74,222,128,0.03);
}

.bcboost-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234ade80' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Native dropdown list — explicit colours so options never render as
   white-on-white / black-on-black regardless of OS theme. */
.bcboost-select option {
  background: #0b1220;
  color: #e2e8f0;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.bcboost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: var(--bcboost-font);
  line-height: 1;
  letter-spacing: 0.2px;
  border-radius: var(--bcboost-radius-sm);
  position: relative;
  overflow: hidden;
  transition:
    background var(--bcboost-transition),
    border-color var(--bcboost-transition),
    box-shadow var(--bcboost-transition),
    transform var(--bcboost-transition),
    color var(--bcboost-transition);
}

.bcboost-btn:active { transform: scale(0.97); }

.bcboost-btn:focus-visible {
  outline: 2px solid var(--bcboost-green);
  outline-offset: 2px;
}

.bcboost-btn .dashicons {
  font-size: 15px;
  width: 15px;
  height: 15px;
}

.bcboost-btn--primary {
  background: linear-gradient(135deg, var(--bcboost-green-dark) 0%, var(--bcboost-green) 100%);
  color: #051209;
  border-color: rgba(74,222,128,0.4);
  box-shadow: 0 0 20px rgba(74,222,128,0.25), 0 4px 14px rgba(0,0,0,0.4);
  font-weight: 700;
}

.bcboost-btn--primary:hover {
  background: linear-gradient(135deg, var(--bcboost-green) 0%, #6ee7a0 100%);
  box-shadow: 0 0 32px rgba(74,222,128,0.4), 0 4px 18px rgba(0,0,0,0.4);
  color: #051209;
  transform: translateY(-1px);
}

.bcboost-btn--secondary {
  background: var(--bcboost-glass-md);
  color: var(--bcboost-text);
  border-color: var(--bcboost-glass-border-md);
  backdrop-filter: blur(var(--bcboost-blur-sm));
}

.bcboost-btn--secondary:hover {
  background: var(--bcboost-glass-high);
  border-color: rgba(74,222,128,0.25);
  color: var(--bcboost-text-bright);
  transform: translateY(-1px);
}

.bcboost-btn--ghost {
  background: transparent;
  color: var(--bcboost-text-dim);
  border-color: var(--bcboost-glass-border);
}
.bcboost-btn--ghost:hover {
  background: var(--bcboost-glass);
  color: var(--bcboost-text-bright);
  border-color: rgba(74,222,128,0.2);
  transform: translateY(-1px);
}

.bcboost-btn--purple {
  background: linear-gradient(135deg, var(--bcboost-purple-dark) 0%, var(--bcboost-purple) 100%);
  color: #fff;
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 0 20px rgba(139,92,246,0.25), 0 4px 14px rgba(0,0,0,0.4);
  font-weight: 700;
}

.bcboost-btn--purple:hover {
  box-shadow: 0 0 32px rgba(139,92,246,0.4), 0 4px 18px rgba(0,0,0,0.4);
  color: #fff;
  transform: translateY(-1px);
}

.bcboost-btn--danger {
  background: linear-gradient(135deg, #dc2626 0%, var(--bcboost-danger) 100%);
  color: #fff;
  border-color: rgba(239,68,68,0.4);
  box-shadow: 0 0 20px rgba(239,68,68,0.2), 0 4px 14px rgba(0,0,0,0.4);
  font-weight: 700;
}

.bcboost-btn--danger:hover {
  box-shadow: 0 0 32px rgba(239,68,68,0.35), 0 4px 18px rgba(0,0,0,0.4);
  color: #fff;
  transform: translateY(-1px);
}

.bcboost-btn--small {
  padding: 7px 14px;
  font-size: 12px;
}

/* ── Save Button Row ─────────────────────────────────────────────────────── */

.bcboost-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--bcboost-glass-border);
  margin-top: 4px;
}

/* ── Links ───────────────────────────────────────────────────────────────── */

.bcboost-link {
  color: var(--bcboost-blue-light);
  font-size: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--bcboost-transition);
}

.bcboost-link:hover {
  color: var(--bcboost-cyan);
  text-decoration: underline;
}

/* ── Misc ────────────────────────────────────────────────────────────────── */

.bcboost-brand-green { color: var(--bcboost-green); }
.bcboost-brand-purple { color: var(--bcboost-purple); }
.bcboost-brand-blue  { color: var(--bcboost-blue); }

.bcboost-divider {
  border: none;
  border-top: 1px solid var(--bcboost-glass-border);
  margin: 16px 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  :root { --bcboost-sidebar-w: 64px; }

  .bcboost-nav-item span { display: none; }
  .bcboost-nav-item { justify-content: center; padding: 12px; }
  .bcboost-nav-item svg { width: 18px; height: 18px; opacity: 0.8; }
  .bcboost-nav-item--active svg { opacity: 1; }
  .bcboost-sidebar-brand, .bcboost-sidebar-product, .bcboost-sidebar-footer { display: none; }
  .bcboost-sidebar-logo { justify-content: center; padding: 0 0 16px; }
  .bcboost-version-badge { display: none; }
}

@media (max-width: 768px) {
  .bcboost-wrap { padding: 16px; }
  .bcboost-stats-grid { grid-template-columns: 1fr 1fr; }
  .bcboost-metrics-grid { grid-template-columns: 1fr; }
}

/* ── Print / Reduced Motion ──────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  #bcboost-ballpit-canvas { display: none; }
  #bcboost-liquid-overlay { display: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   PAGE TRANSITION OVERLAY
   Subtle dark fade — quick, unobtrusive, keeps the background visible.
   ══════════════════════════════════════════════════════════════════════════ */

@keyframes bcboost-page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bcboost-page-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

#bcboost-liquid-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
  background: var(--bcboost-scrim);
  opacity: 0;
}

/* Fill state: quick fade to dark */
#bcboost-liquid-overlay.bcboost-liquid--fill {
  animation: bcboost-page-fade-in 0.18s ease-out forwards;
}

/* Drain state: fade back to transparent on page arrival */
#bcboost-liquid-overlay.bcboost-liquid--drain {
  animation: bcboost-page-fade-out 0.22s ease-in forwards;
}

/* ══════════════════════════════════════════════════════════════════════════
   CDN PROVIDER CARDS  (v8)
   ══════════════════════════════════════════════════════════════════════════ */

.bcboost-cdn-provider-card {
  position: relative;
}

.bcboost-cdn-provider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bcboost-glass-border);
}

.bcboost-cdn-provider-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bcboost-cdn-logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(74,222,128,0.2));
}

.bcboost-cdn-logo-icon--cf {
  filter: drop-shadow(0 0 8px rgba(245,130,32,0.3));
}

.bcboost-cdn-logo-icon--bunny {
  filter: drop-shadow(0 0 8px rgba(255,154,0,0.3));
}

.bcboost-cdn-name {
  font-family: var(--bcboost-font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--bcboost-text-bright);
  letter-spacing: -0.4px;
  margin: 0 0 2px;
}

.bcboost-cdn-tagline {
  font-size: 12px;
  color: var(--bcboost-text-muted);
  margin: 0;
  font-weight: 400;
}

.bcboost-cdn-description {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bcboost-glass);
  border: 1px solid var(--bcboost-glass-border);
  border-radius: var(--bcboost-radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.bcboost-cdn-desc-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.2);
  border-radius: 6px;
  color: var(--bcboost-green);
  margin-top: 1px;
}

.bcboost-cdn-description p {
  margin: 0;
  font-size: 13px;
  color: var(--bcboost-text-muted);
  line-height: 1.6;
}

.bcboost-cdn-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bcboost-cdn-test-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.bcboost-cdn-test-result {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bcboost-cdn-test-result--ok {
  color: var(--bcboost-green);
  text-shadow: 0 0 10px rgba(74,222,128,0.4);
}

.bcboost-cdn-test-result--err {
  color: var(--bcboost-danger);
}

.bcboost-field-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--bcboost-radius-xs);
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.30);
  color: var(--bcboost-green);
  margin-left: 8px;
  vertical-align: middle;
}

.bcboost-cdn-ttl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--bcboost-glass-border);
}

/* BunnyCDN setup steps */
.bcboost-cdn-setup-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255,154,0,0.04);
  border: 1px solid rgba(255,154,0,0.15);
  border-radius: var(--bcboost-radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.bcboost-setup-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--bcboost-text-muted);
}

.bcboost-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,154,0,0.15);
  border: 1px solid rgba(255,154,0,0.3);
  font-size: 11px;
  font-weight: 700;
  color: #ff9a00;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   FORM HELPERS
   ══════════════════════════════════════════════════════════════════════════ */

.bcboost-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bcboost-field-label-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.18);
  border-radius: 4px;
  color: var(--bcboost-green);
  flex-shrink: 0;
}

.bcboost-field-hint {
  font-size: 11.5px;
  color: var(--bcboost-text-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

.bcboost-input-unit {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 160px;
}

.bcboost-input-unit .bcboost-input {
  border-radius: var(--bcboost-radius-sm) 0 0 var(--bcboost-radius-sm);
  border-right: none;
  max-width: 110px;
}

.bcboost-input-unit-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: var(--bcboost-control-bg);
  border: 1px solid var(--bcboost-control-border);
  border-left: none;
  border-radius: 0 var(--bcboost-radius-sm) var(--bcboost-radius-sm) 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--bcboost-text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bcboost-form-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════════════════
   BUTTON VARIANTS  (v8)
   ══════════════════════════════════════════════════════════════════════════ */

/* Glass button — for secondary actions like Test Connection */
.bcboost-btn--glass {
  background: rgba(74,222,128,0.06);
  color: var(--bcboost-green);
  border-color: rgba(74,222,128,0.2);
  backdrop-filter: blur(var(--bcboost-blur-sm));
}

.bcboost-btn--glass:hover {
  background: rgba(74,222,128,0.12);
  border-color: rgba(74,222,128,0.4);
  box-shadow: 0 0 16px rgba(74,222,128,0.15);
  color: var(--bcboost-green);
  transform: translateY(-1px);
}

/* Loading spinner on button */
.bcboost-btn--loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.bcboost-btn--loading::after {
  content: '';
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: bcboost-ring-spin 0.7s linear infinite;
  margin-left: 4px;
}

/* Pulsing glow on hover for primary buttons */
.bcboost-btn--pulsing {
  animation: bcboost-glow-pulse 1.2s ease infinite;
}

/* ══════════════════════════════════════════════════════════════════════════
   ADDITIONAL PREMIUM ANIMATIONS  (v8)
   ══════════════════════════════════════════════════════════════════════════ */

/* Morphing border gradient on card hover */
@keyframes bcboost-border-rotate {
  0%   { --bcboost-border-angle: 0deg; }
  100% { --bcboost-border-angle: 360deg; }
}

/* Fluid background blobs that slowly drift */
@keyframes bcboost-blob-drift-a {
  0%, 100% { transform: translate(0,   0)   scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 15px) scale(0.97); }
}

@keyframes bcboost-blob-drift-b {
  0%, 100% { transform: translate(0,   0) scale(1); }
  40%       { transform: translate(-25px, 20px) scale(1.04); }
  70%       { transform: translate(20px, -15px) scale(0.96); }
}

/* Add drifting ambient blobs to the background layer */
#wpbody-content::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,222,128,0.05) 0%, transparent 70%);
  top: 10%;
  right: 5%;
  z-index: 0;
  pointer-events: none;
  animation: bcboost-blob-drift-a 18s ease-in-out infinite;
}

/* Scan line decoration on cards (ultra-subtle) */
.bcboost-card--accent-green::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(74,222,128,0.06), transparent);
  animation: bcboost-scan 6s ease-in-out infinite;
  pointer-events: none;
}

/* Active nav glow animation */
@keyframes bcboost-nav-active-glow {
  0%, 100% { box-shadow: inset 0 0 16px rgba(74,222,128,0.05), 0 0 10px rgba(74,222,128,0.08); }
  50%       { box-shadow: inset 0 0 24px rgba(74,222,128,0.10), 0 0 20px rgba(74,222,128,0.14); }
}

.bcboost-nav-item--active {
  animation: bcboost-nav-active-glow 3s ease infinite;
}

/* Feature item transition hook (for JS-driven hover) */
.bcboost-feature-item {
  transition:
    border-color var(--bcboost-transition),
    background var(--bcboost-transition),
    transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

/* Progress bar entrance animation */
@keyframes bcboost-progress-enter {
  from { width: 0% !important; }
}

#bcboost-progress-fill {
  animation: bcboost-progress-enter 0.9s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE UPDATES  (v8)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .bcboost-cdn-ttl-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .bcboost-cdn-provider-header { flex-wrap: wrap; }
  .bcboost-cdn-ttl-row { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════════
   TAB CONTENT WRAPPER (scoped to partials including header.php)
   ══════════════════════════════════════════════════════════════════════════ */

.bcboost-tab-content {
  animation: bcboost-fade-up 0.32s ease both;
}

/* ══════════════════════════════════════════════════════════════════════════
   LIGHT MODE  (v9)
   `body.bcboost-mode-light` re-declares the NEUTRAL tokens; accent hues keep
   coming from the user's Appearance picks (inline :root CSS — the body-level
   declarations here win for all descendants). Text that was tinted with a raw
   accent is re-mixed toward ink via color-mix() so any user accent stays
   ≥4.5:1 readable on light surfaces.
   ══════════════════════════════════════════════════════════════════════════ */

body.bcboost-mode-light {
  color-scheme: light;
  --bcboost-bg-deep:        #e9edf3;
  --bcboost-bg-base:        #f6f7fa;
  --bcboost-glass:          rgba(255, 255, 255, 0.80);
  --bcboost-glass-md:       rgba(15, 23, 42, 0.05);
  --bcboost-glass-high:     rgba(15, 23, 42, 0.08);
  --bcboost-glass-border:   rgba(15, 23, 42, 0.10);
  --bcboost-glass-border-md:rgba(15, 23, 42, 0.16);
  --bcboost-text:           #334155;
  --bcboost-text-bright:    #0f172a;
  --bcboost-text-muted:     #64748b;
  --bcboost-text-dim:       #475569;
  --bcboost-danger:         #dc2626;
  --bcboost-green-ink:      color-mix(in srgb, var(--bcboost-green) 50%, #052e16);
  --bcboost-purple-ink:     color-mix(in srgb, var(--bcboost-purple) 70%, #2e1065);
  --bcboost-blue-ink:       color-mix(in srgb, var(--bcboost-blue) 75%, #172554);
  --bcboost-warning-ink:    #92400e;
  --bcboost-control-bg:     #ffffff;
  --bcboost-control-border: rgba(15, 23, 42, 0.18);
  --bcboost-track:          rgba(15, 23, 42, 0.08);
  --bcboost-track-border:   rgba(15, 23, 42, 0.05);
  --bcboost-knob:           #94a3b8;
  --bcboost-veil:           rgba(255, 255, 255, 0.82);
  --bcboost-scrim:          rgba(246, 247, 250, 0.88);
  --bcboost-card-sheen:     rgba(15, 23, 42, 0.06);
  --bcboost-shadow-card:    0 1px 2px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.07);
  --bcboost-shadow-glow-g:  0 8px 24px color-mix(in srgb, var(--bcboost-green) 14%, transparent), 0 1px 2px rgba(15,23,42,0.05);
  --bcboost-shadow-glow-p:  0 8px 24px color-mix(in srgb, var(--bcboost-purple) 14%, transparent), 0 1px 2px rgba(15,23,42,0.05);
  --bcboost-shadow-glow-b:  0 8px 24px color-mix(in srgb, var(--bcboost-blue) 14%, transparent), 0 1px 2px rgba(15,23,42,0.05);
}

/* Ambient background: soft paper gradient instead of deep space */
body.bcboost-mode-light #wpbody-content::before {
  background:
    radial-gradient(ellipse 60% 50% at 70% 10%, color-mix(in srgb, var(--bcboost-green) 8%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 80%, color-mix(in srgb, var(--bcboost-purple) 7%, transparent) 0%, transparent 70%),
    var(--bcboost-bg-base);
}
body.bcboost-mode-light #wpbody-content::after {
  background: radial-gradient(circle, color-mix(in srgb, var(--bcboost-green) 6%, transparent) 0%, transparent 70%);
}

/* Sidebar + scrollbar */
body.bcboost-mode-light .bcboost-sidebar {
  scrollbar-color: rgba(15,23,42,0.15) transparent;
}
body.bcboost-mode-light .bcboost-sidebar::before {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bcboost-green) 45%, transparent), color-mix(in srgb, var(--bcboost-purple) 35%, transparent), transparent);
}

/* Accent-tinted FOREGROUND text re-mixed for contrast on light surfaces */
body.bcboost-mode-light .bcboost-sidebar-product,
body.bcboost-mode-light .bcboost-version-badge,
body.bcboost-mode-light .bcboost-stat-icon,
body.bcboost-mode-light .bcboost-bytes-total strong,
body.bcboost-mode-light .bcboost-rocket-tagline,
body.bcboost-mode-light .bcboost-preloader-status--running,
body.bcboost-mode-light .bcboost-brand-green,
body.bcboost-mode-light .bcboost-btn--glass,
body.bcboost-mode-light .bcboost-btn--glass:hover,
body.bcboost-mode-light .bcboost-cdn-test-result--ok,
body.bcboost-mode-light .bcboost-field-badge,
body.bcboost-mode-light .bcboost-cdn-desc-icon,
body.bcboost-mode-light .bcboost-field-label-icon,
body.bcboost-mode-light .bcboost-feature-item--enabled .dashicons,
body.bcboost-mode-light .bcboost-feature-item--enabled .bcboost-feature-badge,
body.bcboost-mode-light .bcboost-notice--success,
body.bcboost-mode-light .bcboost-feedback--success {
  color: var(--bcboost-green-ink);
}

body.bcboost-mode-light .bcboost-nav-item--active,
body.bcboost-mode-light .bcboost-nav-item--active svg {
  color: var(--bcboost-green-ink);
}

body.bcboost-mode-light .bcboost-stat-icon--purple,
body.bcboost-mode-light .bcboost-brand-purple {
  color: var(--bcboost-purple-ink);
}

body.bcboost-mode-light .bcboost-stat-icon--blue,
body.bcboost-mode-light .bcboost-brand-blue,
body.bcboost-mode-light .bcboost-webhook-status-mini .dashicons {
  color: var(--bcboost-blue-ink);
}

body.bcboost-mode-light .bcboost-link { color: var(--bcboost-blue-ink); }
body.bcboost-mode-light .bcboost-link:hover { color: color-mix(in srgb, var(--bcboost-blue-ink) 80%, #000); }

body.bcboost-mode-light .bcboost-notice--warning { color: var(--bcboost-warning-ink); }
body.bcboost-mode-light .bcboost-step-num { color: #b45309; }

/* Glow effects read as smears on paper — flatten them */
body.bcboost-mode-light .bcboost-stat-value--active {
  color: var(--bcboost-green-ink);
  animation: none;
  text-shadow: none;
}
body.bcboost-mode-light .bcboost-cdn-test-result--ok { text-shadow: none; }
body.bcboost-mode-light .bcboost-nav-item--active { animation: none; }
body.bcboost-mode-light .bcboost-toggle input:checked + .bcboost-toggle-slider { animation: none; }
body.bcboost-mode-light .bcboost-ring-fill { filter: none; }
body.bcboost-mode-light .bcboost-hrd-dot--green,
body.bcboost-mode-light .bcboost-hrd-dot--purple,
body.bcboost-mode-light .bcboost-hrd-dot--blue,
body.bcboost-mode-light .bcboost-status-dot { box-shadow: none; }

/* Toggle: checked state keeps the accent; knob gets a white face for depth */
body.bcboost-mode-light .bcboost-toggle input:checked + .bcboost-toggle-slider {
  background: color-mix(in srgb, var(--bcboost-green) 22%, #fff);
}
body.bcboost-mode-light .bcboost-toggle input:checked + .bcboost-toggle-slider::before {
  background: var(--bcboost-green-dark);
  box-shadow: 0 1px 3px rgba(15,23,42,0.25);
}
body.bcboost-mode-light .bcboost-toggle-slider::before {
  box-shadow: 0 1px 3px rgba(15,23,42,0.20);
}

/* Form controls: crisp white fields, visible caret + dropdown list */
body.bcboost-mode-light .bcboost-input,
body.bcboost-mode-light .bcboost-textarea,
body.bcboost-mode-light .bcboost-select {
  color: var(--bcboost-text-bright);
}
body.bcboost-mode-light .bcboost-input:focus,
body.bcboost-mode-light .bcboost-textarea:focus,
body.bcboost-mode-light .bcboost-select:focus {
  background: #fff;
  border-color: color-mix(in srgb, var(--bcboost-green) 60%, #14532d);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bcboost-green) 18%, transparent);
}
body.bcboost-mode-light .bcboost-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23475569' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
body.bcboost-mode-light .bcboost-select option {
  background: #ffffff;
  color: #0f172a;
}
body.bcboost-mode-light .bcboost-input::placeholder,
body.bcboost-mode-light .bcboost-textarea::placeholder {
  color: #94a3b8;
}

/* Buttons */
body.bcboost-mode-light .bcboost-btn--primary {
  box-shadow: 0 6px 16px color-mix(in srgb, var(--bcboost-green) 30%, transparent), 0 1px 2px rgba(15,23,42,0.10);
}
body.bcboost-mode-light .bcboost-btn--primary:hover {
  box-shadow: 0 8px 22px color-mix(in srgb, var(--bcboost-green) 40%, transparent), 0 1px 2px rgba(15,23,42,0.10);
}
body.bcboost-mode-light .bcboost-btn--secondary { backdrop-filter: none; }
body.bcboost-mode-light .bcboost-btn--purple,
body.bcboost-mode-light .bcboost-btn--danger {
  box-shadow: 0 6px 16px rgba(15,23,42,0.12);
}
body.bcboost-mode-light .bcboost-btn--glass {
  background: color-mix(in srgb, var(--bcboost-green) 10%, #fff);
  border-color: color-mix(in srgb, var(--bcboost-green) 35%, #fff);
}
body.bcboost-mode-light .bcboost-btn--glass:hover {
  background: color-mix(in srgb, var(--bcboost-green) 16%, #fff);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--bcboost-green) 20%, transparent);
}

/* Cards: paper surfaces — heavy blur is unnecessary over a light base */
body.bcboost-mode-light .bcboost-card,
body.bcboost-mode-light .bcboost-stat-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.bcboost-mode-light .bcboost-card--glass-green {
  background: color-mix(in srgb, var(--bcboost-green) 5%, #fff);
  border-color: color-mix(in srgb, var(--bcboost-green) 25%, #fff);
}
body.bcboost-mode-light .bcboost-card--glass-purple {
  background: color-mix(in srgb, var(--bcboost-purple) 5%, #fff);
  border-color: color-mix(in srgb, var(--bcboost-purple) 22%, #fff);
}
body.bcboost-mode-light .bcboost-rocket-banner {
  background: linear-gradient(135deg, color-mix(in srgb, var(--bcboost-green) 7%, #fff) 0%, color-mix(in srgb, var(--bcboost-purple) 6%, #fff) 50%, color-mix(in srgb, var(--bcboost-blue) 5%, #fff) 100%);
  border-color: color-mix(in srgb, var(--bcboost-green) 25%, #fff);
  box-shadow: 0 4px 16px rgba(15,23,42,0.06);
}
body.bcboost-mode-light .bcboost-feature-item--enabled {
  background: color-mix(in srgb, var(--bcboost-green) 6%, #fff);
  border-color: color-mix(in srgb, var(--bcboost-green) 22%, #fff);
}
body.bcboost-mode-light .bcboost-feature-item--disabled .dashicons { color: rgba(15,23,42,0.25); }
body.bcboost-mode-light .bcboost-nav-item--active {
  background: color-mix(in srgb, var(--bcboost-green) 10%, transparent);
  border-color: color-mix(in srgb, var(--bcboost-green) 28%, transparent);
  box-shadow: none;
}

/* Lighthouse rings (inline-styled elsewhere — re-anchored here for light) */
body.bcboost-mode-light .bcboost-lh-ring-bg { stroke: rgba(15,23,42,0.08); }
body.bcboost-mode-light .bcboost-lh-ring-text { fill: #0f172a; }

/* Notices keep tinted fills; borders soften on paper */
body.bcboost-mode-light .bcboost-notice,
body.bcboost-mode-light .bcboost-feedback { backdrop-filter: none; }
