.modern-nav .dropdown-menu {
  z-index: 1100;
}

/* ───── Base Styles ───────────────────────────────────────────────── */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

button.theme-toggle.nav-link {
  background: transparent;
  border: 0;
  cursor: pointer;
}

.theme-toggle {
  white-space: nowrap;
}

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

.navbar-brand {
  font-weight: 600;
}

/* ───── Modern Color Variables ─────────────────────────────────────── */
:root {
  --modern-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --modern-primary-solid: #10b981;
  --modern-primary-light: #34d399;
  --modern-primary-hover: #059669;
  --modern-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --modern-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --modern-info: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --modern-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

  /* ── Shared design tokens (radius / elevation / signal) ── */
  --hb-radius-card: 16px;
  --hb-radius-pill: 999px;
  --hb-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
  --hb-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  /* Progress "signal" ramp: on-track / approaching / over goal */
  --hb-signal-good: #10b981;
  --hb-signal-warn: #f59e0b;
  --hb-signal-over: #ef4444;
}

/* ───── Modern Navigation Styles ─────────────────────────────────── */
.modern-nav {
  background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 0.75rem 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1040;
}

.modern-nav .navbar-brand .brand-text {
  color: #047857;
  font-weight: 700;
  font-size: 1.25rem;
}

.modern-nav .navbar-nav .nav-link {
  color: #374151 !important;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  border-radius: 8px;
  margin: 0 0.25rem;
  transition: all 0.3s ease;
}

.modern-nav .navbar-nav .nav-link:hover {
  color: #047857 !important;
  background-color: rgba(16, 185, 129, 0.1);
  transform: translateY(-1px);
}

.modern-nav .navbar-nav .nav-link.active {
  color: #047857 !important;
  background-color: rgba(16, 185, 129, 0.15);
}

.modern-nav .btn-light {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: white !important;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.modern-nav .btn-light:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  color: white !important;
}

.modern-nav .btn-outline-light {
  border: 2px solid #10b981;
  color: #10b981 !important;
  background: transparent;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.modern-nav .btn-outline-light:hover {
  background: #10b981;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.modern-nav .navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
}

.modern-nav .navbar-toggler:focus {
  box-shadow: none;
}

.modern-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2855, 65, 81, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Navigation Improvements */
@media (max-width: 991.98px) {
  .modern-nav .navbar-collapse {
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.1);
  }
  
  .modern-nav .navbar-nav .nav-link {
    margin: 0.25rem 0;
    text-align: center;
  }
  
  .modern-nav .btn-light,
  .modern-nav .btn-outline-light {
    width: 100%;
    margin: 0.25rem 0;
  }
}

/* ───── Typography ─────────────────────────────────────────────────── */
.display-4 {
  font-size: 2.5rem;
}

.form-label {
  font-weight: 500;
}

@media (min-width: 768px) {
  .display-4 {
      font-size: 3.5rem;
  }
}

/* ───── Updated Button Styles ─────────────────────────────────────── */
.btn {
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--modern-primary);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  color: white;
}

.btn-outline-primary {
  border: 2px solid #10b981;
  color: #10b981;
  background: transparent;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--modern-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success {
  background: var(--modern-success);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  color: white;
}

.btn-warning {
  background: var(--modern-warning);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  color: white;
}

.btn-info {
  background: var(--modern-info);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-info:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  color: white;
}

.btn-danger {
  background: var(--modern-danger);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  color: white;
}

.btn-outline-secondary {
  border: 2px solid #6b7280;
  color: #6b7280;
  background: transparent;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
  background: #6b7280;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* ───── Form Elements ───────────────────────────────────────────────── */
.form-control {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.15);
}

.form-select {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.15);
}

.alert {
  border-radius: 15px;
  border: none;
  padding: 1rem 1.25rem;
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left: 4px solid #3b82f6;
  color: #1e40af;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #10b981;
  color: #047857;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
  color: #b91c1c;
}

/* ───── Card Components ────────────────────────────────────────────────── */
.card {
  transition: transform 0.3s ease;
  border-radius: 20px;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: white;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
  border-radius: 20px 20px 0 0 !important;
  padding: 1.25rem 1.5rem;
}

/* Favorite cards keep edit/delete actions visible instead of placing them in
   a dropdown that can be covered by the next responsive card row. */
.favorite-actions {
  align-items: stretch;
}

.favorite-actions > .flex-grow-1 {
  min-width: 0;
}

.favorite-delete-form {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
}

.favorite-action-button {
  align-items: center;
  display: inline-flex;
  flex: 0 0 42px;
  justify-content: center;
  min-width: 42px;
}

@media (max-width: 374.98px) {
  .favorite-actions {
    gap: 0.25rem !important;
  }

  .favorite-action-button {
    flex-basis: 38px;
    min-width: 38px;
  }
}

/* ───── Entry Button Styles ───────────────────────────────────────────── */
.btn-ai-entry {
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background: var(--modern-primary);
  border: none;
  color: white;
}

.btn-ai-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
}

.btn-ai-entry::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  background-color: #ffcc00;
  border-radius: 50%;
}

/* ───── Integration Styles ────────────────────────────────────────────── */
/* ───── Food Diary Specific Styles ───────────────────────────────────── */
/* Food image styles */
.food-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Main container for diary entries */
.diary-card {
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  border-radius: 20px !important;
  background: #fff;
}

/* Individual diary entry styling */
.diary-entry {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 15px;
  padding: 1rem 1rem 0.8rem;
  margin-bottom: .75rem !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.diary-entry:last-child {
  margin-bottom: 0 !important;
}

.diary-entry > .border-bottom {
  border-bottom: 0 !important; /* Removes default Bootstrap border */
}

.diary-entry:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Food entry photo styling */
.diary-entry-photo img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ───── Dashboard Nutrition Tiles ──────────────────────────────────────
   Theme-aware surfaces with a brand-cohesive per-metric accent. Colour is
   reserved for *signalling* goal progress (.is-warn / .is-over), not for
   decorating every tile. The accent is exposed as --tile-accent so the markup
   stays identical across metrics. */
.dashboard-card {
  --tile-accent: var(--modern-primary-solid);
  --tile-surface: #ffffff;
  position: relative;
  overflow: hidden;
  color: var(--bs-body-color);
  background: var(--tile-surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--hb-radius-card) !important;
  box-shadow: var(--hb-shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Accent bar across the top of each tile */
.dashboard-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--tile-accent);
  opacity: 0.9;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hb-shadow-hover);
}

.dashboard-card .card-title {
  color: var(--bs-secondary-color);
  font-weight: 600;
}

.dashboard-card .stats-icon {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 1.6rem;
  color: var(--tile-accent);
  opacity: 0.9;
}

/* Progress bars: accent by default, signal colour when flagged */
.dashboard-card .progress {
  background: rgba(15, 23, 42, 0.08);
}
.dashboard-card .progress-bar {
  background: var(--tile-accent);
}
.dashboard-card.is-warn .progress-bar { background: var(--hb-signal-warn); }
.dashboard-card.is-over .progress-bar { background: var(--hb-signal-over); }
.dashboard-card.is-warn .calorie-ring { --ring-color: var(--hb-signal-warn); }
.dashboard-card.is-over .calorie-ring { --ring-color: var(--hb-signal-over); }

/* Per-metric accents — a restrained, harmonious set (greens/blues + two warm) */
.stats-card-calories { --tile-accent: var(--modern-primary-solid); }
.stats-card-protein  { --tile-accent: #0ea5e9; }
.stats-card-carbs    { --tile-accent: #f59e0b; }
.stats-card-fat      { --tile-accent: #8b5cf6; }
.stats-card-sugar    { --tile-accent: #ec4899; }
.stats-card-fiber    { --tile-accent: #22c55e; }
.stats-card-water    { --tile-accent: #38bdf8; }

/* Calories hero: progress ring built from a conic gradient */
.calorie-ring {
  --pct: 0;
  --ring-color: var(--hb-signal-good);
  flex: 0 0 auto;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), rgba(15, 23, 42, 0.08) 0);
  display: grid;
  place-items: center;
}
.calorie-ring__inner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--tile-surface);
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.1;
}
.calorie-ring__value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--bs-body-color);
}
.calorie-ring__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
}

/* Water tile: cups must read against a light surface too, so key them off the
   metric accent instead of hard-coded white. */
.water-inline-icon { font-size: 1.1rem; color: var(--tile-accent); opacity: 0.85; }
.water-cups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.water-cup {
  width: 24px;
  height: 32px;
  position: relative;
  border: 2px solid var(--tile-accent);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  background: rgba(56, 189, 248, 0.08);
}
.water-cup::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -2px;
  right: -2px;
  height: 6px;
  border: 2px solid var(--tile-accent);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.water-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--tile-accent);
  opacity: 0.85;
}

/* Enhanced Diary Cards */
.diary-card {
  border-radius: 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: none !important;
  overflow: hidden;
  transition: all 0.3s ease;
}

.diary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.diary-card .card-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.15) 100%);
  border-bottom: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px 20px 0 0 !important;
}


/* Action Buttons Enhancement */
.action-btn-group .btn {
  border-radius: 25px;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.action-btn-group .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.action-btn-group .btn:hover::before {
  left: 100%;
}

.action-btn-group .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Quick Actions Cards */
.quick-action-card {
  border-radius: 15px;
  border: none;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.quick-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Empty State Enhancements */
.empty-state-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gentle-pulse 2s ease-in-out infinite alternate;
}

@keyframes gentle-pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* Progress Enhancement */
.progress-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto 10px;
}

.progress-ring::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3);
}

/* Date Navigation – modern palette  */
.date-nav-container {
  /* soft-white → pale-green fade */
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(16, 185, 129, 0.07) 100%
  );
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}


/* Welcome Text Enhancement */
.welcome-text {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* ───── Responsive Adjustments ─────────────────────────────────────── */
@media (max-width: 576px) {
  .food-image {
      width: 80px;
      height: 80px;
  }
  
  .btn-ai-entry {
      padding: 0.4rem 1.2rem;
  }
  
  .diary-entry {
      padding: .75rem;
  }
}

/* ───── Updated Brand Colors ───────────────────────────────────────────────── */
.bg-primary {
  background: var(--modern-primary) !important;
  color: white !important;
}

.text-primary {
  color: #10b981 !important;
}

/* ───── Dashboard Cards ───────────────────────────────────────────── */
.bg-calories {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
}

.bg-protein {
  background: var(--modern-success);
  color: white;
}

.bg-carbs {
  background: var(--modern-warning);
  color: white;
}

.bg-fat {
  background: var(--modern-info);
  color: white;
}

/* ── navbar friend-request badge positioning ───────────────────────── */
.navbar .nav-link.position-relative {          /* give the anchor a pos ctx */
  padding-right: 1.6rem;                     /* room for the badge bump  */
}

.navbar .nav-link.position-relative .badge {
  position: absolute;
  top: -.35rem;         /* nudge up */
  right: .15rem;        /* nudge right */
  font-size: .65rem;    /* smaller text so pill is tiny */
  padding: .25em .45em; /* tighter pill */
  line-height: 1;       /* keep height compact */
}

/* ── Social feed: limit width only on desktop ──────────────── */
@media (min-width: 992px) { /* ≥ lg breakpoint */
  #social-feed-card {
    max-width: 680px; /* tweak this number to taste */
  }
}

/* ─── Simple Reaction Buttons (Cross-Browser) ─────────────────────────────────────── */
.reaction-bar-container {
  padding: 0.75rem 0 0.5rem 0;
  border-top: 1px solid #e4e6ea;
  margin-top: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.reaction-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.reaction-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dadde1;
  border-radius: 25px;
  background: #f8f9fa;
  color: #65676b;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.reaction-btn:hover {
  background: #e4e6ea;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reaction-btn.my-reaction {
  background: linear-gradient(135deg, #e7f3ff 0%, #cce7ff 100%);
  border-color: var(--modern-primary-solid);
  color: var(--modern-primary-solid);
}

.reaction-btn .emoji {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.reaction-btn .count {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  min-height: 12px;
}

.add-more-container {
  display: flex;
  align-items: flex-start;
}

.add-more-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #dadde1;
  background: #f8f9fa;
  color: #65676b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.add-more-btn:hover {
  background: #e4e6ea;
  transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 576px) {
  .reaction-btn {
    min-width: 44px;
    padding: 0.375rem 0.5rem;
  }
  
  .reaction-btn .emoji {
    font-size: 1.125rem;
  }
  
  .reaction-btn .count {
    font-size: 0.7rem;
  }
  
  .add-more-btn {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
  
  .reaction-buttons {
    gap: 0.375rem;
  }
}

/* Enhanced tooltips for reactions */
.reaction-btn {
  position: relative;
}

.reaction-btn:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  animation: tooltip-fade-in 0.2s ease-in-out forwards;
  pointer-events: none;
}

.reaction-btn:hover::before {
  content: "";
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
  z-index: 999;
  opacity: 0;
  animation: tooltip-fade-in 0.2s ease-in-out forwards;
}

@keyframes tooltip-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Mobile - simpler tooltips */
@media (max-width: 768px) {
  .reaction-btn:hover::after,
  .reaction-btn:hover::before {
    display: none;
  }
}

/* ─── Simplified Comment System (Cross-Browser) ─────────────────────────────────────── */
.comments-container {
  margin-top: 1rem;
  border-top: 1px solid #e4e6ea;
  padding-top: 1rem;
}

.comments-list {
  margin-bottom: 1rem;
}

.comment-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.comment-item:last-child {
  margin-bottom: 0;
}

.comment-avatar {
  flex-shrink: 0;
}

.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e4e6ea;
}

.avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6c757d;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

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

.comment-bubble {
  background: #f0f2f5;
  border-radius: 18px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  display: inline-block;
  max-width: 85%;
  word-wrap: break-word;
}

.my-comment .comment-bubble {
  background: linear-gradient(135deg, #e7f3ff 0%, #cce7ff 100%);
  border: 1px solid var(--modern-primary-solid);
}

.comment-header {
  margin-bottom: 0.25rem;
}

.comment-author {
  font-size: 0.8125rem;
  color: #1c1e21;
  font-weight: 600;
  margin-right: 0.5rem;
}

.comment-time {
  font-size: 0.75rem;
  color: #65676b;
}

.comment-text {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #1c1e21;
  word-wrap: break-word;
}

.comment-actions {
  margin-top: 0.25rem;
}

.comment-action-btn {
  background: none;
  border: none;
  color: #65676b;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.comment-action-btn:hover {
  background: #f0f2f5;
  color: #dc3545;
}

/* Simplified Comment Composer */
.comment-composer {
  border-top: 1px solid #e4e6ea;
  padding-top: 0.75rem;
}

.composer-container {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.composer-avatar {
  flex-shrink: 0;
}

.comment-form {
  flex: 1;
}

.simple-comment-input-container {
  background: #f0f2f5;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  border: 1px solid #e4e6ea;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.simple-comment-input-container:focus-within {
  border-color: var(--modern-primary-solid);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.simple-comment-input {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  outline: none;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #1c1e21;
  font-family: inherit;
  min-height: 20px;
}

.simple-comment-input::placeholder {
  color: #65676b;
}

.simple-comment-submit-btn {
  background: var(--modern-primary);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.simple-comment-submit-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: scale(1.1);
}

/* No Comments State */
.no-comments {
  text-align: center;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.no-comments i {
  font-size: 2rem;
}

/* Comments Footer */
.comments-footer {
  text-align: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e4e6ea;
}

.collapse-comments-link {
  color: #65676b;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.collapse-comments-link:hover {
  background: #f0f2f5;
  color: #1c1e21;
  text-decoration: none;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
  .comment-item {
    gap: 0.5rem;
  }
  
  .avatar-img,
  .avatar-placeholder {
    width: 28px;
    height: 28px;
  }
  
  .avatar-placeholder {
    font-size: 0.7rem;
  }
  
  .comment-bubble {
    padding: 0.5rem 0.75rem;
    max-width: 90%;
  }
  
  .simple-comment-input-container {
    padding: 0.375rem 0.75rem;
  }
  
  .simple-comment-submit-btn {
    width: 24px;
    height: 24px;
  }
}

/* ───── Chatbot & FAB Updates ─────────────────────────────────────── */
.main-fab {
  background: var(--modern-primary) !important;
  color: white !important;
  border: none;
}

.main-fab:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

/* Floating Action Button – mint palette */
.fab-option {
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 1) 0%,
      rgba(209, 250, 229, 1) 100%
  );
  color: #1f2937;
  border: 1px solid rgba(16, 185, 129, 0.30);
  transition: all .3s ease;
  font-weight: 500;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fab-option:hover {
  background: linear-gradient(
      135deg,
      rgba(209, 250, 229, 1) 0%,
      rgba(167, 243, 208, 1) 100%
  );
  color: #047857;
  border-color: rgba(16, 185, 129, 0.50);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}


/* Chat Interface */
.chat-header,
.chatbot-btn,
.fab-chat-btn {
  background: var(--modern-primary) !important;
  color: white !important;
}

.user-message {
  background: var(--modern-primary) !important;
  color: white !important;
}

/* ───── Floating Action Button (FAB) Styles ──────────────────── */
.fab-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.main-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.main-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.fab-options {
  display: none;
  position: absolute;
  bottom: 70px;
  right: 0;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}

.fab-option {
  padding: 12px 16px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  transform: translateX(20px);
  opacity: 0;
}

.fab-option:hover {
  transform: translateX(0) translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

/* Animation classes for when menu opens */
.fab-options.show {
  display: flex;
}

.fab-options.show .fab-option {
  animation: slideInFab 0.3s ease forwards;
}

.fab-options.show .fab-option:nth-child(1) { animation-delay: 0.1s; }
.fab-options.show .fab-option:nth-child(2) { animation-delay: 0.15s; }
.fab-options.show .fab-option:nth-child(3) { animation-delay: 0.2s; }
.fab-options.show .fab-option:nth-child(4) { animation-delay: 0.25s; }
.fab-options.show .fab-option:nth-child(5) { animation-delay: 0.3s; }
.fab-options.show .fab-option:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInFab {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile responsiveness for FAB */
@media (max-width: 768px) {
  /* Entry and onboarding already expose their next action in the page. */
  .focused-entry-page .fab-container,
  .focused-entry-page .chat-widget {
    display: none !important;
  }

  body:not(.focused-entry-page) {
    padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
  }

  .fab-container {
    bottom: calc(15px + env(safe-area-inset-bottom, 0px));
    right: 15px;
  }
  
  .main-fab {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  .fab-options {
    min-width: 180px;
    bottom: 60px;
  }
  
  .fab-option {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}


/* ───── Final Bootstrap Override - Higher Specificity ──────────────────────── */
/* Date navigation specific */
.date-nav-container .btn-outline-primary,
.date-nav-container .btn-outline-primary.btn-sm,
.container .btn-outline-primary,
.container .btn-outline-primary.btn-sm {
  border-color: #10b981 !important;
  color: #10b981 !important;
  background-color: transparent !important;
}

.date-nav-container .btn-outline-primary:hover,
.date-nav-container .btn-outline-primary.btn-sm:hover,
.container .btn-outline-primary:hover,
.container .btn-outline-primary.btn-sm:hover {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
  color: white !important;
}

/* Override Bootstrap CSS Custom Properties */
.btn-outline-primary {
  --bs-btn-color: #10b981 !important;
  --bs-btn-border-color: #10b981 !important;
  --bs-btn-hover-color: #ffffff !important;
  --bs-btn-hover-bg: #10b981 !important;
  --bs-btn-hover-border-color: #10b981 !important;
  --bs-btn-focus-shadow-rgb: 16, 185, 129 !important;
  --bs-btn-active-color: #ffffff !important;
  --bs-btn-active-bg: #10b981 !important;
  --bs-btn-active-border-color: #10b981 !important;
}

/* Force override for all primary elements */
body .btn-outline-primary,
html .btn-outline-primary {
  border-color: #10b981 !important;
  color: #10b981 !important;
}

body .btn-outline-primary:hover,
html .btn-outline-primary:hover {
  background-color: #10b981 !important;
  color: white !important;
  border-color: #10b981 !important;
}


/* Exercise Calories Burned Card */
.bg-calories-burned {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.25);
}


/* ───── Daily Insights Styling ───────────────────────────────────────────── */
#daily-insight-container {
    animation: slideInFromTop 0.3s ease-out;
}

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

/******************************************INSIGHTS */
/* Base insight card */
.insight-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px !important;
    border: none !important;
    transition: all 0.3s ease;
}

/* Type-specific insight styling */
.insight-streak {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%) !important;
    border-left: 4px solid #ff6b6b !important;
}

.insight-nutrition {
    background: linear-gradient(135deg, #f0fff4 0%, #dcffe4 100%) !important;
    border-left: 4px solid #10b981 !important;
}

.insight-exercise {
    background: linear-gradient(135deg, #e0f2ff 0%, #bae6ff 100%) !important;
    border-left: 4px solid #3b82f6 !important;
}

.insight-goal {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border-left: 4px solid #f59e0b !important;
}

.insight-warning {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    border-left: 4px solid #ef4444 !important;
}

.insight-motivation {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%) !important;
    border-left: 4px solid #9333ea !important;
}

.insight-tip {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%) !important;
    border-left: 4px solid #eab308 !important;
}

/* Icon colors by type */
.insight-streak .insight-icon { color: #ff6b6b; }
.insight-nutrition .insight-icon { color: #10b981; }
.insight-exercise .insight-icon { color: #3b82f6; }
.insight-goal .insight-icon { color: #f59e0b; }
.insight-warning .insight-icon { color: #ef4444; }
.insight-motivation .insight-icon { color: #9333ea; }
.insight-tip .insight-icon { color: #eab308; }

/* Insight close button */
#daily-insight-container .btn-close {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

#daily-insight-container .btn-close:hover {
    opacity: 1;
}

/* Mobile responsiveness for insights */
@media (max-width: 768px) {
    #daily-insight-container .card-body {
        padding: 1rem !important;
    }
    
    #insight-text {
        font-size: 1rem !important;
    }
}

/* ==============================
   Dark Mode (Bootstrap 5.3)
   ============================== */
[data-bs-theme="dark"] {
  color-scheme: dark;
}

[data-bs-theme="dark"] .modern-nav {
  background: linear-gradient(135deg, #0b1220 0%, #111827 100%);
  border-bottom: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .modern-nav .navbar-brand .brand-text {
  color: #d1fae5;
}

[data-bs-theme="dark"] .modern-nav .navbar-nav .nav-link {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .modern-nav .navbar-nav .nav-link:hover {
  color: #d1fae5 !important;
  background-color: rgba(16, 185, 129, 0.15);
}

[data-bs-theme="dark"] .modern-nav .navbar-nav .nav-link.active {
  color: #d1fae5 !important;
  background-color: rgba(16, 185, 129, 0.2);
}

[data-bs-theme="dark"] .modern-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28229, 231, 235, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
  [data-bs-theme="dark"] .modern-nav .navbar-collapse {
    background: linear-gradient(135deg, #0b1220 0%, #111827 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(16, 185, 129, 0.18);
  }
}

[data-bs-theme="dark"] .card {
  background-color: #111827;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .card-header {
  background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
  border-bottom: 1px solid rgba(16, 185, 129, 0.18);
}

[data-bs-theme="dark"] .card-header.bg-white {
  background: linear-gradient(135deg, #0f172a 0%, #111827 100%) !important;
}

[data-bs-theme="dark"] .diary-card {
  background: #111827;
  border-color: rgba(229, 231, 235, 0.12) !important;
}

[data-bs-theme="dark"] .diary-card .card-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.08) 100%), #0f172a !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.25) !important;
}

[data-bs-theme="dark"] .diary-entry {
  background: #0f172a;
  border-color: rgba(229, 231, 235, 0.12);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .quick-action-card {
  background: linear-gradient(135deg, #111827 0%, #0f172a 100%) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .membership-card {
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.06) 0%, rgba(229, 231, 235, 0.02) 100%), #0f172a !important;
  color: #e5e7eb !important;
  box-shadow: 0 0 0 1px rgba(229, 231, 235, 0.1), inset 4px 0 0 rgba(229, 231, 235, 0.16), 0 3px 14px rgba(0, 0, 0, 0.28) !important;
}

[data-bs-theme="dark"] .membership-card.membership-premium {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.04) 100%), #0f172a !important;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.14), inset 4px 0 0 rgba(245, 158, 11, 0.65), 0 3px 14px rgba(0, 0, 0, 0.28) !important;
}

[data-bs-theme="dark"] .membership-card.membership-trial {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.04) 100%), #0f172a !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.14), inset 4px 0 0 rgba(59, 130, 246, 0.6), 0 3px 14px rgba(0, 0, 0, 0.28) !important;
}

[data-bs-theme="dark"] .membership-card.membership-free {
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.05) 0%, rgba(229, 231, 235, 0.02) 100%), #0f172a !important;
  color: #e5e7eb !important;
  box-shadow: 0 0 0 1px rgba(229, 231, 235, 0.1), inset 4px 0 0 rgba(156, 163, 175, 0.45), 0 3px 14px rgba(0, 0, 0, 0.28) !important;
}

[data-bs-theme="dark"] .membership-status-badge {
  background: rgba(229, 231, 235, 0.08) !important;
  color: rgba(229, 231, 235, 0.88) !important;
}

[data-bs-theme="dark"] .membership-card .membership-actions .btn.btn-light.text-dark {
  background: rgba(229, 231, 235, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.16);
  color: rgba(229, 231, 235, 0.92) !important;
  box-shadow: none;
}

[data-bs-theme="dark"] .membership-card .membership-actions .btn.btn-light.text-dark:hover {
  background: rgba(229, 231, 235, 0.14);
  border-color: rgba(229, 231, 235, 0.24);
  box-shadow: none;
}

[data-bs-theme="dark"] .progress-bar.bg-white {
  background-color: rgba(229, 231, 235, 0.92) !important;
}

/* Dashboard nutrition tiles — dark surfaces */
[data-bs-theme="dark"] .dashboard-card {
  --tile-surface: #111827;
  background: #111827;
  border-color: rgba(229, 231, 235, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
[data-bs-theme="dark"] .dashboard-card .progress {
  background: rgba(229, 231, 235, 0.12);
}
[data-bs-theme="dark"] .calorie-ring {
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), rgba(229, 231, 235, 0.12) 0);
}

/* Streak card — the one dashboard component that had no dark treatment before */
[data-bs-theme="dark"] .streak-card {
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.05) 0%, rgba(229, 231, 235, 0.02) 100%), #0f172a;
  border: 1px solid rgba(229, 231, 235, 0.12) !important;
}
[data-bs-theme="dark"] .streak-card.active-streak {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(245, 158, 11, 0.04) 100%), #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
}
[data-bs-theme="dark"] .streak-card .streak-number,
[data-bs-theme="dark"] .streak-card .stat-number,
[data-bs-theme="dark"] .streak-card .streak-label,
[data-bs-theme="dark"] .streak-card .stat-label {
  color: var(--bs-body-color);
}
[data-bs-theme="dark"] .streak-card .card-header:hover {
  background-color: rgba(229, 231, 235, 0.04) !important;
}

/* Subscription & Billing */
[data-bs-theme="dark"] .hb-subscriptions h1,
[data-bs-theme="dark"] .hb-subscriptions h2,
[data-bs-theme="dark"] .hb-subscriptions h3,
[data-bs-theme="dark"] .hb-subscriptions h4,
[data-bs-theme="dark"] .hb-subscriptions h5 {
  color: #e5e7eb;
}

[data-bs-theme="dark"] .hb-subscriptions .alert {
  border-color: rgba(229, 231, 235, 0.12);
}

/* Override light inline backgrounds on subscription cards */
[data-bs-theme="dark"] .hb-subscriptions .card[style*="background: #ffffff"] {
  background: linear-gradient(135deg, #0f172a 0%, #111827 100%) !important;
  border: 1px solid rgba(229, 231, 235, 0.12);
}

[data-bs-theme="dark"] .hb-subscriptions .card[style*="background: linear-gradient(135deg, #f8f9fa"] {
  background: linear-gradient(135deg, #0f172a 0%, #111827 100%) !important;
  border: 1px solid rgba(229, 231, 235, 0.12);
}

[data-bs-theme="dark"] .hb-subscriptions .card[style*="background: linear-gradient(135deg, #e3f2fd"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.08) 100%), #0f172a !important;
  border: 1px solid rgba(59, 130, 246, 0.18);
}

[data-bs-theme="dark"] .hb-subscriptions .card[style*="background: linear-gradient(135deg, #fff9c4"] {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.08) 100%), #0f172a !important;
  border: 1px solid rgba(245, 158, 11, 0.18);
}

[data-bs-theme="dark"] .hb-subscriptions .card-header.bg-white {
  background: transparent !important;
}

[data-bs-theme="dark"] .hb-subscriptions .text-muted {
  color: rgba(229, 231, 235, 0.65) !important;
}

[data-bs-theme="dark"] .hb-subscriptions .p-3.rounded-3[style*="background: #f8f9fa"] {
  background: rgba(229, 231, 235, 0.06) !important;
  border: 1px solid rgba(229, 231, 235, 0.12);
}

[data-bs-theme="dark"] .hb-subscriptions .p-3.rounded-3[style*="background: #ffffff"] {
  background: #111827 !important;
  border: 1px solid rgba(229, 231, 235, 0.12);
}

[data-bs-theme="dark"] .hb-subscriptions .p-3.rounded-3[style*="background: linear-gradient(135deg, #f0fdf4"] {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.08) 100%), #0f172a !important;
  border-left-color: rgba(16, 185, 129, 0.7) !important;
  border-top: 1px solid rgba(229, 231, 235, 0.12);
  border-right: 1px solid rgba(229, 231, 235, 0.12);
  border-bottom: 1px solid rgba(229, 231, 235, 0.12);
}

[data-bs-theme="dark"] .hb-subscriptions a[style*="color: #10b981"] {
  color: #34d399 !important;
}

[data-bs-theme="dark"] .hb-subscriptions [style*="color: #1f2937"],
[data-bs-theme="dark"] .hb-subscriptions [style*="color: #0d47a1"],
[data-bs-theme="dark"] .hb-subscriptions [style*="color: #1b5e20"] {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] footer.bg-light {
  background-color: #0b1220 !important;
  color: #e5e7eb;
}

[data-bs-theme="dark"] footer.bg-light .text-muted {
  color: rgba(229, 231, 235, 0.65) !important;
}

[data-bs-theme="dark"] footer.bg-light a.text-muted {
  color: rgba(229, 231, 235, 0.65) !important;
}

[data-bs-theme="dark"] footer.bg-light a.text-muted:hover {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .alert-light {
  background: #0f172a;
  border-color: rgba(229, 231, 235, 0.12);
  color: rgba(229, 231, 235, 0.75);
}

[data-bs-theme="dark"] .alert-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.08) 100%), #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-left: 4px solid rgba(59, 130, 246, 0.65);
  color: #bfdbfe;
}

[data-bs-theme="dark"] .alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.08) 100%), #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-left: 4px solid rgba(16, 185, 129, 0.65);
  color: #a7f3d0;
}

[data-bs-theme="dark"] .alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.08) 100%), #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-left: 4px solid rgba(245, 158, 11, 0.65);
  color: #fde68a;
}

[data-bs-theme="dark"] .alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(239, 68, 68, 0.08) 100%), #0f172a;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-left: 4px solid rgba(239, 68, 68, 0.65);
  color: #fecaca;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #111827 !important;
}

[data-bs-theme="dark"] .bg-white {
  background-color: #111827 !important;
}

[data-bs-theme="dark"] .text-dark {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .bg-warning.text-dark,
[data-bs-theme="dark"] .btn.btn-light.text-dark,
[data-bs-theme="dark"] .btn.btn-warning.text-dark {
  color: #111827 !important;
}

[data-bs-theme="dark"] .insight-card {
  background: linear-gradient(135deg, #111827 0%, #0f172a 100%) !important;
}

[data-bs-theme="dark"] .insight-streak {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.18) 0%, rgba(255, 107, 107, 0.08) 100%) !important;
}

[data-bs-theme="dark"] .insight-nutrition {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.08) 100%) !important;
}

[data-bs-theme="dark"] .insight-exercise {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.08) 100%) !important;
}

[data-bs-theme="dark"] .insight-goal {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.08) 100%) !important;
}

[data-bs-theme="dark"] .insight-warning {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(239, 68, 68, 0.08) 100%) !important;
}

[data-bs-theme="dark"] .insight-motivation {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.18) 0%, rgba(147, 51, 234, 0.08) 100%) !important;
}

[data-bs-theme="dark"] .insight-tip {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.18) 0%, rgba(234, 179, 8, 0.08) 100%) !important;
}
