/* public/css/style.css */
/* Premium CSS Design System for HEALTHMEAL Web App */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* HSL Color Palette - Sleek Dark Glassmorphic Theme */
  --bg-gradient: linear-gradient(135deg, #0b0f19 0%, #111827 50%, #070a13 100%);
  --sidebar-bg: rgba(17, 24, 39, 0.7);
  --card-bg: rgba(31, 41, 55, 0.45);
  --card-hover-bg: rgba(31, 41, 55, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.2);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #111827;

  /* Accent Gradients */
  --primary-glow: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); /* Indigo */
  --accent-glow: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);  /* Amber/Orange */
  --success-glow: linear-gradient(135deg, #10b981 0%, #059669 100%); /* Emerald */
  --danger-glow: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);  /* Red */
  --cyan-glow: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);    /* Cyan */

  --font-family: 'Outfit', sans-serif;
  --sidebar-w: 260px;
  --blur-val: 16px;
  --transition: all 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. Global Resets & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-gradient);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.4);
}

/* 2. Main Layout Structure */
#app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
#sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  backdrop-filter: blur(var(--blur-val));
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

#sidebar .brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

#sidebar .brand svg {
  fill: none;
  stroke: #6366f1;
  stroke-width: 6;
}

#sidebar .brand h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: linear-gradient(to right, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#sidebar nav {
  flex: 1;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

#sidebar nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

#sidebar nav a:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

#sidebar nav a.active {
  color: #fff;
  background: var(--primary-glow);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

#sidebar .user-card {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#sidebar .user-card .info {
  max-width: 140px;
}
#sidebar .user-card .info .name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#sidebar .user-card .info .phone {
  font-size: 11px;
  color: var(--text-muted);
}
#sidebar .user-card .logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}
#sidebar .user-card .logout-btn:hover {
  color: #ef4444;
  transform: scale(1.1);
}

/* Content Area */
#main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}

#topbar {
  padding: 0 40px;
  height: 70px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

#topbar h1 {
  font-size: 20px;
  font-weight: 700;
}

#topbar .actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#content {
  padding: 40px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* 3. Cards & Modules Design */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur-val));
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 26px;
  margin-bottom: 24px;
  transition: var(--transition);
}

.card:hover {
  background: var(--card-hover-bg);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 14px;
  font-weight: 700;
  color: #818cf8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: rgba(31, 41, 55, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-card.primary::before { background: var(--primary-glow); }
.stat-card.success::before { background: var(--success-glow); }
.stat-card.accent::before { background: var(--accent-glow); }
.stat-card.danger::before { background: var(--danger-glow); }

.stat-card .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.6px;
}
.stat-card .value {
  font-size: 28px;
  font-weight: 800;
  margin: 6px 0 2px;
}
.stat-card .sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* 4. Form Controls & Buttons */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

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

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input, .form-group select, .form-group textarea {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
  background: rgba(17, 24, 39, 0.8);
}

.form-group textarea {
  min-height: 90px;
  resize: vertical;
}

/* Custom Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary { background: var(--primary-glow); color: #fff; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2); }
.btn-success { background: var(--success-glow); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }
.btn-accent { background: var(--accent-glow); color: #fff; box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2); }
.btn-danger { background: var(--danger-glow); color: #fff; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2); }
.btn-ghost { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* 5. Custom UI Components */

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

th {
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(31, 41, 55, 0.15);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-gray { background: rgba(156, 163, 175, 0.15); color: #d1d5db; }

/* Tabs Navigation */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.tab:hover {
  color: var(--text-main);
}

.tab.active {
  color: #818cf8;
  border-bottom-color: #6366f1;
}

/* 6. Section Layouts */
.section {
  display: none;
  animation: fadeIn 0.12s ease-out;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* OTP Code Box UI */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 18px 0;
}

.otp-box {
  width: 48px;
  height: 54px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-color);
  color: #fff;
  outline: none;
}

.otp-box:focus {
  border-color: #6366f1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Recipe Scaling Component */
.recipe-view {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  padding: 24px;
}

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

.recipe-header h2 {
  font-size: 22px;
  font-weight: 700;
}

.recipe-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.recipe-meta .meta-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.recipe-meta .meta-item span {
  font-weight: 700;
  color: #818cf8;
}

/* Public header (landing + auth) */
.public-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}
.public-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.public-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}
.public-user-name {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 4px;
}
body.has-public-header #main {
  margin-top: 64px;
}
body.app-mode .public-header {
  display: none;
}
body.app-mode #main {
  margin-top: 0;
}

/* Landing page */
.landing-page {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 60px;
}
.landing-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0 56px;
}
.landing-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.landing-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}
.landing-lead {
  font-size: 16px;
  color: #d1d5db;
  line-height: 1.7;
  margin-bottom: 24px;
}
.landing-benefits {
  list-style: none;
  margin-bottom: 28px;
}
.landing-benefits li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.landing-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
}
.landing-hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.landing-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px 28px;
  text-align: center;
}
.landing-stat-card .num {
  font-size: 36px;
  font-weight: 800;
  color: #818cf8;
}
.landing-stat-card .lbl {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.landing-stat-card.accent .num { color: #fbbf24; }
.landing-stat-card.success .num { color: #34d399; }
.landing-about h2,
.landing-recipes-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.landing-about p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}
.landing-recipes-section {
  margin-top: 40px;
}
.landing-recipes-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.landing-recipe-grid .recipe-card {
  margin-bottom: 0;
}
.auth-page-wrap {
  max-width: 420px;
  margin: 40px auto 80px;
}

/* UI Adaptiveness (Responsive) */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 80px;
  }
  #sidebar .brand h2, #sidebar nav a span:not(.icon), #sidebar .user-card .info {
    display: none;
  }
  #sidebar nav a {
    justify-content: center;
    padding: 12px;
  }
}

@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    width: 100% !important;
    border-right: none;
    border-top: 1px solid var(--border-color);
    flex-direction: row;
    background: var(--sidebar-bg);
    backdrop-filter: blur(var(--blur-val));
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }
  #sidebar .brand, #sidebar .user-card {
    display: none !important;
  }
  #sidebar nav {
    flex-direction: row;
    padding: 0;
    margin: 0;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    gap: 0;
    overflow-y: hidden;
  }
  #sidebar nav a {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 0;
    flex: 1;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text-muted);
  }
  #sidebar nav a.active {
    color: #818cf8 !important;
  }
  #sidebar nav a .icon {
    font-size: 20px;
  }
  #sidebar nav a span:not(.icon) {
    display: block !important;
    font-size: 10px;
    font-weight: 600;
  }
  #main {
    margin-left: 0 !important;
    padding-bottom: 60px; /* Space for bottom nav */
  }
  #content {
    padding: 16px;
  }
  #topbar {
    padding: 0 16px;
    height: 60px;
  }
  .landing-hero {
    grid-template-columns: 1fr;
    padding-top: 16px;
    gap: 24px;
  }
  .public-header {
    padding: 0 16px;
  }
  .public-user-name {
    display: none;
  }
}

/* Modal (taom / retsept) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.modal-overlay.open {
  display: flex;
}
.modal-overlay .modal {
  background: linear-gradient(160deg, #1f2937 0%, #111827 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px 32px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  animation: modalIn 0.12s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
.modal-overlay .modal h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  padding-right: 36px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
}
.modal-close:hover {
  color: #fff;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(12px);
  transition: var(--transition);
  pointer-events: none;
  max-width: 360px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
.toast.error { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; }
.toast.info { background: rgba(99, 102, 241, 0.95); color: #fff; }

/* Recipe cards with photos */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.recipe-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  transition: var(--transition);
}
.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-color: var(--border-glow);
}
.recipe-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: #1f2937;
}
.recipe-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recipe-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #1f2937, #111827);
}
.recipe-card-body {
  padding: 20px;
}
.recipe-card-body h3 {
  color: #fff;
  font-size: 18px;
  margin: 8px 0;
  text-transform: none;
  letter-spacing: 0;
}
.recipe-card-body p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recipe-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 14px;
  color: var(--text-muted);
}
.recipe-modal-hero {
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  margin-bottom: 16px;
}
.section-label {
  color: #818cf8;
  font-size: 13px;
  margin: 12px 0 8px;
}
.instructions {
  white-space: pre-line;
  font-size: 13.5px;
  color: #d1d5db;
}

.meal-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.meal-day-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.meal-day-card:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
}
.meal-day-past {
  opacity: 0.45;
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.04);
}
.meal-day-past .meal-day-title {
  text-decoration: line-through;
  color: var(--text-muted);
}
.meal-day-today {
  border-color: #34d399 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.3);
}
.meal-day-date {
  font-size: 10px;
  color: #a5b4fc;
  display: block;
  margin: 4px 0;
}
.meal-day-num {
  font-size: 11px;
  font-weight: 700;
  color: #818cf8;
  display: block;
}
.meal-day-title {
  font-size: 12px;
  margin-top: 6px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meal-day-meta {
  font-size: 10px;
  color: var(--text-muted);
}
.day-meal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 10px;
}
.empty-state {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
}
.text-muted { color: var(--text-muted); }

/* 7. Light Theme Overrides */
body.light-theme {
  --bg-gradient: linear-gradient(135deg, #f3f4f6 0%, #f9fafb 100%);
  --sidebar-bg: rgba(255, 255, 255, 0.85);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-hover-bg: rgba(255, 255, 255, 0.95);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-dark: #f9fafb;
}

body.light-theme #topbar {
  background: rgba(243, 244, 246, 0.85);
}

body.light-theme .public-header {
  background: rgba(255, 255, 255, 0.9);
}

body.light-theme .public-logo {
  color: #111827;
}

body.light-theme .landing-hero h1,
body.light-theme .landing-about h2,
body.light-theme .landing-recipes-section h2,
body.light-theme .auth-page-wrap h2,
body.light-theme .recipe-card-body h3,
body.light-theme .instructions,
body.light-theme .modal h2 {
  color: #111827;
}

body.light-theme .instructions {
  color: #374151;
}

body.light-theme input,
body.light-theme select,
body.light-theme textarea {
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme input:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
  background: #fff;
  border-color: #6366f1;
}

body.light-theme .stat-card {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.light-theme #sidebar .brand h2 {
  background: linear-gradient(to right, #4f46e5, #9333ea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme #sidebar .user-card {
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme .btn-ghost {
  color: #1f2937;
  border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme th {
  background: rgba(0, 0, 0, 0.05);
  color: #4b5563;
}

body.light-theme td {
  background: rgba(255, 255, 255, 0.4);
  color: #1f2937;
}

body.light-theme .modal-overlay .modal {
  background: linear-gradient(160deg, #ffffff 0%, #f3f4f6 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

body.light-theme .otp-box {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
  color: #111827;
}

body.light-theme .recipe-view {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .recipe-meta .meta-item {
  background: rgba(0, 0, 0, 0.03);
  color: #1f2937;
}

body.light-theme .meal-day-card {
  background: rgba(255, 255, 255, 0.6);
}

body.light-theme .meal-day-past {
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme .day-meal-row {
  border-color: rgba(0, 0, 0, 0.08);
}
