/*
 * Fellowship of the Fork - Clean Modern Design
 * Minimal, elegant, contemporary
 */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Green Palette */
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  /* Neutral Palette */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Accent Colors */
  --blue-500: #3b82f6;
  --yellow-500: #eab308;
  --red-500: #ef4444;
  --purple-500: #a855f7;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: 1.2;
  color: var(--green-900);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  line-height: 1.3;
  color: var(--green-800);
  margin: var(--space-8) 0 var(--space-4);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: 1.4;
  color: var(--green-700);
  margin: var(--space-6) 0 var(--space-3);
}

p {
  margin-bottom: var(--space-4);
  color: var(--gray-700);
}

a {
  color: var(--green-600);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--green-700);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.main-content {
  flex: 1;
  padding: var(--space-12) 0;
}

.main-content:has(> .hero-banner:first-child),
.main-content:has(> .auth-page:first-child) {
  padding-top: 0;
  padding-bottom: 0;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: var(--space-16) 0;
}

.hero-logo {
  display: block;
  margin: 0 auto var(--space-8);
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.hero-logo:hover {
  transform: scale(1.05);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  gap: var(--space-8);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-link {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--green-800);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.brand-link:hover {
  color: var(--green-600);
}

.brand-logo {
  height: 56px;
  width: auto;
  margin-right: 8px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  object-fit: contain;
}

.brand-link:hover .brand-logo {
  transform: scale(1.05);
  opacity: 0.9;
}

.navbar-menu {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  flex-wrap: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--gray-600);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: all var(--transition);
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.nav-link.primary {
  background: var(--green-500);
  color: white;
}

.nav-link.primary:hover {
  background: var(--green-600);
  color: white;
}

.nav-user {
  color: var(--gray-700);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  padding: 0 var(--space-2);
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash {
  padding: var(--space-4);
  margin: var(--space-4) auto;
  max-width: 1200px;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.flash.notice {
  background: var(--green-50);
  color: var(--green-800);
  border: 1px solid var(--green-200);
}

.flash.alert {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Auth Pages (Login / Signup) */
.auth-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 50%, var(--green-800) 100%);
  padding: var(--space-8) var(--space-4);
  margin: -2rem -1rem;
}

.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-card-wide {
  max-width: 540px;
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-4);
}

.auth-logo-img {
  height: 80px;
  width: auto;
}

.auth-heading {
  text-align: center;
  color: var(--green-800);
  font-size: 1.75rem;
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: var(--space-6);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-6);
  color: var(--gray-500);
}

.auth-footer a {
  color: var(--green-600);
  font-weight: var(--font-semibold);
}

.recipe-card,
.strain-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.recipe-card {
  min-height: 240px;
  height: 100%;
}

.recipe-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  min-height: 60px;
}

.recipe-card-header h3 {
  flex: 1;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.8em;
}

.recipe-author {
  color: var(--gray-500);
  font-size: var(--text-xs);
  margin: 0 0 var(--space-3) 0;
  font-weight: var(--font-normal);
  min-height: 1.25rem;
}

.recipe-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.recipe-card-footer {
  margin-top: auto;
  min-height: 60px;
}

.rating-compact {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--yellow-500);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: help;
  position: relative;
}

.rating-compact i {
  color: var(--yellow-500);
}

/* Tooltip */
.rating-compact::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--gray-900);
  color: white;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(4px);
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.rating-compact::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  right: 12px;
  border: 6px solid transparent;
  border-top-color: var(--gray-900);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(4px);
  z-index: 100;
}

.rating-compact:hover::after,
.rating-compact:hover::before {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-indica {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 50%, #d8b4fe 100%);
  color: #6b21a8;
  border: 1px solid #c4b5fd;
  font-weight: var(--font-semibold);
}

.badge-sativa {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: var(--font-semibold);
}

.badge-hybrid,
.badge-hybrid_balanced {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #6ee7b7;
  font-weight: var(--font-semibold);
}

.badge-hybrid_indica {
  background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 25%, #c4b5fd 50%, #a7f3d0 75%, #d1fae5 100%);
  color: #6b21a8;
  border: 1px solid #c4b5fd;
  font-weight: var(--font-semibold);
}

.badge-hybrid_sativa {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 25%, #fcd34d 50%, #a7f3d0 75%, #d1fae5 100%);
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: var(--font-semibold);
}

.badge-cbd_dominant {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #93c5fd 100%);
  color: #1e40af;
  border: 1px solid #60a5fa;
  font-weight: var(--font-semibold);
}

.badge-unknown {
  background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 50%, #e5e7eb 100%);
  color: #4b5563;
  border: 1px solid #d1d5db;
  font-weight: var(--font-semibold);
}

.badge-dosage-micro {
  background: var(--green-100);
  color: var(--green-800);
}

.badge-dosage-low {
  background: var(--green-200);
  color: var(--green-900);
}

.badge-dosage-medium {
  background: #fef3c7;
  color: #92400e;
}

.badge-dosage-high {
  background: #fee2e2;
  color: #991b1b;
}

/* Difficulty Badges */
.badge-difficulty-beginner {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border: 1px solid #6ee7b7;
  font-weight: var(--font-medium);
  font-size: 0.75rem;
}

.badge-difficulty-intermediate {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: var(--font-medium);
  font-size: 0.75rem;
}

.badge-difficulty-advanced {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #9a3412;
  border: 1px solid #fdba74;
  font-weight: var(--font-medium);
  font-size: 0.75rem;
}

/* Recipe Time */
.recipe-time {
  color: var(--gray-500);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Dietary Tags */
.badge-dietary {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #6ee7b7;
  font-weight: var(--font-medium);
  font-size: 0.7rem;
  margin-top: 0.25rem;
}

.dietary-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.dietary-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
}

.dietary-checkbox-label:hover {
  background: var(--green-50, #f0fdf4);
  border-color: var(--green-400);
}

.dietary-checkbox-label:has(input:checked) {
  background: var(--green-100);
  border-color: var(--green-500);
}

.dietary-checkbox-label input[type="checkbox"]:checked + .dietary-checkbox-text {
  color: var(--green-700);
  font-weight: 600;
}

.dietary-checkbox-text {
  font-size: 0.9rem;
}

.dietary-filter-row {
  margin-bottom: 1rem;
}

.dietary-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.dietary-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.dietary-filter-chip:hover {
  border-color: var(--green-400);
  background: var(--green-50, #f0fdf4);
}

.dietary-filter-chip.active,
.dietary-filter-chip:has(input:checked) {
  background: var(--green-100);
  border-color: var(--green-500);
  color: var(--green-800);
  font-weight: 600;
}

.dietary-filter-chip input[type="checkbox"] {
  display: none;
}

.form-hint {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--green-500);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: var(--green-600);
  color: white;
}

.btn:active,
button[type="submit"]:active,
input[type="submit"]:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.btn-danger {
  background: var(--red-500);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-gold {
  background: var(--green-500);
  color: white;
}

.btn-gold:hover {
  background: var(--green-600);
}

.btn-follow-small {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--green-500);
  background: var(--green-500);
  color: white;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1.4;
}

.btn-follow-small:hover {
  background: var(--green-600);
  border-color: var(--green-600);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--space-6);
}

label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--gray-900);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: var(--space-3);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-sm);
  background: white;
  color: var(--gray-900);
  transition: all var(--transition);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="checkbox"] {
  width: auto;
  margin-right: var(--space-2);
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-4);
}

.checkbox-group label {
  margin-bottom: 0;
  cursor: pointer;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid {
  display: grid;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  align-items: stretch;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid > .card {
  height: 100%;
}

/* ============================================
   DOSAGE COMPONENTS
   ============================================ */
.dosage-preview {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 2px solid;
  transition: all var(--transition);
}

.dosage-preview.dosage-micro,
.dosage-preview.dosage-low {
  border-color: var(--green-300);
  background: var(--green-50);
}

.dosage-preview.dosage-medium {
  border-color: #fde047;
  background: #fefce8;
}

.dosage-preview.dosage-high,
.dosage-preview.dosage-very-high {
  border-color: #fca5a5;
  background: #fef2f2;
}

.dosage-warning {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  font-size: var(--text-xs);
  color: #713f12;
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  line-height: 1.4;
}

.dosage-warning.high {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.recipe-card .dosage-warning {
  margin: 0;
  padding: var(--space-2) var(--space-3);
}

/* ============================================
   RATING DISPLAY
   ============================================ */
.rating {
  color: var(--yellow-500);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* ============================================
   TABLES
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

table th {
  font-weight: var(--font-semibold);
  text-align: left;
  padding: var(--space-3);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}

table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

table tr:hover {
  background: var(--gray-50);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: var(--space-12) 0;
  margin-top: auto;
}

.footer-disclaimer {
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  color: var(--gray-600);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: var(--space-4); }
.mt-2 { margin-top: var(--space-8); }
.mb-1 { margin-bottom: var(--space-4); }
.mb-2 { margin-bottom: var(--space-8); }

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

/* ============================================
   ADMIN DASHBOARD
   ============================================ */
.admin-stat-card {
  background: var(--green-600);
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-stat-card h3 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-stat-card p {
  margin: 0.5rem 0 0 0;
  font-weight: 500;
  color: white;
}

/* ============================================
   ADMIN BADGE
   ============================================ */
.user-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background: linear-gradient(135deg, var(--green-600) 0%, var(--green-700) 100%);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ============================================
   ENHANCED STRAIN SELECT
   ============================================ */
.strain-select {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  padding: 0.75rem;
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  color: var(--gray-900);
  transition: all 0.2s ease;
}

.strain-select:hover {
  border-color: var(--green-500);
}

.strain-select:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
  outline: none;
}

.strain-select option {
  padding: 0.5rem;
  font-family: var(--font-mono);
}

/* ============================================
   POLICY PAGES (Terms, Privacy, Guidelines)
   ============================================ */
.policy-page {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
}

.policy-header {
  text-align: center;
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: 2px solid var(--gray-200);
}

.policy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: linear-gradient(135deg, var(--green-50) 0%, var(--green-100) 100%);
  border-radius: 50%;
  color: var(--green-700);
}

.policy-header h1 {
  margin: 0 0 var(--space-4) 0;
  color: var(--gray-900);
  font-size: var(--text-4xl);
  font-weight: 700;
}

.policy-subtitle {
  margin: 0 0 var(--space-3) 0;
  color: var(--gray-600);
  font-size: var(--text-lg);
  font-weight: 400;
}

.policy-updated {
  margin: 0;
  color: var(--gray-500);
  font-size: var(--text-sm);
  font-style: italic;
}

.policy-intro {
  background: var(--gray-50);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-10);
  border-left: 4px solid var(--green-600);
}

.policy-intro p {
  margin: 0;
  color: var(--gray-700);
  font-size: var(--text-base);
  line-height: 1.7;
}

.policy-section {
  margin-bottom: var(--space-16);
  padding: var(--space-8);
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.policy-section-primary {
  border-left: 4px solid var(--green-600);
  background: linear-gradient(to right, var(--green-50) 0%, white 100px);
}

.policy-section-success {
  border-left: 4px solid var(--green-600);
  background: linear-gradient(to right, var(--green-50) 0%, white 100px);
}

.policy-section-info {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(to right, #eff6ff 0%, white 100px);
}

.policy-section-warning {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(to right, #fffbeb 0%, white 100px);
}

.policy-section-danger {
  border-left: 4px solid #ef4444;
  background: linear-gradient(to right, #fef2f2 0%, white 100px);
}

.policy-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  color: var(--gray-900);
}

.policy-section-header i {
  flex-shrink: 0;
}

.policy-section-header h2 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 700;
}

.policy-section h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-6) 0 var(--space-4) 0;
  color: var(--gray-800);
  font-size: var(--text-lg);
  font-weight: 600;
}

.policy-section h4 {
  margin: var(--space-4) 0 var(--space-3) 0;
  color: var(--gray-800);
  font-size: var(--text-base);
  font-weight: 600;
}

.policy-section p {
  margin: var(--space-4) 0;
  color: var(--gray-700);
  line-height: 1.7;
}

.policy-list {
  margin: var(--space-4) 0;
  padding-left: var(--space-8);
  color: var(--gray-700);
}

.policy-list li {
  margin: var(--space-3) 0;
  line-height: 1.6;
}

.policy-list li strong {
  color: var(--gray-900);
  font-weight: 600;
}

.policy-highlight {
  padding: var(--space-6);
  border-radius: var(--radius-md);
  margin: var(--space-6) 0;
}

.policy-highlight-primary {
  background: var(--green-50);
  border: 1px solid var(--green-200);
}

.policy-highlight-success {
  background: var(--green-50);
  border: 1px solid var(--green-200);
}

.policy-highlight-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.policy-highlight-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.policy-highlight-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.policy-highlight h3, .policy-highlight h4 {
  margin-top: 0;
}

.policy-footer {
  margin-top: var(--space-12);
  padding: var(--space-8);
  background: linear-gradient(135deg, var(--green-50) 0%, var(--green-100) 100%);
  border-radius: var(--radius-lg);
  text-align: center;
}

.policy-footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.policy-footer-content i {
  display: block;
  margin: 0 auto var(--space-4);
  color: var(--green-700);
}

.policy-footer-content h3 {
  margin: 0 0 var(--space-3) 0;
  color: var(--gray-900);
  font-size: var(--text-xl);
  font-weight: 700;
}

.policy-footer-content p {
  margin: var(--space-3) 0;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Dosage Grid (Community Guidelines) */
.dosage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.dosage-card {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  text-align: center;
  border: 2px solid;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dosage-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dosage-label {
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}

.dosage-range {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.dosage-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.dosage-micro {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.dosage-low {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.dosage-medium {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.dosage-high {
  background: #fed7aa;
  border-color: #fb923c;
  color: #9a3412;
}

.dosage-very-high {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* Enforcement Levels (Community Guidelines) */
.enforcement-level {
  padding: var(--space-4);
  background: var(--gray-50);
  border-left: 3px solid var(--gray-400);
  border-radius: var(--radius-sm);
}

/* Safety List (Community Guidelines) */
.safety-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}

.safety-list li {
  display: flex;
  align-items: start;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  padding: var(--space-3);
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  line-height: 1.6;
}

.safety-list li i {
  flex-shrink: 0;
  color: var(--green-600);
  margin-top: 2px;
}

/* Rights Grid (Privacy Policy) */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0;
}

.rights-card {
  padding: var(--space-5);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rights-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: var(--green-300);
}

.rights-card h4 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3) 0;
  color: var(--gray-900);
  font-size: var(--text-base);
  font-weight: 600;
}

.rights-card h4 i {
  color: var(--green-600);
}

.rights-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ============================================
   ICON SUPPORT
   ============================================ */
.lucide-icon {
  flex-shrink: 0;
}

/* ============================================
   HOMEPAGE
   ============================================ */

/* Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  padding: var(--space-16) 0;
  color: white;
}

.hero-banner-logo {
  height: 120px;
  width: auto;
  margin: 0 auto var(--space-8);
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.hero-banner-heading {
  color: white;
  font-size: 2.75rem;
  font-weight: var(--font-bold);
  line-height: 1.15;
  margin-bottom: var(--space-4);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-banner-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-lg);
  max-width: 560px;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
}

.hero-banner-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  background: white;
  color: var(--green-800);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-hero-primary:hover {
  background: var(--green-50, #f0fdf4);
  color: var(--green-900);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

/* Homepage Sections */
.homepage-section {
  padding: var(--space-12) 0;
}

.section-heading {
  color: var(--green-800);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin: 0 0 var(--space-8);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-300);
  color: inherit;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  margin-bottom: var(--space-4);
}

.feature-card h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--green-800);
  margin: 0 0 var(--space-2);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--gray-600);
  margin: 0;
  line-height: 1.5;
}

/* Earn Section */
.earn-section {
  background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
  padding: var(--space-16) 0;
}

.earn-heading {
  color: #713f12;
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin: 0 0 var(--space-4);
}

.earn-description {
  color: #92400e;
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto var(--space-4);
  line-height: 1.6;
}

.earn-highlight {
  color: #78350f;
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  margin: 0 0 var(--space-8);
}

.btn-earn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-8);
  background: var(--green-700);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-earn:hover {
  background: var(--green-800);
  color: white;
  transform: translateY(-1px);
}

/* How It Works */
.how-it-works {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
}

.how-step {
  flex: 1;
  max-width: 300px;
  text-align: center;
}

.how-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-600);
  color: white;
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
}

.how-step h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--green-800);
  margin: 0 0 var(--space-2);
}

.how-step p {
  font-size: var(--text-sm);
  color: var(--gray-600);
  margin: 0;
  line-height: 1.5;
}

/* Recipe Card Links (no inline styles) */
.recipe-card-link {
  text-decoration: none;
  color: inherit;
}

.recipe-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.recipe-card-no-rating {
  color: var(--gray-400);
  font-size: var(--text-sm);
  margin: 0;
}

/* Stats Bar */
.stats-bar {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--space-8) 0;
}

.stats-bar-inner {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.stat-number {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--green-700);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--gray-500);
  font-weight: var(--font-medium);
}

/* Final CTA */
.cta-section {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-600) 100%);
  padding: var(--space-16) 0;
  color: white;
}

.cta-heading {
  color: white;
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin: 0 0 var(--space-3);
}

.cta-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-lg);
  margin: 0 0 var(--space-8);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
    --text-2xl: 1.25rem;
  }

  .navbar .container {
    height: auto;
    padding: var(--space-4) var(--space-6);
    flex-wrap: wrap;
  }

  .navbar-menu {
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: var(--space-8) 0;
  }

  /* Homepage responsive */
  .hero-banner {
    padding: var(--space-8) 0;
  }

  .hero-banner-heading {
    font-size: 2rem;
  }

  .hero-banner-logo {
    height: 80px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .how-it-works {
    flex-direction: column;
    align-items: center;
  }

  .stats-bar-inner {
    gap: var(--space-6);
  }

  .earn-section {
    padding: var(--space-8) 0;
  }

  .cta-section {
    padding: var(--space-8) 0;
  }
}

/* ============================================
   SORTABLE TABLE HEADERS
   ============================================ */
th.sortable {
  cursor: pointer;
  user-select: none;
}

.sortable-header {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sortable-header:hover {
  color: var(--green-600);
  text-decoration: none;
}

.sortable-header.active {
  color: var(--green-700);
  font-weight: 600;
}

.sort-indicator {
  display: inline-block;
  font-size: 0.875rem;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.sortable-header:hover .sort-indicator {
  opacity: 1;
}

.sortable-header.active .sort-indicator {
  opacity: 1;
  color: var(--green-700);
}

/* ============================================
   FAVORITE TOGGLE BUTTON
   ============================================ */
turbo-frame[id^="strain_favorite_"] {
  display: inline;
}

button.favorite-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  border-radius: 0;
  font-weight: normal;
  min-width: auto;
  white-space: normal;
}

button.favorite-toggle-btn:hover {
  background: none;
  transform: none;
}

button.favorite-toggle-btn:active {
  transform: none;
}

button.favorite-toggle-btn:hover .favorite-star.inactive {
  opacity: 1;
  stroke: var(--gold-600, #ca8a04);
}

.favorite-star.active {
  color: var(--gold-600, #ca8a04);
  fill: var(--gold-600, #ca8a04);
}

.favorite-star.inactive {
  color: var(--gray-400, #9ca3af);
  opacity: 0.5;
  transition: opacity 0.2s, stroke 0.2s;
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-section {
  margin-bottom: 1.5rem;
  text-align: center;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-900, #1a1a1a);
  margin-bottom: 0.25rem;
}

.newsletter-subtitle {
  font-size: 0.85rem;
  color: var(--gray-500, #6b7280);
  margin-bottom: 0.75rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.newsletter-input {
  padding: 0.5rem 1rem !important;
  border: 2px solid var(--gray-200, #e5e7eb) !important;
  border-radius: 6px !important;
  background: white !important;
  color: var(--gray-900, #1a1a1a) !important;
  min-width: 250px;
  width: auto !important;
}

.newsletter-input:focus {
  border-color: var(--green-500, #22c55e) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
}

.newsletter-input::placeholder {
  color: var(--gray-400, #9ca3af) !important;
}

.newsletter-legal {
  font-size: 0.75rem;
  color: var(--gray-400, #9ca3af);
  margin-top: 0.5rem;
}

.newsletter-legal a {
  color: var(--gray-500, #6b7280);
  text-decoration: underline;
}

.newsletter-legal a:hover {
  color: var(--green-500, #22c55e);
}

/* ============================================
   AGE GATE
   ============================================ */
.age-gate-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-color, #faf8f5);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.age-gate-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.age-gate-card {
  text-align: center;
  max-width: 480px;
  width: 100%;
  padding: 2.5rem 2rem;
}

.age-gate-logo {
  margin-bottom: 1.5rem;
}

.age-gate-logo-img {
  width: 200px;
  height: auto;
}

.age-gate-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #2c1810);
  margin: 0 0 0.5rem;
}

.age-gate-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary, #6b5c4f);
  margin: 0 0 1rem;
}

.age-gate-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--primary, #2d5016), var(--accent, #c9a84c));
  margin: 1rem auto;
  border-radius: 2px;
}

.age-gate-message {
  font-size: 1rem;
  color: var(--text-secondary, #6b5c4f);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.age-gate-btn {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
}

.age-gate-btn:hover {
  transform: translateY(-1px);
}

.age-gate-btn-yes {
  background: var(--primary, #2d5016);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 80, 22, 0.3);
  min-width: 200px;
}

.age-gate-btn-yes:hover {
  background: var(--primary-hover, #3a6b1e);
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.4);
}

.age-gate-btn-no {
  background: transparent;
  color: var(--text-secondary, #6b5c4f);
  border: 1px solid var(--border-color, #d4c5b4);
  min-width: 200px;
}

.age-gate-btn-no:hover {
  background: var(--bg-secondary, #f0ebe4);
}

.age-gate-legal {
  font-size: 0.8rem;
  color: var(--text-muted, #9b8e82);
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto;
}

.age-gate-legal a {
  color: var(--primary, #2d5016);
  text-decoration: underline;
}

.age-gate-legal a:hover {
  color: var(--primary-hover, #3a6b1e);
}

/* ============================================
   LABEL PRINTER
   ============================================ */
.label-preview-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  border: 2px dashed var(--gray-300, #ddd);
  border-radius: 8px;
  background: var(--gray-50, #fafafa);
}

.label-preview-wrapper canvas {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  image-rendering: pixelated;
}

.label-printer-controls {
  max-width: 320px;
}

/* ============================================
   PROFILE & SETTINGS
   ============================================ */

/* Settings Page */
.settings-container {
  max-width: 600px;
  margin: var(--space-6) auto;
}

.settings-subtitle {
  color: var(--gray-500);
  margin-bottom: var(--space-6);
}

.section-heading {
  margin-top: var(--space-6);
}

.input-disabled {
  background: var(--gray-100);
  cursor: not-allowed;
}

.form-hint {
  color: var(--gray-500);
  font-size: var(--text-sm);
}

.error-list {
  list-style: none;
  padding: 0;
}

/* Avatar Upload */
.avatar-upload-area {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.avatar-upload-preview {
  flex-shrink: 0;
}

.avatar-preview-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green-200);
}

.avatar-preview-fallback {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-400));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.avatar-upload-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.file-input {
  font-size: var(--text-sm);
}

/* Privacy Toggles */
.privacy-toggles {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
}

.toggle-row:hover {
  background: var(--gray-100);
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green-600);
  cursor: pointer;
}

.toggle-label {
  font-weight: var(--font-medium);
  color: var(--gray-800);
}

.toggle-hint {
  width: 100%;
  padding-left: 26px;
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.danger-divider {
  margin: var(--space-8) 0;
  border: none;
  border-top: 1px solid var(--gray-200);
}

.danger-heading {
  color: var(--red-500);
}

.btn-danger {
  background: var(--red-500);
  color: white;
  border: 2px solid var(--red-500);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Public Profile */
.profile-header {
  margin-bottom: var(--space-5);
}

.profile-header-info {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.profile-avatar-large {
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green-200);
}

.profile-avatar-fallback-large {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-400));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: var(--font-bold);
}

.profile-name {
  margin: 0 0 var(--space-1) 0;
}

.profile-username {
  color: var(--gray-500);
  margin: 0 0 var(--space-1) 0;
  font-size: var(--text-sm);
}

.profile-member-since {
  color: var(--gray-500);
  margin: 0;
  font-size: var(--text-sm);
}

.profile-bio {
  margin: var(--space-3) 0 0 0;
  color: var(--gray-700);
  line-height: 1.6;
  max-width: 600px;
}

.profile-stats-grid {
  margin-top: var(--space-5);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-4);
}

.profile-stat-card {
  text-align: center;
  padding: var(--space-3);
  background: var(--green-50);
  border-radius: var(--radius-md);
}

.profile-stat-value {
  font-size: 2rem;
  font-weight: var(--font-bold);
  color: var(--green-700);
}

.profile-stat-label {
  color: var(--gray-500);
  font-size: var(--text-sm);
}

.profile-private-message {
  padding: var(--space-8) var(--space-4);
}

.profile-private-icon {
  width: 48px;
  height: 48px;
  color: var(--gray-400);
  margin-bottom: var(--space-3);
}

.profile-back-link {
  text-align: center;
  margin: var(--space-6) 0;
}

/* Badge Cards (Profile) */
.badge-card {
  padding: var(--space-3);
  background: #fff3cd;
  border: 2px solid var(--yellow-500);
  border-radius: var(--radius-md);
}

.badge-card-title {
  margin: 0 0 var(--space-1) 0;
  color: var(--green-700);
}

.badge-card-description {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.badge-card-date {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--gray-400);
}

/* Inline Icons */
.icon-inline {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
}

.icon-inline-lg {
  width: 20px;
  height: 20px;
  vertical-align: -4px;
}

/* ============================================
   BATCH SCALER
   ============================================ */
.batch-scaler-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.batch-scaler-btn {
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--green-300);
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.batch-scaler-btn:hover {
  background: var(--green-100);
  border-color: var(--green-400);
}

.batch-scaler-btn.active {
  background: var(--green-600);
  color: #fff;
  border-color: var(--green-600);
}

.batch-scaler-custom {
  width: 4.5rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--green-300);
  border-radius: 6px;
  font-size: 0.8rem;
  text-align: center;
}

.batch-scaler-custom:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.batch-scaler-original {
  font-size: 0.8rem;
  color: var(--gray-400);
  font-style: italic;
}

/* ============================================
   LEADERBOARDS
   ============================================ */
.leaderboard-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gray-100);
  padding: 0.25rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.period-tab {
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
  color: var(--gray-600);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.period-tab:hover {
  color: var(--gray-800);
  background: var(--gray-200);
}

.period-tab.active {
  background: var(--green-600);
  color: #fff;
  font-weight: 600;
}

.leaderboard-section {
  margin-bottom: 1.5rem;
}

.leaderboard-section h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-lg);
  margin-bottom: 1rem;
  color: var(--gray-800);
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rank-entry {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.rank-entry:last-child {
  border-bottom: none;
}

.rank-number {
  width: 2rem;
  text-align: center;
  font-weight: 600;
  color: var(--gray-400);
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
}

.rank-medal.gold {
  background: #FFD700;
  color: #7c5e00;
}

.rank-medal.silver {
  background: #C0C0C0;
  color: #555;
}

.rank-medal.bronze {
  background: #CD7F32;
  color: #fff;
}

.rank-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.rank-info a {
  font-weight: 600;
  color: var(--green-700);
  text-decoration: none;
}

.rank-info a:hover {
  color: var(--green-500);
  text-decoration: underline;
}

.rank-meta {
  font-size: var(--text-xs);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.leaderboard-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray-400);
}

.leaderboard-empty i {
  margin-bottom: 0.5rem;
}

.leaderboard-empty p {
  margin: 0;
  font-size: var(--text-sm);
}

/* ============================================
   TERPENE MATCHER
   ============================================ */
.matcher-container {
  max-width: 900px;
  margin: 2rem auto;
}

.matcher-subtitle {
  margin-bottom: 1.5rem;
  color: var(--gray-500);
}

.mood-sliders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mood-slider-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--gray-200);
}

.mood-slider-label {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--gray-700);
  min-width: 80px;
}

.mood-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.mood-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-600);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mood-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-600);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mood-slider-value {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--green-700);
  min-width: 1.5rem;
  text-align: center;
}

.match-results {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--gray-200);
}

.match-results h2 {
  margin-bottom: 1rem;
}

.match-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.match-result-card {
  padding: 1rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md, 8px);
  transition: box-shadow 0.15s ease;
}

.match-result-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.match-result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.match-result-name {
  font-weight: 600;
  color: var(--green-800);
  text-decoration: none;
}

.match-result-name:hover {
  text-decoration: underline;
}

.match-result-strain {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.match-result-moods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.mood-tag {
  font-size: var(--text-xs);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-weight: 500;
}

.similarity-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  white-space: nowrap;
}

.similarity-high {
  background: var(--green-100);
  color: var(--green-800);
}

.similarity-medium {
  background: #fef3c7;
  color: #92400e;
}

.similarity-low {
  background: var(--gray-100);
  color: var(--gray-600);
}

.match-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.match-result-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md, 8px);
}

.match-result-info {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.match-result-type {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

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

  .match-result-row {
    flex-wrap: wrap;
  }
}

/* ============================================
   MICRO-DOSING GUIDE
   ============================================ */
.micro-dosing-page {
  max-width: 100%;
}

.micro-dosing-hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, var(--green-50) 0%, var(--green-100) 100%);
  border-bottom: 2px solid var(--green-200);
}

.micro-dosing-hero h1 {
  color: var(--green-800);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.micro-dosing-subtitle {
  color: var(--gray-500);
  font-size: 1.1rem;
}

.micro-dosing-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.micro-dosing-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.micro-dosing-info-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.info-card-icon {
  color: var(--green-600);
  margin-bottom: 0.75rem;
}

.micro-dosing-info-card h3 {
  color: var(--green-800);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.micro-dosing-info-card p {
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.5;
}

.micro-dosing-section {
  margin-bottom: 3rem;
}

.micro-dosing-section h2 {
  color: var(--green-800);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.section-description {
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

/* Preset Buttons */
.preset-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.preset-label {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.preset-btn {
  padding: 0.4rem 1rem;
  border: 2px solid var(--green-300);
  border-radius: 20px;
  background: white;
  color: var(--green-700);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: var(--green-50);
  border-color: var(--green-500);
}

.preset-btn.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: white;
}

/* Calculator Form */
.micro-dosing-form {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
}

.micro-dosing-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.micro-dosing-form .form-actions {
  margin-top: 1rem;
}

/* Live Preview */
.micro-dosing-preview {
  background: var(--green-50);
  border: 2px solid var(--green-200);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.micro-dosing-preview h4 {
  color: var(--green-700);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.preview-grams {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 0.75rem;
}

.preview-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preview-details span {
  background: white;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.8rem;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

/* Server-side Results */
.micro-dosing-results {
  background: white;
  border: 2px solid var(--green-300);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.micro-dosing-results h3 {
  color: var(--green-800);
  margin-bottom: 1rem;
}

.result-highlight {
  text-align: center;
  padding: 1.5rem;
  background: var(--green-50);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.result-big-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--green-700);
}

.result-label {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.result-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.result-detail {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.detail-label {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.detail-value {
  font-weight: 600;
  color: var(--gray-800);
}

.dosage-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.dosage-badge.dosage-micro {
  background: var(--green-100);
  color: var(--green-800);
}

.dosage-badge.dosage-low {
  background: var(--green-100);
  color: var(--green-700);
}

/* Titration Timeline */
.titration-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.titration-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.25rem;
  position: relative;
}

.titration-week {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.titration-dose {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 0.75rem;
}

.titration-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.titration-tips {
  background: var(--green-50);
  border-radius: 12px;
  padding: 1.5rem;
}

.titration-tips h3 {
  color: var(--green-800);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.titration-tips ul {
  margin: 0;
  padding-left: 1.25rem;
}

.titration-tips li {
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Curated Recipes Empty State */
.micro-dosing-section .empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--gray-50);
  border-radius: 12px;
  border: 2px dashed var(--gray-200);
}

.micro-dosing-section .empty-state p {
  color: var(--gray-500);
  margin: 1rem 0;
}

/* Recipe Card Meta */
.recipe-card-meta {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.rating-badge {
  background: var(--gray-100);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
}

.recipe-card-info {
  color: var(--gray-500);
  font-size: 0.85rem;
}

.recipe-card-author {
  font-size: 0.85rem;
  color: var(--gray-400);
}

/* Responsive */
@media (max-width: 768px) {
  .micro-dosing-info-grid {
    grid-template-columns: 1fr;
  }

  .micro-dosing-form .form-grid {
    grid-template-columns: 1fr;
  }

  .titration-timeline {
    grid-template-columns: 1fr 1fr;
  }

  .result-details {
    grid-template-columns: 1fr;
  }

  .preset-buttons {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .titration-timeline {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   NOTIFICATION BELL & NOTIFICATIONS PAGE
   ============================================ */
.notification-bell { position: relative; }
.notification-badge-wrapper { position: absolute; top: -4px; right: -4px; }
.notification-badge {
  background: #e74c3c;
  color: white;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1.2;
}
.notification-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
}
.notification-card.unread { background: var(--green-50); }
.notification-actor { font-weight: 600; }
.notification-time { color: var(--gray-500); font-size: 0.85rem; }
.notifications-list {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.activity-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  transition: box-shadow 0.15s ease;
}

.activity-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.activity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-icon-created_recipe {
  background: var(--green-100);
  color: var(--green-700);
}

.activity-icon-rated_recipe {
  background: #fef3c7;
  color: #b45309;
}

.activity-icon-earned_badge {
  background: #ede9fe;
  color: var(--purple-500);
}

.activity-icon-forked_recipe {
  background: #dbeafe;
  color: var(--blue-500);
}

.activity-icon-followed_user {
  background: var(--green-50);
  color: var(--green-600);
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-description {
  margin: 0 0 0.25rem;
  font-size: var(--text-sm);
  color: var(--gray-700);
  line-height: 1.5;
}

.activity-user-link {
  font-weight: 600;
  color: var(--green-700);
  text-decoration: none;
}

.activity-user-link:hover {
  color: var(--green-500);
  text-decoration: underline;
}

.activity-entity-link {
  font-weight: 500;
  color: var(--green-700);
  text-decoration: none;
}

.activity-entity-link:hover {
  text-decoration: underline;
}

.activity-deleted {
  color: var(--gray-400);
  font-style: italic;
}

.activity-rating {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  margin-left: 0.25rem;
}

.activity-meta {
  font-size: var(--text-xs);
  color: var(--gray-400);
}

.activity-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-400);
}

.activity-empty-state i {
  margin-bottom: 1rem;
}

.activity-empty-state h3 {
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.activity-empty-state p {
  margin-bottom: 1.5rem;
  font-size: var(--text-sm);
}

/* ============================================
   EQUIPMENT
   ============================================ */
.equipment-category-header { margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--green-200, #bbf7d0); }
.equipment-category-header h2 { margin: 0; color: var(--green-700); }
.equipment-rating { display: flex; align-items: center; gap: 0.25rem; }
.review-card { padding: 1rem; border-bottom: 1px solid var(--gray-200); }
.review-card:last-child { border-bottom: none; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.review-stars { color: var(--gold-600, #ca8a04); }
.review-body { color: var(--gray-600); line-height: 1.6; }
.review-form { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-200); }

/* ============================================
   ADVANCED FILTERS
   ============================================ */
.advanced-filters-toggle {
  cursor: pointer;
  color: var(--green-600);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  text-decoration: none;
}

.advanced-filters-toggle:hover {
  color: var(--green-700);
}

.advanced-filters-panel {
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 8px;
  margin-top: 0.75rem;
}

.advanced-filters-panel.hidden {
  display: none;
}

.filter-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  align-items: end;
}

.filter-row label {
  font-weight: 500;
  min-width: 140px;
}

.filter-row select,
.filter-row input {
  flex: 1;
  min-width: 150px;
}

/* ============================================
   GLOBAL SEARCH
   ============================================ */
.navbar-search { position: relative; display: flex; align-items: center; gap: 0.25rem; }
.navbar-search form { display: flex; align-items: center; gap: 0.25rem; }
.navbar-search input {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.85rem;
  width: 180px;
  background: var(--gray-50);
}
.navbar-search input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2); }
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 350px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
}
.search-results-dropdown.hidden { display: none; }
.search-result-group { padding: 0.5rem; }
.search-result-group h4 { font-size: 0.75rem; text-transform: uppercase; color: var(--gray-500); padding: 0.25rem 0.5rem; margin: 0; }
.search-result-item { padding: 0.5rem; border-radius: 4px; cursor: pointer; display: block; color: inherit; text-decoration: none; }
.search-result-item:hover { background: var(--gray-100); }
.search-result-section { margin-bottom: 2rem; }
.search-result-section h2 { display: flex; align-items: center; gap: 0.5rem; color: var(--green-700); border-bottom: 2px solid var(--green-200); padding-bottom: 0.5rem; }

/* ============================================
   COMMUNITY VERIFIED
   ============================================ */
.community-verified-card {
  border-left: 4px solid var(--green-600);
  background: var(--green-50, #f0fdf4);
}
.verified-badge-text {
  color: var(--green-700);
  font-weight: 600;
}
.badge-effect {
  background: var(--green-100, #dcfce7);
  color: var(--green-800, #166534);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.community-verified-icon {
  display: inline-flex;
  margin-left: 0.25rem;
}

/* ============================================
   QUEST BANNER
   ============================================ */
.quest-banner {
  background: linear-gradient(135deg, var(--green-50, #f0fdf4) 0%, #fef9c3 100%);
  border: 2px solid var(--gold, #C9A84C);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.quest-banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.quest-banner-icon {
  color: var(--gold-600, #ca8a04);
  flex-shrink: 0;
}
.quest-banner-text { flex: 1; min-width: 200px; }
.quest-banner-title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--green-800, #166534);
}
.quest-banner-desc {
  margin: 0.25rem 0 0;
  color: var(--gray-600, #4b5563);
  font-size: 0.9rem;
}
.quest-banner-meta {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--gold-600, #ca8a04);
  font-weight: 600;
}
.quest-banner-status { flex-shrink: 0; }
.quest-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.quest-complete {
  background: var(--green-100, #dcfce7);
  color: var(--green-800, #166534);
}
.quest-active {
  background: #fef3c7;
  color: #92400e;
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.share-label {
  font-weight: 600;
  color: var(--gray-600);
  font-size: 0.9rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.2s;
}
.share-btn:hover {
  background: var(--gray-100);
}
.share-btn-twitter:hover { color: #1da1f2; border-color: #1da1f2; }
.share-btn-facebook:hover { color: #1877f2; border-color: #1877f2; }
.share-btn-reddit:hover { color: #ff4500; border-color: #ff4500; }
.share-btn-copy:hover { color: var(--green-600); border-color: var(--green-600); }

/* ============================================
   PRINTABLE RECIPE CARDS
   ============================================ */

/* Hidden on screen */
.printable-recipe-card { display: none; }

@media print {
  @page { size: letter; margin: 0.75in; }

  /* Hide chrome (nav, footer, flash, overlays) */
  .navbar, .footer, .age-gate-overlay,
  .flash-messages, .flash, .no-print { display: none !important; }

  /* Keep main-content and container visible as pass-through wrappers */
  .main-content, .main-content > .container {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Hide all container children except the printable card */
  .main-content > .container > *:not(.printable-recipe-card) { display: none !important; }

  /* Show the printable card */
  .printable-recipe-card {
    display: block !important;
    font-family: Georgia, "Times New Roman", serif;
    color: #111;
    background: #fff;
    font-size: 10pt;
    line-height: 1.5;
  }

  a { color: #111; text-decoration: none; }

  /* Header */
  .print-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
  }

  .print-card-logo {
    width: 48px;
    height: 48px;
    filter: grayscale(100%);
    opacity: 0.7;
  }

  .print-card-title {
    font-size: 18pt;
    margin: 0;
    font-weight: bold;
  }

  .print-card-meta {
    font-size: 9pt;
    color: #555;
    margin: 0.25rem 0 0;
  }

  /* Two-column grid for strain + dosage */
  .print-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
  }

  /* Sections */
  .print-card-section {
    break-inside: avoid;
    margin-bottom: 0.75rem;
  }

  .print-card-section-title {
    font-size: 11pt;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.25rem;
    margin: 0 0 0.5rem;
  }

  /* Tables */
  .print-card-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
  }

  .print-card-table td {
    padding: 0.2rem 0;
    border-bottom: 1px solid #eee;
  }

  .print-card-table td:first-child {
    font-weight: bold;
    width: 35%;
    color: #444;
  }

  /* Dosage highlight */
  .print-card-dosage {
    text-align: center;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 0.5rem;
  }

  .print-card-dosage-value {
    display: block;
    font-size: 16pt;
    font-weight: bold;
  }

  .print-card-dosage-label {
    font-size: 8pt;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* Inline detail row (decarb/infusion) */
  .print-card-inline-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 9pt;
  }

  /* Ingredients list */
  .print-card-ingredients {
    padding-left: 1.5rem;
    margin: 0;
    font-size: 9pt;
    columns: 2;
    column-gap: 1.5rem;
  }

  .print-card-ingredients li {
    margin-bottom: 0.2rem;
    break-inside: avoid;
  }

  /* Text blocks */
  .print-card-text {
    white-space: pre-line;
    font-size: 9pt;
  }

  /* Footer */
  .print-card-footer {
    margin-top: 1.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #999;
  }

  .print-card-disclaimer {
    font-size: 7pt;
    color: #666;
    margin: 0 0 0.25rem;
  }

  .print-card-branding {
    font-size: 8pt;
    color: #888;
    text-align: right;
    margin: 0;
    font-style: italic;
  }
}

/* ============================================
   TWO-TIER NAV
   ============================================ */
.nav-b {
  padding: 0;
}

.nav-b .container {
  height: auto;
}

.nav-b-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-6);
  gap: var(--space-6);
}

.nav-b-search {
  flex: 1;
}

.nav-b-search input {
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
}

.nav-b-search form {
  width: 100%;
}

.nav-b-auth {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
}

.nav-b-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0 var(--space-6);
}

.nav-b-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-6);
  gap: var(--space-1);
}

/* Two-tier nav responsive adjustments — handled in HAMBURGER MENU section */

/* ============================================
   STRAIN COMPARISON
   ============================================ */

.compare-header {
  margin-bottom: 2rem;
}

.compare-header h1 {
  margin: 0 0 0.25rem 0;
}

.compare-subtitle {
  color: var(--gray-500);
  margin: 0;
}

.compare-grid {
  display: grid;
  gap: 1.5rem;
}

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

.compare-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.compare-card {
  display: flex;
  flex-direction: column;
}

.compare-card-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--green-100);
}

.compare-strain-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.compare-strain-name a {
  color: var(--green-700);
  text-decoration: none;
}

.compare-strain-name a:hover {
  text-decoration: underline;
}

.compare-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.compare-badge-product {
  background: #4a7029;
  color: white;
}

.compare-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
}

.compare-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.compare-section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin: 0 0 0.75rem 0;
}

.compare-stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.compare-stat-label {
  font-weight: 500;
  color: var(--gray-700);
}

.compare-stat-value {
  font-weight: 600;
  color: var(--green-700);
}

.compare-bar-track {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.compare-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.compare-bar-thc {
  background: linear-gradient(90deg, var(--green-500), var(--green-700));
}

.compare-bar-cbd {
  background: linear-gradient(90deg, var(--blue-500), #2563eb);
}

.compare-dispensary {
  margin: 0;
  color: var(--gray-600);
}

.compare-terpene-total {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin: 0 0 0.75rem 0;
}

.compare-terpene-bars {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.compare-terpene-row {
  display: grid;
  grid-template-columns: 90px 1fr 50px;
  align-items: center;
  gap: 0.5rem;
}

.compare-terpene-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-terpene-bar-track {
  height: 8px;
  background: var(--green-100);
  border-radius: 4px;
  overflow: hidden;
}

.compare-terpene-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-400), var(--green-600));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.compare-terpene-pct {
  font-size: 0.8rem;
  color: var(--green-600);
  text-align: right;
  font-weight: 500;
}

.compare-mood-row {
  display: grid;
  grid-template-columns: 80px 1fr 30px;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.compare-mood-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
}

.compare-mood-bar-track {
  height: 8px;
  background: var(--green-100);
  border-radius: 4px;
  overflow: hidden;
}

.compare-mood-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), var(--green-600));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.compare-mood-score {
  font-size: 0.8rem;
  color: var(--green-600);
  text-align: right;
  font-weight: 500;
}

.compare-dominant-mood {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--green-50);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.compare-recipe-count a {
  color: var(--green-600);
  font-weight: 600;
  text-decoration: none;
}

.compare-recipe-count a:hover {
  text-decoration: underline;
}

.compare-recipe-none {
  color: var(--gray-400);
  margin: 0;
}

.compare-back {
  text-align: center;
  margin: 2rem 0;
}

.btn-outline-green {
  background: transparent;
  color: var(--green-600);
  border: 1px solid var(--green-600);
  cursor: pointer;
}

.btn-outline-green:hover {
  background: var(--green-50);
}

.compare-btn-active {
  background: var(--green-600) !important;
  color: white !important;
  border-color: var(--green-600) !important;
}

.compare-tray {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  border-top: 2px solid var(--green-600);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  transition: bottom 0.3s ease;
  padding: 0.75rem 1rem;
}

.compare-tray-visible {
  bottom: 0;
}

.compare-tray-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.compare-tray-info {
  font-size: 0.9rem;
  color: var(--gray-700);
  white-space: nowrap;
}

.compare-tray-items {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  flex-wrap: wrap;
}

.compare-tray-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--green-100);
  color: var(--green-800);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.compare-tray-remove {
  background: none;
  border: none;
  color: var(--green-600);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.compare-tray-remove:hover {
  color: var(--red-500);
}

.compare-tray-actions {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}

.compare-tray-go,
.compare-tray-clear {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

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

  .compare-tray-content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .compare-tray-items {
    justify-content: center;
  }

  .compare-tray-actions {
    justify-content: center;
  }
}

/* ============================================
   RECIPE VERSION HISTORY
   ============================================ */

.recipe-version-info {
  color: var(--gray-500);
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.version-badge {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.version-history-link {
  color: var(--green-600);
  text-decoration: underline;
}

.version-history-link:hover {
  color: var(--green-700);
}

.version-history-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 1rem;
}

.version-history-header h1 {
  margin: 0 0 0.25rem 0;
}

.version-history-subtitle {
  color: var(--gray-500);
  margin: 0;
}

.version-timeline {
  position: relative;
  padding-left: 2rem;
}

.version-timeline::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green-200);
}

.version-entry {
  position: relative;
  margin-bottom: 1.5rem;
}

.version-entry:last-child {
  margin-bottom: 0;
}

.version-entry-marker {
  position: absolute;
  left: -1.65rem;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green-500);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--green-200);
}

.version-entry-content {
  margin-bottom: 0;
}

.version-entry-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.version-entry-date {
  color: var(--gray-500);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.version-changes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.version-change-row {
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: 6px;
}

.version-field-name {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.version-diff {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.version-diff-old,
.version-diff-new {
  flex: 1;
  min-width: 120px;
}

.version-diff-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.15rem;
}

.version-diff-old .version-diff-value {
  color: #b91c1c;
  background: #fef2f2;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  font-size: 0.9rem;
  word-break: break-word;
}

.version-diff-new .version-diff-value {
  color: #15803d;
  background: #f0fdf4;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  font-size: 0.9rem;
  word-break: break-word;
}

.version-diff-arrow {
  color: var(--gray-400);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .version-history-header {
    flex-direction: column;
  }

  .version-diff {
    flex-direction: column;
    align-items: stretch;
  }

  .version-diff-arrow {
    text-align: center;
    transform: rotate(90deg);
  }

  .version-timeline {
    padding-left: 1.5rem;
  }
}

/* ============================================
   API DOCUMENTATION
   ============================================ */

.api-docs {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
}

.api-docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-8);
  align-items: start;
}

/* Sidebar */
.api-docs-sidebar {
  position: sticky;
  top: var(--space-4);
}

.api-docs-sidebar-inner {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.api-docs-sidebar-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.api-docs-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.api-docs-nav-link {
  font-size: var(--text-sm);
  color: var(--gray-600);
  text-decoration: none;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.api-docs-nav-link:hover {
  background: var(--green-50);
  color: var(--green-700);
}

/* Content */
.api-docs-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

.api-docs-intro {
  font-size: var(--text-lg);
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.api-docs-section {
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--gray-200);
}

.api-docs-section:last-child {
  border-bottom: none;
}

.api-docs-section-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.api-docs-section > p {
  color: var(--gray-600);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.api-docs-section > h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--gray-800);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

/* Endpoints */
.api-docs-endpoint {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}

.api-docs-endpoint-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.api-docs-method {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 60px;
  text-align: center;
}

.api-docs-method-get {
  background: var(--green-100);
  color: var(--green-800);
}

.api-docs-method-post {
  background: #dbeafe;
  color: #1e40af;
}

.api-docs-method-patch {
  background: #fef3c7;
  color: #92400e;
}

.api-docs-method-delete {
  background: #fee2e2;
  color: #991b1b;
}

.api-docs-path {
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--gray-800);
}

.api-docs-endpoint > p {
  color: var(--gray-600);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.api-docs-endpoint h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--gray-700);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

/* Parameter tables */
.api-docs-params {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.api-docs-params th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  background: var(--gray-50);
  color: var(--gray-600);
  font-weight: var(--font-medium);
  border-bottom: 1px solid var(--gray-200);
}

.api-docs-params td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: top;
}

.api-docs-params code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  font-size: var(--text-xs);
  background: var(--gray-100);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--gray-800);
}

/* Code blocks */
.api-docs-code-block {
  background: var(--gray-900);
  color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-2);
  overflow-x: auto;
}

.api-docs-code-block pre,
.api-docs-code-block code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  font-size: var(--text-sm);
  line-height: 1.6;
  white-space: pre;
  margin: 0;
}

.api-docs-inline-code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  font-size: 0.85em;
  background: var(--gray-100);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--gray-800);
}

/* Responsive */
@media (max-width: 768px) {
  .api-docs-layout {
    grid-template-columns: 1fr;
  }

  .api-docs-sidebar {
    position: static;
  }

  .api-docs-sidebar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    align-items: center;
  }

  .api-docs-sidebar-title {
    width: 100%;
    margin-bottom: var(--space-2);
  }

  .api-docs-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .api-docs-endpoint {
    padding: var(--space-4);
  }

  .api-docs-endpoint-header {
    flex-wrap: wrap;
  }

  .api-docs-params {
    display: block;
    overflow-x: auto;
  }
}

/* ============================================
   RECIPE PHOTO GALLERY
   ============================================ */

/* Photo Upload Dropzone */
.photo-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
  position: relative;
}

.photo-dropzone:hover {
  border-color: var(--green-400);
  background-color: var(--green-50);
}

.photo-dropzone-active {
  border-color: var(--green-500);
  background-color: var(--green-50);
  border-style: solid;
}

.photo-dropzone-content {
  pointer-events: none;
}

.photo-dropzone-icon {
  width: 48px;
  height: 48px;
  color: var(--gray-400);
  margin-bottom: var(--space-2);
}

.photo-dropzone-text {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--gray-700);
  margin-bottom: var(--space-1);
}

.photo-dropzone-hint {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.photo-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
}

/* Photo Counter */
.photo-counter {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-top: var(--space-2);
  font-weight: var(--font-medium);
}

.photo-counter-full {
  color: var(--red-500);
  font-weight: var(--font-semibold);
}

/* Photo Preview Grid */
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.photo-preview-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--gray-100);
}

.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-preview-remove {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition);
  padding: 0;
}

.photo-preview-remove:hover {
  background: rgba(220, 53, 69, 0.9);
}

.photo-preview-label {
  position: absolute;
  bottom: var(--space-1);
  left: var(--space-1);
  font-size: var(--text-xs);
  background: var(--green-600);
  color: white;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-weight: var(--font-medium);
}

/* Photo Gallery (Show Page) */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
}

.photo-gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: block;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.photo-gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.photo-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-gallery-empty {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--gray-500);
}

.photo-gallery-empty-icon {
  width: 48px;
  height: 48px;
  color: var(--gray-300);
  margin-bottom: var(--space-3);
}

.photo-gallery-empty p {
  margin-bottom: var(--space-4);
}

/* Photo Lightbox */
.photo-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.photo-lightbox-open {
  display: flex;
}

.photo-lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2001;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: background-color var(--transition);
}

.photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.photo-lightbox-prev,
.photo-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 2001;
  width: 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: background-color var(--transition);
}

.photo-lightbox-prev { left: var(--space-4); }
.photo-lightbox-next { right: var(--space-4); }

.photo-lightbox-prev:hover,
.photo-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.photo-lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.photo-lightbox-counter {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

/* Recipe Card Thumbnail */
.recipe-card-photo-link {
  display: block;
  text-decoration: none;
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.recipe-card-thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}

.recipe-card-photo-link:hover .recipe-card-thumbnail {
  transform: scale(1.03);
}

.recipe-card-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--green-50), var(--green-100));
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-card-placeholder-icon {
  width: 40px;
  height: 40px;
  color: var(--green-300);
}

/* Responsive adjustments for photo gallery */
@media (max-width: 768px) {
  .photo-gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-2);
  }

  .photo-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .photo-dropzone {
    padding: var(--space-4);
  }

  .photo-lightbox-prev,
  .photo-lightbox-next {
    width: 36px;
    height: 48px;
    font-size: 1.5rem;
  }

  .recipe-card-thumbnail,
  .recipe-card-placeholder {
    height: 140px;
  }

  .recipe-card {
    min-height: auto;
  }

  .recipe-card-header {
    min-height: auto;
    margin-bottom: 0.25rem;
    margin-top: 0.5rem;
  }

  .recipe-author {
    margin-bottom: 0.5rem;
    min-height: auto;
  }

  .recipe-card-content {
    gap: 0.35rem;
  }

  .recipe-card-content p {
    margin: 0;
  }

  .recipe-card-footer {
    min-height: auto;
    margin-top: 0.5rem;
  }
}

/* ============================================
   ICON UTILITY CLASSES
   ============================================ */
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }
.icon-2xl { width: 28px; height: 28px; }

/* ============================================
   HAMBURGER MENU
   ============================================ */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--gray-600);
  border-radius: var(--radius-md);
  transition: background var(--transition);
}

.hamburger-btn:hover {
  background: var(--gray-100);
}

/* Mobile menu auth section — hidden on desktop */
.mobile-menu-auth {
  display: none;
}

.mobile-menu-user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.mobile-menu-auth-links {
  display: flex;
  flex-direction: column;
}

.mobile-menu-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.25rem 0;
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Hide search bar and auth row on mobile — they live in the hamburger menu */
  .nav-b-search {
    display: none;
  }

  .nav-b-auth {
    display: none;
  }

  /* Show auth inside the mobile menu */
  .mobile-menu-auth {
    display: block;
  }

  /* Compact top bar: just logo + hamburger */
  .nav-b-top {
    padding: var(--space-2) var(--space-4);
    gap: var(--space-3);
  }

  .navbar .nav-b-bottom {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.25rem 1rem 0.5rem;
    max-height: 70vh;
    overflow-y: auto;
    gap: 0 !important;
    height: auto;
  }

  .navbar .nav-b-bottom.nav-b-bottom--open {
    display: flex;
  }

  .navbar .nav-b-bottom .nav-link {
    padding: 0.4rem 0.75rem !important;
    border-radius: 6px;
    width: 100%;
    justify-content: flex-start;
    font-size: 0.9rem;
    gap: 0.4rem;
  }

  .navbar .nav-b-bottom .nav-link:hover {
    background: var(--gray-100);
  }

  /* Kill form wrapper margin from button_to */
  .navbar .nav-b-bottom form,
  .mobile-menu-auth form {
    margin: 0;
    padding: 0;
  }

  .nav-b-divider {
    display: none;
  }
}

/* ============================================
   NAV LINK ADMIN STYLE
   ============================================ */
.nav-link-admin {
  color: #e74c3c;
}

/* ============================================
   NAV SEARCH FORM
   ============================================ */
.nav-search-form {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}

/* ============================================
   FOOTER STYLES (replacing inline)
   ============================================ */
.footer-branding {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-logo {
  height: 24px;
  width: auto;
}

.footer-disclaimer {
  margin: 1rem 0;
  padding: 1rem;
  background: #fff3cd;
  border-radius: 8px;
  display: flex;
  align-items: start;
  gap: 0.5rem;
  color: #856404;
}

.footer-disclaimer-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #856404;
}

.footer-links {
  margin: 1rem 0;
}

.footer-copyright {
  font-size: 0.9rem;
  color: #999;
}

/* ============================================
   RESPONSIVE UTILITY CLASSES
   ============================================ */

/* Form Grids */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

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

/* Stat Grids */
.stat-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Page Headers */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-header h1,
.page-header h3 {
  margin: 0;
}

.page-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Detail Headers */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 1rem;
}

.detail-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Nested Field Rows */
.nested-field-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.field-name { flex: 2; }
.field-link { flex: 1; font-size: 0.9rem; color: #666; }
.field-cost { flex: 0 0 80px; font-size: 0.9rem; }
.field-remove {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Info Tables */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid #eee;
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table td {
  padding: 0.75rem 0;
}

.info-table td:first-child {
  font-weight: bold;
  width: 40%;
}

/* Responsive Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.data-table thead tr {
  border-bottom: 2px solid #ddd;
}

.data-table tbody tr {
  border-bottom: 1px solid #eee;
}

.data-table th,
.data-table td {
  padding: 1rem 0.75rem;
}

.data-table th {
  text-align: left;
}

.data-table td.text-center,
.data-table th.text-center {
  text-align: center;
}

/* Stat Boxes */
.stat-box {
  text-align: center;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 6px;
}

.stat-box-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--green-600);
}

.stat-box-value-lg {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--green-600);
}

.stat-box-label {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}

/* View Toggle Buttons */
.view-toggle-btn {
  padding: 0.5rem 1rem;
}

/* ============================================
   RECIPE SHOW PAGE CLASSES
   ============================================ */

/* Save Dropdown */
.save-dropdown {
  position: relative;
  display: inline-block;
}

.save-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 220px;
  z-index: 100;
  padding: 0.5rem 0;
}

.save-dropdown-item {
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.save-dropdown-item-name {
  font-size: 0.9rem;
}

.save-dropdown-divider {
  border-top: 1px solid #eee;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}

.save-dropdown-new {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--green-600);
  text-decoration: none;
  font-size: 0.9rem;
}

.save-dropdown-empty {
  padding: 0.75rem 1rem;
  text-align: center;
}

.save-dropdown-empty p {
  color: #666;
  font-size: 0.85rem;
  margin: 0 0 0.5rem 0;
}

/* Mood Bars */
.mood-bar-row {
  margin-bottom: 0.5rem;
}

.mood-bar-row:last-child {
  margin-bottom: 0;
}

.mood-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.mood-bar-label {
  font-weight: 500;
}

.mood-bar-score {
  color: var(--green-600);
  font-size: 0.9rem;
}

.mood-bar-track {
  background: var(--green-100);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}

.mood-bar-track-lg {
  height: 8px;
}

.mood-bar-fill {
  background: linear-gradient(90deg, var(--green-500), var(--green-600));
  height: 100%;
}

/* Dosage Highlight */
.dosage-highlight {
  font-size: 1.5rem;
  color: var(--forest-green);
  margin: 1rem 0;
  padding: 1rem;
  background: #f0f8f0;
  border-radius: 8px;
  text-align: center;
}

.dosage-subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Rating Section */
.your-rating-box {
  background: #e8f5e9;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.rating-form-box {
  background: #f4f1e8;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Report Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

.modal-content {
  background: white;
  max-width: 500px;
  margin: 100px auto;
  padding: 2rem;
  border-radius: 8px;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Rating Feedback */
.rating-feedback-item {
  border-left: 4px solid var(--gold);
  padding-left: 1rem;
  margin: 1rem 0;
}

.rating-feedback-meta {
  font-size: 0.85rem;
  color: #999;
}

/* Cost Breakdown Grid */
.cost-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
}

.cost-stat-value {
  font-size: 1.2rem;
  margin: 0.25rem 0 0;
}

/* Recipe Metadata Row */
.recipe-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0;
}

/* Recipe Rating Display */
.recipe-rating-display {
  margin: 1.5rem 0;
}

.recipe-rating-large {
  font-size: 2rem;
}

.recipe-rating-count {
  color: #666;
  margin-left: 1rem;
}

/* Forked Info */
.recipe-forked-info {
  color: #888;
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
}

/* ============================================
   DOSAGE CALCULATOR PAGE CLASSES
   ============================================ */
.mode-toggle-group {
  display: inline-flex;
  gap: 0.5rem;
  background: var(--gray-100);
  padding: 0.25rem;
  border-radius: 8px;
}

.mode-toggle {
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
  color: var(--gray-600);
}

.mode-toggle.active {
  background: var(--green-600);
  color: white;
  font-weight: 600;
}

.input-with-unit {
  display: flex;
  gap: 0.5rem;
}

.input-with-unit input,
.input-with-unit .input-main {
  flex: 2;
}

.input-with-unit select,
.input-with-unit .input-unit {
  flex: 1;
}

.results-card {
  background: linear-gradient(135deg, #f4f1e8 0%, #e8e4d8 100%);
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
  border: 2px solid var(--green-600);
}

.results-card-inner {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
}

.results-card-inner-alt {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  border: 2px solid var(--green-600);
}

.results-card-recipe {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  border: 2px solid var(--green-800);
}

.stat-box-parchment {
  text-align: center;
  background: #f4f1e8;
  padding: 1.5rem;
  border-radius: 8px;
}

.safety-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff9e6;
  border-left: 4px solid var(--green-600);
  border-radius: 4px;
}

.calculator-cta {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #ddd;
  text-align: center;
}

.calculator-step {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
}

.calculator-step-locked {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  color: #999;
}

.recipe-stats-box {
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* ============================================
   STRAIN SHOW PAGE CLASSES
   ============================================ */
.mood-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.mood-chart-container {
  max-width: 400px;
  margin: 0 auto;
}

.dominant-effect-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--green-50);
  border-radius: 8px;
}

.dominant-effect-box p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.terpene-note {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--green-100);
  border-radius: 8px;
  border-left: 4px solid var(--green-600);
}

.terpene-note p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--green-800);
}

.terpene-inline {
  display: inline-block;
  margin-right: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ============================================
   DIRECTORY TABS
   ============================================ */
.directory-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--gray-200);
}

.directory-tab {
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.directory-tab:hover {
  color: var(--green-700);
  border-bottom-color: var(--green-300);
}

.directory-tab.active {
  color: var(--green-700);
  border-bottom-color: var(--green-600);
}

/* ============================================
   STRAINS INDEX PAGE CLASSES
   ============================================ */
.strain-notes-box {
  margin: 1rem 0;
  padding: 0.75rem;
  background: #f4f1e8;
  border-radius: 8px;
}

.strain-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.strain-table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

/* ============================================
   ADMIN DASHBOARD CLASSES
   ============================================ */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-growth-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-report-stat {
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
}

.admin-report-stat h3 {
  margin: 0;
  font-size: 2rem;
}

.admin-report-stat p {
  margin: 0.5rem 0 0 0;
}

.admin-activity-item {
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--green-500);
}

.admin-activity-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.admin-activity-meta {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* ============================================
   GENERAL UTILITY CLASSES
   ============================================ */
.text-muted { color: #666; }
.text-muted-light { color: #999; }
.text-green { color: var(--green-600); }
.text-green-bold { color: var(--green-600); font-weight: bold; }
.text-sm { font-size: 0.85rem; }
.text-italic { font-style: italic; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-half { margin-bottom: 0.5rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-quarter { margin-bottom: 0.25rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.gap-half { gap: 0.5rem; }
.gap-1 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.whitespace-pre { white-space: pre-line; }
.back-link { text-align: center; margin: 2rem 0; }

.btn-icon-inline {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.btn-icon-green {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--green-600);
  font-size: 0.85rem;
  padding: 0;
}

.btn-icon-muted {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 0.85rem;
  padding: 0;
}

.btn-report {
  background: #dc3545;
  color: white;
}

.recipe-link-green {
  color: var(--green-600);
  text-decoration: underline;
}

.ingredient-list {
  padding-left: 1.5rem;
  margin: 0;
}

.ingredient-list li {
  margin-bottom: 0.5rem;
}

.equipment-list {
  padding-left: 1.5rem;
  margin: 0;
}

.equipment-list li {
  margin-bottom: 0.5rem;
}

.cost-list {
  padding-left: 1.5rem;
  margin: 0 0 1rem;
}

.cost-list li {
  margin-bottom: 0.25rem;
}

.badge-product-type {
  background: #4a7029;
  color: white;
}

.badge-terpene {
  background: #e8e4d8;
  color: #5c4033;
  margin-top: 0.25rem;
}

.terpene-total {
  color: var(--gold);
  font-weight: bold;
}

.terpene-value {
  color: var(--green-600);
}

.legacy-data {
  font-size: 0.85rem;
  color: #999;
  font-style: italic;
}

.cbd-info-box {
  padding: 1rem;
  background: #f0f8f0;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.ratio-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.hint-text {
  color: #999;
}

.hint-text-dark {
  color: #666;
}

.strong-green-lg {
  color: var(--green-600);
  font-size: 1.1rem;
  font-weight: bold;
}

.draft-card {
  background: #fff3cd;
  border-color: #ffc107;
}

.draft-text {
  color: #856404;
}

.tips-card {
  background: #fff3cd;
  border-color: #ffc107;
}

.infusion-faded {
  opacity: 0.7;
}

/* ============================================
   COLLAPSIBLE FILTER CARDS (MOBILE)
   ============================================ */
.collapsible-chevron {
  display: none;
}

@media (max-width: 768px) {
  .collapsible-header {
    cursor: pointer;
    margin-bottom: 0 !important;
  }

  .collapsible-header h3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .collapsible-chevron {
    display: inline;
    transition: transform 0.2s;
  }

  .collapsible-body {
    display: none;
    padding-top: 1rem;
  }

  .collapsible-body.collapsible-body--open {
    display: block;
  }

  .collapsible-body--open ~ .collapsible-chevron,
  .collapsible-card:has(.collapsible-body--open) .collapsible-chevron {
    transform: rotate(180deg);
  }
}

/* ============================================
   VIEW TOGGLE: TABLE / CARD RESPONSIVE
   ============================================ */
.desktop-hidden {
  display: none;
}

@media (max-width: 768px) {
  /* Force cards on mobile, hide table */
  .view-table {
    display: none !important;
  }

  .view-cards {
    display: block !important;
  }

  /* Hide view toggle on mobile since cards are forced */
  .view-toggle-btn {
    display: none;
  }

  /* Single-column card grids on mobile */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESPONSIVE: 768px
   ============================================ */
@media (max-width: 768px) {
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

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

  .stat-grid-3 {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header-actions {
    justify-content: flex-start;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-header-actions {
    width: 100%;
  }

  .nested-field-row {
    flex-wrap: wrap;
  }

  .field-link {
    flex: 1 1 100%;
  }

  .mood-profile-grid {
    grid-template-columns: 1fr;
  }

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

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

  .admin-activity-grid {
    grid-template-columns: 1fr;
  }

  .mode-toggle-group {
    flex-direction: column;
  }

  .mode-toggle {
    text-align: center;
  }

  .input-with-unit {
    flex-direction: column;
  }

  .modal-content {
    margin: 2rem 1rem;
  }

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

  /* nav-b-auth is fully hidden on mobile — auth lives in hamburger menu */
}

/* ============================================
   RESPONSIVE: 480px (Ultra-Compact)
   ============================================ */
@media (max-width: 480px) {
  :root {
    --text-4xl: 1.75rem;
    --text-3xl: 1.375rem;
    --text-2xl: 1.125rem;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .card {
    padding: var(--space-4);
  }

  .brand-link span {
    display: none;
  }

  .brand-logo {
    height: 40px;
  }

  .nav-user-text {
    display: none;
  }

  .stat-grid-2 {
    grid-template-columns: 1fr;
  }

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

  .admin-growth-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar-inner {
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat-item {
    flex: 0 0 45%;
    text-align: center;
  }

  .page-header-actions {
    flex-direction: column;
    width: 100%;
  }

  .page-header-actions .btn {
    width: 100%;
    text-align: center;
  }

  .detail-header-actions {
    flex-direction: column;
    width: 100%;
  }

  .detail-header-actions .btn,
  .detail-header-actions button {
    width: 100%;
    text-align: center;
  }

  .hero-banner-heading {
    font-size: 1.5rem;
  }

  .cost-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .results-card {
    padding: 1rem;
  }

  .stat-box-value-lg {
    font-size: 2rem;
  }
}

/* ============================================
   BLOG STYLES
   ============================================ */

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.blog-grid-related {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Blog Card */
.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  width: fit-content;
}

.blog-category-recipes { background: var(--green-100); color: var(--green-800); }
.blog-category-strains { background: #e0f2fe; color: #075985; }
.blog-category-guides { background: #fef3c7; color: #92400e; }
.blog-category-news { background: #ede9fe; color: #5b21b6; }
.blog-category-community { background: #fce7f3; color: #9d174d; }

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-card-title a {
  color: var(--gray-900);
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--green-700);
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: auto;
}

.blog-card-meta i {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

/* Blog Article */
.blog-article {
  max-width: 800px;
  margin: 0 auto;
}

.blog-article-header {
  margin-bottom: 2rem;
}

.blog-article-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0.75rem 0;
}

.blog-article-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.blog-article-meta i {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.blog-article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-tag {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: var(--green-50);
  color: var(--green-700);
  text-decoration: none;
  border: 1px solid var(--green-200);
}

.blog-tag:hover {
  background: var(--green-100);
}

.blog-article-image {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
}

.blog-article-image img {
  width: 100%;
  height: auto;
}

/* Blog Content - Markdown Prose Typography */
.blog-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--gray-800);
}

.blog-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.blog-content p {
  margin-bottom: 1.25rem;
}

.blog-content ul, .blog-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content blockquote {
  border-left: 3px solid var(--green-500);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--gray-600);
  font-style: italic;
}

.blog-content code {
  font-size: 0.9em;
  background: var(--gray-100);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.blog-content pre {
  background: var(--gray-100);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.blog-content pre code {
  background: none;
  padding: 0;
}

.blog-content a {
  color: var(--green-700);
  text-decoration: underline;
}

.blog-content a:hover {
  color: var(--green-900);
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.blog-content th, .blog-content td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-200);
  text-align: left;
}

.blog-content th {
  background: var(--gray-50);
  font-weight: 600;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Blog Related Posts */
.blog-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.blog-related h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Blog Responsive */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-article-header h1 {
    font-size: 1.75rem;
  }

  .blog-content {
    font-size: 1rem;
  }

  .blog-categories {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================
   BLOG EDITOR - Split Pane Preview
   ============================================ */
.blog-editor-panes {
  display: flex;
  gap: 1rem;
  min-height: 500px;
}

.blog-editor-editor-pane {
  flex: 1;
  min-width: 0;
}

.blog-editor-preview-pane {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  background: #fff;
  padding: 1rem;
  overflow-y: auto;
  max-height: 600px;
}

.blog-editor-preview-hidden {
  display: none;
}

@media (max-width: 768px) {
  .blog-editor-panes {
    flex-direction: column;
  }

  .blog-editor-preview-pane {
    max-height: 400px;
  }
}

/* ============================================
   BLOG GENERATE - Progress Bar
   ============================================ */
.blog-generate-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.blog-generate-progress-fill {
  height: 100%;
  background: var(--green-600);
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

.blog-generate-status {
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* ============================================
   BLOG REFINE - AI Refinement Panel
   ============================================ */
.blog-refine-panel {
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 0.75rem;
  background: var(--gray-50);
}

.blog-refine-prompt {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  resize: vertical;
}

.blog-refine-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================
   IMAGE SEARCH - Unsplash Panel
   ============================================ */
.image-search-panel {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  background: var(--gray-50);
}

.image-search-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.image-search-item {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.image-search-item:hover {
  border-color: var(--green-500);
}

.image-search-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.image-search-credit {
  font-size: 0.7rem;
  color: var(--gray-500);
  padding: 0.15rem 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   Mini Dosage Calculator (Blog Embed)
   ======================================== */

.mini-dosage-calculator {
  background: var(--gray-50, #f9fafb);
  border: 2px solid var(--green-500);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.mini-calc-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-600);
  margin-bottom: 1rem;
}

.mini-calc-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.mini-calc-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600, #4b5563);
  margin-bottom: 0.25rem;
}

.mini-calc-field input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
}

.mini-calc-field input:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.mini-calc-result {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.75rem;
  background: var(--green-50, #f0fdf4);
  border-radius: 8px;
  text-align: center;
  margin-bottom: 0.75rem;
}

.mini-calc-result span {
  color: var(--green-600);
}

.mini-calc-warning {
  background: #fef2f2;
  color: #991b1b;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.mini-calc-footer {
  font-size: 0.85rem;
  color: var(--gray-500, #6b7280);
  text-align: center;
}

.mini-calc-footer a {
  color: var(--green-600);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .mini-calc-fields {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PAGINATION (Pagy series-nav)
   ============================================ */
nav.pagy.series-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  margin: 2rem 0;
}

nav.pagy.series-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--green-700);
  background: white;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}

nav.pagy.series-nav a:hover:not([aria-disabled="true"]):not([aria-current="page"]) {
  background: var(--green-50);
  border-color: var(--green-300);
}

nav.pagy.series-nav a[aria-current="page"] {
  background: var(--green-700);
  border-color: var(--green-700);
  color: white;
}

nav.pagy.series-nav a[aria-disabled="true"] {
  color: var(--gray-300);
  cursor: default;
  border-color: var(--gray-100);
  background: var(--gray-50);
}

nav.pagy.series-nav a[role="separator"] {
  border: none;
  background: none;
  color: var(--gray-400);
  min-width: auto;
  padding: 0 0.25rem;
}
