/* ==========================================================
   CALORIAS AI - MODERN LUXURY DARK NUTRITION DESIGN SYSTEM
   ========================================================== */

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

:root {
  --bg-main: #090810;
  --bg-card: rgba(22, 19, 38, 0.75);
  --bg-card-hover: rgba(32, 27, 54, 0.85);
  --bg-surface: #131024;
  --bg-input: #1a162e;
  
  --primary: #9333ea;
  --primary-glow: rgba(147, 51, 234, 0.4);
  --primary-light: #c084fc;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.35);
  --accent-orange: #f97316;
  
  --macro-protein: #8b5cf6;
  --macro-carb: #3b82f6;
  --macro-fat: #f59e0b;
  --macro-fiber: #10b981;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-subtle: rgba(147, 51, 234, 0.18);
  --border-glow: rgba(168, 85, 247, 0.5);
  --border-green: rgba(16, 185, 129, 0.3);
  
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 9999px;
  
  --shadow-neon: 0 0 35px rgba(147, 51, 234, 0.25);
  --shadow-green: 0 0 30px rgba(16, 185, 129, 0.2);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-main: #f4f6fb;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #ffffff;
  --bg-surface: #ffffff;
  --bg-input: #eef2f7;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --border-subtle: rgba(147, 51, 234, 0.12);
  --shadow-neon: 0 10px 30px rgba(147, 51, 234, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Background Atmospheric Glows */
.bg-glow-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  animation: floatOrb 18s ease-in-out infinite alternate;
}
.glow-orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #9333ea, transparent 70%);
  top: -100px;
  right: -100px;
}
.glow-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #10b981, transparent 70%);
  bottom: 10%;
  left: -150px;
  animation-delay: -6s;
}
.glow-orb-3 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  top: 45%;
  right: 10%;
  animation-delay: -12s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

.app-wrapper {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 90px;
  z-index: 1;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-neon);
}

.green-card {
  border-color: var(--border-green);
}
.green-card:hover {
  border-color: var(--accent-green);
  box-shadow: var(--shadow-green);
}

/* Modern Gradient Badges & Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.55);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-purple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #9333ea 0%, #d946ef 100%);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 25px rgba(147, 51, 234, 0.45);
  transition: var(--transition);
  text-decoration: none;
}
.btn-purple:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 35px rgba(147, 51, 234, 0.65);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glow);
}

/* Tag Pill */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.tag-badge.purple {
  background: rgba(147, 51, 234, 0.12);
  border-color: rgba(147, 51, 234, 0.35);
  color: #c084fc;
}

/* Header Styles */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 8, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
}
.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}
.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #ffffff 40%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.brand-ai-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #9333ea, #ec4899);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.5);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.header-streak-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
}
.header-streak-badge .trophy {
  color: #fbbf24;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.95rem;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.4);
}

/* Mode Switcher Banner (Bariátrica / Ozempic vs Normal) */
.mode-toggle-card {
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(147, 51, 234, 0.08));
  border: 1px solid var(--border-green);
}
.mode-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.mode-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mode-title {
  font-size: 0.88rem;
  font-weight: 700;
}
.mode-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-input);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--border-subtle);
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-green);
}
input:checked + .slider:before {
  transform: translateX(22px);
}

/* Calorie & Macro Dashboard */
.macro-dashboard {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.macro-dashboard::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.25), transparent 70%);
  pointer-events: none;
}
.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.day-date-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.daily-kcal-title {
  font-size: 1.75rem;
  font-weight: 800;
}

/* Circular Progress for Calories */
.calorie-circle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 1rem auto 1.5rem auto;
}
.circle-chart {
  transform: rotate(-90deg);
}
.circle-bg {
  fill: none;
  stroke: var(--bg-surface);
  stroke-width: 10;
}
.circle-progress {
  fill: none;
  stroke: url(#calGradient);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease;
}
.circle-inner-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.circle-kcal-number {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}
.circle-kcal-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.circle-target-tag {
  font-size: 0.72rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-top: 0.35rem;
  font-weight: 600;
}

/* Macro Bars */
.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}
.macro-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.macro-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.macro-val {
  font-size: 1.05rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}
.macro-val span {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}
.macro-bar-container {
  height: 6px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.4rem;
}
.macro-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.bar-prot { background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.bar-carb { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.bar-fat { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar-fib { background: linear-gradient(90deg, #10b981, #34d399); }

/* Quick Action Buttons Grid */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.action-card {
  padding: 1.1rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}
.action-card.action-camera {
  background: linear-gradient(145deg, rgba(147, 51, 234, 0.2), rgba(22, 19, 38, 0.8));
  border-color: rgba(147, 51, 234, 0.4);
}
.action-card.action-camera:hover {
  border-color: var(--primary-light);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
}
.action-card.action-barcode {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(22, 19, 38, 0.8));
  border-color: rgba(16, 185, 129, 0.3);
}
.action-card.action-barcode:hover {
  border-color: var(--accent-green);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
}
.action-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.action-camera .action-card-icon {
  background: rgba(147, 51, 234, 0.3);
  color: #c084fc;
}
.action-barcode .action-card-icon {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}
.action-card-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.action-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Meals Timeline (Visual Food Diary) */
.diary-section {
  margin-bottom: 2rem;
}
.diary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.diary-title {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meal-slot-card {
  margin-bottom: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.meal-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.meal-type-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.92rem;
}
.meal-type-icon {
  font-size: 1.1rem;
}
.meal-slot-totals {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}
.meal-slot-totals strong {
  color: var(--text-main);
}

.meal-entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.meal-food-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--primary);
}
.food-row-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.food-row-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
}
.food-row-name {
  font-size: 0.85rem;
  font-weight: 600;
}
.food-row-portion {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.food-row-macros {
  text-align: right;
}
.food-row-kcal {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary-light);
}
.food-row-detail {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.btn-add-food-slot {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.5rem;
  border: 1px dashed var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition);
}
.btn-add-food-slot:hover {
  background: rgba(147, 51, 234, 0.1);
  color: var(--primary-light);
  border-color: var(--primary);
}

/* Bottom Navigation Bar (PWA Style) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(14, 11, 25, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.6rem 0.5rem 0.8rem 0.5rem;
  z-index: 50;
}
.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.nav-tab svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}
.nav-tab.active {
  color: #c084fc;
}
.nav-tab.active svg {
  stroke: #c084fc;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

/* Center Shutter Button in Nav */
.nav-center-shutter {
  position: relative;
  top: -18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 4px solid var(--bg-main);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
  transition: var(--transition);
}
.nav-center-shutter:hover {
  transform: scale(1.08);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.8);
}
.nav-center-shutter svg {
  width: 26px;
  height: 26px;
}

/* Modals & Overlays */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  display: flex;
  opacity: 1;
}
.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
  position: relative;
  padding: 1.5rem;
}
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-input);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* AI Camera Capture HUD */
.camera-hud-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000000;
  aspect-ratio: 4/3;
  margin-bottom: 1rem;
}
.camera-video-preview, .camera-photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-reticle {
  position: absolute;
  inset: 15%;
  border: 2px dashed rgba(168, 85, 247, 0.7);
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.3) inset;
  pointer-events: none;
  animation: pulseScan 2s ease-in-out infinite;
}
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #c084fc, transparent);
  box-shadow: 0 0 15px #c084fc;
  animation: moveScanLine 2s ease-in-out infinite alternate;
}
@keyframes pulseScan {
  0%, 100% { border-color: rgba(168, 85, 247, 0.5); }
  50% { border-color: rgba(217, 70, 239, 0.9); }
}
@keyframes moveScanLine {
  0% { top: 5%; }
  100% { top: 95%; }
}

/* Coach Nutri Chat Drawer */
.chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.chat-bubble {
  max-width: 85%;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.chat-bubble.coach {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #9333ea, #7e22ce);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.chat-input-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.chat-text-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.15rem;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
}
.chat-text-input:focus {
  border-color: var(--primary-light);
}

/* Landing Page Styles */
.hero-section {
  padding: 4rem 0 3rem 0;
  text-align: center;
  position: relative;
}
.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  background: rgba(147, 51, 234, 0.12);
  border: 1px solid rgba(147, 51, 234, 0.35);
  font-size: 0.82rem;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: 2.75rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
  .hero-title {
    font-size: 3.8rem;
  }
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #c084fc 70%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2rem auto;
}
.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Hero Showcase Mockup */
.hero-mockup-wrapper {
  position: relative;
  max-width: 820px;
  margin: 0 auto 4rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px -15px rgba(147, 51, 234, 0.35);
  border: 1px solid var(--border-glow);
}
.hero-mockup-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Feature 4 Pillars Section (As in Screenshot 3) */
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.pillar-card {
  padding: 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.pillar-check-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}
.pillar-text h4 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.pillar-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-msg {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(19, 16, 36, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid var(--primary-light);
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-neon);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
}
.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================
   ESTILOS DE HISTÓRICO: DIÁRIO, SEMANAL E MENSAL
   ========================================================== */
.history-view-selector {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.3rem;
  margin: 1rem 0;
  gap: 0.25rem;
}
.view-tab-btn {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.view-tab-btn.active {
  background: linear-gradient(135deg, #9333ea, #7e22ce);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.4);
}
.view-tab-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* Date Navigator (Diário) */
.date-navigator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  margin-bottom: 1.25rem;
}
.date-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}
.date-nav-btn:hover {
  border-color: var(--primary-light);
  background: rgba(147, 51, 234, 0.2);
}
.date-nav-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Gráfico Semanal (Weekly) */
.weekly-bars-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 180px;
  padding: 1.25rem 0.5rem 0.5rem 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  margin: 1rem 0;
  position: relative;
}
.weekly-target-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 2px dashed rgba(16, 185, 129, 0.6);
  z-index: 1;
}
.weekly-target-label {
  position: absolute;
  right: 8px;
  top: -18px;
  font-size: 0.68rem;
  color: #34d399;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.weekly-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  z-index: 2;
}
.weekly-bar {
  width: 22px;
  border-radius: 6px 6px 2px 2px;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 4px;
}
.weekly-bar.on-target {
  background: linear-gradient(180deg, #10b981, #059669);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.weekly-bar.under-target {
  background: linear-gradient(180deg, #c084fc, #9333ea);
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.3);
}
.weekly-bar.over-target {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}
.weekly-bar-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 600;
}
.weekly-bar-val {
  font-size: 0.65rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-main);
}

/* Calendário Mensal de Consistência */
.monthly-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin: 1rem 0;
}
.calendar-day-header {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 700;
  padding-bottom: 0.25rem;
}
.calendar-day-box {
  aspect-ratio: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.calendar-day-box.completed {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-green);
  color: #34d399;
}
.calendar-day-box.selected {
  border-color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}
.calendar-day-box.today {
  outline: 2px solid #a855f7;
  outline-offset: -2px;
}
.day-status-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  margin-top: 2px;
}
.day-status-dot.green { background: #10b981; }
.day-status-dot.purple { background: #c084fc; }

