/* ==========================================================================
   Bisp&d MIRA — Design System & Tokens (Dark & Light Mode Enterprise UI)
   ========================================================================== */

:root {
  /* Color Palette - Light Mode Default */
  --bg-primary: #f3f7fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eaf1f6;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-elevated: #ffffff;
  
  --text-primary: #0f1e2e;
  --text-secondary: #4a6176;
  --text-muted: #758b9f;
  --text-inverse: #ffffff;

  --border-light: rgba(15, 30, 46, 0.08);
  --border-medium: rgba(15, 30, 46, 0.16);
  --border-focus: #059669;

  /* Brand Accents (Emerald & Cyan Inspired by MIRA) */
  --mira-emerald: #10b981;
  --mira-emerald-dark: #059669;
  --mira-emerald-glow: rgba(16, 185, 129, 0.35);
  --mira-cyan: #06b6d4;
  --mira-cyan-dark: #0891b2;
  --mira-dark-surface: #072224;
  --mira-dark-card: rgba(11, 38, 42, 0.85);

  /* Functional Color Tokens (Refined & Softened) */
  --tone-violet-bg: rgba(139, 92, 246, 0.08);
  --tone-violet-border: #8b5cf6;
  --tone-violet-text: #6d28d9;
  --tone-violet-shadow: rgba(139, 92, 246, 0.18);

  --tone-amber-bg: rgba(245, 158, 11, 0.1);
  --tone-amber-border: #f59e0b;
  --tone-amber-text: #b45309;

  --tone-green-bg: rgba(16, 185, 129, 0.1);
  --tone-green-border: #10b981;
  --tone-green-text: #047857;

  --tone-rose-bg: rgba(244, 63, 94, 0.09);
  --tone-rose-border: #f43f5e;
  --tone-rose-text: #be123c;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 25px var(--mira-emerald-glow);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Montserrat', 'Barlow', var(--font-main);
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Dark Mode Override (Matching the MIRA Futuristic Brand Aesthetic)
   ========================================================================== */
[data-theme="dark"] {
  --bg-primary: #041214;
  --bg-secondary: #081d20;
  --bg-tertiary: #0c272a;
  --bg-card: rgba(8, 30, 33, 0.85);
  --bg-elevated: #0f3438;

  --text-primary: #e6f6f7;
  --text-secondary: #90b3b7;
  --text-muted: #5e7f83;
  --text-inverse: #041214;

  --border-light: rgba(45, 180, 160, 0.15);
  --border-medium: rgba(45, 180, 160, 0.28);
  --border-focus: #34d399;

  --tone-violet-bg: rgba(139, 92, 246, 0.15);
  --tone-violet-border: #a78bfa;
  --tone-violet-text: #c4b5fd;
  --tone-violet-shadow: rgba(139, 92, 246, 0.25);

  --tone-amber-bg: rgba(245, 158, 11, 0.14);
  --tone-amber-border: #fbbf24;
  --tone-amber-text: #fde68a;

  --tone-green-bg: rgba(16, 185, 129, 0.15);
  --tone-green-border: #34d399;
  --tone-green-text: #6ee7b7;

  --tone-rose-bg: rgba(244, 63, 94, 0.15);
  --tone-rose-border: #fb7185;
  --tone-rose-text: #fecdd3;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.65);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ==========================================================================
   Header & MIRA Hero Showcase
   ========================================================================== */
.mira-hero {
  background: linear-gradient(135deg, #051a1d 0%, #08292c 50%, #031315 100%);
  border: 1px solid rgba(45, 180, 160, 0.25);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

.mira-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28) 0%, rgba(6, 182, 212, 0.12) 40%, transparent 70%);
  pointer-events: none;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.brand-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 800;
  color: #72a4a8;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.brand-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mira-title-svg {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.45));
}

.hero-tagline {
  font-size: 24px;
  font-weight: 800;
  color: #e2f8fa;
  margin-top: 8px;
  letter-spacing: -0.3px;
}

.hero-tagline span {
  color: #10b981;
}

.hero-subtags {
  font-size: 12px;
  letter-spacing: 2.5px;
  font-weight: 700;
  color: #669599;
  margin-top: 6px;
}

.hero-right-pitch {
  max-width: 320px;
  text-align: right;
  border-left: 2px solid rgba(16, 185, 129, 0.4);
  padding-left: 18px;
}

@media (max-width: 860px) {
  .hero-right-pitch {
    text-align: left;
    border-left: 2px solid rgba(16, 185, 129, 0.4);
    max-width: 100%;
  }
}

.hero-pitch-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1.4;
  color: #c8edf0;
}

.hero-pitch-title span.ai {
  color: #10b981;
}

.hero-pitch-desc {
  font-size: 12px;
  color: #7ea8ac;
  margin-top: 6px;
}

/* ==========================================================================
   Ecosystem Cards (from Image)
   ========================================================================== */
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .ecosystem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .ecosystem-grid {
    grid-template-columns: 1fr;
  }
}

.eco-card {
  background: rgba(7, 30, 33, 0.7);
  border: 1px solid rgba(45, 180, 160, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: #ffffff;
  transition: var(--transition);
  cursor: pointer;
}

.eco-card:hover {
  background: rgba(12, 45, 50, 0.85);
  border-color: rgba(45, 180, 160, 0.5);
  transform: translateY(-2px);
}

.eco-card.active-comparator {
  border: 2px solid #10b981;
  background: rgba(10, 42, 46, 0.95);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.eco-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eco-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.icon-energy { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.icon-internet { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }
.icon-tv { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.icon-car { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; }
.icon-home { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.icon-doc { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.icon-ai { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.icon-help { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.eco-texts b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.eco-texts span {
  display: block;
  font-size: 11px;
  color: #7ea8ac;
}

.eco-arrow {
  color: #58878b;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.eco-card:hover .eco-arrow {
  color: #10b981;
  transform: translateX(3px);
}

/* ==========================================================================
   Header Utilities & Top Bar (Sync, Theme Toggle, Nav)
   ========================================================================== */
.top-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tone-green-bg);
  border: 1px solid var(--tone-green-border);
  color: var(--tone-green-text);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.sync-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--mira-emerald);
  box-shadow: 0 0 8px var(--mira-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.util-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-nav-link {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.top-nav-link:hover {
  border-color: var(--mira-emerald);
  color: var(--mira-emerald);
  transform: translateY(-1px);
}

.top-nav-link.accent {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border-color: rgba(16, 185, 129, 0.4);
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  border-color: var(--mira-emerald);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.tabs button {
  background: transparent;
  color: var(--text-secondary);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tabs button:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.tabs button.active {
  background: var(--mira-dark-surface);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .tabs button.active {
  background: #10b981;
  color: #041214;
}

/* ==========================================================================
   Card Panels & Steps UI
   ========================================================================== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 18px 0;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.panel h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Notice for Consultant */
.consultant-notice {
  background: var(--tone-rose-bg);
  border: 1px solid var(--tone-rose-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  color: var(--tone-rose-text);
}

.consultant-notice b {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

/* PUN Indicators */
.pun-metrics-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 2px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 22px;
}

.metrics-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 768px) {
  .metrics-3col {
    grid-template-columns: 1fr;
  }
}

.metric-val {
  font-size: 30px;
  font-weight: 900;
  color: var(--text-primary);
  margin-top: 4px;
  font-family: var(--font-display);
}

/* Guided Steps */
.step-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 16px 0;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--mira-dark-surface);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}

[data-theme="dark"] .step-badge {
  background: var(--mira-emerald);
  color: #041214;
}

/* Inputs & Form Controls */
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px 24px;
  margin-top: 10px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

input[type=number],
input[type=text],
input[type=date],
textarea,
select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-medium);
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font-main);
  margin-top: 6px;
  transition: var(--transition);
}

/* Custom styled Select dropdown */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-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='%23059669' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 44px !important;
  cursor: pointer;
  background-color: var(--bg-secondary);
}

/* Options for Light Mode */
select option,
select optgroup {
  background-color: #ffffff !important;
  color: #0f1e2e !important;
  padding: 12px 14px;
  font-size: 14px;
}

/* Options & Select for Dark Mode (Dark Surface, Crisp High-Contrast Text) */
[data-theme="dark"] select {
  background-color: #0c272a !important;
  color: #e6f6f7 !important;
  border-color: rgba(45, 180, 160, 0.35) !important;
  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='%2334d399' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

[data-theme="dark"] select option,
[data-theme="dark"] select optgroup {
  background-color: #0c272a !important;
  color: #e6f6f7 !important;
}

[data-theme="dark"] select option:hover,
[data-theme="dark"] select option:focus,
[data-theme="dark"] select option:checked {
  background-color: #059669 !important;
  color: #ffffff !important;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

/* Sophisticated Softened Required Fields (Viola Smorzato) */
.required-entry select,
.required-entry input {
  border: 2px solid var(--tone-violet-border) !important;
  background: var(--tone-violet-bg) !important;
  box-shadow: 0 0 0 2px var(--tone-violet-shadow);
}

/* Softened Estimated Yellow (Giallo Smorzato) */
.estimate-banner {
  background: var(--tone-amber-bg);
  border: 2px solid var(--tone-amber-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 14px 0;
  color: var(--tone-amber-text);
}

.estimate-banner b {
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}

/* Spend Switch */
.spend-switch {
  display: flex;
  gap: 12px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.spend-switch button {
  flex: 1;
  min-width: 180px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--tone-violet-border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.spend-switch button.chosen {
  background: var(--tone-violet-border);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--tone-violet-shadow);
}

/* Primary Action Button */
button.action-primary {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-md);
  padding: 16px 28px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

button.action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.45);
}

/* Results & Savings Cards */
.saving-highlight-box {
  background: var(--tone-green-bg);
  border: 2px solid var(--tone-green-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 18px 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.saving-highlight-box strong {
  display: block;
  font-size: 36px;
  font-weight: 900;
  color: var(--tone-green-text);
  font-family: var(--font-display);
}

/* Interactive Tooltips */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
  cursor: help;
  position: relative;
  vertical-align: middle;
}

.tooltip-trigger:hover {
  background: var(--mira-emerald);
  color: #ffffff;
}

.tooltip-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f1e2e;
  color: #f1f5f9;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  width: max-content;
  max-width: 260px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

.tooltip-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #0f1e2e transparent transparent transparent;
}

.tooltip-trigger:hover .tooltip-popup {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Corporate Footer & Legal Bar
   ========================================================================== */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border-light);
  padding: 40px 0 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

.footer-brand b {
  font-size: 16px;
  color: var(--text-primary);
  display: block;
  margin-bottom: 6px;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--mira-emerald);
}

.footer-legal {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-close {
  background: var(--bg-tertiary);
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 20px;
  z-index: 999;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.cookie-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Print Overrides */
@media print {
  body { background: #ffffff !important; color: #000000 !important; }
  .mira-hero, .top-nav-bar, .noprint, .tabs, .cookie-banner, .site-footer { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .report { page-break-inside: avoid; border: 0 !important; }
}

/* ==========================================================================
   Dedicated Documentation Layout (docs.html)
   ========================================================================== */
.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
}

.docs-sidebar {
  position: sticky;
  top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.docs-nav-group {
  margin-bottom: 24px;
}

.docs-nav-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  transition: var(--transition);
}

.docs-nav-link:hover,
.docs-nav-link.active {
  background: var(--tone-green-bg);
  color: var(--tone-green-text);
  border-left: 3px solid var(--mira-emerald);
}

.docs-main-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.docs-article h1 {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.docs-article h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.docs-article h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 10px;
}

.docs-article p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.docs-article ul, .docs-article ol {
  margin-left: 24px;
  margin-bottom: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.docs-article li {
  margin-bottom: 6px;
}

.callout-box {
  background: var(--bg-tertiary);
  border-left: 4px solid var(--mira-emerald);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 22px 0;
}

.callout-box.alert {
  border-left-color: var(--tone-rose-border);
  background: var(--tone-rose-bg);
  color: var(--tone-rose-text);
}

.callout-box.info {
  border-left-color: var(--tone-violet-border);
  background: var(--tone-violet-bg);
  color: var(--tone-violet-text);
}

/* ==========================================================================
   Dedicated Admin Portal Layout (admin.html)
   ========================================================================== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.admin-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.admin-stat-num {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-primary);
  margin-top: 6px;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Common clean margin and breathing space utilities */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

