/* ==========================================================================
   CALORIECAL - ULTRA-CLEAN 7-DASHBOARD SUITE & MINT EMERALD THEME
   Palette: Primary #10b981 | Dark #065f46 | Soft #e8f5e9 | Bg #f4fbf7 | Text #0f172a
   100% Bespoke, Copyright-Free Architecture & Responsive Mobile Frame
   ========================================================================== */

:root {
  --cc-emerald: #10b981;
  --cc-emerald-dark: #065f46;
  --cc-emerald-deep: #064e3b;
  --cc-emerald-light: #e8f5e9;
  --cc-emerald-surface: #f4fbf7;
  --cc-emerald-border: #a7f3d0;
  --cc-emerald-glow: rgba(16, 185, 129, 0.25);
  
  --cc-water-blue: #0284c7;
  --cc-water-light: #e0f2fe;
  --cc-water-wave: #38bdf8;
  
  --cc-protein: #f43f5e;
  --cc-carbs: #3b82f6;
  --cc-fats: #f59e0b;
  
  --cc-text-main: #0f172a;
  --cc-text-muted: #64748b;
  --cc-card-bg: #ffffff;
  --cc-body-bg: #f8faf9;
  --cc-border: #e2e8f0;
  --cc-radius-lg: 16px;
  --cc-radius-xl: 24px;
  --cc-shadow-sm: 0 2px 4px rgba(6, 95, 70, 0.04);
  --cc-shadow-md: 0 6px 16px -2px rgba(6, 95, 70, 0.08);
  --cc-shadow-lg: 0 16px 28px -4px rgba(6, 95, 70, 0.12);
}

[data-theme="dark"] {
  --cc-card-bg: #131d1a;
  --cc-body-bg: #0b1210;
  --cc-emerald-surface: #10241e;
  --cc-emerald-border: #064e3b;
  --cc-text-main: #f1f5f9;
  --cc-text-muted: #94a3b8;
  --cc-border: #1e332c;
  --cc-shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.4);
  --cc-shadow-lg: 0 16px 28px -4px rgba(0, 0, 0, 0.6);
}

/* Header Brand with Real Leaf+Flame+Gauge Icon */
.cc-brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
}

.cc-brand-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--cc-emerald-surface);
  border: 1px solid var(--cc-emerald-border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--cc-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.cc-brand-badge:hover .cc-brand-icon-wrap {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--cc-emerald-glow);
}

.cc-brand-icon-wrap svg {
  width: 32px;
  height: 32px;
  display: block;
}

.cc-brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cc-text-main);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.cc-brand-text span {
  color: var(--cc-emerald);
}

/* 7 Dashboard Screen Switcher Bar (Desktop & Tablet) */
.cc-screens-nav-wrap {
  position: sticky;
  top: 4.5rem;
  z-index: 90;
  background: rgba(248, 250, 249, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cc-border);
  margin-bottom: 2rem;
  padding: 0.6rem 0;
  transition: all 0.3s ease;
}

[data-theme="dark"] .cc-screens-nav-wrap {
  background: rgba(11, 18, 16, 0.94);
}

.cc-screens-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0.5rem;
}

.cc-screens-nav::-webkit-scrollbar {
  display: none;
}

.cc-screen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cc-text-muted);
  font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-screen-btn:hover {
  background: var(--cc-emerald-light);
  color: var(--cc-emerald-dark);
}

[data-theme="dark"] .cc-screen-btn:hover {
  background: var(--cc-emerald-surface);
  color: var(--cc-emerald);
}

.cc-screen-btn.active {
  background: linear-gradient(135deg, var(--cc-emerald), var(--cc-emerald-dark));
  color: #ffffff;
  box-shadow: 0 4px 12px var(--cc-emerald-glow);
  border-color: transparent;
}

.cc-screen-btn .cc-nav-icon {
  font-size: 1.1rem;
}

/* Screen Title Header Bar */
.cc-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--cc-border);
}

.cc-screen-title-area h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--cc-text-main);
  margin: 0 0 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cc-screen-title-area p {
  color: var(--cc-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.cc-screen-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Dedicated Screen Panels */
.cc-screen-panel {
  display: none;
  animation: ccFadeScale 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cc-screen-panel.active {
  display: block;
}

@keyframes ccFadeScale {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Handset Frame Simulator for APK Preview */
.cc-handset-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cc-emerald-surface);
  border: 1.5px solid var(--cc-emerald);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cc-emerald-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-handset-toggle-pill:hover {
  background: var(--cc-emerald);
  color: #fff;
  box-shadow: 0 4px 12px var(--cc-emerald-glow);
}

.cc-handset-stage {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 3rem;
  transition: all 0.3s ease;
}

.cc-phone-frame {
  width: 100%;
  max-width: 412px;
  height: 860px;
  background: #0f172a;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 25px 60px -15px rgba(6, 95, 70, 0.35), 0 0 0 4px #334155, 0 0 0 8px #1e293b;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cc-phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 24px;
  background: #000000;
  border-radius: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.cc-phone-camera {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #0f172a;
}

.cc-phone-sensor {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #064e3b;
}

.cc-phone-status-bar {
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 95;
  background: transparent;
}

.cc-phone-screen-scroll {
  flex: 1;
  background: var(--cc-body-bg);
  border-radius: 36px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 0.85rem 5.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cc-phone-screen-scroll::-webkit-scrollbar {
  display: none;
}

.cc-phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 4px;
  background: #ffffff;
  border-radius: 4px;
  opacity: 0.6;
  z-index: 100;
  pointer-events: none;
}

/* ==========================================================================
   SCREEN 1: OVERVIEW & CENTRAL MACRO DONUT
   ========================================================================== */
.cc-overview-hero {
  background: linear-gradient(135deg, var(--cc-emerald-deep), var(--cc-emerald-dark), #047857);
  border-radius: var(--cc-radius-xl);
  padding: 2rem;
  color: #ffffff;
  box-shadow: 0 20px 30px -8px rgba(6, 78, 59, 0.4);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.cc-overview-hero::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.cc-budget-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 900px) {
  .cc-budget-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.cc-macro-donut-container {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.cc-donut-svg-wrap {
  position: relative;
  width: 170px;
  height: 170px;
  flex-shrink: 0;
}

.cc-donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.cc-donut-bg {
  stroke: rgba(255, 255, 255, 0.15);
}

.cc-donut-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.cc-donut-cal-num {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.cc-donut-cal-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a7f3d0;
  margin-top: 0.25rem;
}

.cc-budget-stats-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.cc-bstat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.cc-bstat-item.highlight {
  background: rgba(52, 211, 153, 0.25);
  font-weight: 700;
}

.cc-quick-actions-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ==========================================================================
   SCREEN 2: WATER & HYDRATION HUB
   ========================================================================== */
.cc-water-hub-card {
  background: linear-gradient(to bottom, #f0fdf4, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: var(--cc-radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--cc-shadow-md);
  margin-bottom: 2rem;
}

[data-theme="dark"] .cc-water-hub-card {
  background: linear-gradient(to bottom, #082f49, #0c4a6e);
  border-color: #0369a1;
}

.cc-water-center-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.cc-water-bottle-visual {
  width: 120px;
  height: 240px;
  border: 5px solid var(--cc-water-blue);
  border-radius: 30px 30px 42px 42px;
  background: rgba(2, 132, 199, 0.06);
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(2, 132, 199, 0.25);
}

.cc-water-cap {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 14px;
  background: var(--cc-water-blue);
  border-radius: 6px 6px 0 0;
}

.cc-water-fill-level {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cc-water-wave-anim {
  position: absolute;
  top: -6px;
  left: 0;
  width: 200%;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C150,40 350,-40 500,0 C650,40 900,-40 1200,0 L1200,120 L0,120 Z' fill='%2338bdf8'/%3E%3C/svg%3E");
  background-size: 50% 100%;
  animation: ccWaveFlow 3s linear infinite;
}

@keyframes ccWaveFlow {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.cc-water-stats-display {
  text-align: center;
}

.cc-water-big-num {
  font-size: 3.8rem;
  font-weight: 900;
  color: var(--cc-water-blue);
  line-height: 1;
}

.cc-water-target-lbl {
  font-size: 1.15rem;
  color: var(--cc-text-muted);
  margin: 0.5rem 0 1rem;
}

.cc-water-milestone-pills {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cc-glass-icon-pill {
  width: 32px;
  height: 38px;
  border: 2px solid #bae6fd;
  border-radius: 4px 4px 8px 8px;
  background: #ffffff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-glass-icon-pill.filled {
  border-color: var(--cc-water-blue);
  background: #e0f2fe;
}

.cc-glass-icon-pill.filled::after {
  content: "";
  display: block;
  width: 100%;
  height: 75%;
  background: var(--cc-water-blue);
}

.cc-water-timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.cc-water-reminder-card {
  background: var(--cc-card-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.cc-water-reminder-card.completed {
  border-color: var(--cc-emerald);
  background: var(--cc-emerald-light);
}

/* ==========================================================================
   SCREEN 3: FOOD DATABASE & MEAL LOGGER
   ========================================================================== */
.cc-food-search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.cc-food-search-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  font-size: 1.05rem;
  border: 2px solid var(--cc-emerald-border);
  border-radius: var(--cc-radius-lg);
  background: var(--cc-card-bg);
  color: var(--cc-text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cc-food-search-input:focus {
  border-color: var(--cc-emerald);
  box-shadow: 0 0 0 4px var(--cc-emerald-glow);
}

.cc-food-search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  pointer-events: none;
  color: var(--cc-emerald-dark);
}

.cc-food-autocomplete-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--cc-card-bg);
  border: 1.5px solid var(--cc-emerald);
  border-radius: var(--cc-radius-lg);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--cc-shadow-lg);
}

.cc-food-autocomplete-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--cc-border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.cc-food-autocomplete-item:hover {
  background: var(--cc-emerald-light);
}

.cc-food-cat-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
}

.cc-food-cat-pill.desi {
  background: #fef3c7;
  color: #b45309;
}

.cc-food-cat-pill.protein {
  background: #fee2e2;
  color: #b91c1c;
}

/* ==========================================================================
   SCREEN 4: EXERCISE & FITNESS HUB (METS CALCULATOR)
   ========================================================================== */
.cc-mets-calc-card {
  background: var(--cc-card-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-xl);
  padding: 2rem;
  box-shadow: var(--cc-shadow-md);
  margin-bottom: 2rem;
}

.cc-activity-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cc-activity-btn {
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  border: 1.5px solid var(--cc-border);
  background: var(--cc-card-bg);
  color: var(--cc-text-main);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-activity-btn.active {
  background: var(--cc-emerald);
  color: #ffffff;
  border-color: var(--cc-emerald);
  box-shadow: 0 4px 10px var(--cc-emerald-glow);
}

.cc-step-gauge-wrap {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--cc-emerald-surface);
  border: 1px solid var(--cc-emerald-border);
  border-radius: var(--cc-radius-xl);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.cc-step-ring {
  position: relative;
  width: 140px;
  height: 140px;
}

/* ==========================================================================
   SCREEN 5: BODY METRICS & BMI METER
   ========================================================================== */
.cc-bmi-meter-wrap {
  background: var(--cc-card-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-xl);
  padding: 2rem;
  box-shadow: var(--cc-shadow-md);
  margin-bottom: 2rem;
}

.cc-bmi-bar {
  height: 20px;
  border-radius: 9999px;
  background: linear-gradient(to right, #38bdf8 0%, #10b981 30%, #f59e0b 65%, #ef4444 100%);
  position: relative;
  margin: 2rem 0 1.25rem;
}

.cc-bmi-needle {
  position: absolute;
  top: -10px;
  width: 14px;
  height: 38px;
  background: var(--cc-text-main);
  border-radius: 4px;
  transform: translateX(-50%);
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cc-bmi-needle::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--cc-text-main);
}

/* ==========================================================================
   SCREEN 6: WEEKLY ANALYTICS & REPORTS
   ========================================================================== */
.cc-chart-container {
  width: 100%;
  height: 240px;
  margin-top: 1rem;
}

.cc-report-score-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.cc-score-box {
  background: var(--cc-card-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--cc-shadow-sm);
  transition: transform 0.2s ease;
}

.cc-score-box:hover {
  transform: translateY(-3px);
  border-color: var(--cc-emerald);
}

.cc-score-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--cc-emerald-dark);
}

/* ==========================================================================
   SCREEN 7: SETTINGS & GOALS CUSTOMIZER
   ========================================================================== */
.cc-mode-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.cc-mode-card {
  border: 2px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  background: var(--cc-card-bg);
}

.cc-mode-card:hover {
  border-color: var(--cc-emerald);
}

.cc-mode-card.active {
  border-color: var(--cc-emerald);
  background: var(--cc-emerald-light);
  box-shadow: 0 4px 14px var(--cc-emerald-glow);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .cc-screens-nav-wrap {
    top: 4rem;
  }
  .cc-screen-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.825rem;
  }
  .cc-overview-hero {
    padding: 1.5rem 1.25rem;
  }
  .cc-water-center-stage {
    gap: 1.5rem;
  }
  .cc-water-bottle-visual {
    width: 100px;
    height: 200px;
  }
  .cc-water-big-num {
    font-size: 2.75rem;
  }
}
