/* Family Recipes - Theme & Design System */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --card-bg: rgba(22, 31, 53, 0.85);
  --card-hover: rgba(30, 42, 72, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(245, 158, 11, 0.5);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-amber: #f59e0b;
  --accent-orange: #ea580c;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --badge-amber-text: #fcd34d;
  --badge-blue-text: #93c5fd;
  --badge-green-text: #34d399;
  --alert-amber-bg: rgba(245, 158, 11, 0.15);
  --alert-amber-border: rgba(245, 158, 11, 0.4);
  --alert-amber-text: #fef3c7;
  --alert-amber-strong: #fef08a;
  --calc-pill-bg: rgba(245, 158, 11, 0.08);
  --calc-pill-border: rgba(245, 158, 11, 0.25);
  --calc-pill-value: #fcd34d;
  --input-weight-color: #fcd34d;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Georgia', Cambria, 'Times New Roman', serif;
}

html {
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, var(--bg-radial-1, rgba(234, 88, 12, 0.07)) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, var(--bg-radial-2, rgba(245, 158, 11, 0.05)) 0%, transparent 40%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  transition: background-color 0.25s ease, color 0.25s ease;
}


/* Container */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }
}

/* Navbar */
.navbar {
  background: rgba(11, 15, 25, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-amber));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 15px rgba(234, 88, 12, 0.3);
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--accent-amber);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 40px;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-amber);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex !important;
  }

  .nav-actions {
    display: none !important;
    position: absolute;
    top: calc(100% + 13px);
    left: -14px;
    right: -14px;
    background: rgba(11, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column !important;
    padding: 20px;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }

  .nav-actions.active {
    display: flex !important;
  }

  .nav-actions .btn,
  .nav-actions .user-badge {
    width: 100% !important;
    max-height: none !important;
    height: auto !important;
    min-height: 42px !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
  }

  .nav-actions .user-display-name {
    max-width: none !important;
  }

  .nav-meta-stack {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 6px 0 !important;
  }

  .nav-meta-stack .brand-column-btn {
    padding: 6px 16px !important;
    font-size: 0.85rem !important;
  }

  /* Mobile menu background on light themes */
  [data-theme-type="light"] .nav-actions,
  body[data-theme*="sunflower"] .nav-actions,
  html[data-theme*="sunflower"] .nav-actions,
  body[data-theme="parchment"] .nav-actions,
  html[data-theme="parchment"] .nav-actions,
  body[data-theme="mint"] .nav-actions,
  html[data-theme="mint"] .nav-actions,
  body[data-theme="daisy"] .nav-actions,
  html[data-theme="daisy"] .nav-actions {
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
  }


  .brand-title {
    font-size: 1.1rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-amber));
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(30, 42, 72, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Flash Messages */
.alerts {
  margin-top: 20px;
}

.alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.alert-info {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

/* Hero & Search Header */
.hero-header {
  padding: 40px 0 24px;
  text-align: center;
}

.hero-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 28px;
}

.search-bar-wrap {
  max-width: 650px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 20px 14px 46px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  -webkit-appearance: none;
  appearance: none;
}

.search-input:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

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

/* Category Filters */
.category-filter-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 20px 0;
  scrollbar-width: none;
  justify-content: center;
  flex-wrap: wrap;
  -webkit-overflow-scrolling: touch;
}

.category-filter-wrap::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  white-space: nowrap;
  touch-action: manipulation;
}

.category-pill:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.category-pill.active {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-amber));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

@media (max-width: 640px) {
  .hero-header {
    padding: 24px 0 16px;
  }

  .hero-header h1 {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .hero-header p {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .search-input {
    padding: 12px 16px 12px 42px;
    font-size: 16px;
  }

  .category-filter-wrap {
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 14px 4px 6px;
  }

  .category-pill {
    padding: 7px 15px;
    font-size: 0.85rem;
  }
}

/* Recipe Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 28px;
  margin: 30px 0 60px;
}

@media (max-width: 640px) {
  .recipe-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 18px 0 40px;
  }
}

.recipe-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.recipe-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: var(--shadow-lg);
  background: var(--card-hover);
}

.card-image-wrap {
  width: 100%;
  height: 200px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recipe-card:hover .card-img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-amber);
  border: 1px solid var(--border);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Detail View */
.detail-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 30px 0;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.detail-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.detail-header {
  padding: 30px;
  background: var(--card-bg);
}

.detail-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-title-col {
  flex: 1 1 280px;
}

.detail-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.25;
}

.detail-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.detail-actions-bar .action-btn {
  white-space: nowrap;
}

.detail-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  padding: 18px 30px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin: 0;
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 90px;
}

.stat-box-contributor {
  margin-left: auto;
}

.stat-box-contributor .contributor-value {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-amber);
  line-height: 1.2;
}

.detail-meta-bar .stat-box:not(:last-child):not(.stat-box-contributor) {
  position: relative;
  padding-right: 24px;
}

.detail-meta-bar .stat-box:not(:last-child):not(.stat-box-contributor)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border);
  opacity: 0.7;
}

.btn-change-contributor {
  padding: 2px 8px;
  font-size: 0.72rem;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border-color: rgba(245, 158, 11, 0.4);
}

.stat-box-advisor {
  cursor: pointer;
  min-width: max-content;
  user-select: none;
}

.stat-advisor-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.advisor-action-value {
  color: #38bdf8 !important;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.stat-box-advisor:hover .advisor-action-value {
  color: #7dd3fc !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Executive Culinary Review Score Chip (Left of Review & Swaps) */
.advisor-meta-score-chip {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.advisor-meta-score-chip .score-icon {
  font-size: 0.75rem;
  line-height: 1;
}

.advisor-meta-score-chip .score-num {
  font-weight: 800;
}

.advisor-meta-score-chip .score-max {
  font-size: 0.68rem;
  opacity: 0.75;
  font-weight: 600;
}

.advisor-meta-score-chip.score-high {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}

.advisor-meta-score-chip.score-mid {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}

.advisor-meta-score-chip.score-low {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

.advisor-meta-score-chip.score-pending {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted, #94a3b8);
  border-color: rgba(148, 163, 184, 0.25);
}

/* Allergen Warnings Chip (Right of Review & Swaps) */
.advisor-meta-allergen-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.advisor-meta-allergen-chip.has-allergens {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.advisor-meta-allergen-chip.is-safe {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 36px;
  margin-bottom: 60px;
}

@media (max-width: 860px) {
  .detail-content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* Dedicated Allergen Advisory & Safe Alternatives Panel */
.allergen-advisory-panel {
  border-left: 4px solid #f87171 !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.allergen-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.allergen-panel-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: #f87171;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-advisor-advisory-link {
  font-size: 0.76rem;
  padding: 3px 10px;
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  border-radius: 9999px;
  transition: all 0.15s ease;
}

.btn-advisor-advisory-link:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #7dd3fc;
}

.allergen-notice-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.allergen-notice-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.allergen-notice-text {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.allergen-swaps-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.allergen-swaps-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 6px;
}

.allergen-swaps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.allergen-swap-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.allergen-swap-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.allergen-swap-name {
  font-size: 0.86rem;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
}

.allergen-chip-bullet {
  font-size: 0.8rem;
}

.allergen-swap-tip {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.allergen-raw-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-line;
}

.panel-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-amber);
}

/* Ingredients Checklist */
.ingredient-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  min-height: 48px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  touch-action: manipulation;
}

.ingredient-item:hover {
  background: var(--card-hover);
}

.ingredient-item.checked {
  opacity: 0.45;
  text-decoration: line-through;
}

.ingredient-checkbox {
  accent-color: var(--accent-amber);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  touch-action: manipulation;
}

/* Steps List */
.step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-item {
  display: flex;
  gap: 18px;
  position: relative;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-amber));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}

.step-content {
  flex-grow: 1;
  padding-top: 4px;
}

.step-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.step-tip {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.step-tip strong {
  color: var(--accent-amber);
  font-weight: 700;
}

@media (max-width: 640px) {
  .detail-hero {
    margin: 16px 0;
  }

  .detail-img {
    max-height: 240px;
  }

  .detail-header {
    padding: 20px 16px;
  }

  .detail-title {
    font-size: 1.7rem;
  }

  .detail-actions-bar {
    width: 100%;
    gap: 8px;
  }

  .detail-actions-bar .action-btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
    padding: 10px 8px;
    font-size: 0.85rem;
  }

  .detail-actions-bar form {
    flex: 1 1 auto;
    display: flex;
  }

  .detail-actions-bar form .action-btn {
    width: 100%;
  }

  .detail-meta-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
    padding: 16px 20px;
  }

  .detail-meta-bar .stat-box:not(:last-child):not(.stat-box-contributor) {
    padding-right: 0;
  }

  .detail-meta-bar .stat-box:not(:last-child):not(.stat-box-contributor)::after {
    display: none;
  }

  .stat-box-contributor {
    grid-column: 1 / -1;
    margin-left: 0;
    border-top: 1px dashed var(--border);
    padding-top: 12px;
    margin-top: 4px;
  }

  .stat-box-advisor {
    grid-column: 1 / -1;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0;
    border-top: 1px dashed var(--border);
    padding-top: 12px;
    margin-top: 4px;
  }

  .stat-advisor-content {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 10px !important;
    align-items: center !important;
    width: 100% !important;
  }

  .advisor-meta-allergen-chip {
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
    display: inline-flex !important;
    line-height: 1.35 !important;
  }

  .panel {
    padding: 18px 14px;
  }

  .panel-title {
    font-size: 1.2rem;
  }

  .step-item {
    gap: 12px;
  }

  .step-num {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .step-text {
    font-size: 0.98rem;
  }
}

/* Forms */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 860px;
  margin: 30px auto 60px;
}

.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #cbd5e1;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom */
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-amber);
}

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

/* Ingredient & Step Form Cards */
.ingredient-form-row, .step-form-row {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  transition: border-color 0.2s ease;
}

.ingredient-form-row:focus-within, .step-form-row:focus-within {
  border-color: rgba(245, 158, 11, 0.4);
}

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

.ing-title {
  font-weight: 700;
  color: var(--accent-amber);
  font-size: 0.95rem;
}

.ing-sublabel {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ing-row-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ing-col {
  width: 100%;
}

.btn-remove-row {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.btn-remove-row:hover {
  background: #ef4444;
  color: #fff;
}

@media (max-width: 768px) {
  .form-card {
    padding: 20px 14px;
    margin: 16px auto 36px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ingredient-form-row, .step-form-row {
    padding: 12px 14px;
  }
}

/* Admin Contributor Fields */
.admin-contributor-fields {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contributor-field-col {
  flex: 1 1 200px;
  min-width: 0;
}

@media (max-width: 600px) {
  .contributor-field-col {
    flex: 1 1 100%;
  }
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
  .modal-dialog {
    padding: 18px 14px;
  }
}

/* Login Card */
.login-card {
  max-width: 480px;
  margin: 60px auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

@media (max-width: 480px) {
  .login-card {
    margin: 24px auto;
    padding: 24px 16px;
  }
}

/* Responsive Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  min-width: 580px;
  border-collapse: collapse;
}

/* Recipe Photo Gallery & Management */
.existing-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.photo-manage-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.photo-manage-card.is-cover {
  border-color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.photo-manage-card.marked-delete {
  opacity: 0.35;
  filter: grayscale(0.9);
}

.photo-thumb-wrap {
  width: 100%;
  height: 105px;
  position: relative;
  background: #0f172a;
}

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

.cover-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--accent-amber);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.photo-manage-actions {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.7);
  gap: 6px;
}

.cover-radio-label, .delete-check-label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.cover-radio-label {
  color: var(--accent-amber);
  font-weight: 600;
}

.delete-check-label {
  color: #fca5a5;
}

/* Detail Page Gallery Bar */
.recipe-gallery-bar {
  margin: 16px 0 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.gallery-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.gallery-thumbnails {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.gallery-thumb-card {
  position: relative;
  width: 120px;
  height: 85px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #0f172a;
  touch-action: manipulation;
}

.gallery-thumb-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.gallery-thumb-card.active-thumb {
  border-color: var(--accent-amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

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

.gallery-cover-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--accent-amber);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.btn-make-cover {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(11, 15, 25, 0.88);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.btn-make-cover:hover {
  background: var(--accent-amber);
  color: #000;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==============================================================================
   SOURDOUGH STUDIO DESIGN SYSTEM & COMPONENTS
   ============================================================================== */

.sourdough-studio-container {
  padding: 24px 0 60px 0;
  width: 100%;
}

.studio-breadcrumbs {
  margin-bottom: 20px;
}

.studio-breadcrumbs a {
  color: var(--accent-amber);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.studio-breadcrumbs a:hover {
  text-decoration: underline;
  transform: translateX(-2px);
}

/* Studio Hero */
.studio-hero {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent-amber);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.studio-hero::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-amber) 0%, transparent 70%);
  opacity: 0.08;
  pointer-events: none;
}

.studio-hero-content {
  flex: 1 1 500px;
}

.studio-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  color: var(--accent-amber);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-amber);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-amber);
  animation: pulse-glow 2s infinite ease-in-out;
}

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

.studio-hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.studio-hero-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 650px;
  line-height: 1.5;
}

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

.btn-glow {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-amber));
  color: #0b0f19 !important;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.btn-glow:hover {
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
  transform: translateY(-2px);
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
  display: block;
  text-align: center;
}

/* Metrics Bar */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.metric-card:hover {
  background: var(--card-hover);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}

.metric-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
}

/* Studio Section */
.studio-section {
  margin-bottom: 40px;
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 2px;
}

.section-actions-inline {
  display: flex;
  gap: 10px;
}

/* Starter Cards Grid */
.starter-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.starter-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.starter-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: var(--shadow-md);
}

.starter-card-media {
  position: relative;
  width: 100%;
  height: 200px;
  background: #111827;
  overflow: hidden;
}

.starter-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.starter-card:hover .starter-cover-img {
  transform: scale(1.04);
}

.starter-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.starter-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-active {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-resting {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-archived {
  background: rgba(100, 116, 139, 0.25);
  color: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, 0.4);
}

.starter-lineage-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.starter-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.starter-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.starter-card-name {
  font-size: 1.35rem;
  font-weight: 700;
}

.starter-card-name a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.starter-card-name a:hover {
  color: var(--accent-amber);
}

.starter-jar-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.starter-flour-tag {
  font-size: 0.82rem;
  color: var(--accent-amber);
  margin-bottom: 14px;
  font-weight: 500;
}

.starter-stats-list {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}

.starter-stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 3px 0;
}

.starter-stat-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-name {
  color: var(--text-secondary);
}

.stat-val {
  color: var(--text-primary);
  font-weight: 600;
}

.stat-highlight {
  color: #fcd34d;
}

.starter-card-notes {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.starter-card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.starter-footer-row {
  display: flex;
  gap: 8px;
}

.starter-footer-row .btn {
  flex: 1;
  text-align: center;
}

/* Advisor Widget Card */
.advisor-card {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.08) 0%, rgba(245, 158, 11, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
}

.advisor-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-amber);
  margin-bottom: 6px;
}

.advisor-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.advisor-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.advisor-interactive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.advisor-input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.range-with-display {
  display: flex;
  align-items: center;
  gap: 14px;
}

.slider-input {
  flex: 1;
  accent-color: var(--accent-amber);
  height: 6px;
  border-radius: 4px;
  cursor: pointer;
}

.slider-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  min-width: 55px;
  text-align: center;
}

.advisor-output {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.advisor-rec-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  color: var(--accent-amber);
  margin-bottom: 8px;
}

.rec-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-amber);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-amber);
}

.advisor-rec-text {
  font-size: 0.94rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.advisor-rec-text strong {
  color: var(--accent-amber);
  font-weight: 700;
}

.advisor-rec-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

/* Lineage Tree Section */
.lineage-tree-wrapper {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.tree-root-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-sizing: border-box;
}

.tree-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.tree-node-root {
  border-left: 4px solid var(--accent-amber);
}

.tree-node-child {
  border-left: 4px solid #10b981;
}

.node-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-content {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.node-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.node-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  word-break: break-word;
}

.node-name:hover {
  color: var(--accent-amber);
}

.node-badge-root {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  display: inline-block;
}

.node-badge-child {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  display: inline-block;
}

.node-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 3px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.node-branch-count {
  font-size: 0.78rem;
  color: #38bdf8;
  margin-top: 3px;
  word-break: break-word;
}

.node-branch-btn {
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

.tree-children-container {
  margin-left: 36px;
  padding-left: 18px;
  border-left: 2px dashed rgba(245, 158, 11, 0.3);
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.tree-branch-item {
  position: relative;
  min-width: 0;
}

.tree-connector-line {
  position: absolute;
  top: 50%;
  left: -18px;
  width: 18px;
  height: 2px;
  background: rgba(245, 158, 11, 0.3);
}

@media (max-width: 768px) {
  .tree-root-container {
    padding: 14px 12px;
  }

  .tree-children-container {
    margin-left: 16px;
    padding-left: 12px;
    margin-top: 10px;
    gap: 10px;
  }

  .tree-connector-line {
    left: -12px;
    width: 12px;
  }

  .tree-node {
    padding: 10px 10px;
    gap: 10px;
  }

  .node-icon {
    font-size: 1.45rem;
  }

  .node-title-row {
    gap: 4px 8px;
  }

  .node-name {
    font-size: 1.05rem;
  }

  .node-badge-root,
  .node-badge-child {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .node-meta {
    font-size: 0.78rem;
  }

  .node-branch-count {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .tree-root-container {
    padding: 12px 8px;
  }

  .tree-children-container {
    margin-left: 10px;
    padding-left: 8px;
    margin-top: 8px;
    gap: 8px;
  }

  .tree-connector-line {
    left: -8px;
    width: 8px;
  }

  .tree-node {
    padding: 8px 8px;
    gap: 8px;
  }

  .node-icon {
    font-size: 1.3rem;
  }

  .node-name {
    font-size: 0.98rem;
  }

  .node-branch-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
}

/* Table Styling for Feeding Log */
.table-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-sourdough {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table-sourdough th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table-sourdough td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: middle;
}

.table-sourdough tr:hover td {
  background: var(--card-hover);
}

.table-starter-link {
  color: var(--text-primary);
  text-decoration: none;
}

.table-starter-link:hover strong {
  color: var(--accent-amber);
}

.badge-ratio {
  background: rgba(245, 158, 11, 0.15);
  color: var(--badge-amber-text, var(--accent-amber));
  font-family: monospace;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-est-peak {
  background: rgba(59, 130, 246, 0.15);
  color: var(--badge-blue-text, #2563eb);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-multiplier {
  background: rgba(16, 185, 129, 0.18);
  color: var(--badge-green-text, #059669);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.notes-cell {
  max-width: 220px;
}

.notes-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}

.table-photo-thumb img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}

.table-photo-thumb img:hover {
  transform: scale(1.15);
  border-color: var(--accent-amber);
}

.sub-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.text-nowrap {
  white-space: nowrap;
}

.text-accent {
  color: var(--accent-amber);
}

/* ==========================================================================
   Sourdough Studio: Dead Phase, Custodian & Starter Maturity
   ========================================================================== */

/* Dead Phase Feeds Highlight */
.feed-row-dead-phase td {
  background: rgba(139, 92, 246, 0.08) !important;
  border-bottom-color: rgba(139, 92, 246, 0.2) !important;
}

.feed-row-dead-phase:hover td {
  background: rgba(139, 92, 246, 0.16) !important;
}

.feed-row-dead-phase td:first-child {
  border-left: 3px solid #8b5cf6;
}

.sub-dead-phase-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.18);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 3px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-dead-phase {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.45);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Dead Phase Form Card */
.dead-phase-card {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  transition: all 0.2s ease;
}

.dead-phase-card:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
}

.dead-phase-toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.dead-phase-toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #8b5cf6;
  margin-top: 3px;
  cursor: pointer;
}

.dead-phase-toggle-body {
  flex: 1;
}

.dead-phase-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dead-phase-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* Custodian Badges & Controls */
.meta-custodian-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}

.meta-custodian-pill:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--accent-amber);
  transform: translateY(-1px);
}

.pill-reassign-btn {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-amber);
  color: #000;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 4px;
  display: inline-block;
  transition: opacity 0.2s ease;
}

.pill-reassign-btn:hover {
  opacity: 0.9;
}

.compact-custodian-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-full);
  padding: 1px 7px;
  margin-left: 6px;
}

/* Starter Maturity & Ecological Health Section */
.starter-maturity-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.starter-maturity-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.maturity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.maturity-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.maturity-pulse-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.maturity-pre-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.maturity-main-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2px 0 0 0;
}

.maturity-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-maturity-stage {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-maturity-stage.stage-purple {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.badge-maturity-stage.stage-teal {
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.35);
}

.badge-maturity-stage.stage-amber {
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-maturity-stage.stage-blue {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-maturity-stage.stage-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.25));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.maturity-percent-pill {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Stepper Track */
.maturity-stepper-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 20px 0;
  position: relative;
  overflow-x: auto;
  padding: 4px 0;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 90px;
  z-index: 2;
  opacity: 0.45;
  transition: all 0.3s ease;
}

.stepper-step.step-completed {
  opacity: 0.85;
}

.stepper-step.step-active {
  opacity: 1;
  transform: scale(1.05);
}

.step-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 6px;
  transition: all 0.3s ease;
}

.step-completed .step-marker {
  background: var(--card-bg);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.step-active .step-marker {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #0b0f19;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

.dead-phase-active .step-marker {
  background: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.5) !important;
}

.step-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.step-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.stepper-line {
  flex: 1;
  height: 3px;
  background: var(--border);
  margin: 0 6px;
  margin-bottom: 22px;
  z-index: 1;
  transition: background 0.3s ease;
}

.stepper-line.line-filled {
  background: var(--accent-amber);
}

/* Maturity Insight Content */
.maturity-insight-content {
  margin-top: 16px;
}

.maturity-description-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 12px;
}

.maturity-advice-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.advice-icon {
  font-size: 1.2rem;
  line-height: 1.2;
}

.advice-body {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.45;
}

/* Data Highlights Bar */
.maturity-data-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.mdh-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mdh-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.mdh-val {
  font-size: 1rem;
  color: var(--text-primary);
}

.text-purple {
  color: #a78bfa !important;
}

.compact-maturity-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 1px 7px;
  margin-left: 6px;
  white-space: nowrap;
}

.compact-maturity-chip.stage-purple {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.compact-maturity-chip.stage-teal {
  background: rgba(20, 184, 166, 0.16);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.35);
}

.compact-maturity-chip.stage-amber {
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.compact-maturity-chip.stage-blue {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.compact-maturity-chip.stage-gold {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

/* Recipes Mini Grid */
.recipes-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.recipe-mini-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  text-decoration: none;
  transition: all 0.2s ease;
}

.recipe-mini-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.4);
}

.mini-media {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  background: #111827;
}

.mini-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.mini-content {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.mini-category {
  font-size: 0.7rem;
  color: var(--accent-amber);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.mini-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Starter Profile Card (Detail Page) */
.starter-profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  gap: 28px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
}

.starter-profile-media {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #111827;
  flex-shrink: 0;
}

.starter-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.starter-profile-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.starter-profile-info {
  flex: 1 1 380px;
  display: flex;
  flex-direction: column;
}

.starter-profile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.starter-profile-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.starter-profile-flour {
  font-size: 0.95rem;
  color: var(--accent-amber);
  margin-top: 4px;
}

.starter-profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.starter-profile-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.meta-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.meta-lineage {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.meta-lineage a {
  color: #fcd34d;
  text-decoration: underline;
}

.starter-profile-notes {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 14px;
}

.starter-children-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: auto;
}

.children-box-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.children-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.child-tag {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.82rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.15s ease;
}

.child-tag:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #fff;
}

/* 1-Quart Jar Headroom Guard Section */
.jar-safety-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.jar-safety-icon {
  font-size: 2.5rem;
  width: 56px;
  height: 56px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jar-safety-body {
  flex: 1;
}

.jar-safety-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.jar-safety-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.safety-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-safe {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.jar-safety-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.headroom-meter-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.headroom-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.safe-zone-label {
  color: #34d399;
}

.threshold-label {
  color: #f59e0b;
}

.headroom-bar {
  display: flex;
  height: 22px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.headroom-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  transition: width 0.3s ease;
}

.headroom-fill.safe {
  background: linear-gradient(90deg, #10b981, #059669);
}

.headroom-fill.caution {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.headroom-fill.danger {
  background: linear-gradient(90deg, #ef4444, #b91c1c);
}

/* Photo Gallery & Rise Progression */
.photo-timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.photo-timeline-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.photo-timeline-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.4);
}

.photo-media-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  background: #111827;
}

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

.photo-multiplier-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(16, 185, 129, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.photo-hours-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(4px);
  color: #fcd34d;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.photo-caption-body {
  padding: 12px;
}

.photo-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.photo-notes {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Danger Zone */
.danger-zone-card {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.danger-zone-card h4 {
  color: #f87171;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.danger-zone-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Forms & Inputs */
.form-card-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.form-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.form-icon {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.form-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 2px;
}

.sourdough-entry-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lineage-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: #34d399;
}

.callout-icon {
  font-size: 1.5rem;
}

.quick-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.quick-chip-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.feeding-weights-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 14px;
}

.weights-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.input-weight {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--input-weight-color, #fcd34d);
}

.quick-ratios-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.live-calc-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.calc-metric-pill {
  background: var(--calc-pill-bg, rgba(245, 158, 11, 0.08));
  border: 1px solid var(--calc-pill-border, rgba(245, 158, 11, 0.25));
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.calc-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.calc-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--calc-pill-value, #fcd34d);
  margin-top: 2px;
}

.jar-alert-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-top: 14px;
}

.alert-amber {
  background: var(--alert-amber-bg, rgba(245, 158, 11, 0.15));
  border: 1px solid var(--alert-amber-border, rgba(245, 158, 11, 0.4));
  color: var(--alert-amber-text, #fef3c7);
}

.alert-amber strong {
  color: var(--alert-amber-strong, #fef08a);
}

.jar-alert-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.jar-alert-text {
  font-size: 0.88rem;
  line-height: 1.45;
}

.env-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.form-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* Calculator Page Tabs */
.calc-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.calc-tab-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.calc-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.2));
  border-color: var(--accent-amber);
  color: #fcd34d;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.calc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.calc-card-header {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.calc-card-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.mode2-recipe-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 22px;
}

.recipe-box-title {
  color: #34d399;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.weights-callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.weight-callout {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.wc-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.wc-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #34d399;
  margin-top: 4px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 26px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ==============================================================================
   VERSION BADGE & FOOTER LINK
   ============================================================================== */
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-meta-column,
.nav-meta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}


.brand-column-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: var(--radius-full, 9999px);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  line-height: 1.3;
  outline: none;
  border: 1px solid var(--border);
}

.theme-column-btn {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.theme-column-btn:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--accent-amber);
  color: #fff;
  transform: translateY(-1px);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full, 9999px);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
  line-height: 1.3;
  outline: none;
}

.version-badge:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.7);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

.footer-meta-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}


.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-version-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-version-link {
  background: none;
  border: none;
  color: var(--accent-amber);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.8rem;
  padding: 0;
  transition: color 0.15s ease;
}

.footer-version-link:hover {
  color: #fcd34d;
}

/* ==============================================================================
   SITE ANNOUNCEMENT BAR
   ============================================================================== */
.site-announcement-bar {
  width: 100%;
  padding: 10px 18px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.site-announcement-bar.banner-info {
  background: linear-gradient(90deg, #1e1b4b 0%, #172554 50%, #0f172a 100%);
  border-bottom-color: rgba(96, 165, 250, 0.35);
  color: #e0f2fe;
}

.site-announcement-bar.banner-success {
  background: linear-gradient(90deg, #064e3b 0%, #065f46 50%, #022c22 100%);
  border-bottom-color: rgba(52, 211, 153, 0.35);
  color: #d1fae5;
}

.site-announcement-bar.banner-warning {
  background: linear-gradient(90deg, #7c2d12 0%, #9a3412 50%, #431407 100%);
  border-bottom-color: rgba(251, 146, 60, 0.35);
  color: #ffedd5;
}

.announcement-bar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.announcement-bar-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.announcement-bell {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.announcement-title {
  font-weight: 700;
  color: #ffffff;
}

.announcement-sep {
  opacity: 0.5;
}

.announcement-text {
  opacity: 0.95;
  line-height: 1.4;
}

.announcement-link-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: var(--radius-sm, 4px);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 6px;
  white-space: nowrap;
}

.announcement-link-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateX(1px);
}

.announcement-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.announcement-close:hover {
  color: #ffffff;
}

/* ==============================================================================
   COMPACT STARTERS DASHBOARD GRID
   ============================================================================== */
.starters-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

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

.starter-compact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 14px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  align-items: stretch;
}

.starter-compact-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.starter-compact-card.status-resting {
  border-left: 3px solid #3b82f6;
}

.starter-compact-card:not(.status-resting) {
  border-left: 3px solid #10b981;
}

.compact-media-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 76px;
}

.compact-thumb-wrap {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.compact-placeholder {
  font-size: 2.2rem;
}

.compact-photo-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fcd34d;
}

.compact-thumb-wrap:hover .compact-photo-hover {
  opacity: 1;
}

.btn-swap-photo {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: center;
}

.btn-swap-photo:hover {
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
}

.compact-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  justify-content: space-between;
}

.compact-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.compact-name-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.compact-starter-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-starter-name a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.compact-starter-name a:hover {
  color: var(--accent-amber);
}

.starter-status-badge-inline {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.compact-jar-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.compact-flour-line {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 3px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.compact-flour-line strong {
  color: var(--accent-amber);
}

.compact-lineage-chip {
  color: #38bdf8;
  font-size: 0.75rem;
}

.compact-metrics-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  margin-bottom: 8px;
}

.cmp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cmp-label {
  font-size: 0.64rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.cmp-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.cmp-accent {
  color: var(--accent-amber);
}

.compact-actions-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.compact-actions-row .btn {
  flex: 1;
  text-align: center;
  padding: 4px 6px;
  font-size: 0.74rem;
}

/* Compact header in starter detail page */
.starter-profile-media-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 104px;
}

.compact-thumb-wrap.lg {
  width: 104px;
  height: 104px;
  border-radius: var(--radius-md);
}

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

.starter-profile-placeholder {
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ==============================================================================
   CHANGELOG MODAL & PAGE
   ============================================================================== */
.modal-changelog-box {
  max-width: 680px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.modal-changelog-box .modal-header {
  padding: 18px 24px;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.02);
}

.modal-changelog-body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(85vh - 140px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-changelog-box .modal-footer {
  padding: 14px 24px;
  margin-top: 0;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border);
}

.admin-changelog-callout {
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fcd34d;
  margin-bottom: 6px;
}

.modal-changelog-entry {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.modal-changelog-entry.entry-current {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(234, 88, 12, 0.02) 100%);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08);
}

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

.mce-version-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mce-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fcd34d;
}

.mce-badge-current {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.mce-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mce-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.mce-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Dedicated changelog page */
.changelog-header-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent-amber);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.changelog-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.version-hero-badge {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.changelog-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.changelog-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.timeline-changelog {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.changelog-entry-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: border-color 0.2s;
}

.changelog-entry-card.entry-latest {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

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

.entry-version-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entry-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fcd34d;
}

.entry-badge-latest {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.entry-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.entry-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.entry-highlights {
  margin: 0;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==============================================================================
   ADMIN ANNOUNCEMENTS & BROADCASTS
   ============================================================================== */
.announcement-banner-preview {
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.announcement-banner-preview.banner-info {
  background: linear-gradient(90deg, #1e1b4b 0%, #172554 100%);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #e0f2fe;
}

.announcement-banner-preview.banner-success {
  background: linear-gradient(90deg, #064e3b 0%, #065f46 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #d1fae5;
}

.announcement-banner-preview.banner-warning {
  background: linear-gradient(90deg, #7c2d12 0%, #9a3412 100%);
  border: 1px solid rgba(251, 146, 60, 0.4);
  color: #ffedd5;
}

.banner-badge-live {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.banner-preview-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.banner-preview-msg {
  font-size: 0.9rem;
  opacity: 0.95;
  line-height: 1.4;
  margin-bottom: 6px;
}

.banner-preview-meta {
  font-size: 0.76rem;
  opacity: 0.7;
}

.no-banner-box {
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.email-broadcast-box {
  background: rgba(234, 88, 12, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 18px 0;
}

.broadcast-box-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.broadcast-box-header .box-icon {
  font-size: 1.5rem;
}

.badge-status-on {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.badge-status-off {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.badge-email-sent {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Recipe Tags System Styling
   ========================================================================== */
.tag-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag-selector-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}

.tag-selector-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  transform: translateY(-1px);
}

.tag-selector-btn.active-tag-chip {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-amber);
  color: #fcd34d;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

/* Recipe Detail Tag Badges */
.recipe-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fcd34d;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
}

.recipe-tag-badge:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--accent-amber);
  transform: translateY(-1px);
}

/* Active Tag Filter Pill (Hero/Index) */
.active-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--accent-amber);
  color: #fcd34d;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
  margin-top: 10px;
}

.active-tag-pill strong {
  color: #ffffff;
}

.clear-tag-btn {
  color: #fcd34d;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

.clear-tag-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #ffffff;
  transform: scale(1.15);
}

/* Card Mini Tags */
.card-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.card-tag-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.card-tag-pill:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

/* ==========================================================================
   Customizable Color Themes System
   ========================================================================== */

/* 1. Amber Gold (Default) */
html[data-theme="amber"], :root {
  --accent-amber: #f59e0b;
  --accent-orange: #ea580c;
  --border-focus: rgba(245, 158, 11, 0.5);
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --card-bg: rgba(22, 31, 53, 0.85);
  --card-hover: rgba(30, 42, 72, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --bg-radial-1: rgba(234, 88, 12, 0.08);
  --bg-radial-2: rgba(245, 158, 11, 0.06);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

/* 2. Sage & Emerald */
html[data-theme="emerald"] {
  --accent-amber: #10b981;
  --accent-orange: #059669;
  --border-focus: rgba(16, 185, 129, 0.5);
  --bg-primary: #06140e;
  --bg-secondary: #0c231a;
  --card-bg: rgba(16, 41, 30, 0.88);
  --card-hover: rgba(22, 54, 40, 0.96);
  --border: rgba(52, 211, 153, 0.15);
  --bg-radial-1: rgba(16, 185, 129, 0.1);
  --bg-radial-2: rgba(5, 150, 105, 0.07);
  --text-primary: #f0fdf4;
  --text-secondary: #a7f3d0;
  --text-muted: #6ee7b7;
}

/* 3. Midnight Sapphire */
html[data-theme="sapphire"] {
  --accent-amber: #38bdf8;
  --accent-orange: #2563eb;
  --border-focus: rgba(56, 189, 248, 0.5);
  --bg-primary: #080d1a;
  --bg-secondary: #0f1930;
  --card-bg: rgba(20, 34, 62, 0.88);
  --card-hover: rgba(28, 46, 84, 0.96);
  --border: rgba(96, 165, 250, 0.15);
  --bg-radial-1: rgba(37, 99, 235, 0.12);
  --bg-radial-2: rgba(56, 189, 248, 0.08);
  --text-primary: #f0f9ff;
  --text-secondary: #bae6fd;
  --text-muted: #7dd3fc;
}

/* 4. Wild Rose & Berry */
html[data-theme="rose"] {
  --accent-amber: #fb7185;
  --accent-orange: #e11d48;
  --border-focus: rgba(251, 113, 133, 0.5);
  --bg-primary: #150910;
  --bg-secondary: #24111d;
  --card-bg: rgba(46, 22, 38, 0.88);
  --card-hover: rgba(62, 30, 51, 0.96);
  --border: rgba(251, 113, 133, 0.16);
  --bg-radial-1: rgba(225, 29, 72, 0.12);
  --bg-radial-2: rgba(251, 113, 133, 0.08);
  --text-primary: #fff1f2;
  --text-secondary: #fecdd3;
  --text-muted: #fda4af;
}

/* 5. Royal Amethyst */
html[data-theme="amethyst"] {
  --accent-amber: #c084fc;
  --accent-orange: #9333ea;
  --border-focus: rgba(192, 132, 252, 0.5);
  --bg-primary: #100b1a;
  --bg-secondary: #1a122b;
  --card-bg: rgba(36, 24, 56, 0.88);
  --card-hover: rgba(50, 34, 78, 0.96);
  --border: rgba(192, 132, 252, 0.16);
  --bg-radial-1: rgba(147, 51, 234, 0.12);
  --bg-radial-2: rgba(192, 132, 252, 0.08);
  --text-primary: #faf5ff;
  --text-secondary: #e9d5ff;
  --text-muted: #d8b4fe;
}

/* 6. Tuscan Terracotta */
html[data-theme="terracotta"] {
  --accent-amber: #fb923c;
  --accent-orange: #c2410c;
  --border-focus: rgba(251, 146, 60, 0.5);
  --bg-primary: #160c06;
  --bg-secondary: #26150c;
  --card-bg: rgba(48, 28, 18, 0.88);
  --card-hover: rgba(64, 38, 25, 0.96);
  --border: rgba(251, 146, 60, 0.16);
  --bg-radial-1: rgba(194, 65, 12, 0.12);
  --bg-radial-2: rgba(251, 146, 60, 0.08);
  --text-primary: #fff7ed;
  --text-secondary: #fed7aa;
  --text-muted: #fdba74;
}

/* 7. Pitch Black OLED */
html[data-theme="oled"] {
  --accent-amber: #fbbf24;
  --accent-orange: #f59e0b;
  --border-focus: rgba(251, 191, 36, 0.6);
  --bg-primary: #000000;
  --bg-secondary: #0a0a0c;
  --card-bg: #111114;
  --card-hover: #1b1b20;
  --border: rgba(255, 255, 255, 0.14);
  --bg-radial-1: transparent;
  --bg-radial-2: transparent;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
}

/* 8. Cookbook Parchment (Clean Light Mode) */
html[data-theme="parchment"] {
  --accent-amber: #b45309;
  --accent-orange: #92400e;
  --border-focus: rgba(180, 83, 9, 0.5);
  --badge-amber-text: #b45309;
  --badge-blue-text: #1d4ed8;
  --badge-green-text: #047857;
  --bg-primary: #f8f6f0;
  --bg-secondary: #ede7dc;
  --card-bg: #ffffff;
  --card-hover: #faf8f5;
  --border: rgba(28, 25, 23, 0.12);
  --bg-radial-1: rgba(217, 119, 6, 0.04);
  --bg-radial-2: rgba(180, 83, 9, 0.03);
  --text-primary: #1c1917;
  --text-secondary: #44403c;
  --text-muted: #78716c;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08);
  --alert-amber-bg: #fffbeb;
  --alert-amber-border: rgba(217, 119, 6, 0.35);
  --alert-amber-text: #92400e;
  --alert-amber-strong: #78350f;
  --calc-pill-bg: #fffbeb;
  --calc-pill-border: rgba(217, 119, 6, 0.25);
  --calc-pill-value: #92400e;
  --input-weight-color: #1c1917;
}

/* 9. Sunflower (Light & Airy) */
html[data-theme="sunflower"] {
  --accent-amber: #ca8a04;
  --accent-orange: #d97706;
  --border-focus: rgba(202, 138, 4, 0.5);
  --badge-amber-text: #a16207;
  --badge-blue-text: #1d4ed8;
  --badge-green-text: #047857;
  --bg-primary: #fffdf5;
  --bg-secondary: #fef9e7;
  --card-bg: #ffffff;
  --card-hover: #fffefb;
  --border: rgba(202, 138, 4, 0.18);
  --bg-radial-1: rgba(234, 179, 8, 0.07);
  --bg-radial-2: rgba(202, 138, 4, 0.05);
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  --shadow-sm: 0 1px 4px rgba(202, 138, 4, 0.08);
  --shadow-md: 0 8px 20px rgba(202, 138, 4, 0.1);
  --alert-amber-bg: #fffbeb;
  --alert-amber-border: rgba(217, 119, 6, 0.35);
  --alert-amber-text: #92400e;
  --alert-amber-strong: #78350f;
  --calc-pill-bg: #fffbeb;
  --calc-pill-border: rgba(217, 119, 6, 0.25);
  --calc-pill-value: #92400e;
  --input-weight-color: #1c1917;
}

/* 10. Mint Meadow (formerly Daisy Meadow - Fresh Botanical & Airy Light) */
html[data-theme="daisy"],
html[data-theme="mint"] {
  --accent-amber: #10b981;
  --accent-orange: #059669;
  --border-focus: rgba(16, 185, 129, 0.5);
  --badge-amber-text: #047857;
  --badge-blue-text: #1d4ed8;
  --badge-green-text: #047857;
  --bg-primary: #f4faf6;
  --bg-secondary: #eaf5ee;
  --card-bg: #ffffff;
  --card-hover: #fcfffd;
  --border: rgba(16, 185, 129, 0.2);
  --bg-radial-1: rgba(16, 185, 129, 0.08);
  --bg-radial-2: rgba(5, 150, 105, 0.05);
  --text-primary: #11291f;
  --text-secondary: #3d5a4c;
  --text-muted: #5e7b6d;
  --shadow-sm: 0 1px 3px rgba(16, 185, 129, 0.08);
  --shadow-md: 0 6px 18px rgba(16, 185, 129, 0.1);
  --alert-amber-bg: #fffbeb;
  --alert-amber-border: rgba(217, 119, 6, 0.35);
  --alert-amber-text: #92400e;
  --alert-amber-strong: #78350f;
  --calc-pill-bg: #fffbeb;
  --calc-pill-border: rgba(217, 119, 6, 0.25);
  --calc-pill-value: #92400e;
  --input-weight-color: #1c1917;
}

/* Light mode specific component refinements (Parchment, Sunflower, Daisy/Mint, and Custom Light Themes) */
html[data-theme-type="light"] .navbar,
html[data-theme*="parchment"] .navbar,
html[data-theme*="sunflower"] .navbar,
html[data-theme*="daisy"] .navbar,
html[data-theme*="mint"] .navbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme*="parchment"] .navbar {
  background: rgba(248, 246, 240, 0.94);
}
html[data-theme*="sunflower"] .navbar {
  background: rgba(255, 253, 245, 0.95);
}
html[data-theme*="daisy"] .navbar,
html[data-theme*="mint"] .navbar {
  background: rgba(244, 250, 246, 0.95);
}


html[data-theme-type="light"] .modal-box,
html[data-theme*="parchment"] .modal-box,
html[data-theme*="sunflower"] .modal-box,
html[data-theme*="daisy"] .modal-box,
html[data-theme*="mint"] .modal-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  color: #1c1917;
}

html[data-theme-type="light"] .form-input,
html[data-theme-type="light"] .form-textarea,
html[data-theme-type="light"] .form-select,
html[data-theme*="parchment"] .form-input,
html[data-theme*="parchment"] .form-textarea,
html[data-theme*="parchment"] .form-select,
html[data-theme*="sunflower"] .form-input,
html[data-theme*="sunflower"] .form-textarea,
html[data-theme*="sunflower"] .form-select,
html[data-theme*="daisy"] .form-input,
html[data-theme*="daisy"] .form-textarea,
html[data-theme*="daisy"] .form-select,
html[data-theme*="mint"] .form-input,
html[data-theme*="mint"] .form-textarea,
html[data-theme*="mint"] .form-select {
  background: #ffffff;
  color: #1c1917;
  border-color: rgba(0, 0, 0, 0.18);
}

html[data-theme-type="light"] .btn-secondary,
html[data-theme*="parchment"] .btn-secondary,
html[data-theme*="sunflower"] .btn-secondary,
html[data-theme*="daisy"] .btn-secondary,
html[data-theme*="mint"] .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #1c1917;
  border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme-type="light"] .btn-secondary:hover,
html[data-theme*="parchment"] .btn-secondary:hover,
html[data-theme*="sunflower"] .btn-secondary:hover,
html[data-theme*="daisy"] .btn-secondary:hover,
html[data-theme*="mint"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
}

html[data-theme-type="light"] .data-table thead tr,
html[data-theme-type="light"] .table-sourdough th,
html[data-theme*="parchment"] .data-table thead tr,
html[data-theme*="parchment"] .table-sourdough th,
html[data-theme*="sunflower"] .data-table thead tr,
html[data-theme*="sunflower"] .table-sourdough th,
html[data-theme*="daisy"] .data-table thead tr,
html[data-theme*="daisy"] .table-sourdough th,
html[data-theme*="mint"] .data-table thead tr,
html[data-theme*="mint"] .table-sourdough th {
  background: rgba(0, 0, 0, 0.04);
  color: #44403c;
}

html[data-theme-type="light"] .panel,
html[data-theme-type="light"] .recipe-card,
html[data-theme-type="light"] .starter-card,
html[data-theme-type="light"] .table-card,
html[data-theme*="parchment"] .panel,
html[data-theme*="parchment"] .recipe-card,
html[data-theme*="parchment"] .starter-card,
html[data-theme*="parchment"] .table-card,
html[data-theme*="sunflower"] .panel,
html[data-theme*="sunflower"] .recipe-card,
html[data-theme*="sunflower"] .starter-card,
html[data-theme*="sunflower"] .table-card,
html[data-theme*="daisy"] .panel,
html[data-theme*="daisy"] .recipe-card,
html[data-theme*="daisy"] .starter-card,
html[data-theme*="daisy"] .table-card,
html[data-theme*="mint"] .panel,
html[data-theme*="mint"] .recipe-card,
html[data-theme*="mint"] .starter-card,
html[data-theme*="mint"] .table-card {
  box-shadow: var(--shadow-sm);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Light mode alerts and sourdough calc text readability */
html[data-theme-type="light"] .alert-amber,
html[data-theme*="parchment"] .alert-amber,
html[data-theme*="sunflower"] .alert-amber,
html[data-theme*="daisy"] .alert-amber,
html[data-theme*="mint"] .alert-amber,
html[data-theme="sunflower-custom"] .alert-amber {
  background: #fffbeb !important;
  border: 1px solid rgba(217, 119, 6, 0.4) !important;
  color: #92400e !important;
}

html[data-theme-type="light"] .alert-amber strong,
html[data-theme*="parchment"] .alert-amber strong,
html[data-theme*="sunflower"] .alert-amber strong,
html[data-theme*="daisy"] .alert-amber strong,
html[data-theme*="mint"] .alert-amber strong,
html[data-theme="sunflower-custom"] .alert-amber strong {
  color: #78350f !important;
}

html[data-theme-type="light"] .calc-metric-pill,
html[data-theme*="parchment"] .calc-metric-pill,
html[data-theme*="sunflower"] .calc-metric-pill,
html[data-theme*="daisy"] .calc-metric-pill,
html[data-theme*="mint"] .calc-metric-pill,
html[data-theme="sunflower-custom"] .calc-metric-pill {
  background: #fffbeb !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
}

html[data-theme-type="light"] .calc-value,
html[data-theme*="parchment"] .calc-value,
html[data-theme*="sunflower"] .calc-value,
html[data-theme*="daisy"] .calc-value,
html[data-theme*="mint"] .calc-value,
html[data-theme="sunflower-custom"] .calc-value {
  color: #92400e !important;
}

html[data-theme-type="light"] .input-weight,
html[data-theme*="parchment"] .input-weight,
html[data-theme*="sunflower"] .input-weight,
html[data-theme*="daisy"] .input-weight,
html[data-theme*="mint"] .input-weight,
html[data-theme="sunflower-custom"] .input-weight {
  color: #1c1917 !important;
}

html[data-theme-type="light"] .chip-btn,
html[data-theme*="parchment"] .chip-btn,
html[data-theme*="sunflower"] .chip-btn,
html[data-theme*="daisy"] .chip-btn,
html[data-theme*="mint"] .chip-btn,
html[data-theme="sunflower-custom"] .chip-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #44403c !important;
}

html[data-theme-type="light"] .chip-btn:hover,
html[data-theme*="parchment"] .chip-btn:hover,
html[data-theme*="sunflower"] .chip-btn:hover,
html[data-theme*="daisy"] .chip-btn:hover,
html[data-theme*="mint"] .chip-btn:hover,
html[data-theme="sunflower-custom"] .chip-btn:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(217, 119, 6, 0.4) !important;
  color: #92400e !important;
}

html[data-theme-type="light"] .calc-tab-btn.active,
html[data-theme*="parchment"] .calc-tab-btn.active,
html[data-theme*="sunflower"] .calc-tab-btn.active,
html[data-theme*="daisy"] .calc-tab-btn.active,
html[data-theme*="mint"] .calc-tab-btn.active,
html[data-theme="sunflower-custom"] .calc-tab-btn.active {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #d97706 !important;
  color: #92400e !important;
}

/* Light mode flash alerts */
html[data-theme-type="light"] .alert-warning,
html[data-theme*="parchment"] .alert-warning,
html[data-theme*="sunflower"] .alert-warning,
html[data-theme*="daisy"] .alert-warning,
html[data-theme*="mint"] .alert-warning {
  background: #fffbeb !important;
  border-color: rgba(217, 119, 6, 0.35) !important;
  color: #92400e !important;
}

html[data-theme-type="light"] .alert-danger,
html[data-theme*="parchment"] .alert-danger,
html[data-theme*="sunflower"] .alert-danger,
html[data-theme*="daisy"] .alert-danger,
html[data-theme*="mint"] .alert-danger {
  background: #fef2f2 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #991b1b !important;
}

html[data-theme-type="light"] .alert-success,
html[data-theme*="parchment"] .alert-success,
html[data-theme*="sunflower"] .alert-success,
html[data-theme*="daisy"] .alert-success,
html[data-theme*="mint"] .alert-success {
  background: #ecfdf5 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #065f46 !important;
}

html[data-theme-type="light"] .alert-info,
html[data-theme*="parchment"] .alert-info,
html[data-theme*="sunflower"] .alert-info,
html[data-theme*="daisy"] .alert-info,
html[data-theme*="mint"] .alert-info {
  background: #f0f9ff !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  color: #075985 !important;
}

/* Light mode Mode 2 solver callouts & recipe tag badges */
html[data-theme-type="light"] .mode2-recipe-box,
html[data-theme*="parchment"] .mode2-recipe-box,
html[data-theme*="sunflower"] .mode2-recipe-box,
html[data-theme*="daisy"] .mode2-recipe-box,
html[data-theme*="mint"] .mode2-recipe-box {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.3);
}

html[data-theme-type="light"] .recipe-box-title,
html[data-theme*="parchment"] .recipe-box-title,
html[data-theme*="sunflower"] .recipe-box-title,
html[data-theme*="daisy"] .recipe-box-title,
html[data-theme*="mint"] .recipe-box-title {
  color: #047857;
}

html[data-theme-type="light"] .weight-callout,
html[data-theme*="parchment"] .weight-callout,
html[data-theme*="sunflower"] .weight-callout,
html[data-theme*="daisy"] .weight-callout,
html[data-theme*="mint"] .weight-callout {
  background: #ffffff;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

html[data-theme-type="light"] .wc-val,
html[data-theme*="parchment"] .wc-val,
html[data-theme*="sunflower"] .wc-val,
html[data-theme*="daisy"] .wc-val,
html[data-theme*="mint"] .wc-val {
  color: #047857;
}

html[data-theme-type="light"] .recipe-tag-badge,
html[data-theme*="parchment"] .recipe-tag-badge,
html[data-theme*="sunflower"] .recipe-tag-badge,
html[data-theme*="daisy"] .recipe-tag-badge,
html[data-theme*="mint"] .recipe-tag-badge {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(217, 119, 6, 0.3);
  color: #92400e;
}

html[data-theme-type="light"] .lineage-callout,
html[data-theme*="parchment"] .lineage-callout,
html[data-theme*="sunflower"] .lineage-callout,
html[data-theme*="daisy"] .lineage-callout,
html[data-theme*="mint"] .lineage-callout {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #047857;
}

html[data-theme-type="light"] .meta-lineage,
html[data-theme*="parchment"] .meta-lineage,
html[data-theme*="sunflower"] .meta-lineage,
html[data-theme*="daisy"] .meta-lineage,
html[data-theme*="mint"] .meta-lineage {
  color: #92400e;
}

html[data-theme-type="light"] .meta-lineage a,
html[data-theme*="parchment"] .meta-lineage a,
html[data-theme*="sunflower"] .meta-lineage a,
html[data-theme*="daisy"] .meta-lineage a,
html[data-theme*="mint"] .meta-lineage a {
  color: #92400e;
}

/* Light mode Sourdough Lineage Badges & Count */
html[data-theme-type="light"] .node-badge-child,
html[data-theme*="parchment"] .node-badge-child,
html[data-theme*="sunflower"] .node-badge-child,
html[data-theme*="daisy"] .node-badge-child,
html[data-theme*="mint"] .node-badge-child {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(5, 150, 105, 0.45);
  color: #065f46;
}

html[data-theme-type="light"] .node-badge-root,
html[data-theme*="parchment"] .node-badge-root,
html[data-theme*="sunflower"] .node-badge-root,
html[data-theme*="daisy"] .node-badge-root,
html[data-theme*="mint"] .node-badge-root {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(217, 119, 6, 0.45);
  color: #78350f;
}

html[data-theme-type="light"] .node-branch-count,
html[data-theme*="parchment"] .node-branch-count,
html[data-theme*="sunflower"] .node-branch-count,
html[data-theme*="daisy"] .node-branch-count,
html[data-theme*="mint"] .node-branch-count {
  color: #0369a1;
}


/* Light mode Sourdough Dead Phase, Custodian & Maturity overrides */
html[data-theme-type="light"] .feed-row-dead-phase td,
html[data-theme*="parchment"] .feed-row-dead-phase td,
html[data-theme*="sunflower"] .feed-row-dead-phase td,
html[data-theme*="daisy"] .feed-row-dead-phase td,
html[data-theme*="mint"] .feed-row-dead-phase td,
html[data-theme="sunflower-custom"] .feed-row-dead-phase td {
  background: #f5f3ff !important;
  border-bottom-color: #ddd6fe !important;
}

html[data-theme-type="light"] .feed-row-dead-phase:hover td,
html[data-theme*="parchment"] .feed-row-dead-phase:hover td,
html[data-theme*="sunflower"] .feed-row-dead-phase:hover td,
html[data-theme*="daisy"] .feed-row-dead-phase:hover td,
html[data-theme*="mint"] .feed-row-dead-phase:hover td,
html[data-theme="sunflower-custom"] .feed-row-dead-phase:hover td {
  background: #ede9fe !important;
}

html[data-theme-type="light"] .feed-row-dead-phase td:first-child,
html[data-theme*="parchment"] .feed-row-dead-phase td:first-child,
html[data-theme*="sunflower"] .feed-row-dead-phase td:first-child,
html[data-theme*="daisy"] .feed-row-dead-phase td:first-child,
html[data-theme*="mint"] .feed-row-dead-phase td:first-child,
html[data-theme="sunflower-custom"] .feed-row-dead-phase td:first-child {
  border-left: 3px solid #7c3aed !important;
}

html[data-theme-type="light"] .sub-dead-phase-tag,
html[data-theme*="parchment"] .sub-dead-phase-tag,
html[data-theme*="sunflower"] .sub-dead-phase-tag,
html[data-theme*="daisy"] .sub-dead-phase-tag,
html[data-theme*="mint"] .sub-dead-phase-tag,
html[data-theme="sunflower-custom"] .sub-dead-phase-tag {
  color: #6d28d9 !important;
  background: #ede9fe !important;
  border-color: #c4b5fd !important;
}

html[data-theme-type="light"] .badge-dead-phase,
html[data-theme*="parchment"] .badge-dead-phase,
html[data-theme*="sunflower"] .badge-dead-phase,
html[data-theme*="daisy"] .badge-dead-phase,
html[data-theme*="mint"] .badge-dead-phase,
html[data-theme="sunflower-custom"] .badge-dead-phase {
  background: #ede9fe !important;
  color: #6d28d9 !important;
  border-color: #c4b5fd !important;
}

html[data-theme-type="light"] .dead-phase-card,
html[data-theme*="parchment"] .dead-phase-card,
html[data-theme*="sunflower"] .dead-phase-card,
html[data-theme*="daisy"] .dead-phase-card,
html[data-theme*="mint"] .dead-phase-card,
html[data-theme="sunflower-custom"] .dead-phase-card {
  background: #faf5ff !important;
  border-color: #ddd6fe !important;
}

html[data-theme-type="light"] .badge-maturity-stage.stage-purple,
html[data-theme*="parchment"] .badge-maturity-stage.stage-purple,
html[data-theme*="sunflower"] .badge-maturity-stage.stage-purple,
html[data-theme*="daisy"] .badge-maturity-stage.stage-purple,
html[data-theme*="mint"] .badge-maturity-stage.stage-purple,
html[data-theme="sunflower-custom"] .badge-maturity-stage.stage-purple {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
  border-color: #c4b5fd !important;
}

html[data-theme-type="light"] .badge-maturity-stage.stage-teal,
html[data-theme*="parchment"] .badge-maturity-stage.stage-teal,
html[data-theme*="sunflower"] .badge-maturity-stage.stage-teal,
html[data-theme*="daisy"] .badge-maturity-stage.stage-teal,
html[data-theme*="mint"] .badge-maturity-stage.stage-teal,
html[data-theme="sunflower-custom"] .badge-maturity-stage.stage-teal {
  background: #f0fdfa !important;
  color: #0f766e !important;
  border-color: #99f6e4 !important;
}

html[data-theme-type="light"] .badge-maturity-stage.stage-blue,
html[data-theme*="parchment"] .badge-maturity-stage.stage-blue,
html[data-theme*="sunflower"] .badge-maturity-stage.stage-blue,
html[data-theme*="daisy"] .badge-maturity-stage.stage-blue,
html[data-theme*="mint"] .badge-maturity-stage.stage-blue,
html[data-theme="sunflower-custom"] .badge-maturity-stage.stage-blue {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

html[data-theme-type="light"] .badge-maturity-stage.stage-gold,
html[data-theme*="parchment"] .badge-maturity-stage.stage-gold,
html[data-theme*="sunflower"] .badge-maturity-stage.stage-gold,
html[data-theme*="daisy"] .badge-maturity-stage.stage-gold,
html[data-theme*="mint"] .badge-maturity-stage.stage-gold,
html[data-theme="sunflower-custom"] .badge-maturity-stage.stage-gold {
  background: #fefce8 !important;
  color: #b45309 !important;
  border-color: #fde68a !important;
}

html[data-theme-type="light"] .compact-maturity-chip.stage-purple,
html[data-theme*="parchment"] .compact-maturity-chip.stage-purple,
html[data-theme*="sunflower"] .compact-maturity-chip.stage-purple,
html[data-theme*="daisy"] .compact-maturity-chip.stage-purple,
html[data-theme*="mint"] .compact-maturity-chip.stage-purple,
html[data-theme="sunflower-custom"] .compact-maturity-chip.stage-purple {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
  border-color: #c4b5fd !important;
}

html[data-theme-type="light"] .compact-maturity-chip.stage-teal,
html[data-theme*="parchment"] .compact-maturity-chip.stage-teal,
html[data-theme*="sunflower"] .compact-maturity-chip.stage-teal,
html[data-theme*="daisy"] .compact-maturity-chip.stage-teal,
html[data-theme*="mint"] .compact-maturity-chip.stage-teal,
html[data-theme="sunflower-custom"] .compact-maturity-chip.stage-teal {
  background: #f0fdfa !important;
  color: #0f766e !important;
  border-color: #99f6e4 !important;
}

html[data-theme-type="light"] .compact-maturity-chip.stage-blue,
html[data-theme*="parchment"] .compact-maturity-chip.stage-blue,
html[data-theme*="sunflower"] .compact-maturity-chip.stage-blue,
html[data-theme*="daisy"] .compact-maturity-chip.stage-blue,
html[data-theme*="mint"] .compact-maturity-chip.stage-blue,
html[data-theme="sunflower-custom"] .compact-maturity-chip.stage-blue {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

html[data-theme-type="light"] .compact-maturity-chip.stage-gold,
html[data-theme*="parchment"] .compact-maturity-chip.stage-gold,
html[data-theme*="sunflower"] .compact-maturity-chip.stage-gold,
html[data-theme*="daisy"] .compact-maturity-chip.stage-gold,
html[data-theme*="mint"] .compact-maturity-chip.stage-gold,
html[data-theme="sunflower-custom"] .compact-maturity-chip.stage-gold {
  background: #fefce8 !important;
  color: #b45309 !important;
  border-color: #fde68a !important;
}

html[data-theme-type="light"] .compact-custodian-chip,
html[data-theme*="parchment"] .compact-custodian-chip,
html[data-theme*="sunflower"] .compact-custodian-chip,
html[data-theme*="daisy"] .compact-custodian-chip,
html[data-theme*="mint"] .compact-custodian-chip,
html[data-theme="sunflower-custom"] .compact-custodian-chip {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fde68a !important;
}

html[data-theme-type="light"] .meta-custodian-pill,
html[data-theme*="parchment"] .meta-custodian-pill,
html[data-theme*="sunflower"] .meta-custodian-pill,
html[data-theme*="daisy"] .meta-custodian-pill,
html[data-theme*="mint"] .meta-custodian-pill,
html[data-theme="sunflower-custom"] .meta-custodian-pill {
  background: #fef3c7 !important;
  border-color: #fde68a !important;
  color: #92400e !important;
}

html[data-theme-type="light"] .pill-reassign-btn,
html[data-theme*="parchment"] .pill-reassign-btn,
html[data-theme*="sunflower"] .pill-reassign-btn,
html[data-theme*="daisy"] .pill-reassign-btn,
html[data-theme*="mint"] .pill-reassign-btn,
html[data-theme="sunflower-custom"] .pill-reassign-btn {
  background: #d97706 !important;
  color: #ffffff !important;
}

html[data-theme-type="light"] .text-purple,
html[data-theme*="parchment"] .text-purple,
html[data-theme*="sunflower"] .text-purple,
html[data-theme*="daisy"] .text-purple,
html[data-theme*="mint"] .text-purple,
html[data-theme="sunflower-custom"] .text-purple {
  color: #7c3aed !important;
}


/* Theme Modal UI & Switcher Button */
.theme-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-color: rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}

.theme-nav-btn:hover {
  border-color: var(--accent-amber);
  transform: translateY(-1px);
}

.modal-theme-box {
  max-width: 820px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.modal-theme-box .modal-header {
  padding: 16px 20px;
  margin-bottom: 0;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.modal-theme-box .modal-header h3 {
  font-size: 1.15rem;
}

.theme-modal-body {
  padding: 14px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
  max-height: calc(88vh - 120px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for theme modal */
.theme-modal-body::-webkit-scrollbar {
  width: 7px;
}
.theme-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
.theme-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.theme-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-amber);
}

.modal-theme-box .modal-footer {
  padding: 12px 20px;
  margin-top: 0;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

html[data-theme="parchment"] .modal-theme-box .modal-footer,
html[data-theme="sunflower"] .modal-theme-box .modal-footer,
html[data-theme="daisy"] .modal-theme-box .modal-footer {
  background: rgba(0, 0, 0, 0.04);
}

.theme-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.theme-choice-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}

.theme-choice-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.theme-choice-card.theme-selected {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Swatch Previews */
.theme-swatch-preview {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.swatch-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.swatch-accent-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 5px currentColor;
}

.swatch-mini-card {
  width: 20px;
  height: 7px;
  border-radius: 2px;
}

/* Swatch Palettes */
.swatch-amber {
  background: #0b0f19;
}
.swatch-amber .swatch-accent-dot {
  background: #f59e0b;
}
.swatch-amber .swatch-mini-card {
  background: #161f35;
}

.swatch-emerald {
  background: #06140e;
}
.swatch-emerald .swatch-accent-dot {
  background: #10b981;
}
.swatch-emerald .swatch-mini-card {
  background: #10291e;
}

.swatch-sapphire {
  background: #080d1a;
}
.swatch-sapphire .swatch-accent-dot {
  background: #38bdf8;
}
.swatch-sapphire .swatch-mini-card {
  background: #14223e;
}

.swatch-rose {
  background: #150910;
}
.swatch-rose .swatch-accent-dot {
  background: #fb7185;
}
.swatch-rose .swatch-mini-card {
  background: #2e1626;
}

.swatch-amethyst {
  background: #100b1a;
}
.swatch-amethyst .swatch-accent-dot {
  background: #c084fc;
}
.swatch-amethyst .swatch-mini-card {
  background: #241838;
}

.swatch-terracotta {
  background: #160c06;
}
.swatch-terracotta .swatch-accent-dot {
  background: #fb923c;
}
.swatch-terracotta .swatch-mini-card {
  background: #301c12;
}

.swatch-oled {
  background: #000000;
  border-color: rgba(255, 255, 255, 0.25);
}
.swatch-oled .swatch-accent-dot {
  background: #fbbf24;
}
.swatch-oled .swatch-mini-card {
  background: #18181c;
}

.swatch-parchment {
  background: #f8f6f0;
  border-color: rgba(0, 0, 0, 0.15);
}
.swatch-parchment .swatch-accent-dot {
  background: #b45309;
}
.swatch-parchment .swatch-mini-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.swatch-sunflower {
  background: #fffdf5;
  border-color: rgba(202, 138, 4, 0.25);
}
.swatch-sunflower .swatch-accent-dot {
  background: #ca8a04;
}
.swatch-sunflower .swatch-mini-card {
  background: #ffffff;
  border: 1px solid rgba(202, 138, 4, 0.25);
}

.swatch-daisy,
.swatch-mint {
  background: #f4faf6;
  border-color: rgba(16, 185, 129, 0.3);
}
.swatch-daisy .swatch-accent-dot,
.swatch-mint .swatch-accent-dot {
  background: #10b981;
}
.swatch-daisy .swatch-mini-card,
.swatch-mint .swatch-mini-card {
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.theme-choice-info {
  flex: 1;
  min-width: 0;
}

.theme-choice-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text-primary);
  margin-bottom: 1px;
}

.theme-choice-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.25;
  margin: 0;
  white-space: normal;
}

.theme-badge-default {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.theme-badge-light {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.theme-active-indicator {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-amber);
  color: #0b0f19;
  font-weight: 900;
  font-size: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-choice-card.theme-selected .theme-active-indicator {
  display: flex;
}


/* User Profile Theme Badges (users.html) */
.user-theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.theme-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.theme-badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}
.theme-badge-amber .theme-badge-dot { background: #f59e0b; }

.theme-badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}
.theme-badge-emerald .theme-badge-dot { background: #10b981; }

.theme-badge-sapphire {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
}
.theme-badge-sapphire .theme-badge-dot { background: #38bdf8; }

.theme-badge-rose {
  background: rgba(251, 113, 133, 0.15);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.3);
}
.theme-badge-rose .theme-badge-dot { background: #fb7185; }

.theme-badge-amethyst {
  background: rgba(192, 132, 252, 0.15);
  color: #d8b4fe;
  border-color: rgba(192, 132, 252, 0.3);
}
.theme-badge-amethyst .theme-badge-dot { background: #c084fc; }

.theme-badge-terracotta {
  background: rgba(251, 146, 60, 0.15);
  color: #fdba74;
  border-color: rgba(251, 146, 60, 0.3);
}
.theme-badge-terracotta .theme-badge-dot { background: #fb923c; }

.theme-badge-oled {
  background: rgba(255, 255, 255, 0.1);
  color: #fcd34d;
  border-color: rgba(255, 255, 255, 0.2);
}
.theme-badge-oled .theme-badge-dot { background: #fbbf24; }

.theme-badge-parchment {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.25);
}
.theme-badge-parchment .theme-badge-dot { background: #b45309; }

.theme-badge-sunflower {
  background: rgba(234, 179, 8, 0.18);
  color: #ca8a04;
  border-color: rgba(202, 138, 4, 0.35);
}
.theme-badge-sunflower .theme-badge-dot { background: #eab308; }

.theme-badge-daisy,
.theme-badge-mint {
  background: rgba(16, 185, 129, 0.14);
  color: #15803d;
  border-color: rgba(16, 185, 129, 0.3);
}
.theme-badge-daisy .theme-badge-dot,
.theme-badge-mint .theme-badge-dot { background: #10b981; }

/* ==============================================================================
   ADMINISTRATIVE CONSOLE: THEME STUDIO & COLOR PICKER EDITOR
   ============================================================================== */
.theme-studio-container {
  margin-top: 36px;
}

.theme-studio-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.theme-preset-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.theme-editor-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 26px;
  align-items: start;
}

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

.theme-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.color-token-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.color-token-card:hover {
  border-color: var(--accent-amber);
  background: rgba(255, 255, 255, 0.05);
}

.color-token-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}

.color-token-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.3;
}

.color-token-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-input-swatch {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.color-input-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input-swatch::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.color-input-swatch::-moz-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.color-input-hex {
  flex: 1;
  font-family: monospace;
  font-size: 0.88rem;
  text-transform: uppercase;
  padding: 8px 12px;
}

/* Live Interactive Preview Box */
.theme-live-preview-box {
  position: sticky;
  top: 90px;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.preview-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 9999px;
  margin-bottom: 14px;
}

.preview-mini-card {
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.preview-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.82rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.preview-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.82rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}

/* Tooltip Component for Help / Explanations */
.help-tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  font-size: 0.82rem;
  line-height: 1;
  vertical-align: middle;
  margin-left: 4px;
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.help-tooltip-trigger:hover,
.help-tooltip-trigger:focus {
  opacity: 1;
  outline: none;
  transform: scale(1.15);
}

/* Hidden bubble source inside trigger */
.help-tooltip-bubble {
  display: none;
}

/* Global Floating Tooltip Portal (Escapes all overflow clipping) */
#global-tooltip-portal {
  position: fixed;
  display: none;
  width: 295px;
  max-width: calc(100vw - 24px);
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 0.79rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.75), 0 8px 14px -6px rgba(0, 0, 0, 0.6);
  z-index: 100000;
  pointer-events: none;
  white-space: normal;
  transition: opacity 0.15s ease;
}

#global-tooltip-portal strong {
  color: #facc15;
  font-weight: 600;
}

#global-tooltip-portal em {
  color: #94a3b8;
  font-style: italic;
  display: block;
  margin-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  padding-top: 5px;
}

/* ==========================================================================
   Kitchen Measurement & Weight Converter (Volume ⇄ Weight) & Unit Selector
   ========================================================================== */

.conversion-helper-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.helper-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 300px;
}

.helper-banner-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.helper-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 2px;
}

.helper-banner-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.helper-banner-desc em {
  color: var(--text-primary);
  font-style: normal;
  font-weight: 600;
}

.btn-ref-chart-toggle {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-ref-chart-toggle:hover {
  background: var(--accent-amber);
  color: #1e1e1e;
  border-color: var(--accent-amber);
}

/* Culinary Weight Reference Drawer */
.converter-reference-drawer {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  animation: fadeInDown 0.25s ease;
}

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

.ref-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.ref-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.ref-table-card {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.ref-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-amber);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.ref-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.ref-mini-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
}

.ref-mini-table td {
  padding: 5px 6px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ref-mini-table td strong {
  color: var(--text-primary);
}

/* Ingredient Form Row Enhancement */
.ing-unit-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.ing-unit-select {
  width: 100%;
  cursor: pointer;
}

.ing-unit-custom {
  animation: fadeInDown 0.15s ease;
}

/* Active Conversion Bar */
.ing-conversion-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  margin: 10px 0 12px 0;
  animation: fadeInDown 0.2s ease;
}

.ing-conversion-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.83rem;
}

.conversion-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}

.conversion-pill-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.conversion-pill-text strong {
  color: #34d399;
}

.conversion-density-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.density-override-select {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.density-override-select option {
  background: #1e293b;
  color: #f8fafc;
}

/* 1-Click Convert Swap Button */
.btn-convert-swap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-sm);
  padding: 5px 11px;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-convert-swap:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-convert-swap:active {
  transform: translateY(0);
}

.btn-convert-swap .swap-icon {
  font-size: 0.95rem;
  font-weight: 800;
  transition: transform 0.2s ease;
}

.btn-convert-swap:hover .swap-icon {
  transform: rotate(180deg);
}

/* Flash animation when conversion is applied */
.convert-flash {
  animation: convertRowFlash 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes convertRowFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    border-color: #10b981;
  }
  50% {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.3);
    border-color: #34d399;
  }
  100% {
    box-shadow: none;
    border-color: var(--border);
  }
}

/* Light Theme High Contrast Overrides */
[data-theme-type="light"] .conversion-helper-banner,
body[data-theme="sunflower"] .conversion-helper-banner,
body[data-theme="sunflower-custom"] .conversion-helper-banner,
body[data-theme="parchment"] .conversion-helper-banner,
body[data-theme="mint"] .conversion-helper-banner,
body[data-theme="daisy"] .conversion-helper-banner {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
}

[data-theme-type="light"] .helper-banner-title,
body[data-theme="sunflower"] .helper-banner-title,
body[data-theme="sunflower-custom"] .helper-banner-title,
body[data-theme="parchment"] .helper-banner-title,
body[data-theme="mint"] .helper-banner-title,
body[data-theme="daisy"] .helper-banner-title {
  color: #78350f !important;
}

[data-theme-type="light"] .helper-banner-desc,
body[data-theme="sunflower"] .helper-banner-desc,
body[data-theme="sunflower-custom"] .helper-banner-desc,
body[data-theme="parchment"] .helper-banner-desc,
body[data-theme="mint"] .helper-banner-desc,
body[data-theme="daisy"] .helper-banner-desc {
  color: #92400e !important;
}

[data-theme-type="light"] .btn-ref-chart-toggle,
body[data-theme="sunflower"] .btn-ref-chart-toggle,
body[data-theme="sunflower-custom"] .btn-ref-chart-toggle,
body[data-theme="parchment"] .btn-ref-chart-toggle,
body[data-theme="mint"] .btn-ref-chart-toggle,
body[data-theme="daisy"] .btn-ref-chart-toggle {
  background: #fde68a !important;
  color: #78350f !important;
  border-color: #d97706 !important;
}

[data-theme-type="light"] .btn-ref-chart-toggle:hover,
body[data-theme="sunflower"] .btn-ref-chart-toggle:hover,
body[data-theme="sunflower-custom"] .btn-ref-chart-toggle:hover,
body[data-theme="parchment"] .btn-ref-chart-toggle:hover,
body[data-theme="mint"] .btn-ref-chart-toggle:hover,
body[data-theme="daisy"] .btn-ref-chart-toggle:hover {
  background: #d97706 !important;
  color: #ffffff !important;
}

[data-theme-type="light"] .ref-table-card,
body[data-theme="sunflower"] .ref-table-card,
body[data-theme="sunflower-custom"] .ref-table-card,
body[data-theme="parchment"] .ref-table-card,
body[data-theme="mint"] .ref-table-card,
body[data-theme="daisy"] .ref-table-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

[data-theme-type="light"] .ref-card-title,
body[data-theme="sunflower"] .ref-card-title,
body[data-theme="sunflower-custom"] .ref-card-title,
body[data-theme="parchment"] .ref-card-title,
body[data-theme="mint"] .ref-card-title,
body[data-theme="daisy"] .ref-card-title {
  color: #92400e !important;
}

[data-theme-type="light"] .ref-mini-table td,
body[data-theme="sunflower"] .ref-mini-table td,
body[data-theme="sunflower-custom"] .ref-mini-table td,
body[data-theme="parchment"] .ref-mini-table td,
body[data-theme="mint"] .ref-mini-table td,
body[data-theme="daisy"] .ref-mini-table td {
  color: #334155 !important;
  border-bottom-color: #e2e8f0 !important;
}

[data-theme-type="light"] .ref-mini-table td strong,
body[data-theme="sunflower"] .ref-mini-table td strong,
body[data-theme="sunflower-custom"] .ref-mini-table td strong,
body[data-theme="parchment"] .ref-mini-table td strong,
body[data-theme="mint"] .ref-mini-table td strong,
body[data-theme="daisy"] .ref-mini-table td strong {
  color: #0f172a !important;
}

[data-theme-type="light"] .ing-conversion-bar,
body[data-theme="sunflower"] .ing-conversion-bar,
body[data-theme="sunflower-custom"] .ing-conversion-bar,
body[data-theme="parchment"] .ing-conversion-bar,
body[data-theme="mint"] .ing-conversion-bar,
body[data-theme="daisy"] .ing-conversion-bar {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

[data-theme-type="light"] .conversion-pill,
body[data-theme="sunflower"] .conversion-pill,
body[data-theme="sunflower-custom"] .conversion-pill,
body[data-theme="parchment"] .conversion-pill,
body[data-theme="mint"] .conversion-pill,
body[data-theme="daisy"] .conversion-pill {
  color: #064e3b !important;
}

[data-theme-type="light"] .conversion-pill-text strong,
body[data-theme="sunflower"] .conversion-pill-text strong,
body[data-theme="sunflower-custom"] .conversion-pill-text strong,
body[data-theme="parchment"] .conversion-pill-text strong,
body[data-theme="mint"] .conversion-pill-text strong,
body[data-theme="daisy"] .conversion-pill-text strong {
  color: #047857 !important;
}

[data-theme-type="light"] .conversion-density-pill,
body[data-theme="sunflower"] .conversion-density-pill,
body[data-theme="sunflower-custom"] .conversion-density-pill,
body[data-theme="parchment"] .conversion-density-pill,
body[data-theme="mint"] .conversion-density-pill,
body[data-theme="daisy"] .conversion-density-pill {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme-type="light"] .density-override-select,
body[data-theme="sunflower"] .density-override-select,
body[data-theme="sunflower-custom"] .density-override-select,
body[data-theme="parchment"] .density-override-select,
body[data-theme="mint"] .density-override-select,
body[data-theme="daisy"] .density-override-select {
  color: #1e293b !important;
}

[data-theme-type="light"] .density-override-select option,
body[data-theme="sunflower"] .density-override-select option,
body[data-theme="sunflower-custom"] .density-override-select option,
body[data-theme="parchment"] .density-override-select option,
body[data-theme="mint"] .density-override-select option,
body[data-theme="daisy"] .density-override-select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme-type="light"] .btn-convert-swap,
body[data-theme="sunflower"] .btn-convert-swap,
body[data-theme="sunflower-custom"] .btn-convert-swap,
body[data-theme="parchment"] .btn-convert-swap,
body[data-theme="mint"] .btn-convert-swap,
body[data-theme="daisy"] .btn-convert-swap {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border-color: #6ee7b7 !important;
}

[data-theme-type="light"] .btn-convert-swap:hover,
body[data-theme="sunflower"] .btn-convert-swap:hover,
body[data-theme="sunflower-custom"] .btn-convert-swap:hover,
body[data-theme="parchment"] .btn-convert-swap:hover,
body[data-theme="mint"] .btn-convert-swap:hover,
body[data-theme="daisy"] .btn-convert-swap:hover {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
}

/* ==========================================================================
   Recipe Step Reordering (Up / Down) Controls & Flash Animation
   ========================================================================== */

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.step-badge {
  font-weight: 700;
  color: var(--accent-amber);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.step-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.step-reorder-btns {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-step-move {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  touch-action: manipulation;
  user-select: none;
}

.btn-step-up {
  border-right: 1px solid var(--border);
}

.btn-step-move:not(:disabled):hover {
  background: var(--accent-amber);
  color: #1e1e1e;
}

.btn-step-move:not(:disabled):active {
  transform: scale(0.97);
}

.btn-step-move:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  pointer-events: none;
}

.reorder-arrow {
  font-size: 0.72rem;
  line-height: 1;
}

.reorder-label {
  letter-spacing: 0.02em;
}

/* Flash animation when a step is moved */
.step-move-flash {
  animation: stepReorderPulse 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes stepReorderPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    border-color: var(--accent-amber);
    transform: translateY(-2px);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.25);
    border-color: var(--accent-amber);
    transform: translateY(0);
  }
  100% {
    box-shadow: none;
    border-color: var(--border);
  }
}

/* Light Theme Step Reorder Overrides */
[data-theme-type="light"] .step-reorder-btns,
body[data-theme="sunflower"] .step-reorder-btns,
body[data-theme="sunflower-custom"] .step-reorder-btns,
body[data-theme="parchment"] .step-reorder-btns,
body[data-theme="mint"] .step-reorder-btns,
body[data-theme="daisy"] .step-reorder-btns {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

[data-theme-type="light"] .btn-step-move,
body[data-theme="sunflower"] .btn-step-move,
body[data-theme="sunflower-custom"] .btn-step-move,
body[data-theme="parchment"] .btn-step-move,
body[data-theme="mint"] .btn-step-move,
body[data-theme="daisy"] .btn-step-move {
  color: #334155 !important;
}

[data-theme-type="light"] .btn-step-up,
body[data-theme="sunflower"] .btn-step-up,
body[data-theme="sunflower-custom"] .btn-step-up,
body[data-theme="parchment"] .btn-step-up,
body[data-theme="mint"] .btn-step-up,
body[data-theme="daisy"] .btn-step-up {
  border-right-color: #cbd5e1 !important;
}

[data-theme-type="light"] .btn-step-move:not(:disabled):hover,
body[data-theme="sunflower"] .btn-step-move:not(:disabled):hover,
body[data-theme="sunflower-custom"] .btn-step-move:not(:disabled):hover,
body[data-theme="parchment"] .btn-step-move:not(:disabled):hover,
body[data-theme="mint"] .btn-step-move:not(:disabled):hover,
body[data-theme="daisy"] .btn-step-move:not(:disabled):hover {
  background: #d97706 !important;
  color: #ffffff !important;
}

/* Light Theme Detail Meta Bar Overrides */
[data-theme-type="light"] .detail-meta-bar,
body[data-theme*="sunflower"] .detail-meta-bar,
html[data-theme*="sunflower"] .detail-meta-bar,
body[data-theme="parchment"] .detail-meta-bar,
html[data-theme="parchment"] .detail-meta-bar,
body[data-theme="mint"] .detail-meta-bar,
html[data-theme="mint"] .detail-meta-bar,
body[data-theme="daisy"] .detail-meta-bar,
html[data-theme="daisy"] .detail-meta-bar {
  border-top-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme-type="light"] .detail-meta-bar .stat-label,
body[data-theme*="sunflower"] .detail-meta-bar .stat-label,
html[data-theme*="sunflower"] .detail-meta-bar .stat-label,
body[data-theme="parchment"] .detail-meta-bar .stat-label,
html[data-theme="parchment"] .detail-meta-bar .stat-label,
body[data-theme="mint"] .detail-meta-bar .stat-label,
html[data-theme="mint"] .detail-meta-bar .stat-label,
body[data-theme="daisy"] .detail-meta-bar .stat-label,
html[data-theme="daisy"] .detail-meta-bar .stat-label {
  color: #78350f !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
}

[data-theme-type="light"] .detail-meta-bar .stat-value,
body[data-theme*="sunflower"] .detail-meta-bar .stat-value,
html[data-theme*="sunflower"] .detail-meta-bar .stat-value,
body[data-theme="parchment"] .detail-meta-bar .stat-value,
html[data-theme="parchment"] .detail-meta-bar .stat-value,
body[data-theme="mint"] .detail-meta-bar .stat-value,
html[data-theme="mint"] .detail-meta-bar .stat-value,
body[data-theme="daisy"] .detail-meta-bar .stat-value,
html[data-theme="daisy"] .detail-meta-bar .stat-value {
  color: #1c1917 !important;
  font-weight: 800 !important;
}

[data-theme-type="light"] .detail-meta-bar .stat-box:not(:last-child):not(.stat-box-contributor)::after,
body[data-theme*="sunflower"] .detail-meta-bar .stat-box:not(:last-child):not(.stat-box-contributor)::after,
html[data-theme*="sunflower"] .detail-meta-bar .stat-box:not(:last-child):not(.stat-box-contributor)::after {
  background: rgba(0, 0, 0, 0.15) !important;
}

[data-theme-type="light"] .btn-change-contributor,
body[data-theme*="sunflower"] .btn-change-contributor,
html[data-theme*="sunflower"] .btn-change-contributor {
  background: #ffffff !important;
  color: #78350f !important;
  border-color: #d97706 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
}

[data-theme-type="light"] .btn-change-contributor:hover,
body[data-theme*="sunflower"] .btn-change-contributor:hover,
html[data-theme*="sunflower"] .btn-change-contributor:hover {
  background: #d97706 !important;
  color: #ffffff !important;
}

[data-theme-type="light"] .advisor-action-value,
body[data-theme*="sunflower"] .advisor-action-value,
html[data-theme*="sunflower"] .advisor-action-value {
  color: #0284c7 !important;
}

[data-theme-type="light"] .stat-box-advisor:hover .advisor-action-value,
body[data-theme*="sunflower"] .stat-box-advisor:hover .advisor-action-value,
html[data-theme*="sunflower"] .stat-box-advisor:hover .advisor-action-value {
  color: #0369a1 !important;
}

[data-theme-type="light"] .advisor-meta-score-chip.score-high,
body[data-theme*="sunflower"] .advisor-meta-score-chip.score-high,
html[data-theme*="sunflower"] .advisor-meta-score-chip.score-high {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #047857 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

[data-theme-type="light"] .advisor-meta-score-chip.score-mid,
body[data-theme*="sunflower"] .advisor-meta-score-chip.score-mid,
html[data-theme*="sunflower"] .advisor-meta-score-chip.score-mid {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #b45309 !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

[data-theme-type="light"] .advisor-meta-score-chip.score-low,
body[data-theme*="sunflower"] .advisor-meta-score-chip.score-low,
html[data-theme*="sunflower"] .advisor-meta-score-chip.score-low {
  background: rgba(239, 68, 68, 0.14) !important;
  color: #b91c1c !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

[data-theme-type="light"] .advisor-meta-allergen-chip.has-allergens,
body[data-theme*="sunflower"] .advisor-meta-allergen-chip.has-allergens,
html[data-theme*="sunflower"] .advisor-meta-allergen-chip.has-allergens {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #dc2626 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

[data-theme-type="light"] .advisor-meta-allergen-chip.is-safe,
body[data-theme*="sunflower"] .advisor-meta-allergen-chip.is-safe,
html[data-theme*="sunflower"] .advisor-meta-allergen-chip.is-safe {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #047857 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

[data-theme-type="light"] .allergen-advisory-panel,
body[data-theme*="sunflower"] .allergen-advisory-panel,
html[data-theme*="sunflower"] .allergen-advisory-panel {
  border-left-color: #dc2626 !important;
}

[data-theme-type="light"] .allergen-panel-title,
body[data-theme*="sunflower"] .allergen-panel-title,
html[data-theme*="sunflower"] .allergen-panel-title {
  color: #b91c1c !important;
}

[data-theme-type="light"] .btn-advisor-advisory-link,
body[data-theme*="sunflower"] .btn-advisor-advisory-link,
html[data-theme*="sunflower"] .btn-advisor-advisory-link {
  color: #0284c7 !important;
  border-color: rgba(2, 132, 199, 0.4) !important;
}

[data-theme-type="light"] .btn-advisor-advisory-link:hover,
body[data-theme*="sunflower"] .btn-advisor-advisory-link:hover,
html[data-theme*="sunflower"] .btn-advisor-advisory-link:hover {
  background: rgba(2, 132, 199, 0.1) !important;
  border-color: #0284c7 !important;
}

[data-theme-type="light"] .allergen-notice-box,
body[data-theme*="sunflower"] .allergen-notice-box,
html[data-theme*="sunflower"] .allergen-notice-box {
  background: rgba(239, 68, 68, 0.06) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

[data-theme-type="light"] .allergen-notice-badge,
body[data-theme*="sunflower"] .allergen-notice-badge,
html[data-theme*="sunflower"] .allergen-notice-badge {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #b91c1c !important;
}

[data-theme-type="light"] .allergen-notice-text,
body[data-theme*="sunflower"] .allergen-notice-text,
html[data-theme*="sunflower"] .allergen-notice-text {
  color: #1c1917 !important;
}

[data-theme-type="light"] .allergen-swap-card,
body[data-theme*="sunflower"] .allergen-swap-card,
html[data-theme*="sunflower"] .allergen-swap-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme-type="light"] .allergen-swap-name,
body[data-theme*="sunflower"] .allergen-swap-name,
html[data-theme*="sunflower"] .allergen-swap-name {
  color: #b91c1c !important;
}

[data-theme-type="light"] .allergen-swap-tip,
body[data-theme*="sunflower"] .allergen-swap-tip,
html[data-theme*="sunflower"] .allergen-swap-tip {
  color: #44403c !important;
}

/* ==========================================================================
   FEATURE ENHANCEMENTS & ROADMAP STYLES
   ========================================================================== */
.nav-enhancements-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.enhancement-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-amber, #f59e0b);
  color: #1e1b4b;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: var(--radius-full, 9999px);
  padding: 1px 6px;
  line-height: 1.2;
  margin-left: 2px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.enhancements-hero {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.enhancement-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.enhancement-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.enhancement-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.enhancement-vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.btn-enhancement-upvote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-height: 60px;
  padding: 8px 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-enhancement-upvote:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  transform: scale(1.05);
}

.btn-enhancement-upvote.has-upvoted {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.btn-enhancement-upvote .vote-arrow {
  font-size: 1.25rem;
  line-height: 1;
}

.btn-enhancement-upvote .vote-count {
  font-size: 0.95rem;
  font-weight: 800;
  margin-top: 2px;
}

.enhancement-main-col {
  flex: 1;
  min-width: 0;
}

.enhancement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.enhancement-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-proposed {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-planned {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-in_progress {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-declined {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.enhancement-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.enhancement-admin-note {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--accent-amber);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--text-primary);
}

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

.enhancement-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.enhancement-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.enhancement-modal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 620px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.enhancement-modal-backdrop.is-open .enhancement-modal-card {
  transform: translateY(0);
}

/* ==========================================================================
   RECIPE FAVORITES STYLES
   ========================================================================== */
.card-favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full, 9999px);
  padding: 4px 10px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.card-favorite-btn:hover {
  transform: scale(1.08);
  border-color: var(--accent-amber);
  color: #fff;
  background: rgba(15, 23, 42, 0.95);
}

.card-favorite-btn .fav-star-icon {
  font-size: 1rem;
  color: #94a3b8;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
  line-height: 1;
}

.card-favorite-btn:hover .fav-star-icon {
  color: #fbbf24;
}

.card-favorite-btn.is-favorited {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.7);
  color: #fef3c7;
}

.card-favorite-btn.is-favorited .fav-star-icon {
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  animation: starPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes starPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35) rotate(15deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.favorite-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.favorite-action-btn.is-favorited {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
}

.favorite-action-btn .fav-count-pill {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full, 9999px);
  padding: 1px 7px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 2px;
}

.favorite-action-btn.is-favorited .fav-count-pill {
  background: rgba(245, 158, 11, 0.35);
  color: #fff;
}

/* Light Theme Overrides for Favorites */
[data-theme-type="light"] .card-favorite-btn,
body[data-theme*="sunflower"] .card-favorite-btn,
html[data-theme*="sunflower"] .card-favorite-btn,
body[data-theme="parchment"] .card-favorite-btn,
html[data-theme="parchment"] .card-favorite-btn,
body[data-theme="mint"] .card-favorite-btn,
html[data-theme="mint"] .card-favorite-btn,
body[data-theme="daisy"] .card-favorite-btn,
html[data-theme="daisy"] .card-favorite-btn {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.16);
  color: #475569;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

[data-theme-type="light"] .card-favorite-btn.is-favorited,
body[data-theme*="sunflower"] .card-favorite-btn.is-favorited,
html[data-theme*="sunflower"] .card-favorite-btn.is-favorited,
body[data-theme="parchment"] .card-favorite-btn.is-favorited,
html[data-theme="parchment"] .card-favorite-btn.is-favorited,
body[data-theme="mint"] .card-favorite-btn.is-favorited,
html[data-theme="mint"] .card-favorite-btn.is-favorited,
body[data-theme="daisy"] .card-favorite-btn.is-favorited,
html[data-theme="daisy"] .card-favorite-btn.is-favorited {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

/* ==========================================================================
   NAVBAR & TOP NAVIGATION CONTROLS (DESKTOP ONLY - UNIFIED SIZING)
   ========================================================================== */
@media (min-width: 769px) {
  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .nav-actions .btn,
  .nav-actions .nav-link-item,
  .nav-actions .user-badge {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    line-height: 32px !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius-full, 9999px) !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    gap: 6px !important;
    text-decoration: none;
    transition: all 0.18s ease;
  }

  .nav-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-primary);
  }

  .nav-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-amber);
    color: #ffffff;
    transform: translateY(-1px);
  }

  .nav-actions .btn-primary {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-amber)) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 14px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25) !important;
  }

  .nav-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
  }

  .nav-actions .btn-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.28) !important;
    color: #fca5a5 !important;
    padding: 0 11px !important;
  }

  .nav-actions .btn-danger:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
  }

  .nav-actions .user-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 0 11px 0 5px !important;
    gap: 7px;
    font-size: 0.8rem !important;
  }

  .nav-actions .user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-amber);
    color: #1e1b4b;
    font-weight: 800;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .nav-actions .user-display-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-actions .nav-meta-stack {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    height: 34px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }

  .nav-actions .nav-meta-stack .brand-column-btn {
    height: 26px !important;
    line-height: 24px !important;
    padding: 0 8px !important;
    font-size: 0.7rem !important;
  }

  /* Light Theme Navigation Clean Pill Styling */
  [data-theme-type="light"] .nav-actions .btn-secondary,
  body[data-theme*="sunflower"] .nav-actions .btn-secondary,
  html[data-theme*="sunflower"] .nav-actions .btn-secondary,
  body[data-theme="parchment"] .nav-actions .btn-secondary,
  html[data-theme="parchment"] .nav-actions .btn-secondary,
  body[data-theme="mint"] .nav-actions .btn-secondary,
  html[data-theme="mint"] .nav-actions .btn-secondary,
  body[data-theme="daisy"] .nav-actions .btn-secondary,
  html[data-theme="daisy"] .nav-actions .btn-secondary {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1f2937 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }

  [data-theme-type="light"] .nav-actions .btn-secondary:hover,
  body[data-theme*="sunflower"] .nav-actions .btn-secondary:hover,
  html[data-theme*="sunflower"] .nav-actions .btn-secondary:hover,
  body[data-theme="parchment"] .nav-actions .btn-secondary:hover,
  html[data-theme="parchment"] .nav-actions .btn-secondary:hover,
  body[data-theme="mint"] .nav-actions .btn-secondary:hover,
  html[data-theme="mint"] .nav-actions .btn-secondary:hover,
  body[data-theme="daisy"] .nav-actions .btn-secondary:hover,
  html[data-theme="daisy"] .nav-actions .btn-secondary:hover {
    background: #fffbeb !important;
    border-color: #f59e0b !important;
    color: #b45309 !important;
  }

  [data-theme-type="light"] .nav-actions .user-badge,
  body[data-theme*="sunflower"] .nav-actions .user-badge,
  html[data-theme*="sunflower"] .nav-actions .user-badge,
  body[data-theme="parchment"] .nav-actions .user-badge,
  html[data-theme="parchment"] .nav-actions .user-badge,
  body[data-theme="mint"] .nav-actions .user-badge,
  html[data-theme="mint"] .nav-actions .user-badge,
  body[data-theme="daisy"] .nav-actions .user-badge,
  html[data-theme="daisy"] .nav-actions .user-badge {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1f2937 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }

  [data-theme-type="light"] .nav-actions .btn-danger,
  body[data-theme*="sunflower"] .nav-actions .btn-danger,
  html[data-theme*="sunflower"] .nav-actions .btn-danger,
  body[data-theme="parchment"] .nav-actions .btn-danger,
  html[data-theme="parchment"] .nav-actions .btn-danger,
  body[data-theme="mint"] .nav-actions .btn-danger,
  html[data-theme="mint"] .nav-actions .btn-danger,
  body[data-theme="daisy"] .nav-actions .btn-danger,
  html[data-theme="daisy"] .nav-actions .btn-danger {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #e11d48 !important;
  }

  [data-theme-type="light"] .nav-actions .btn-danger:hover,
  body[data-theme*="sunflower"] .nav-actions .btn-danger:hover,
  html[data-theme*="sunflower"] .nav-actions .btn-danger:hover {
    background: #e11d48 !important;
    color: #ffffff !important;
  }
}

/* ==========================================================================
   FEATURE ENHANCEMENTS TOOLBAR & STATUS PILLS
   ========================================================================== */
.enhancements-toolbar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.enhancements-status-pills-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pills-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.enhancements-status-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full, 9999px);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.status-filter-pill:hover {
  transform: translateY(-1px);
  border-color: var(--accent-amber);
  color: var(--text-primary);
}

.status-filter-pill.active {
  background: linear-gradient(135deg, var(--accent-orange, #ea580c), var(--accent-amber, #f59e0b)) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.3) !important;
}

.enhancements-filter-controls {
  width: 100%;
}

.enhancement-search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.enhancement-search-box {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}

.enhancement-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.95rem;
  opacity: 0.6;
}

.enhancement-search-box .search-input-sm {
  padding-left: 36px !important;
  height: 38px !important;
  border-radius: var(--radius-md) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

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

.enhancement-select-group .select-sm {
  height: 38px !important;
  border-radius: var(--radius-md) !important;
  padding: 0 12px !important;
  font-size: 0.85rem !important;
  min-width: 140px;
}

/* Light Theme Overrides for Enhancement Pills */
[data-theme-type="light"] .status-filter-pill,
body[data-theme*="sunflower"] .status-filter-pill,
html[data-theme*="sunflower"] .status-filter-pill,
body[data-theme="parchment"] .status-filter-pill,
html[data-theme="parchment"] .status-filter-pill,
body[data-theme="mint"] .status-filter-pill,
html[data-theme="mint"] .status-filter-pill,
body[data-theme="daisy"] .status-filter-pill,
html[data-theme="daisy"] .status-filter-pill {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.16) !important;
  color: #1f2937 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme-type="light"] .status-filter-pill:hover,
body[data-theme*="sunflower"] .status-filter-pill:hover,
html[data-theme*="sunflower"] .status-filter-pill:hover,
body[data-theme="parchment"] .status-filter-pill:hover,
html[data-theme="parchment"] .status-filter-pill:hover {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

[data-theme-type="light"] .status-filter-pill.active,
body[data-theme*="sunflower"] .status-filter-pill.active,
html[data-theme*="sunflower"] .status-filter-pill.active,
body[data-theme="parchment"] .status-filter-pill.active,
html[data-theme="parchment"] .status-filter-pill.active {
  background: linear-gradient(135deg, #ea580c, #f59e0b) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 3px 8px rgba(234, 88, 12, 0.3) !important;
}

/* ==========================================================================
   LINKED COMPANION RECIPES & MEAL PAIRINGS (COMPACT CHIPS)
   ========================================================================== */
.meal-pairings-container {
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.pairings-header {
  margin-bottom: 8px;
}

.pairings-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-amber);
}

.pairings-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: 100%;
}

.pairing-compact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-full, 9999px);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  max-width: 100%;
  box-sizing: border-box;
}

.pairing-compact-chip:hover {
  transform: translateY(-1px);
  border-color: var(--accent-amber);
  background: var(--card-hover);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.pairing-chip-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pairing-chip-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.pairing-chip-content {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.pairing-chip-relation {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-amber);
  white-space: nowrap;
  flex-shrink: 0;
}

.pairing-chip-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.pairing-chip-arrow {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: transform 0.15s ease;
  margin-left: 2px;
  flex-shrink: 0;
}

.pairing-compact-chip:hover .pairing-chip-arrow {
  transform: translateX(2px);
  color: var(--accent-amber);
}

/* Light Theme Overrides for Pairing Chips */
[data-theme-type="light"] .pairing-compact-chip,
body[data-theme*="sunflower"] .pairing-compact-chip,
html[data-theme*="sunflower"] .pairing-compact-chip,
body[data-theme="parchment"] .pairing-compact-chip,
html[data-theme="parchment"] .pairing-compact-chip,
body[data-theme="mint"] .pairing-compact-chip,
html[data-theme="mint"] .pairing-compact-chip,
body[data-theme="daisy"] .pairing-compact-chip,
html[data-theme="daisy"] .pairing-compact-chip {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.14) !important;
  color: #1c1917 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme-type="light"] .pairing-compact-chip:hover,
body[data-theme*="sunflower"] .pairing-compact-chip:hover,
html[data-theme*="sunflower"] .pairing-compact-chip:hover,
body[data-theme="parchment"] .pairing-compact-chip:hover,
html[data-theme="parchment"] .pairing-compact-chip:hover {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
}

[data-theme-type="light"] .pairing-chip-relation,
body[data-theme*="sunflower"] .pairing-chip-relation,
html[data-theme*="sunflower"] .pairing-chip-relation {
  color: #b45309 !important;
}

[data-theme-type="light"] .pairing-chip-thumb,
body[data-theme*="sunflower"] .pairing-chip-thumb,
html[data-theme*="sunflower"] .pairing-chip-thumb {
  border-color: rgba(0, 0, 0, 0.12);
}

/* Mobile Pairings Layout (Cards neatly fit mobile screen width without overflow) */
@media (max-width: 640px) {
  .meal-pairings-container {
    padding: 10px 12px !important;
    margin-top: 16px !important;
    border-radius: var(--radius-md) !important;
  }

  .pairings-chips-list {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .pairing-compact-chip {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: var(--radius-md) !important;
    padding: 8px 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .pairing-chip-thumb,
  .pairing-chip-placeholder {
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.95rem !important;
  }

  .pairing-chip-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .pairing-chip-relation {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .pairing-chip-title {
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .pairing-chip-arrow {
    font-size: 1rem !important;
    margin-left: auto !important;
  }
}

/* ==========================================================================
   AI RECIPE CARD & PHOTO SCANNER (GEMINI MULTIMODAL)
   ========================================================================== */

.ai-scan-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.35), 0 0 16px -4px rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-theme="sunflower"] .ai-scan-banner,
[data-theme="sunflower-custom"] .ai-scan-banner,
[data-theme="parchment"] .ai-scan-banner,
[data-theme="mint"] .ai-scan-banner {
  background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: 0 6px 20px -4px rgba(180, 83, 9, 0.15);
}

.ai-scan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-scan-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-scan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.ai-sparkle {
  animation: aiSparkleRotate 3s infinite linear;
  display: inline-block;
}

@keyframes aiSparkleRotate {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.25) rotate(15deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.ai-scan-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ai-toggle {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-amber);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-ai-toggle:hover {
  background: rgba(245, 158, 11, 0.22);
  transform: translateY(-1px);
}

.ai-scanner-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="sunflower"] .ai-scanner-body,
[data-theme="sunflower-custom"] .ai-scanner-body,
[data-theme="parchment"] .ai-scanner-body,
[data-theme="mint"] .ai-scanner-body {
  border-top-color: rgba(217, 119, 6, 0.2);
}

.ai-scanner-intro {
  margin-bottom: 16px;
}

.ai-scanner-intro p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

.ai-dropzone {
  border: 2px dashed rgba(245, 158, 11, 0.45);
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

[data-theme="sunflower"] .ai-dropzone,
[data-theme="sunflower-custom"] .ai-dropzone,
[data-theme="parchment"] .ai-dropzone,
[data-theme="mint"] .ai-dropzone {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(217, 119, 6, 0.5);
}

.ai-dropzone:hover,
.ai-dropzone.dragover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.ai-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.ai-dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.ai-dropzone-text {
  font-size: 0.96rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ai-dropzone-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ai-selected-files {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ai-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: 0.82rem;
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ai-preview-thumb {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.ai-chip-name {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.btn-remove-ai-file {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.ai-scan-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn-ai-scan {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 10px 22px !important;
  font-size: 0.95rem !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35) !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-ai-scan:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.5) !important;
}

.btn-ai-scan:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ai-scan-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--accent-amber);
  font-weight: 600;
}

.ai-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(245, 158, 11, 0.25);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: aiSpin 0.8s infinite linear;
}

@keyframes aiSpin {
  to { transform: rotate(360deg); }
}

.ai-scan-alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: aiAlertFadeIn 0.3s ease;
}

.ai-alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

[data-theme="sunflower"] .ai-alert-success,
[data-theme="sunflower-custom"] .ai-alert-success,
[data-theme="parchment"] .ai-alert-success,
[data-theme="mint"] .ai-alert-success {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.ai-alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

[data-theme="sunflower"] .ai-alert-danger,
[data-theme="sunflower-custom"] .ai-alert-danger,
[data-theme="parchment"] .ai-alert-danger,
[data-theme="mint"] .ai-alert-danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

@keyframes aiAlertFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Audience & Privacy (Personal vs Public) Styles
   ========================================================================== */

/* Tile & Detail Audience Marker Badges */
.card-audience-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.card-audience-badge.badge-personal {
  background: rgba(124, 58, 237, 0.9);
  color: #ffffff;
  border: 1px solid rgba(167, 139, 250, 0.5);
}

.card-audience-badge.badge-public {
  background: rgba(13, 148, 136, 0.9);
  color: #ffffff;
  border: 1px solid rgba(45, 212, 191, 0.5);
}

/* Scope Toggle Toolbar (Browse screen filter) */
.scope-toggle-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 18px 0 14px;
}

.scope-toggle-group {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: var(--radius-full);
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-wrap: wrap;
  justify-content: center;
}

.scope-toggle-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}

.scope-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.scope-toggle-btn.active {
  background: var(--accent-amber);
  color: #0b0f19;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.scope-toggle-btn.scope-toggle-admin.active {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
}

/* Audience Radio Selection Card (recipe_form.html) */
.audience-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.audience-radio-card {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
}

.audience-radio-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.audience-radio-card.selected {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 1px var(--accent-amber);
}

.audience-radio-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.audience-card-content {
  width: 100%;
}

.audience-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.audience-card-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.audience-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  flex-grow: 1;
}

.audience-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.audience-pill.badge-public {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.audience-pill.badge-personal {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.audience-card-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* Admin Dashboard Stats Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-amber);
}

.stat-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-card-body {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

.stat-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* User Breakdown Badges */
.badge-count {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.8rem;
}

.badge-count-public {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-count-private {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-count-ai {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

/* AI Assisted Badges and Indicators */
.badge-ai-assisted {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card-ai-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(219, 39, 119, 0.88);
  color: #ffffff;
  border: 1px solid rgba(244, 114, 182, 0.5);
  transition: all 0.2s ease;
}

[data-theme="sunflower"] .badge-count-ai,
[data-theme="sunflower-custom"] .badge-count-ai,
[data-theme="parchment"] .badge-count-ai,
[data-theme="mint"] .badge-count-ai {
  background: #fdf2f8;
  color: #db2777;
  border-color: #fbcfe8;
}

[data-theme="sunflower"] .badge-ai-assisted,
[data-theme="sunflower-custom"] .badge-ai-assisted,
[data-theme="parchment"] .badge-ai-assisted,
[data-theme="mint"] .badge-ai-assisted {
  background: #fdf2f8;
  color: #be185d;
  border-color: #f472b6;
}

/* Light Theme Contrast Overrides */
[data-theme="sunflower"] .scope-toggle-group,
[data-theme="sunflower-custom"] .scope-toggle-group,
[data-theme="parchment"] .scope-toggle-group,
[data-theme="mint"] .scope-toggle-group {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="sunflower"] .scope-toggle-btn,
[data-theme="sunflower-custom"] .scope-toggle-btn,
[data-theme="parchment"] .scope-toggle-btn,
[data-theme="mint"] .scope-toggle-btn {
  color: #475569;
}

[data-theme="sunflower"] .scope-toggle-btn.active,
[data-theme="sunflower-custom"] .scope-toggle-btn.active,
[data-theme="parchment"] .scope-toggle-btn.active,
[data-theme="mint"] .scope-toggle-btn.active {
  background: #f59e0b;
  color: #ffffff;
}

[data-theme="sunflower"] .audience-radio-card,
[data-theme="sunflower-custom"] .audience-radio-card,
[data-theme="parchment"] .audience-radio-card,
[data-theme="mint"] .audience-radio-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="sunflower"] .audience-radio-card.selected,
[data-theme="sunflower-custom"] .audience-radio-card.selected,
[data-theme="parchment"] .audience-radio-card.selected,
[data-theme="mint"] .audience-radio-card.selected {
  border-color: #d97706;
  background: #fffbeb;
}

[data-theme="sunflower"] .badge-count-public,
[data-theme="sunflower-custom"] .badge-count-public,
[data-theme="parchment"] .badge-count-public,
[data-theme="mint"] .badge-count-public {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

[data-theme="sunflower"] .badge-count-private,
[data-theme="sunflower-custom"] .badge-count-private,
[data-theme="parchment"] .badge-count-private,
[data-theme="mint"] .badge-count-private {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

/* ==========================================================================
   Save Recipe Audience Confirmation Dialog Styles (High-Contrast & Multi-Theme)
   ========================================================================== */
.audience-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.audience-modal-box {
  background: var(--card-bg, #1a2234);
  background-color: var(--card-bg, #1a2234);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
  border-radius: var(--radius-lg, 18px);
  max-width: 520px;
  width: 100%;
  padding: 28px;
  color: var(--text-primary);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: audienceModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes audienceModalFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.audience-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}

.audience-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.audience-modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.audience-modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.audience-modal-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Modal Inner Preview Card */
.audience-preview-card {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.2s ease;
}

/* Private / Personal Preview Card (Dark default) */
.audience-preview-card.is-private {
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.5);
}

.audience-preview-card.is-private .preview-title {
  color: #c4b5fd;
  font-size: 1.05rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.audience-preview-card.is-private .preview-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.5;
}

.audience-preview-card.is-private .preview-desc strong {
  color: #ffffff;
}

/* Public / Community Preview Card (Dark default) */
.audience-preview-card.is-public {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.5);
}

.audience-preview-card.is-public .preview-title {
  color: #6ee7b7;
  font-size: 1.05rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.audience-preview-card.is-public .preview-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.5;
}

.audience-preview-card.is-public .preview-desc strong {
  color: #ffffff;
}

.audience-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Light Theme Contrast Overrides (Sunflower, Parchment, Mint Meadow, Daisy)
   -------------------------------------------------------------------------- */
html[data-theme-type="light"] .audience-modal-box,
html[data-theme*="sunflower"] .audience-modal-box,
html[data-theme*="parchment"] .audience-modal-box,
html[data-theme*="daisy"] .audience-modal-box,
html[data-theme*="mint"] .audience-modal-box,
body[data-theme="sunflower"] .audience-modal-box,
body[data-theme="parchment"] .audience-modal-box,
body[data-theme="mint"] .audience-modal-box {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  color: #1c1917 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme-type="light"] .audience-modal-title,
html[data-theme*="sunflower"] .audience-modal-title,
html[data-theme*="parchment"] .audience-modal-title,
html[data-theme*="daisy"] .audience-modal-title,
html[data-theme*="mint"] .audience-modal-title,
body[data-theme="sunflower"] .audience-modal-title,
body[data-theme="parchment"] .audience-modal-title,
body[data-theme="mint"] .audience-modal-title {
  color: #1c1917 !important;
}

html[data-theme-type="light"] .audience-modal-header,
html[data-theme*="sunflower"] .audience-modal-header,
html[data-theme*="parchment"] .audience-modal-header,
html[data-theme*="daisy"] .audience-modal-header,
html[data-theme*="mint"] .audience-modal-header,
body[data-theme="sunflower"] .audience-modal-header,
body[data-theme="parchment"] .audience-modal-header,
body[data-theme="mint"] .audience-modal-header {
  border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme-type="light"] .audience-modal-close,
html[data-theme*="sunflower"] .audience-modal-close,
html[data-theme*="parchment"] .audience-modal-close,
html[data-theme*="daisy"] .audience-modal-close,
html[data-theme*="mint"] .audience-modal-close,
body[data-theme="sunflower"] .audience-modal-close,
body[data-theme="parchment"] .audience-modal-close,
body[data-theme="mint"] .audience-modal-close {
  color: #78716c !important;
}

html[data-theme-type="light"] .audience-modal-close:hover,
html[data-theme*="sunflower"] .audience-modal-close:hover,
html[data-theme*="parchment"] .audience-modal-close:hover,
html[data-theme*="daisy"] .audience-modal-close:hover,
html[data-theme*="mint"] .audience-modal-close:hover,
body[data-theme="sunflower"] .audience-modal-close:hover,
body[data-theme="parchment"] .audience-modal-close:hover,
body[data-theme="mint"] .audience-modal-close:hover {
  color: #1c1917 !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

html[data-theme-type="light"] .audience-modal-intro,
html[data-theme*="sunflower"] .audience-modal-intro,
html[data-theme*="parchment"] .audience-modal-intro,
html[data-theme*="daisy"] .audience-modal-intro,
html[data-theme*="mint"] .audience-modal-intro,
body[data-theme="sunflower"] .audience-modal-intro,
body[data-theme="parchment"] .audience-modal-intro,
body[data-theme="mint"] .audience-modal-intro {
  color: #44403c !important;
  font-weight: 500;
}

/* Light Theme Private Preview Card */
html[data-theme-type="light"] .audience-preview-card.is-private,
html[data-theme*="sunflower"] .audience-preview-card.is-private,
html[data-theme*="parchment"] .audience-preview-card.is-private,
html[data-theme*="daisy"] .audience-preview-card.is-private,
html[data-theme*="mint"] .audience-preview-card.is-private,
body[data-theme="sunflower"] .audience-preview-card.is-private,
body[data-theme="parchment"] .audience-preview-card.is-private,
body[data-theme="mint"] .audience-preview-card.is-private {
  background: #f5f3ff !important;
  border: 1.5px solid #c4b5fd !important;
}

html[data-theme-type="light"] .audience-preview-card.is-private .preview-title,
html[data-theme*="sunflower"] .audience-preview-card.is-private .preview-title,
html[data-theme*="parchment"] .audience-preview-card.is-private .preview-title,
html[data-theme*="daisy"] .audience-preview-card.is-private .preview-title,
html[data-theme*="mint"] .audience-preview-card.is-private .preview-title,
body[data-theme="sunflower"] .audience-preview-card.is-private .preview-title,
body[data-theme="parchment"] .audience-preview-card.is-private .preview-title,
body[data-theme="mint"] .audience-preview-card.is-private .preview-title {
  color: #6d28d9 !important;
  font-weight: 800 !important;
}

html[data-theme-type="light"] .audience-preview-card.is-private .preview-desc,
html[data-theme*="sunflower"] .audience-preview-card.is-private .preview-desc,
html[data-theme*="parchment"] .audience-preview-card.is-private .preview-desc,
html[data-theme*="daisy"] .audience-preview-card.is-private .preview-desc,
html[data-theme*="mint"] .audience-preview-card.is-private .preview-desc,
body[data-theme="sunflower"] .audience-preview-card.is-private .preview-desc,
body[data-theme="parchment"] .audience-preview-card.is-private .preview-desc,
body[data-theme="mint"] .audience-preview-card.is-private .preview-desc {
  color: #2e1065 !important;
  font-weight: 450;
}

html[data-theme-type="light"] .audience-preview-card.is-private .preview-desc strong,
html[data-theme*="sunflower"] .audience-preview-card.is-private .preview-desc strong,
html[data-theme*="parchment"] .audience-preview-card.is-private .preview-desc strong,
html[data-theme*="daisy"] .audience-preview-card.is-private .preview-desc strong,
html[data-theme*="mint"] .audience-preview-card.is-private .preview-desc strong,
body[data-theme="sunflower"] .audience-preview-card.is-private .preview-desc strong,
body[data-theme="parchment"] .audience-preview-card.is-private .preview-desc strong,
body[data-theme="mint"] .audience-preview-card.is-private .preview-desc strong {
  color: #1e1b4b !important;
  font-weight: 700;
}

/* Light Theme Public Preview Card */
html[data-theme-type="light"] .audience-preview-card.is-public,
html[data-theme*="sunflower"] .audience-preview-card.is-public,
html[data-theme*="parchment"] .audience-preview-card.is-public,
html[data-theme*="daisy"] .audience-preview-card.is-public,
html[data-theme*="mint"] .audience-preview-card.is-public,
body[data-theme="sunflower"] .audience-preview-card.is-public,
body[data-theme="parchment"] .audience-preview-card.is-public,
body[data-theme="mint"] .audience-preview-card.is-public {
  background: #ecfdf5 !important;
  border: 1.5px solid #a7f3d0 !important;
}

html[data-theme-type="light"] .audience-preview-card.is-public .preview-title,
html[data-theme*="sunflower"] .audience-preview-card.is-public .preview-title,
html[data-theme*="parchment"] .audience-preview-card.is-public .preview-title,
html[data-theme*="daisy"] .audience-preview-card.is-public .preview-title,
html[data-theme*="mint"] .audience-preview-card.is-public .preview-title,
body[data-theme="sunflower"] .audience-preview-card.is-public .preview-title,
body[data-theme="parchment"] .audience-preview-card.is-public .preview-title,
body[data-theme="mint"] .audience-preview-card.is-public .preview-title {
  color: #047857 !important;
  font-weight: 800 !important;
}

html[data-theme-type="light"] .audience-preview-card.is-public .preview-desc,
html[data-theme*="sunflower"] .audience-preview-card.is-public .preview-desc,
html[data-theme*="parchment"] .audience-preview-card.is-public .preview-desc,
html[data-theme*="daisy"] .audience-preview-card.is-public .preview-desc,
html[data-theme*="mint"] .audience-preview-card.is-public .preview-desc,
body[data-theme="sunflower"] .audience-preview-card.is-public .preview-desc,
body[data-theme="parchment"] .audience-preview-card.is-public .preview-desc,
body[data-theme="mint"] .audience-preview-card.is-public .preview-desc {
  color: #064e3b !important;
  font-weight: 450;
}

html[data-theme-type="light"] .audience-preview-card.is-public .preview-desc strong,
html[data-theme*="sunflower"] .audience-preview-card.is-public .preview-desc strong,
html[data-theme*="parchment"] .audience-preview-card.is-public .preview-desc strong,
html[data-theme*="daisy"] .audience-preview-card.is-public .preview-desc strong,
html[data-theme*="mint"] .audience-preview-card.is-public .preview-desc strong,
body[data-theme="sunflower"] .audience-preview-card.is-public .preview-desc strong,
body[data-theme="parchment"] .audience-preview-card.is-public .preview-desc strong,
body[data-theme="mint"] .audience-preview-card.is-public .preview-desc strong {
  color: #022c22 !important;
  font-weight: 700;
}

/* ==========================================================================
   AI Kitchen Advisor Modal & Components (Theme-Native)
   ========================================================================== */

.advisor-modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999 !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.advisor-modal-backdrop.is-hidden,
.advisor-modal-backdrop[style*="display: none"],
.advisor-modal-backdrop[style*="display:none"] {
  display: none !important;
}

.advisor-modal-backdrop.is-open {
  display: flex !important;
}

.advisor-modal-box {
  background: var(--bg-secondary, #131b2e);
  color: var(--text-primary, #f8fafc);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  width: 880px;
  max-width: 95vw;
  height: 85vh;
  max-height: 850px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

/* Light Theme Overrides for Advisor Modal */
html[data-theme-type="light"] .advisor-modal-box,
html[data-theme*="sunflower"] .advisor-modal-box,
body[data-theme*="sunflower"] .advisor-modal-box,
html[data-theme*="parchment"] .advisor-modal-box,
body[data-theme*="parchment"] .advisor-modal-box,
html[data-theme*="mint"] .advisor-modal-box,
body[data-theme*="mint"] .advisor-modal-box,
html[data-theme*="daisy"] .advisor-modal-box,
body[data-theme*="daisy"] .advisor-modal-box {
  background: #ffffff !important;
  color: #1c1917 !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.advisor-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: inherit;
}

.advisor-sparkle-icon {
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.advisor-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  padding: 0 16px;
  flex-shrink: 0;
}

html[data-theme-type="light"] .advisor-tabs-bar,
html[data-theme*="sunflower"] .advisor-tabs-bar,
body[data-theme*="sunflower"] .advisor-tabs-bar,
html[data-theme*="parchment"] .advisor-tabs-bar,
body[data-theme*="parchment"] .advisor-tabs-bar,
html[data-theme*="mint"] .advisor-tabs-bar,
body[data-theme*="mint"] .advisor-tabs-bar,
html[data-theme*="daisy"] .advisor-tabs-bar,
body[data-theme*="daisy"] .advisor-tabs-bar {
  background: rgba(0, 0, 0, 0.03) !important;
}

.advisor-tab-btn {
  background: none;
  border: none;
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.advisor-tab-btn:hover {
  color: var(--text-primary);
}

.advisor-tab-btn.active {
  color: var(--accent-amber) !important;
  border-bottom-color: var(--accent-amber) !important;
}

.advisor-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 24px;
  color: var(--text-primary);
}

.advisor-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

html[data-theme-type="light"] .advisor-modal-footer,
html[data-theme*="sunflower"] .advisor-modal-footer,
body[data-theme*="sunflower"] .advisor-modal-footer,
html[data-theme*="parchment"] .advisor-modal-footer,
body[data-theme*="parchment"] .advisor-modal-footer,
html[data-theme*="mint"] .advisor-modal-footer,
body[data-theme*="mint"] .advisor-modal-footer,
html[data-theme*="daisy"] .advisor-modal-footer,
body[data-theme*="daisy"] .advisor-modal-footer {
  background: rgba(0, 0, 0, 0.02) !important;
}

/* Mobile Viewport Polish for Advisor Modals (Prevents Buttons Being Pushed Offscreen) */
@media (max-width: 640px) {
  .advisor-modal-backdrop {
    padding: 8px 6px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .advisor-modal-box {
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100dvh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    border-radius: 14px !important;
    margin: 0 !important;
  }
  .advisor-modal-header {
    padding: 10px 14px !important;
    gap: 8px !important;
  }
  .advisor-modal-header h3,
  .advisor-modal-header .modal-title {
    font-size: 1.05rem !important;
    line-height: 1.25 !important;
  }
  .advisor-modal-header p,
  .advisor-modal-header span:not(.advisor-sparkle-icon) {
    display: none !important; /* Hide long subtitle to avoid crowding actions on mobile */
  }
  .advisor-sparkle-icon {
    width: 30px !important;
    height: 30px !important;
    font-size: 1.15rem !important;
  }
  #btn-advisor-rerun {
    font-size: 0.74rem !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
  }
  .advisor-tabs-bar {
    padding: 0 6px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .advisor-tab-btn {
    padding: 10px 10px !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
  }
  .advisor-modal-body {
    padding: 14px 14px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .advisor-modal-footer {
    padding: 10px 14px !important;
    flex-shrink: 0 !important;
  }
  .advisor-modal-footer .btn {
    width: 100% !important;
  }
}

html[data-theme-type="light"] .advisor-progress-card,
body[data-theme*="sunflower"] .advisor-progress-card,
html[data-theme*="sunflower"] .advisor-progress-card,
body[data-theme*="parchment"] .advisor-progress-card,
html[data-theme*="parchment"] .advisor-progress-card,
body[data-theme*="mint"] .advisor-progress-card,
html[data-theme*="mint"] .advisor-progress-card,
body[data-theme*="daisy"] .advisor-progress-card,
html[data-theme*="daisy"] .advisor-progress-card {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.advisor-empty-state {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  padding: 16px 0 !important;
  margin: 0 auto !important;
}

.advisor-hero-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 28px;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 660px !important;
  margin: 0 auto !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.advisor-score-card,
.advisor-section-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

html[data-theme-type="light"] .advisor-hero-card,
html[data-theme*="sunflower"] .advisor-hero-card,
body[data-theme*="sunflower"] .advisor-hero-card,
html[data-theme*="parchment"] .advisor-hero-card,
body[data-theme*="parchment"] .advisor-hero-card,
html[data-theme*="mint"] .advisor-hero-card,
body[data-theme*="mint"] .advisor-hero-card,
html[data-theme*="daisy"] .advisor-hero-card,
body[data-theme*="daisy"] .advisor-hero-card,
html[data-theme-type="light"] .advisor-score-card,
html[data-theme*="sunflower"] .advisor-score-card,
body[data-theme*="sunflower"] .advisor-score-card,
html[data-theme*="parchment"] .advisor-score-card,
body[data-theme*="parchment"] .advisor-score-card,
html[data-theme*="mint"] .advisor-score-card,
body[data-theme*="mint"] .advisor-score-card,
html[data-theme*="daisy"] .advisor-score-card,
body[data-theme*="daisy"] .advisor-score-card,
html[data-theme-type="light"] .advisor-section-card,
html[data-theme*="sunflower"] .advisor-section-card,
body[data-theme*="sunflower"] .advisor-section-card,
html[data-theme*="parchment"] .advisor-section-card,
body[data-theme*="parchment"] .advisor-section-card,
html[data-theme*="mint"] .advisor-section-card,
body[data-theme*="mint"] .advisor-section-card,
html[data-theme*="daisy"] .advisor-section-card,
body[data-theme*="daisy"] .advisor-section-card {
  background: #faf8f5 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #1c1917 !important;
}

.shimmer-pulse-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--accent-amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.score-dial {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.1);
  border: 3px solid var(--accent-amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.score-number {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-amber);
}

.score-rating-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.tip-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-amber);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

html[data-theme-type="light"] .tip-item,
html[data-theme*="sunflower"] .tip-item,
body[data-theme*="sunflower"] .tip-item,
html[data-theme*="parchment"] .tip-item,
body[data-theme*="parchment"] .tip-item,
html[data-theme*="mint"] .tip-item,
body[data-theme*="mint"] .tip-item,
html[data-theme*="daisy"] .tip-item,
body[data-theme*="daisy"] .tip-item {
  background: #fdfbf7 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  border-left-color: var(--accent-amber) !important;
}

.tip-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  white-space: nowrap;
  margin-top: 1px;
}









