/* Optimal Diet Planner CSS Design System */

:root {
  /* Colors */
  --bg-darkest: #030712;
  --bg-panel: rgba(17, 24, 39, 0.65);
  --bg-input: rgba(31, 41, 55, 0.6);
  --border-light: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Brand Gradients */
  --grad-indigo-pink: linear-gradient(135deg, #6366f1, #ec4899);
  --grad-hover: linear-gradient(135deg, #4f46e5, #db2777);
  --grad-dark-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15));

  /* Colors for UI details */
  --c-pink: #f472b6;
  --c-indigo: #818cf8;
  --c-blue: #60a5fa;
  --c-emerald: #34d399;
  --c-rose: #f87171;
  --c-amber: #fbbf24;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.12;
}

.bg-glow-indigo {
  top: -10%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  background-color: #6366f1;
}

.bg-glow-pink {
  bottom: -10%;
  right: -10%;
  width: 45vw;
  height: 45vw;
  background-color: #ec4899;
}

/* App Layout Container */
.app-container {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Global App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #818cf8, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Badges & Avatars */
.streak-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.2);
  color: #fdba74;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.fire-icon {
  width: 1.1rem;
  height: 1.1rem;
  color: #f97316;
  filter: drop-shadow(0 0 4px rgba(249, 115, 22, 0.5));
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  padding: 0.35rem 1rem 0.35rem 0.35rem;
  border-radius: 9999px;
}

.avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--grad-indigo-pink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.username-txt {
  font-size: 0.875rem;
  font-weight: 500;
  color: #e2e8f0;
}

/* Typography & General Buttons */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-text {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-text:hover {
  color: white;
}

.btn-primary {
  background: #6366f1;
  color: white;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.85rem 1.5rem;
}

.btn-primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ec4899;
  color: white;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.85rem 1.5rem;
}

.btn-secondary:hover {
  background: #db2777;
  transform: translateY(-1px);
}

.btn-link {
  background: transparent;
  color: #818cf8;
  font-weight: 600;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-link:hover {
  color: #a5b4fc;
}

.btn-back {
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.btn-back:hover {
  color: white;
}

/* Screen Transitions */
.screen-fade {
  animation: fadeIn 0.4s ease-out forwards;
}

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

/* SCREEN: Auth Box Card */
.auth-box {
  max-width: 440px;
  margin: 4rem auto 0 auto;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 1.5rem;
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.auth-title {
  font-size: 1.85rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 800;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.form-group input, .form-stack select {
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  color: white;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.25s;
}

.form-group input:focus, .form-stack select:focus {
  border-color: #818cf8;
}

.auth-submit-btn {
  margin-top: 0.75rem;
  padding: 0.95rem;
  font-size: 1rem;
}

.auth-toggle-tip {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-align: center;
}

/* SCREEN: Welcome Hero Box */
.welcome-box {
  max-width: 650px;
  margin: 6rem auto 0 auto;
  text-align: center;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-gradient {
  background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn-glow {
  background: white;
  color: var(--bg-darkest);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 1.1rem 2.2rem;
  border-radius: 9999px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.25);
}

.btn-glow:hover {
  transform: scale(1.04);
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.35);
}

.btn-welcome-logout {
  display: block;
  margin: 1.5rem auto 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-welcome-logout:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}


/* SCREEN: Onboarding Form Steps Panel */
.panel-card {
  max-width: 550px;
  margin: 2rem auto;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 1.75rem;
  padding: 2.25rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.panel-card .btn-back {
  margin-bottom: 1.5rem;
}

.step-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.step-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-gradient-submit {
  background: var(--grad-indigo-pink);
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1.05rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 10px 20px rgba(236, 72, 153, 0.15);
}

.btn-gradient-submit:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-gradient-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Grid layout for checkbox buttons */
.conditions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cond-btn, .allergy-btn {
  background: rgba(31, 41, 55, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.85rem;
  padding: 1.1rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.cond-btn:hover, .allergy-btn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: white;
}

.cond-btn.active, .allergy-btn.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: #6366f1;
  color: white;
}

.allergy-btn.active {
  background: rgba(236, 72, 153, 0.12);
  border-color: #ec4899;
}

.checkbox-outer {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.cond-btn.active .checkbox-outer {
  border-color: #6366f1;
  background-color: #6366f1;
}

.allergy-btn.active .checkbox-outer {
  border-color: #ec4899;
  background-color: #ec4899;
}

.checkbox-inner {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background-color: white;
  transform: scale(0);
  transition: transform 0.2s;
}

.cond-btn.active .checkbox-inner, .allergy-btn.active .checkbox-inner {
  transform: scale(1);
}

.cond-lbl {
  font-weight: 500;
  font-size: 0.875rem;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.button-split {
  display: flex;
  gap: 1rem;
}

.btn-text-nav {
  background: var(--bg-input);
  color: white;
  border-radius: 0.85rem;
  padding: 1.05rem 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-text-nav:hover {
  background: rgba(55, 65, 81, 0.8);
}

.flex-expand {
  flex: 1;
}

.btn-glow-accent {
  background: var(--grad-indigo-pink);
  color: white;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 1.05rem;
  border-radius: 0.85rem;
  box-shadow: 0 0 30px rgba(236, 72, 153, 0.3);
}

.btn-glow-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 35px rgba(236, 72, 153, 0.4);
}

/* SCREEN: Dashboard Layout */
.dashboard-layout {
  max-width: 1000px;
  margin: 0 auto;
}

.dashboard-back-link-row {
  margin-bottom: 1.5rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 1.75rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  backdrop-filter: blur(20px);
}

.stat-icon-box {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-pink .stat-icon-box {
  background-color: rgba(236, 72, 153, 0.15);
  color: var(--c-pink);
}

.card-indigo .stat-icon-box {
  background-color: rgba(99, 102, 241, 0.15);
  color: var(--c-indigo);
}

.card-blue .stat-icon-box {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--c-blue);
}

.stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 2rem;
}

@media (max-width: 868px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: white;
}

.meal-group-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 1.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(20px);
}

.meal-time-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.text-morning { color: #f472b6; }
.text-afternoon { color: #818cf8; }
.text-night { color: #60a5fa; }

.meal-item-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Meal item row card */
.meal-item-card {
  background: rgba(31, 41, 55, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 1.25rem;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.meal-item-card:hover {
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(31, 41, 55, 0.6);
}

.meal-clickable-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  cursor: pointer;
}

.meal-img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.85rem;
  object-cover: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #111827;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.meal-img.loaded {
  opacity: 1;
}

.meal-details {
  display: flex;
  flex-direction: column;
}

.meal-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #f1f5f9;
  transition: color 0.2s;
}

.meal-item-card:hover .meal-name {
  color: #a5b4fc;
}

.meal-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.meal-actions-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.badge-diet {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}

.badge-veg {
  background-color: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.badge-nonveg {
  background-color: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-swap-item {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background-color: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.2);
  white-space: nowrap;
}

.btn-swap-item:hover {
  background-color: rgba(251, 191, 36, 0.25);
}

/* Sidebar Presc card */
.presc-generation-card {
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.8), rgba(131, 24, 73, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.75rem;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.presc-glow-orb {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.05;
}

.doc-icon {
  margin: 0 auto 1.5rem auto;
  color: #fbcfe8;
  filter: drop-shadow(0 0 8px rgba(244, 114, 182, 0.3));
}

.side-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.side-card-desc {
  font-size: 0.85rem;
  color: #c7d2fe;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.btn-glow-dark {
  background: white;
  color: var(--bg-darkest);
  font-weight: 700;
  padding: 0.95rem 1.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.btn-glow-dark:hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
}

/* Clinical Alerts Callout Card */
.clinical-alerts-card {
  margin-top: 1.5rem;
  background: var(--bg-panel);
  border: 1px solid rgba(244, 114, 182, 0.2);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.05);
  backdrop-filter: blur(10px);
}

.alerts-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f472b6;
  margin-bottom: 1rem;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.warn-alert-box {
  background: rgba(244, 114, 182, 0.08);
  border-left: 3px solid #f472b6;
  padding: 0.85rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.85rem;
  color: #fbcfe8;
  line-height: 1.4;
}

.warn-alert-box strong {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: white;
}

/* FLOATING CHATBOT WIDGET */
.chatbot-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
}

.chat-toggle-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--grad-indigo-pink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-toggle-btn:hover {
  transform: scale(1.08);
}

.shadow-pink {
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.35);
}

.chat-window-panel {
  position: absolute;
  bottom: 4.5rem;
  right: 0;
  width: 360px;
  height: 500px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-header {
  background: var(--grad-indigo-pink);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.chat-bot-identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-close-btn {
  background: transparent;
  color: white;
  opacity: 0.7;
}

.chat-close-btn:hover {
  opacity: 1;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-row {
  display: flex;
  gap: 0.5rem;
}

.user-row {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.bot-avatar {
  background: #ec4899;
}

.user-avatar {
  background: #6366f1;
}

.chat-bubble {
  padding: 0.6rem 1rem;
  border-radius: 1.25rem;
  font-size: 0.875rem;
  max-width: 75%;
  line-height: 1.45;
}

.bot-bubble {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
  border-top-left-radius: 0.25rem;
}

.user-bubble {
  background: #6366f1;
  color: white;
  border-top-right-radius: 0.25rem;
}

/* Bouncing Typing Indicator */
.typing-dots {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.8rem 1rem;
}

.typing-dot {
  width: 0.35rem;
  height: 0.35rem;
  background-color: #94a3b8;
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

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

.chat-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 0.5rem;
  background: var(--bg-darkest);
}

.chat-footer input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  color: white;
  outline: none;
  font-size: 0.875rem;
}

.btn-chat-send {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #ec4899;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* GENERAL MODAL OVERLAY */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-box-card {
  background: #111827;
  border: 1px solid var(--border-light);
  border-radius: 1.75rem;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.recipe-hero-banner {
  height: 12rem;
  position: relative;
  flex-shrink: 0;
}

.recipe-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

.recipe-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #111827, transparent);
}

.btn-recipe-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.35);
  color: white;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.recipe-banner-text-details {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  right: 1.5rem;
}

.recipe-modal-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
}

.recipe-action-links {
  display: flex;
  gap: 0.75rem;
}

.badge-blue {
  background-color: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}

.badge-rose-btn {
  background-color: rgba(244, 114, 182, 0.2);
  color: #fbcfe8;
  border: 1px solid rgba(244, 114, 182, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
  text-decoration: none;
  display: inline-block;
}

.badge-rose-btn:hover {
  background-color: rgba(244, 114, 182, 0.35);
}

.recipe-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem;
}

.guide-alert-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 1.25rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}

.guide-alert-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.guide-accent-title {
  color: #60a5fa;
}

.guide-light-lbl {
  color: var(--text-muted);
}

.guide-alert-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.guide-servings-txt {
  font-size: 1.35rem;
  font-weight: 800;
  color: white;
}

.text-pink { color: #f472b6; }
.text-highlight { color: white; font-weight: 700; }

.guide-grams-txt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.guide-serving-unit-card {
  text-align: right;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.45rem 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border-light);
}

.guide-unit-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.guide-unit-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  margin-top: 0.1rem;
}

.recipe-section {
  margin-bottom: 1.75rem;
}

.recipe-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.ingredients-grid-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  list-style: none;
}

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

.ingredients-grid-list li {
  font-size: 0.875rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  padding: 0.65rem 0.85rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ingredients-grid-list li::before {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  background-color: #6366f1;
  border-radius: 50%;
  flex-shrink: 0;
}

.steps-ordered-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-row-flex {
  display: flex;
  gap: 1rem;
  align-items: start;
}

.step-num-bubble {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.15);
  color: var(--c-pink);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.step-txt {
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.55;
}

/* FULLSCREEN PRESCRIPTION OVERLAY */
.modal-overlay-fullscreen {
  position: fixed;
  inset: 0;
  background-color: rgba(3, 7, 18, 0.98);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.prescription-preview-header {
  background: #0f172a;
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.presc-header-title {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prescription-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-cancel {
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
}

.btn-cancel:hover {
  color: white;
}

.btn-pink-print {
  background: #ec4899;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-pink-print:hover {
  background: #db2777;
}

.prescription-paper-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.prescription-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  color: var(--text-secondary);
  text-align: center;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid rgba(236, 72, 153, 0.15);
  border-top-color: #ec4899;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.loading-subtitle {
  font-size: 0.875rem;
}

.prescription-page-border {
  display: none;
}

/* MEDICAL DOCUMENT SHEET (A4 layout emulation) */
.prescription-document-sheet {
  width: 100%;
  max-width: 800px;
  background-color: white;
  color: #0f172a;
  border-radius: 0.75rem;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-family: 'Outfit', sans-serif;
}

/* Elements inside the printable prescription */
.presc-logo-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.presc-hospital-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hospital-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: #0f172a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hospital-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.hospital-sub {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 0.35rem;
}

.presc-contact-block {
  text-align: right;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.5;
}

.presc-date-pill {
  display: inline-block;
  background-color: #f1f5f9;
  padding: 0.35rem 1rem;
  border-radius: 0.35rem;
  font-weight: 700;
  color: #334155;
  margin-top: 0.5rem;
}

.presc-divider {
  border: 0;
  border-top: 2px solid #0f172a;
  margin-bottom: 2rem;
}

.presc-rx-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.rx-symbol {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  font-weight: 900;
  font-style: italic;
  line-height: 0.7;
  color: #e2e8f0;
  user-select: none;
}

.rx-document-title {
  text-align: right;
}

.rx-doc-type {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.rx-doc-id {
  font-family: monospace;
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.patient-info-box {
  background: white;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #0f172a;
  padding: 1.25rem 1.5rem;
  border-radius: 0.35rem;
  margin-bottom: 2.5rem;
}

.box-title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.patient-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-group-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.stat-group-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.box-row-divider {
  border-top: 1px solid #f1f5f9;
  margin: 1rem 0;
}

.patient-medical-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.medical-txt-desc {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
  line-height: 1.4;
}

.clinical-assessment-section {
  margin-bottom: 2.5rem;
}

.presc-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.presc-section-header svg {
  color: #475569;
}

.clinical-quote-box {
  border-left: 4px solid #e2e8f0;
  padding-left: 1.25rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  background-color: #f8fafc;
}

.quote-txt {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.6;
  color: #334155;
}

.presc-regimen-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.presc-cals-badge {
  background-color: #0f172a;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
}

.presc-meals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.presc-meal-col-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}

.presc-meal-header-title {
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  padding: 0.6rem 0.5rem;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
}

.presc-meal-foods-stack {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.presc-food-row {
  display: flex;
  gap: 0.75rem;
  align-items: start;
}

.presc-food-img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.35rem;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.presc-food-name {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.presc-food-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
}

.presc-food-serv {
  font-size: 0.65rem;
  color: #64748b;
}

.presc-food-cals {
  background-color: #f1f5f9;
  color: #334155;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.05rem 0.35rem;
  border-radius: 0.2rem;
  border: 1px solid #cbd5e1;
}

.presc-recipe-link {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #3b82f6;
  text-decoration: none;
  margin-top: 0.25rem;
}

.presc-bottom-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.presc-bottom-card {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.presc-bullets-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.presc-bullets-list li {
  font-size: 0.75rem;
  color: #334155;
  line-height: 1.45;
  display: flex;
  gap: 0.5rem;
  align-items: start;
}

.bullet-dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background-color: #0f172a;
  margin-top: 0.45rem;
  flex-shrink: 0;
  opacity: 0.6;
}

.presc-bullets-list li.bold-txt {
  font-weight: 700;
  color: #0f172a;
}

.warn-alert-box {
  background-color: #fff1f2;
  border: 1px solid #fecdd3;
  border-left: 3px solid #e11d48;
  border-radius: 0.35rem;
  padding: 0.85rem 1rem;
  margin-top: 1.5rem;
}

.warn-box-title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #be123c;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.warn-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.warn-list li {
  font-size: 0.7rem;
  color: #9f1239;
  line-height: 1.4;
  display: flex;
  gap: 0.35rem;
}

.warn-symbol {
  color: #f43f5e;
}

/* UTILITY CLASSES */
.hidden {
  display: none !important;
}

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* PRINT MEDIA OVERRIDES */
@media print {
  /* Draw thin page border during prints */
  .prescription-page-border {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid #0f172a;
    outline: 1px solid #0f172a;
    outline-offset: -6px;
    pointer-events: none;
    z-index: 9999;
  }

  body {
    background-color: white !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Do not hide app-container, but reset its layout for print */
  .app-container {
    display: block !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Hide headers, footers, dashboard, chatbot, other modals, and preview actions */
  .app-header,
  .main-content,
  .ambient-glow,
  .chatbot-container,
  .prescription-preview-header,
  .modal-overlay,
  #modal-checkin,
  #modal-daily-preference,
  #modal-profile-settings {
    display: none !important;
  }

  .modal-overlay-fullscreen {
    position: static !important;
    inset: 0 !important;
    background-color: white !important;
    z-index: auto !important;
    display: block !important;
  }

  .prescription-paper-scroll {
    overflow: visible !important;
    padding: 0 !important;
    display: block !important;
  }

  .prescription-document-sheet {
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    background-color: white !important;
    color: black !important;
  }

  /* Hide watch recipe links in print to look more professional */
  .presc-recipe-link {
    display: none !important;
  }
}

/* Page rules for clinical standard spacing and margins */
@page {
  size: A4;
  margin: 15mm;
}

/* AI Answer Uncovering Reveal Animations */
@keyframes uncoverReveal {
  from {
    clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
    opacity: 0.8;
  }
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
  }
}

@keyframes scanLineGlow {
  0% {
    left: 0%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

.reveal-uncover {
  animation: uncoverReveal var(--reveal-duration, 0.8s) cubic-bezier(0.19, 1, 0.22, 1) forwards;
  position: relative;
}

.bot-bubble-glow-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #6366f1, #ec4899);
  box-shadow: 0 0 10px #ec4899, 0 0 20px #6366f1;
  animation: scanLineGlow var(--reveal-duration, 0.8s) cubic-bezier(0.19, 1, 0.22, 1) forwards;
  pointer-events: none;
  z-index: 10;
}

.uncover-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  filter: blur(2px);
  transition: opacity 0.4s cubic-bezier(0.215, 0.61, 0.355, 1),
              transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1),
              filter 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  transition-delay: calc(var(--word-index) * 12ms);
  will-change: transform, opacity, filter;
}

.uncover-word.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* ============================================ */
/* WEEKLY CHECK-IN MODAL STYLES                 */
/* ============================================ */

.card-emerald {
  border-color: rgba(52, 211, 153, 0.15);
}
.card-emerald .stat-icon-box {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.sparkline-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 40px;
  opacity: 0.2;
}

.sparkline-svg polyline {
  fill: none;
  stroke: #34d399;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline-svg .sparkline-fill {
  fill: url(#sparkline-grad);
  opacity: 0.3;
}

/* Check-in Modal Card */
.checkin-card {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.5rem;
  max-width: 560px;
  width: 92%;
  margin: 2rem auto;
  padding: 2rem;
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.checkin-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.checkin-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.checkin-title svg {
  color: #34d399;
}

/* Step Dots */
.step-dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.3s ease;
}

.step-dot.active {
  background: #6366f1;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
  width: 24px;
  border-radius: 4px;
}

.step-dot.completed {
  background: #34d399;
}

/* Check-in Steps */
.checkin-step {
  display: none;
  animation: stepFadeIn 0.35s ease forwards;
}

.checkin-step.active {
  display: block;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.checkin-step-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.3rem;
}

.checkin-step-desc {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

/* Weight Input Group */
.weight-input-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.weight-stepper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weight-stepper:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  transform: scale(1.1);
}

.weight-big-input {
  width: 120px;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  background: transparent;
  border: none;
  border-bottom: 3px solid rgba(99, 102, 241, 0.4);
  color: #f1f5f9;
  padding: 0.25rem 0;
  outline: none;
  transition: border-color 0.3s;
}

.weight-big-input:focus {
  border-bottom-color: #6366f1;
}

.weight-unit {
  font-size: 1.2rem;
  color: #64748b;
  font-weight: 600;
}

/* Delta Badge */
.delta-badge {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  display: inline-block;
  margin: 0 auto 1rem;
  width: fit-content;
}

.delta-badge.loss {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.delta-badge.gain {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.2);
}

.delta-badge.neutral {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

/* Emoji Scale */
.emoji-scale {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.emoji-btn {
  width: 52px;
  height: 52px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(30, 41, 59, 0.6);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.emoji-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
  transform: scale(1.1);
}

/* Symptom Grid */
.symptom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.symptom-btn {
  padding: 0.55rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.symptom-btn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.8);
}

.symptom-btn.improved-btn.active {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.15);
}

.symptom-btn.worsened-btn.active {
  background: rgba(251, 113, 133, 0.12);
  border-color: rgba(251, 113, 133, 0.35);
  color: #fb7185;
  box-shadow: 0 0 10px rgba(251, 113, 133, 0.15);
}

.symptom-btn.pref-btn.active {
  background: rgba(99, 102, 241, 0.18) !important;
  border-color: #6366f1 !important;
  color: #a5b4fc !important;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3) !important;
  transform: translateY(-2px);
}

/* Illness symptom buttons — amber/orange theme for acute illness */
.symptom-btn.illness-btn {
  border-color: rgba(251, 191, 36, 0.15);
}

.symptom-btn.illness-btn:hover {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
}

.symptom-btn.illness-btn.active {
  background: rgba(251, 146, 60, 0.15) !important;
  border-color: rgba(251, 146, 60, 0.5) !important;
  color: #fb923c !important;
  box-shadow: 0 0 14px rgba(251, 146, 60, 0.25) !important;
  animation: illness-pulse 2s ease-in-out infinite;
}

@keyframes illness-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(251, 146, 60, 0.25); }
  50% { box-shadow: 0 0 20px rgba(251, 146, 60, 0.4); }
}

/* Textarea */
.checkin-textarea {
  width: 100%;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  color: #e2e8f0;
  padding: 0.75rem 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
}

.checkin-textarea:focus {
  border-color: rgba(99, 102, 241, 0.4);
}

/* Loading State */
.checkin-loading-state {
  text-align: center;
  padding: 3rem 1rem;
}

/* Check-in Result Metrics Row */
.checkin-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 1.2rem 0;
}

.checkin-metric-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 0.75rem;
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.metric-label {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.metric-delta {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.metric-delta.positive {
  color: #34d399;
}

.metric-delta.negative {
  color: #fb7185;
}

.metric-delta.neutral {
  color: #94a3b8;
}

/* AI Analysis Result Card */
.analysis-result-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 1rem;
  padding: 1.25rem;
  margin: 1rem 0;
  position: relative;
}

.analysis-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.analysis-text {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.6;
}

.checkin-done-btn {
  width: 100%;
  margin-top: 1rem;
}

.checkin-next-btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 600px) {
  .symptom-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .checkin-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .emoji-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

/* ============================================ */
/* ADMIN CONSOLE STYLES                         */
/* ============================================ */

.admin-layout {
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
  width: 95%;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 1rem;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-brand h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #f1f5f9;
}

.admin-user-profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.admin-user-details {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.admin-user-name {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 0.95rem;
}

.admin-user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-logout-admin {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-logout-admin:hover {
  background: #ef4444;
  color: white;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Controls Card */
.admin-controls-card {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.25rem;
  border-radius: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-search-wrapper {
  position: relative;
  flex-grow: 1;
}

.admin-search-wrapper .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

#admin-search-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: #f1f5f9;
  outline: none;
  font-size: 0.9rem;
  transition: border-color 0.3s;
}

#admin-search-input:focus {
  border-color: rgba(99, 102, 241, 0.4);
}

.admin-filters {
  display: flex;
  gap: 1rem;
}

.admin-select {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.admin-select option {
  background: #0f172a;
  color: #cbd5e1;
}

/* Glass Table Styles */
.admin-table-container {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1.25rem;
  overflow: hidden;
}

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

.admin-table th {
  background: rgba(30, 41, 59, 0.3);
  padding: 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table td {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  font-size: 0.9rem;
  color: #cbd5e1;
}

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

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.admin-client-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.admin-client-meta {
  display: flex;
  flex-direction: column;
}

.admin-client-name {
  font-weight: 600;
  color: #f8fafc;
}

.admin-client-username {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Badges for Goals/Streaks */
.badge-streak {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-goal {
  padding: 0.25rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-goal.lose {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.15);
}

.badge-goal.gain {
  background: rgba(129, 140, 248, 0.1);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.15);
}

.badge-goal.maintain {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.admin-targets-column {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
}

.admin-target-lbl {
  color: var(--text-muted);
}

.admin-target-val {
  font-weight: 600;
  color: #e2e8f0;
}

.admin-btn-inspect {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 0.5rem 0.85rem;
  border-radius: 0.6rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-btn-inspect:hover {
  background: #6366f1;
  color: white;
  border-color: #6366f1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}

/* Admin Detail Inspect Modal Drawer */
.admin-inspect-card {
  background: rgba(15, 23, 42, 0.93);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.75rem;
  max-width: 820px;
  width: 92%;
  margin: 3rem auto;
  padding: 2.5rem;
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.admin-inspect-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.25rem;
}

.inspect-title-group {
  display: flex;
  flex-direction: column;
}

.inspect-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #f1f5f9;
}

.inspect-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.inspect-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.inspect-vitals-card, .inspect-trend-card {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.inspect-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.vital-detail-item {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.3);
  padding: 0.6rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.detail-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.detail-value {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 0.95rem;
}

.detail-sub-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.alert-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.badge-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.alert-badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.warning-badge {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.15);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 2rem;
}

.warning-badge.allergen {
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

/* Large SVG Sparkline in Inspector */
.trend-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.inspect-sparkline-wrapper {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 0.75rem;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.02);
  height: 120px;
  position: relative;
}

.large-sparkline-svg {
  width: 100%;
  height: 100%;
}

.large-sparkline-svg polyline {
  fill: none;
  stroke: #ec4899;
  stroke-width: 3;
  stroke-linecap: round;
}

.large-sparkline-svg .sparkline-fill {
  fill: url(#large-sparkline-grad);
  opacity: 0.25;
}

.sparkline-axes {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  padding: 0 0.25rem;
}

/* Accordion Check-ins */
.checkin-log-card {
  background: rgba(30, 41, 59, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.checkin-log-header {
  background: rgba(30, 41, 59, 0.15);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.checkin-log-header:hover {
  background: rgba(30, 41, 59, 0.3);
}

.log-date-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.log-date {
  font-weight: 600;
  color: #e2e8f0;
}

.log-streak {
  font-size: 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
}

.log-meta-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.log-weight-delta {
  font-weight: 700;
  font-size: 0.85rem;
}

.log-accordion-icon {
  transition: transform 0.3s;
  color: var(--text-muted);
}

.checkin-log-card.open .log-accordion-icon {
  transform: rotate(180deg);
}

.checkin-log-body {
  display: none;
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(15, 23, 42, 0.25);
  animation: accordionSlideDown 0.3s ease forwards;
}

.checkin-log-card.open .checkin-log-body {
  display: block;
}

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

.log-ratings-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.log-rating-pill {
  background: rgba(30, 41, 59, 0.4);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
}

.rating-pill-lbl {
  color: var(--text-muted);
}

.rating-pill-val {
  font-weight: 700;
  color: #f1f5f9;
}

.log-symptoms-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.log-symptom-column {
  background: rgba(30, 41, 59, 0.15);
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.8rem;
}

.log-symptom-column-title {
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.log-symptom-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: #e2e8f0;
}

.log-symptom-tag {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
}

.log-notes-section {
  background: rgba(30, 41, 59, 0.15);
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.log-notes-title {
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.log-notes-txt {
  color: #cbd5e1;
  font-style: italic;
}

.log-ai-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(236, 72, 153, 0.04));
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.log-ai-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.log-ai-text {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Responsive Table */
@media (max-width: 900px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-controls-card {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-filters {
    justify-content: flex-end;
  }
  .inspect-details-grid {
    grid-template-columns: 1fr;
  }
}

