/* ═══════════════════════════════════════════════════════
   ATPROO EDA AI — WELCOME SCREEN + PREMIUM DASHBOARD
   ═══════════════════════════════════════════════════════ */

/* ── WELCOME / SPLASH SCREEN ── */
#welcome-screen {
  position: fixed; inset: 0; z-index: 500;
  background: #0a0f1e;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#welcome-screen.hide {
  opacity: 0; pointer-events: none; transform: scale(1.04);
}

/* Animated gradient orbs */
.ws-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none; animation: orbDrift 8s ease-in-out infinite;
}
.ws-orb1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(0,229,160,.18), transparent 65%); top: -160px; left: -120px; }
.ws-orb2 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(79,142,255,.13), transparent 65%); bottom: -200px; right: -150px; animation-delay: -4s; }
.ws-orb3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(139,92,246,.12), transparent 65%); top: 50%; left: 40%; animation-delay: -2s; }
@keyframes orbDrift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,-25px); } }

/* Grid lines texture */
.ws-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,229,160,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0,229,160,.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Logo area */
.ws-logo-wrap {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  margin-bottom: 48px;
  animation: wsLogoIn 0.8s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes wsLogoIn { from { opacity:0; transform:scale(.7) translateY(20px); } to { opacity:1; transform:none; } }

.ws-icon {
  width: 96px; height: 96px; border-radius: 28px;
  background: linear-gradient(135deg, #00e5a0 0%, #4f8eff 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  box-shadow: 0 0 0 1px rgba(0,229,160,.3), 0 0 60px rgba(0,229,160,.25), 0 20px 60px rgba(0,0,0,.5);
  animation: iconPulse 3s ease-in-out infinite;
}
@keyframes iconPulse { 0%,100% { box-shadow: 0 0 0 1px rgba(0,229,160,.3), 0 0 60px rgba(0,229,160,.25), 0 20px 60px rgba(0,0,0,.5); } 50% { box-shadow: 0 0 0 1px rgba(0,229,160,.5), 0 0 80px rgba(0,229,160,.4), 0 20px 60px rgba(0,0,0,.5); } }

.ws-brand {
  font-size: 52px; font-weight: 900; letter-spacing: -2px;
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,.6));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}
.ws-brand span {
  background: linear-gradient(135deg, #00e5a0, #4f8eff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ws-tagline {
  font-size: 16px; font-weight: 500; color: rgba(255,255,255,.45);
  letter-spacing: 3px; text-transform: uppercase;
}

/* Feature pills */
.ws-pills {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; max-width: 360px;
  margin-bottom: 52px;
  animation: wsPillsIn 0.7s ease both 0.3s;
}
@keyframes wsPillsIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }

.ws-pill {
  padding: 8px 16px; border-radius: 50px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.7);
  display: flex; align-items: center; gap: 7px; backdrop-filter: blur(8px);
}
.ws-pill-dot { width: 7px; height: 7px; border-radius: 50%; }

/* CTA Buttons */
.ws-btns {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 320px;
  animation: wsBtnsIn 0.7s ease both 0.5s;
}
@keyframes wsBtnsIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }

.ws-btn-main {
  width: 100%; padding: 17px;
  background: linear-gradient(135deg, #00e5a0, #4f8eff);
  color: #000; font-size: 16px; font-weight: 800;
  border: none; border-radius: 16px; cursor: pointer;
  box-shadow: 0 8px 32px rgba(0,229,160,.35);
  transition: all .2s; letter-spacing: .3px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ws-btn-main:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,229,160,.45); }
.ws-btn-main:active { transform: scale(.97); }

.ws-btn-login {
  width: 100%; padding: 16px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.85); font-size: 15px; font-weight: 700;
  border-radius: 16px; cursor: pointer; backdrop-filter: blur(8px);
  transition: all .2s;
}
.ws-btn-login:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.22); }
.ws-btn-login:active { transform: scale(.97); }

.ws-footer { position: relative; z-index: 1; margin-top: 28px; font-size: 12px; color: rgba(255,255,255,.25); }

/* ════════════════════════════════════════════
   PREMIUM APP BACKGROUND — replaces plain white
   ════════════════════════════════════════════ */
body {
  background: #0d1117 !important;
}

/* Sidebar premium dark */
.sidebar, #sb-desktop {
  background: #0f1420 !important;
  border-right: 1px solid rgba(255,255,255,.06) !important;
}

/* Content area */
#main-wrap, .main-wrap { background: #0d1117; }
.content { background: #0d1117; }
.page    { background: transparent; }

/* Topbar premium */
.topbar {
  background: rgba(13,17,23,.92) !important;
  border-bottom: 1px solid rgba(255,255,255,.06) !important;
}

/* ════════════════════════════════════════════
   DASHBOARD COMPONENTS
   ════════════════════════════════════════════ */

/* ── Daily Summary Hero ── */
.dash-hero {
  background: linear-gradient(135deg, rgba(0,229,160,.1) 0%, rgba(79,142,255,.08) 50%, rgba(139,92,246,.06) 100%);
  border: 1px solid rgba(0,229,160,.15);
  border-radius: 24px; padding: 20px; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.dash-hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0,229,160,.12), transparent 70%);
  pointer-events: none;
}
.dash-hero-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dash-hero-date { font-size: 12px; color: var(--t3); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.dash-hero-badge {
  padding: 4px 12px; border-radius: 50px; font-size: 11px; font-weight: 800;
  background: rgba(0,229,160,.15); color: var(--g1); border: 1px solid rgba(0,229,160,.25);
}

/* Calorie ring + macros row */
.dash-main-row { display: flex; align-items: center; gap: 20px; }
.cal-ring-wrap { flex-shrink: 0; position: relative; width: 110px; height: 110px; }
.cal-ring-svg { width: 110px; height: 110px; transform: rotate(-90deg); }
.cal-ring-bg  { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 10; }
.cal-ring-fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.2s ease; }
.cal-ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.cal-ring-val  { font-size: 22px; font-weight: 900; letter-spacing: -1px; line-height: 1; }
.cal-ring-lbl  { font-size: 9px; color: var(--t3); font-weight: 700; letter-spacing: .8px; text-transform: uppercase; margin-top: 2px; }

.dash-macros { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.dash-macro-item { display: flex; flex-direction: column; gap: 4px; }
.dm-header { display: flex; align-items: center; justify-content: space-between; }
.dm-label  { font-size: 11px; color: var(--t2); font-weight: 600; }
.dm-val    { font-size: 12px; font-weight: 800; }
.dm-bar    { height: 5px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.dm-fill   { height: 100%; border-radius: 3px; transition: width 1.2s ease; }

/* ── Quick Stats Grid ── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px; padding: 14px; position: relative; overflow: hidden;
  transition: all .2s; cursor: pointer;
}
.stat-card:active { transform: scale(.97); }
.stat-card::after {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--sc-glow, rgba(0,229,160,.08));
  pointer-events: none;
}
.sc-icon   { font-size: 22px; margin-bottom: 8px; }
.sc-val    { font-size: 26px; font-weight: 900; letter-spacing: -1px; line-height: 1; }
.sc-unit   { font-size: 11px; color: var(--t2); font-weight: 500; }
.sc-lbl    { font-size: 10px; color: var(--t3); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; margin-top: 5px; }
.sc-bar    { height: 3px; background: rgba(255,255,255,.08); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.sc-fill   { height: 100%; border-radius: 2px; transition: width 1.2s ease; }

/* ── Apple-style Activity Rings ── */
.rings-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
.rings-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.rings-title  { font-size: 15px; font-weight: 800; }
.rings-body   { display: flex; align-items: center; gap: 20px; }
.rings-svg-wrap { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.rings-svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.ring-track, .ring-fill { fill: none; stroke-linecap: round; }
.rings-legend { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.rl-item { display: flex; align-items: center; gap: 10px; }
.rl-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rl-info { flex: 1; }
.rl-name { font-size: 12px; font-weight: 700; color: var(--t1); }
.rl-sub  { font-size: 11px; color: var(--t3); }

/* ── Weekly Chart ── */
.chart-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chart-title  { font-size: 15px; font-weight: 800; }
.chart-tabs   { display: flex; background: rgba(255,255,255,.06); border-radius: 8px; padding: 2px; gap: 2px; }
.chart-tab    {
  padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 700;
  color: var(--t3); cursor: pointer; transition: all .18s;
}
.chart-tab.active { background: rgba(0,229,160,.15); color: var(--g1); }
.chart-wrap { height: 140px; position: relative; }

/* ── Water Widget ── */
.water-card {
  background: linear-gradient(135deg, rgba(79,142,255,.08), rgba(6,182,212,.06));
  border: 1px solid rgba(79,142,255,.15);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
.water-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.water-title  { font-size: 15px; font-weight: 800; }
.water-count  { font-size: 13px; font-weight: 700; color: #4f8eff; }
.water-glasses { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.water-glass {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1.5px solid rgba(79,142,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; transition: all .18s;
  background: rgba(255,255,255,.04);
}
.water-glass.filled { background: rgba(79,142,255,.2); border-color: rgba(79,142,255,.5); }
.water-glass:active { transform: scale(.88); }
.water-progress { display: flex; align-items: center; gap: 12px; }
.water-bar-wrap { flex: 1; height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.water-bar-fill { height: 100%; background: linear-gradient(90deg, #4f8eff, #06b6d4); border-radius: 3px; transition: width .5s ease; }
.water-pct { font-size: 12px; font-weight: 800; color: #4f8eff; }

/* ── Streak Calendar ── */
.streak-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
.streak-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.streak-title   { font-size: 15px; font-weight: 800; }
.streak-flame   {
  padding: 5px 12px; border-radius: 50px; font-size: 13px; font-weight: 800;
  background: rgba(245,158,11,.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.25);
}
.streak-days { display: flex; gap: 7px; justify-content: space-between; }
.sd-item { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; }
.sd-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; transition: all .3s;
}
.sd-circle.done  { background: linear-gradient(135deg, var(--g1), #00c8b8); border-color: transparent; box-shadow: 0 4px 14px rgba(0,229,160,.3); }
.sd-circle.today { border-color: var(--g1); background: rgba(0,229,160,.1); box-shadow: 0 0 0 3px rgba(0,229,160,.15); }
.sd-circle.missed { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.2); }
.sd-lbl { font-size: 10px; color: var(--t3); font-weight: 600; }

/* ── AI Recommendations ── */
.ai-rec-card {
  background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(236,72,153,.06));
  border: 1px solid rgba(139,92,246,.2);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
.ai-rec-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ai-rec-orb    {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(139,92,246,.3), rgba(236,72,153,.2));
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  animation: aiPulse 2s ease-in-out infinite;
}
@keyframes aiPulse { 0%,100%{opacity:1} 50%{opacity:.7} }
.ai-rec-label { font-size: 11px; font-weight: 700; color: var(--g4); text-transform: uppercase; letter-spacing: 1px; }
.ai-rec-title { font-size: 15px; font-weight: 800; }
.ai-rec-list  { display: flex; flex-direction: column; gap: 8px; }
.ai-rec-item  {
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.04); border-radius: 12px; padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.06); cursor: pointer; transition: all .18s;
}
.ai-rec-item:active { transform: scale(.98); background: rgba(255,255,255,.07); }
.ai-rec-ico   { font-size: 20px; flex-shrink: 0; }
.ai-rec-text  { flex: 1; }
.ai-rec-name  { font-size: 13px; font-weight: 700; }
.ai-rec-sub   { font-size: 11px; color: var(--t3); margin-top: 1px; }
.ai-rec-arrow { font-size: 16px; color: var(--t3); }

/* ── Body Progress ── */
.body-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
.body-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 14px; }
.body-stat {
  background: rgba(255,255,255,.05); border-radius: 14px; padding: 13px 10px; text-align: center;
}
.bs-val  { font-size: 22px; font-weight: 900; letter-spacing: -.5px; }
.bs-lbl  { font-size: 10px; color: var(--t3); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; margin-top: 3px; }
.bs-chg  { font-size: 11px; font-weight: 700; margin-top: 4px; }
.bs-pos  { color: var(--g1); }
.bs-neg  { color: var(--rd); }

/* ── Premium Banner ── */
.premium-banner {
  background: linear-gradient(135deg, #1a0a2e 0%, #0d1a3a 50%, #0a2018 100%);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 20px; padding: 20px; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.premium-banner::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(0,229,160,.06));
  pointer-events: none;
}
.pb-top    { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pb-crown  { font-size: 28px; }
.pb-label  { font-size: 11px; font-weight: 700; color: var(--g4); text-transform: uppercase; letter-spacing: 1px; }
.pb-title  { font-size: 18px; font-weight: 900; line-height: 1.2; position: relative; z-index: 1; }
.pb-desc   { font-size: 13px; color: var(--t2); margin: 8px 0 16px; line-height: 1.6; position: relative; z-index: 1; }
.pb-btn    {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px;
  background: linear-gradient(135deg, var(--g4), var(--g5));
  color: #fff; font-size: 14px; font-weight: 800; border: none; cursor: pointer;
  transition: all .2s; box-shadow: 0 6px 20px rgba(139,92,246,.35);
}
.pb-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(139,92,246,.45); }

/* ── Meal Log Today ── */
.meals-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
.meals-list  { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.meal-item   {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06); border-radius: 14px;
}
.meal-time   { font-size: 11px; font-weight: 700; color: var(--t3); min-width: 48px; }
.meal-ico    { font-size: 24px; }
.meal-info   { flex: 1; }
.meal-name   { font-size: 13px; font-weight: 700; }
.meal-cals   { font-size: 11px; color: var(--t3); margin-top: 1px; }
.meal-score  { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.add-meal-btn {
  width: 100%; padding: 13px; margin-top: 10px;
  background: rgba(0,229,160,.08); border: 1.5px dashed rgba(0,229,160,.25);
  border-radius: 14px; color: var(--g1); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.add-meal-btn:hover { background: rgba(0,229,160,.12); border-color: rgba(0,229,160,.4); }
