/* ═══════════════════════════════════════════════════════════════
   FISHFORTANK — Premium Aquarium Stocking Dashboard
   style.css
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Palette */
/* Brighter, clearer water palette */
  --abyss-900: #0a192f; /* Lighter navy background */
  --abyss-800: #112240;
  --abyss-700: #1a365d;
  --abyss-600: #234e82;
  --abyss-500: #2c65a7;
  --abyss-400: #3a82ce;
  --abyss-300: #4b9ee5;

  /* Vibrant Tropical Accents */
  --cyan-primary: #00e5ff;
  --cyan-mid:     #00b8d4;
  --cyan-dim:     #00838f;
  --blue-glow:    #29b6f6;
  --blue-mid:     #0288d1;
  --blue-deep:    #01579b;

  --coral:        #ff4d6d;
  --coral-dim:    #cc3d58;
  --amber:        #f5a623;
  --amber-dim:    #cc8a1d;
  --success:      #00f5d4;
  --error:        #ff4d6d;
  --warning:      #f5a623;

  --text-primary:   #e8f4fd;
  --text-secondary: #8ab4c8;
  --text-muted:     #4a6e85;
  --text-accent:    #00f5d4;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Radii */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Shadows */
  --shadow-card:    0 4px 32px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255,255,255,0.03) inset;
  --shadow-hover:   0 8px 48px rgba(0, 180, 216, 0.12), 0 0 0 1px rgba(0,245,212,0.08);
  --shadow-glow:    0 0 40px rgba(0,245,212,0.15);
  --glow-cyan:      0 0 20px rgba(0,245,212,0.3);

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-mid:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--abyss-400) var(--abyss-800);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--abyss-800); }
::-webkit-scrollbar-thumb { background: var(--abyss-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-mid); }

body {
  margin: 0;
  padding: 0;
  /* Dark overlay at 85% opacity to maintain text legibility */
  background: 
    linear-gradient(rgba(3, 13, 24, 0.85), rgba(3, 13, 24, 0.1)),
    url('assets/tank_mates_background_2.jpg');
    
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Creates a smooth parallax effect when scrolling */
  background-repeat: no-repeat;
  
  color: var(--text-primary, #e8f4fa);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 15, 34, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(0,245,212,0.08);
  overflow: hidden;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-shimmer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-primary) 30%, var(--blue-glow) 70%, transparent);
  opacity: 0.4;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--cyan-primary), var(--blue-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.logo-domain {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ─── NEW: Universal Navigation Links ─── */
.header-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap; /* Prevents text from ever stacking */
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--cyan-primary);
  background: rgba(0, 245, 212, 0.08);
  border-color: rgba(0, 245, 212, 0.2);
  transform: translateY(-1px);
}

/* ─── App Grid (Bento Box) ───────────────────────────────────── */
.app-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 380px 1fr;
  grid-auto-rows: min-content; 
  gap: 20px;
}

/* ─── Bento Cards ────────────────────────────────────────────── */
.bento-card {
  /* Change the 0.8 to 0.4 to make it more transparent */
  background: rgba(9, 21, 40, 0.4); 
  /* Add these two lines for a frosty glass effect */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.5s ease both;
  transition: border-color var(--transition-mid), box-shadow var(--transition-mid);
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,245,212,0.15), transparent);
}

.bento-card:hover {
  border-color: rgba(0,245,212,0.08);
  box-shadow: var(--shadow-hover);
}

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

.card-tank-setup   { grid-column: 1; grid-row: 1 / 4; animation-delay: 0.05s; } 
.card-fish-search  { grid-column: 2; grid-row: 1; animation-delay: 0.1s; }
.card-plant-search { grid-column: 2; grid-row: 2; animation-delay: 0.12s; } /* Forces it under Fish */
.card-selected     { grid-column: 2; grid-row: 3; animation-delay: 0.15s; } /* Forces it under Plants */
.card-dashboard    { grid-column: 1 / 3; grid-row: 4; animation-delay: 0.2s; }

.card-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--cyan-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.7;
}

.card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

/* ─── Field Elements ─────────────────────────────────────────── */
.setup-group {
  margin-bottom: 22px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

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

.modifier-badge {
  background: rgba(0,245,212,0.1);
  color: var(--cyan-primary);
  border: 1px solid rgba(0,245,212,0.2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ─── Volume Input ───────────────────────────────────────────── */
.volume-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.styled-input {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  padding: 10px 16px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  width: 100%;
}

.styled-input:focus {
  border-color: rgba(0,245,212,0.4);
  background: rgba(0,245,212,0.04);
  box-shadow: 0 0 0 3px rgba(0,245,212,0.08);
}

.styled-input::placeholder { color: var(--text-muted); font-weight: 400; font-size: 14px; }

.unit-toggle {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.unit-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 5px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.05em;
}

.unit-btn.active {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  color: white;
  box-shadow: 0 2px 8px rgba(0,119,182,0.3);
}

.volume-display {
  font-size: 12px;
  color: var(--cyan-dim);
  margin-top: 6px;
  font-weight: 500;
}

/* ─── Water Type Toggle ──────────────────────────────────────── */
.water-type-toggle {
  display: flex;
  gap: 8px;
}

.wt-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  transition: all var(--transition-mid);
}

/* ─── Calculation Rule Toggle ─── */
.rule-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all var(--transition-mid);
}

.rule-btn:hover {
  background: rgba(245,166,35,0.05);
  border-color: rgba(245,166,35,0.3);
  color: var(--text-secondary);
}

.rule-btn.active {
  background: linear-gradient(135deg, rgba(245,166,35,0.2), rgba(245,166,35,0.05));
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 16px rgba(245,166,35,0.15);
}

.wt-btn:hover {
  border-color: rgba(0,180,216,0.3);
  color: var(--text-secondary);
  background: rgba(0,180,216,0.05);
}

.wt-btn.active {
  background: linear-gradient(135deg, rgba(0,119,182,0.25), rgba(0,180,216,0.15));
  border-color: rgba(0,180,216,0.4);
  color: var(--blue-glow);
  box-shadow: 0 0 16px rgba(0,180,216,0.12);
}

.wt-icon { font-size: 20px; }

/* ─── Filter Toggle ──────────────────────────────────────────── */
.filter-toggle {
  display: flex;
  gap: 8px;
}

.filter-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  transition: all var(--transition-mid);
}

.filter-icon { font-size: 16px; }

.filter-mult {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(0,245,212,0.12), rgba(0,180,216,0.08));
  border-color: rgba(0,245,212,0.3);
  color: var(--cyan-primary);
}

.filter-btn.active .filter-mult { color: var(--cyan-primary); }

.filter-btn:hover:not(.active) {
  border-color: rgba(0,245,212,0.15);
  color: var(--text-secondary);
}

/* ─── Toggle Switch ──────────────────────────────────────────── */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider-thumb {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 13px;
  cursor: pointer;
  transition: all var(--transition-mid);
}

.slider-thumb::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-mid);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

input:checked + .slider-thumb {
  background: linear-gradient(135deg, rgba(0,245,212,0.2), rgba(0,180,216,0.15));
  border-color: rgba(0,245,212,0.4);
}

input:checked + .slider-thumb::before {
  transform: translateX(22px);
  background: var(--cyan-primary);
  box-shadow: 0 0 8px rgba(0,245,212,0.5);
}

/* ─── Dual Range Sliders ─────────────────────────────────────── */
.setup-params {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.param-field {}

.range-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.range-val {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan-primary);
  min-width: 38px;
  text-align: center;
}

.dual-range-wrap {
  flex: 1;
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

.range-input {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  height: 4px;
  border-radius: 2px;
  outline: none;
}

/* The custom track underneath */
.dual-range-wrap::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  z-index: 0;
}

/* The filled segment */
.range-track-fill {
  position: absolute;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-mid), var(--cyan-primary));
  border-radius: 2px;
  z-index: 1;
  pointer-events: none;
  transition: left var(--transition-fast), width var(--transition-fast);
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--abyss-700);
  border: 2px solid var(--cyan-primary);
  box-shadow: 0 0 8px rgba(0,245,212,0.3);
  cursor: pointer;
  pointer-events: all;
  position: relative;
  z-index: 3;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 14px rgba(0,245,212,0.5);
}

.range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--abyss-700);
  border: 2px solid var(--cyan-primary);
  cursor: pointer;
  pointer-events: all;
}

/* ─── Fish Search ────────────────────────────────────────────── */
.card-fish-search {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.search-bar-wrap {
  position: relative;
  margin-bottom: 16px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.fish-search-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 36px;
  outline: none;
  transition: all var(--transition-fast);
}

.fish-search-input:focus {
  border-color: rgba(0,245,212,0.3);
  background: rgba(0,245,212,0.03);
  box-shadow: 0 0 0 3px rgba(0,245,212,0.07);
}

.fish-search-input::placeholder { color: var(--text-muted); }

.clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
  padding: 2px 6px;
}

.clear-search:hover { color: var(--text-primary); }

/* ─── Fish Grid ──────────────────────────────────────────────── */
.fish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  overflow-y: auto;
  flex: 1;          /* ← added: fills available space in the flex column */
  min-height: 200px; /* ← added: guarantees a visible area */
  max-height: 420px;
  padding-right: 4px;
}

/* ─── Fish Card ──────────────────────────────────────────────── */
/* ─── Fish Card ──────────────────────────────────────────────── */
.fish-card {
  /* Change the 0.8 to 0.4 to make it more transparent */
  background: rgba(9, 21, 40, 0.4); 
  /* Add these two lines for a frosty glass effect */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition-mid);
  position: relative;
  overflow: hidden;
  animation: fishCardIn 0.3s ease both;

  /* ─── NEW LINES TO FIX THE SQUISHING ─── */
  height: auto !important;     
  min-height: 280px;           
  display: flex;               
  flex-direction: column;      
}

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

.fish-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,245,212,0.06), transparent);
  opacity: 0;
  transition: opacity var(--transition-mid);
}

.fish-card:hover {
  border-color: rgba(0,245,212,0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), var(--glow-cyan);
}

.fish-card:hover::after { opacity: 1; }

.fish-card:active { transform: translateY(-1px); }

.fish-card-selected {
  border-color: rgba(0,245,212,0.35);
  background: rgba(0,245,212,0.06);
  box-shadow: 0 0 20px rgba(0,245,212,0.1);
}

.fish-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 4px;
}
/* ─── Fish Card Images ─── */
.fish-image-wrap {
  width: 100%;
  height: 110px; /* Forces every image to be the exact same height */
  margin: 10px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2); 
}

.fish-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This acts like a "smart crop" so the image never squishes or stretches! */
  display: block;
  transition: transform var(--transition-slow);
}

/* Adds a high-end subtle zoom effect when you hover over the card */
.fish-card:hover .fish-img {
  transform: scale(1.08);
}

/* Badges */
.water-badge, .care-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-fresh { background: rgba(0,245,212,0.12); color: var(--cyan-mid); border: 1px solid rgba(0,245,212,0.2); }
.badge-cold  { background: rgba(147,197,253,0.12); color: #93c5fd; border: 1px solid rgba(147,197,253,0.2); }
.badge-marine { background: rgba(0,119,182,0.2); color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }

.care-easy  { background: rgba(0,245,212,0.1); color: var(--success); }
.care-inter { background: rgba(245,166,35,0.1); color: var(--amber); }
.care-expert { background: rgba(255,77,109,0.1); color: var(--coral); }

.fish-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 2px;
  word-break: break-word; /* Add this line */
}

.fish-sci {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
  line-height: 1.3;
}

.fish-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.fish-meta-item {
  font-size: 10px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 2px 6px;
}

.fish-selected-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--cyan-primary);
  color: var(--abyss-900);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
  font-size: 13px;
}

/* ─── Selected List ──────────────────────────────────────────── */
.card-selected {
  display: flex;
  flex-direction: column;
}

.selected-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 16px;
  max-height: 320px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
}

.selected-summary {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0,245,212,0.05);
  border: 1px solid rgba(0,245,212,0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan-mid);
}

.selected-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  margin-bottom: 6px;
  transition: all var(--transition-fast);
  gap: 8px;
}

.selected-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

.selected-item-info { flex: 1; min-width: 0; }

.sel-name {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sel-sci {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sel-size {
  display: block;
  font-size: 10px;
  color: var(--cyan-dim);
  margin-top: 2px;
}

.selected-item-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.qty-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all var(--transition-fast);
  font-family: var(--font-display);
}

.qty-btn:hover {
  background: rgba(0,245,212,0.1);
  border-color: rgba(0,245,212,0.3);
  color: var(--cyan-primary);
}

.qty-display {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 24px;
  text-align: center;
}

.remove-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,77,109,0.08);
  border: 1px solid rgba(255,77,109,0.15);
  border-radius: 6px;
  color: var(--coral-dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all var(--transition-fast);
  margin-left: 4px;
}

.remove-btn:hover {
  background: rgba(255,77,109,0.18);
  border-color: rgba(255,77,109,0.4);
  color: var(--coral);
}

/* ─── Analyze Button ─────────────────────────────────────────── */
.analyze-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 50%, var(--cyan-dim) 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition-mid);
  position: relative;
  overflow: hidden;
}

.analyze-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.analyze-btn:hover:not(:disabled)::before { opacity: 1; }

.analyze-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,119,182,0.4), var(--shadow-glow);
}

.analyze-btn:active:not(:disabled) { transform: translateY(0); }

.analyze-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255,255,255,0.06);
}

/* ─── Dashboard ──────────────────────────────────────────────── */
.card-dashboard.hidden { display: none; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.dash-panel {
  /* Change the 0.8 to 0.4 to make it more transparent */
  background: rgba(9, 21, 40, 0.4); 
  /* Add these two lines for a frosty glass effect */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-mid);
}

.dash-panel:hover {
  border-color: rgba(0,245,212,0.1);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Donut panel spans 2 rows */
.panel-donut {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}

.panel-zones { grid-column: 2; grid-row: 1; }
.panel-compat { grid-column: 3; grid-row: 1 / 3; }
.panel-stats  { grid-column: 2; grid-row: 2; }

/* ─── Donut Chart ────────────────────────────────────────────── */
.donut-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.donut-svg {
  width: 180px;
  height: 180px;
  transform: rotate(-90deg);
}

.donut-track {
  fill: none;
  stroke: rgba(255,255,255,0.05);
  stroke-width: 16;
}

.donut-fill {
  fill: none;
  stroke: var(--cyan-primary);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 502.65;
  stroke-dashoffset: 502.65;
  filter: drop-shadow(0 0 8px currentColor);
}

.donut-pct {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  fill: var(--cyan-primary);
  transform: rotate(90deg);
  transform-origin: 100px 100px;
}

.donut-label {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  transform: rotate(90deg);
  transform-origin: 100px 100px;
}

.stocking-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  align-items: center;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.legend-dot.green { background: var(--success); box-shadow: 0 0 4px var(--success); }
.legend-dot.yellow { background: var(--warning); box-shadow: 0 0 4px var(--warning); }
.legend-dot.red { background: var(--error); box-shadow: 0 0 4px var(--error); }

.stocking-breakdown { margin-top: auto; }

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
  color: var(--text-secondary);
}

.breakdown-row:last-of-type { border-bottom: none; }

.breakdown-row span:last-child {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
}

.breakdown-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.status-good {
  background: rgba(0,245,212,0.08);
  border: 1px solid rgba(0,245,212,0.2);
  color: var(--success);
}

.status-warn {
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.2);
  color: var(--warning);
}

.status-danger {
  background: rgba(255,77,109,0.08);
  border: 1px solid rgba(255,77,109,0.2);
  color: var(--error);
}

/* ─── Tank Zones ─────────────────────────────────────────────── */
.tank-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zone {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  position: relative;
  overflow: hidden;
}

.top-zone    { border-top: 2px solid rgba(0,245,212,0.3); }
.mid-zone    { border-top: 2px solid rgba(0,180,216,0.3); }
.bottom-zone { border-top: 2px solid rgba(0,119,182,0.3); }

.zone-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.zone-fish {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  min-height: 20px;
}

.zone-pill {
  font-size: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.zone-empty {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

.zone-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.zone-bar {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.zone-bar::after {
  content: attr(data-pct);
  position: absolute;
  right: 4px;
  top: -16px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ─── Compatibility Report ───────────────────────────────────── */
.panel-compat {
  overflow-y: auto;
  max-height: 500px;
}

.compat-report {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compat-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compat-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 4px;
}

.error-title   { color: var(--error); }
.warn-title    { color: var(--warning); }
.success-title { color: var(--success); }

.compat-item {
  font-size: 12px;
  line-height: 1.6;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  animation: compatItemIn 0.3s ease both;
}

@keyframes compatItemIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.error-item {
  background: rgba(255,77,109,0.07);
  border-left: 3px solid var(--error);
  color: #ffb3bf;
}

.warn-item {
  background: rgba(245,166,35,0.07);
  border-left: 3px solid var(--warning);
  color: #fad99a;
}

.success-item {
  background: rgba(0,245,212,0.05);
  border-left: 3px solid var(--success);
  color: #8ef8e7;
}

.compat-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.compat-perfect {
  text-align: center;
  padding: 24px;
  color: var(--cyan-primary);
  font-size: 14px;
  font-weight: 600;
  background: rgba(0,245,212,0.05);
  border: 1px solid rgba(0,245,212,0.15);
  border-radius: var(--radius-sm);
}

/* ─── Stats Grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  transition: all var(--transition-mid);
}

.stat-card:hover {
  background: rgba(0,245,212,0.04);
  border-color: rgba(0,245,212,0.12);
  transform: translateY(-2px);
}

.stat-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--cyan-primary), var(--blue-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
  color: var(--text-muted);
  gap: 16px;
}

.site-footer a {
  color: var(--cyan-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer a:hover { color: var(--cyan-primary); }

.footer-note {
  font-style: italic;
  opacity: 0.6;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .app-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

.card-tank-setup   { grid-column: 1; grid-row: 1; }
  .card-fish-search  { grid-column: 1; grid-row: 2; }
  .card-plant-search { grid-column: 1; grid-row: 3; }
  .card-selected     { grid-column: 1; grid-row: 4; }
  .card-dashboard    { grid-column: 1; grid-row: 5; }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .panel-donut  { grid-row: 1; grid-column: 1; }
  .panel-zones  { grid-row: 1; grid-column: 2; }
  .panel-compat { grid-row: 2; grid-column: 1 / 3; max-height: 320px; }
  .panel-stats  { grid-row: 3; grid-column: 1 / 3; }
}

@media (max-width: 680px) {
  .header-inner { padding: 0 16px; }
  .logo-domain  { display: none; }
  .nav-badge.secondary { display: none; }

  .app-grid { padding: 12px; gap: 12px; }
  .bento-card { padding: 20px 16px; border-radius: var(--radius-lg); }

  .water-type-toggle { flex-direction: column; }

  .fish-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .panel-donut  { grid-column: 1; grid-row: 1; }
  .panel-zones  { grid-column: 1; grid-row: 2; }
  .panel-compat { grid-column: 1; grid-row: 3; }
  .panel-stats  { grid-column: 1; grid-row: 4; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .site-footer { flex-direction: column; text-align: center; }
}

/* ─── Utility ────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* Selection */
::selection {
  background: rgba(0,245,212,0.25);
  color: var(--text-primary);
}
.fish-card-hint {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  color: rgba(0, 245, 212, 0.35);
  text-align: center;
  padding-top: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.fish-card:hover .fish-card-hint {
  opacity: 1;
}
@keyframes cardHighlightPulse {
  0%   { box-shadow: 0 0 0 0   rgba(0,245,212,0.7); }
  40%  { box-shadow: 0 0 0 10px rgba(0,245,212,0.2); }
  100% { box-shadow: 0 0 0 0   rgba(0,245,212,0); }
}
.fish-card--highlighted {
  animation: cardHighlightPulse 1s ease 2;
  border-color: rgba(0, 245, 212, 0.6) !important;
}
/* ── FISH CARD BUTTONS ── */
.fish-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  position: relative;
  z-index: 2; /* Ensures buttons sit above the card link */
}

.action-btn {
  flex: 1; /* Makes buttons equal width */
  padding: 8px 0;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: none;
}

/* Secondary "View" Button */
.view-btn {
  background: rgba(0, 245, 212, 0.1);
  color: var(--cyan-primary, #00f5d4);
  border: 1px solid rgba(0, 245, 212, 0.2);
}

.view-btn:hover {
  background: rgba(0, 245, 212, 0.2);
}

/* Primary "Add" Button */
.add-btn {
  background: linear-gradient(135deg, #00f5d4, #00b4d8);
  color: #030d18;
}

.add-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
/* ── SELECTED LIST IMAGE STYLING ── */
.selected-item {
  display: flex;
  align-items: center; /* Aligns image with text */
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-bottom: 8px;
}

.sel-item-img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(0, 245, 212, 0.2);
  flex-shrink: 0; /* Prevents image from squishing */
}

.selected-item-info {
  flex: 1; /* Pushes the quantity controls to the right */
  display: flex;
  flex-direction: column;
}
/* ── AQUASCAPE GRIDS ── */
.scape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px 8px; /* Slightly more vertical gap between rows */
  margin-top: 12px;
}

.scape-card {
  background: transparent; /* Removes the rectangular box */
  border: none;            /* Removes the rectangular border */
  padding: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;  /* Forces text to sit under the image */
  align-items: center;     /* Centers everything horizontally */
  gap: 8px;                /* Exact space between circle and text */
  transition: transform 0.2s ease;
}

.scape-card:hover {
  transform: translateY(-2px); /* Gentle floating effect on hover */
}

/* ── We moved the highlight to the Image instead of the Card ── */
.scape-card img {
  width: 72px;             /* Large, clear size */
  height: 72px;
  border-radius: 50%;      /* Perfect circles */
  object-fit: cover;
  border: 3px solid transparent; /* Invisible border keeps size stable */
  transition: all 0.2s ease;
}

.scape-card.active img {
  border-color: var(--cyan-primary, #00f5d4); /* Highlights just the circle */
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.4);
}

.scape-card span {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}

/* The visual highlight when selected */
.scape-card.active {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--cyan-primary, #00f5d4);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}

.scape-card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
  border: 2px solid transparent;
}

.scape-card.active img {
  border-color: var(--cyan-primary, #00f5d4);
}

.scape-card span {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
/* ── CUSTOM TOAST NOTIFICATIONS ── */
#toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(17, 34, 64, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  pointer-events: auto;
  
  /* Animation */
  animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transition: all 0.3s ease;
}

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

.toast.fade-out {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
}

.toast-icon { font-size: 18px; }
.toast-error { border-color: var(--error); }
.toast-error .toast-icon { color: var(--error); }
/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES (Clean PDF Export)
   ═══════════════════════════════════════════════════════════════ */
@media print {
  /* 1. Strip the dark theme, animations, and backgrounds */
  body, html {
    background: none !important;
    background-color: white !important;
    color: black !important;
  }
  * {
    animation: none !important;
    transition: none !important;
  }

  /* 2. Hide everything the user DOES NOT need at the fish store */
  .card-tank-setup, 
  .card-fish-search, 
  .card-plant-search,  /* <-- ADD THIS LINE HERE */
  .action-buttons-row, 
  .site-footer, 
  #toast-container, 
  .qty-btn,
  .remove-btn,
  #suggestionPanel,
  .empty-state,
  .header-nav,        /* Hides the 'Premium' badges */
  .header-shimmer,    /* Hides the neon line under header */
  .card-label         /* Hides the "Step 03" and "Step 04" text */
  {
    display: none !important;
  }

  /* 3. Reformat the Header to act as a Document Title */
  .site-header {
    position: static !important;
    background: transparent !important;
    border: none !important;
    padding: 0 0 20px 0 !important;
    margin-bottom: 20px !important;
    border-bottom: 2px solid #ddd !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .header-inner {
    padding: 0 !important;
    height: auto !important;
  }
  .logo-name {
    background: none !important;
    -webkit-text-fill-color: black !important;
    color: black !important;
  }
  .logo-domain {
    color: #666 !important;
  }

  /* 4. Reformat all Grids to stack vertically on paper */
  .app-grid, .dashboard-grid {
    display: block !important;
    padding: 0 !important;
  }

  /* 5. Strip the bento card styles to look like a document */
  .bento-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 0 20px 0 !important;
    margin-bottom: 20px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    page-break-inside: avoid;
  }
  .bento-card::before { display: none !important; }

  /* 6. Dashboard Panels */
  .dash-panel {
    width: 100% !important;
    background: white !important;
    border: 1px solid #ddd !important;
    color: black !important;
    page-break-inside: avoid !important;
    margin-bottom: 24px !important;
    padding: 16px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* 7. Typography updates for ink/paper */
  .card-title { 
    color: black !important; 
    border-bottom: 2px solid #ddd; 
    padding-bottom: 8px;
    margin-bottom: 16px;
  }
  .panel-title { color: black !important; }

  /* 8. List formatting */
  .selected-summary {
    background: #f0f0f0 !important;
    border: 1px solid #ccc !important;
    color: black !important;
  }

  .selected-item {
    background: white !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
    margin-bottom: 8px;
    color: black !important;
    padding: 8px !important;
  }

  .sel-name { color: black !important; font-weight: bold !important; }
  .sel-sci { color: #555 !important; }
  .sel-size { color: #777 !important; }

  /* Format the quantity specifically for paper */
  .selected-item-controls {
    display: block !important;
  }
  .qty-display {
    color: black !important;
    font-weight: bold !important;
    font-size: 14px !important;
  }
  .qty-display::before {
    content: "Qty: ";
    font-weight: normal;
    color: #555;
  }

  /* 9. Stats Grid specifically formatted for paper */
  .stats-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  .stat-card {
    flex: 1 1 calc(33.333% - 12px) !important;
    border: 1px solid #eee !important;
    background: none !important;
    padding: 12px !important;
    page-break-inside: avoid !important;
  }

  .stat-val { 
    color: black !important; 
    -webkit-text-fill-color: black !important; 
    background: none !important; 
  }
  .stat-label { color: #555 !important; }

  /* 10. Breakdown rows and Charts */
  .breakdown-row { border-bottom-color: #eee !important; color: #333 !important; }
  .breakdown-row span:last-child { color: black !important; }
  .donut-pct { fill: black !important; }
  .donut-label { fill: #555 !important; }
  .donut-fill { stroke: #333 !important; }
  .donut-track { stroke: #eee !important; }

  /* 11. Re-color status badges */
  .status-good, .status-warn, .status-danger, .compat-perfect, .compat-item {
    background: #f9f9f9 !important;
    border: 1px solid #ccc !important;
    color: black !important;
  }

  /* Ensure panels can expand fully on paper without a scrollbar cutting text off */
  .panel-compat {
    max-height: none !important;
    overflow: visible !important;
  }
  /* ADD THIS: Push all headings into the printer's safe zone */
  .card-title, 
  .panel-title, 
  .section-heading,
  .card-label {
    margin-left: 32px !important; /* Pushes the text safely to the right */
  }
}