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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #1E3A8A;
  --blue-light: #3B5FC0;
  --blue-subtle: #EFF6FF;
  --orange: #F97316;
  --orange-light: #FED7AA;
  --orange-dark: #EA580C;
  --white: #FFFFFF;
  --grey-50: #F9FAFB;
  --grey-100: #F3F4F6;
  --grey-200: #E5E7EB;
  --grey-400: #9CA3AF;
  --grey-600: #4B5563;
  --grey-800: #1F2937;
  --green: #059669;
  --red: #DC2626;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--grey-50);
  color: var(--grey-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SCREENS ──────────────────────────────── */
.screen { display: none; min-height: 100vh; flex-direction: column; }
.screen.active { display: flex; }

/* ─── NAV / HEADER ──────────────────────────── */
.app-header {
  background: var(--white);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 100;
  min-height: 60px;
}
.app-header .logo-img { width: 36px; height: 36px; border-radius: 8px; }
.app-header h1 { font-size: 1.1rem; font-weight: 700; color: var(--blue); }
.header-right { display: flex; align-items: center; gap: 10px; }
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue-subtle); border: 2px solid var(--blue-light);
  color: var(--blue); font-weight: 700; font-size: 0.85rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; overflow: hidden;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-btn:hover { transform: scale(1.05); }

/* ─── BOTTOM NAV ─────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white);
  box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
  display: flex; z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 4px; cursor: pointer;
  color: var(--grey-400); font-size: 0.65rem; font-weight: 500;
  transition: all 0.2s; gap: 3px; border: none; background: none;
  user-select: none;
}
.nav-item svg { width: 22px; height: 22px; transition: all 0.2s; }
.nav-item.active { color: var(--blue); }
.nav-item.active svg { transform: scale(1.1); }

/* ─── SCROLL CONTAINER ─────────────────────── */
.scroll-body {
  flex: 1; overflow-y: auto;
  padding: 20px 16px 90px;
  -webkit-overflow-scrolling: touch;
}

/* ─── CARDS ─────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--grey-400); margin-bottom: 12px;
}

/* ─── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(249,115,22,0.35); }
.btn-secondary { background: var(--blue-subtle); color: var(--blue); }
.btn-secondary:hover { background: #DBEAFE; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline:hover { background: var(--blue-subtle); }
.btn-ghost { background: transparent; color: var(--grey-600); }
.btn-ghost:hover { background: var(--grey-100); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #B91C1C; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── FORM ELEMENTS ─────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--grey-800); margin-bottom: 6px; }
.form-label .hint { font-weight: 400; color: var(--grey-400); font-size: 0.8rem; margin-left: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--grey-200); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.95rem; color: var(--grey-800);
  background: var(--grey-50); transition: border-color 0.2s;
  appearance: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--blue); background: var(--white);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* ─── SLIDER ─────────────────────────────────── */
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-val {
  min-width: 40px; text-align: center;
  font-size: 1.1rem; font-weight: 700; color: var(--orange);
}
input[type=range] {
  flex: 1; height: 6px; appearance: none; -webkit-appearance: none;
  background: var(--grey-200); border-radius: 99px; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--orange); border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(249,115,22,0.4); cursor: pointer;
  transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }

/* ─── CHOICE CHIPS ───────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  padding: 8px 16px; border-radius: 99px;
  border: 2px solid var(--grey-200); background: var(--white);
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: all 0.2s; color: var(--grey-600);
}
.chip.selected {
  border-color: var(--orange); background: var(--orange-light);
  color: var(--orange-dark); font-weight: 600;
}

/* ─── LIFE SUMMARY ───────────────────────────── */
.life-hero {
  background: linear-gradient(135deg, var(--blue) 0%, #1D4ED8 60%, #2563EB 100%);
  border-radius: var(--radius-lg); padding: 28px 20px; color: var(--white);
  text-align: center; margin-bottom: 16px; position: relative; overflow: hidden;
}
.life-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.life-hero::after {
  content: ''; position: absolute; bottom: -60px; left: -30px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(249,115,22,0.15);
}
.life-days-number {
  font-size: 3.5rem; font-weight: 800; letter-spacing: -2px;
  line-height: 1; margin: 8px 0;
  background: linear-gradient(135deg, #FFF 40%, var(--orange-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.life-days-label { font-size: 0.8rem; opacity: 0.75; letter-spacing: 1px; text-transform: uppercase; }
.life-tagline { font-size: 0.95rem; opacity: 0.9; margin-top: 12px; font-weight: 500; }
.life-sub { font-size: 0.78rem; opacity: 0.65; margin-top: 4px; }

/* ─── STAT BAR ───────────────────────────────── */
.stat-row { display: flex; gap: 10px; margin-bottom: 16px; }
.stat-chip {
  flex: 1; padding: 12px 8px; border-radius: var(--radius-sm);
  text-align: center; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.stat-chip .val { font-size: 1.2rem; font-weight: 800; display: block; margin-bottom: 2px; }
.stat-chip.red { background: #FEF2F2; color: var(--red); }
.stat-chip.green { background: #ECFDF5; color: var(--green); }
.stat-chip.blue { background: var(--blue-subtle); color: var(--blue); }

/* ─── FEATURE CARDS ──────────────────────────── */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px;
}
.feature-card {
  background: var(--white); border-radius: var(--radius); padding: 18px 14px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  border: 2px solid transparent;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--grey-200); }
.feature-card:active { transform: scale(0.98); }
.feature-icon { font-size: 1.8rem; }
.feature-label { font-size: 0.8rem; font-weight: 700; color: var(--grey-800); }
.feature-val { font-size: 0.72rem; color: var(--grey-400); }
.feature-badge {
  font-size: 0.65rem; font-weight: 700; padding: 2px 8px;
  border-radius: 99px; margin-top: 4px;
}
.badge-orange { background: var(--orange-light); color: var(--orange-dark); }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-blue { background: var(--blue-subtle); color: var(--blue); }
.badge-grey { background: var(--grey-100); color: var(--grey-600); }

/* ─── WEEKLY BAR CHART ───────────────────────── */
.week-bars { display: flex; align-items: flex-end; gap: 4px; height: 48px; margin: 12px 0 4px; }
.week-bar {
  flex: 1; border-radius: 4px 4px 0 0;
  transition: height 0.4s ease;
  min-height: 4px;
}
.week-bar.orange { background: linear-gradient(180deg, var(--orange) 0%, var(--orange-dark) 100%); }
.week-bar.blue { background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue) 100%); }
.week-labels { display: flex; gap: 4px; }
.week-label { flex: 1; text-align: center; font-size: 0.6rem; color: var(--grey-400); }

/* ─── FELLOW SEEKERS ─────────────────────────── */
.friend-list { display: flex; flex-direction: column; gap: 10px; }
.friend-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--grey-50); border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
}
.friend-item:hover { background: var(--grey-100); }
.friend-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-subtle); color: var(--blue);
  font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-info { flex: 1; min-width: 0; }
.friend-name { font-weight: 600; font-size: 0.9rem; color: var(--grey-800); }
.friend-meta { font-size: 0.75rem; color: var(--grey-400); }
.friend-days { font-size: 0.8rem; font-weight: 700; color: var(--blue); white-space: nowrap; }

/* ─── REFLECTION ITEMS ───────────────────────── */
.reflection-item {
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--grey-50); margin-bottom: 10px;
  border-left: 3px solid var(--orange);
}
.reflection-date { font-size: 0.72rem; color: var(--grey-400); margin-bottom: 4px; }
.reflection-text { font-size: 0.9rem; color: var(--grey-800); line-height: 1.5; }

/* ─── MEDITATION TIMER ───────────────────────── */
.timer-ring-wrap { display: flex; justify-content: center; margin: 24px 0; }
.timer-ring { position: relative; }
.timer-circle { transform: rotate(-90deg); }
.timer-circle .bg { fill: none; stroke: var(--grey-100); stroke-width: 10; }
.timer-circle .fg { fill: none; stroke: var(--blue); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center;
}
.timer-display { font-size: 2rem; font-weight: 800; color: var(--blue); }
.timer-label { font-size: 0.7rem; color: var(--grey-400); letter-spacing: 1px; text-transform: uppercase; }
.timer-btns { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }

/* ─── FASTING TRACKER ────────────────────────── */
.fasting-ring-wrap { display: flex; justify-content: center; margin: 24px 0; }
.fasting-circle .fg { stroke: var(--orange); }
.fasting-status { font-size: 0.8rem; color: var(--grey-600); text-align: center; }

/* ─── ONBOARDING ─────────────────────────────── */
#screen-onboarding {
  background: linear-gradient(160deg, var(--blue) 0%, #1D4ED8 40%, #3B82F6 100%);
  color: var(--white);
}
.onboard-slide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 32px; text-align: center; }
.onboard-img { width: 200px; height: 200px; border-radius: 36px; object-fit: contain; background: rgba(255,255,255,0.12); padding: 24px; margin-bottom: 32px; }
.onboard-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 14px; line-height: 1.25; }
.onboard-desc { font-size: 0.95rem; opacity: 0.85; line-height: 1.7; }
.onboard-dots { display: flex; justify-content: center; gap: 8px; padding: 20px 0; }
.onboard-dot { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.3); transition: all 0.3s; }
.onboard-dot.active { width: 28px; background: var(--orange); }
.onboard-footer { padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 12px; }
.btn-white { background: var(--white); color: var(--blue); }
.btn-white:hover { background: #EFF6FF; }
.btn-ghost-white { background: transparent; color: rgba(255,255,255,0.75); border: 2px solid rgba(255,255,255,0.3); }
.btn-ghost-white:hover { background: rgba(255,255,255,0.1); color: var(--white); }

/* ─── AUTH ───────────────────────────────────── */
#screen-auth {
  background: linear-gradient(160deg, var(--blue) 0%, #1D4ED8 50%, #1E3A8A 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 28px; color: var(--white);
}
.auth-logo { width: 80px; height: 80px; border-radius: 20px; margin-bottom: 20px; }
.auth-title { font-size: 1.8rem; font-weight: 800; }
.auth-sub { opacity: 0.75; font-size: 0.95rem; margin-top: 8px; }
.auth-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px 24px; margin-top: 32px; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.auth-card h2 { font-size: 1.15rem; color: var(--blue); margin-bottom: 20px; font-weight: 700; }
.google-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 20px; border-radius: var(--radius-sm); border: 2px solid var(--grey-200);
  background: var(--white); cursor: pointer; font-family: var(--font);
  font-size: 0.95rem; font-weight: 600; color: var(--grey-800);
  transition: all 0.2s;
}
.google-btn:hover { background: var(--grey-50); border-color: var(--grey-400); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.google-icon { width: 22px; height: 22px; }
.auth-divider { text-align: center; color: var(--grey-400); font-size: 0.8rem; margin: 16px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--grey-200); }
.auth-divider span { background: var(--white); padding: 0 12px; position: relative; }

/* ─── SETUP / PROFILE FORM ───────────────────── */
.setup-header { background: var(--white); padding: 16px 20px; border-bottom: 1px solid var(--grey-100); }
.setup-progress { height: 4px; background: var(--grey-100); border-radius: 99px; margin-top: 10px; }
.setup-progress-fill { height: 100%; background: var(--orange); border-radius: 99px; transition: width 0.4s ease; }
.step-num { font-size: 0.75rem; color: var(--grey-400); font-weight: 600; }
.step-title { font-size: 1.15rem; font-weight: 700; color: var(--blue); margin-top: 2px; }
.section-emoji { font-size: 2.5rem; margin-bottom: 8px; text-align: center; }
.section-desc { font-size: 0.875rem; color: var(--grey-600); text-align: center; margin-bottom: 24px; line-height: 1.6; }

/* ─── EMPTY STATE ────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-title { font-size: 1rem; font-weight: 700; color: var(--grey-800); margin-bottom: 6px; }
.empty-desc { font-size: 0.875rem; color: var(--grey-400); line-height: 1.6; }

/* ─── MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 500; display: none; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s; }
.modal {
  background: var(--white); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px 36px; width: 100%; max-width: 560px;
  animation: slideUp 0.3s ease-out;
  max-height: 90vh; overflow-y: auto;
}
.modal-handle { width: 40px; height: 4px; background: var(--grey-200); border-radius: 99px; margin: 0 auto 20px; }
.modal h2 { font-size: 1.1rem; font-weight: 700; color: var(--blue); margin-bottom: 16px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* ─── TOAST ──────────────────────────────────── */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--grey-800); color: var(--white);
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; z-index: 900;
  animation: toastIn 0.3s ease; pointer-events: none;
  white-space: nowrap;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ─── LOADING SPINNER ─────────────────────────── */
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--grey-100);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; gap: 20px; background: var(--white);
}
.loading-logo { width: 72px; height: 72px; border-radius: 18px; animation: pulse 2s infinite; }

/* ─── RESPONSIVE ─────────────────────────────── */
@media (min-width: 480px) {
  .feature-row { grid-template-columns: repeat(2, 1fr); }
  .scroll-body { padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 768px) {
  body { background: var(--grey-100); }
  .screen { max-width: 480px; margin: 0 auto; background: var(--grey-50); box-shadow: 0 0 40px rgba(0,0,0,0.1); }
  .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); }
  .toast { bottom: 100px; }
}

/* ─── UTILS ──────────────────────────────────── */
.text-center { text-align: center; }
.text-blue { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-grey { color: var(--grey-400); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--grey-100); margin: 16px 0; }

/* ═══════════════════════════════════════════════════════════════
   STEPPER
═══════════════════════════════════════════════════════════════ */
#screen-stepper {
  background: linear-gradient(160deg, #0F172A 0%, #1E3A8A 60%, #1D4ED8 100%);
  flex-direction: column;
  min-height: 100vh;
}

.stepper-topbar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 18, 40, 0.55);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stepper-back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; flex-shrink: 0;
}
.stepper-back-btn:hover { background: rgba(255,255,255,0.22); }

/* Logo — left-aligned, no longer centred absolutely */
.stepper-logo-link {
  display: flex; align-items: center; flex-shrink: 0;
}
.stepper-logo-img {
  width: 34px; height: 34px; border-radius: 8px;
  object-fit: contain; display: block;
}

/* Bubble step indicator — fills the rest of the bar */
.stepper-bubbles {
  display: flex; align-items: center; flex: 1;
  justify-content: flex-end;
}
.step-bubble {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  transition: all 0.3s ease; flex-shrink: 0;
  letter-spacing: 0;
}
.step-bubble.active {
  background: var(--orange); border-color: var(--orange); color: #fff;
  box-shadow: 0 0 0 4px rgba(249,115,22,0.25);
  transform: scale(1.1);
}
.step-bubble.done {
  background: rgba(249,115,22,0.2); border-color: var(--orange); color: var(--orange);
}
.step-bubble-line {
  width: 16px; height: 2px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}


.stepper-body {
  flex: 1; overflow-y: auto; padding: 16px 20px 20px;
  -webkit-overflow-scrolling: touch;
}

.stepper-step {
  display: flex; flex-direction: column; align-items: center;
  animation: stepFadeIn 0.35s ease-out;
}
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-hero-emoji {
  font-size: 4rem; margin-bottom: 20px;
  filter: drop-shadow(0 4px 20px rgba(249,115,22,0.5));
}
.step-headline {
  font-size: 1.6rem; font-weight: 800; color: #fff;
  text-align: center; line-height: 1.25; margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.step-sub {
  font-size: 0.875rem; color: rgba(255,255,255,0.65);
  text-align: center; line-height: 1.7; margin-bottom: 28px; max-width: 320px;
}

.step-card {
  width: 100%; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px; padding: 20px;
  backdrop-filter: blur(8px);
}

.step-field-label {
  display: block; font-size: 0.8rem; font-weight: 700;
  color: rgba(255,255,255,0.6); letter-spacing: 0.5px;
  text-transform: uppercase; margin-bottom: 12px;
}

/* Date input (legacy, kept for safety) */
.step-date-input {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px; color: #fff;
  font-family: var(--font); font-size: 1rem; font-weight: 600;
  transition: border-color 0.2s;
  color-scheme: dark;
}
.step-date-input:focus { outline: none; border-color: var(--orange); }

/* DOB split fields */
.dob-fields {
  display: grid; grid-template-columns: 1fr 1.8fr 1.2fr; gap: 10px;
}
.dob-field-wrap { display: flex; flex-direction: column; gap: 6px; }
.dob-sub-label {
  font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.dob-select {
  width: 100%; padding: 13px 10px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px; color: #fff;
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  transition: border-color 0.2s; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.dob-select:focus { outline: none; border-color: var(--orange); }
.dob-select option { background: #1E3A8A; color: #fff; }

/* Gender picker */
.step-card:has(.gender-option) {
  display: flex; flex-direction: row; gap: 16px;
}
.gender-option {
  flex: 1; background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 16px; padding: 28px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer; transition: all 0.2s;
}
.gender-option:hover { background: rgba(255,255,255,0.14); }
.gender-option.selected {
  border-color: var(--orange); background: rgba(249,115,22,0.15);
}
.gender-icon { font-size: 2.5rem; color: #fff; line-height: 1; }
.gender-label { font-size: 0.9rem; font-weight: 700; color: #fff; }

/* Country search */
.country-search-wrap {
  position: relative; margin-bottom: 12px;
}
.country-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: rgba(255,255,255,0.4);
}
.country-search-input {
  width: 100%; padding: 12px 12px 12px 40px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px; color: #fff;
  font-family: var(--font); font-size: 0.95rem;
  transition: border-color 0.2s;
}
.country-search-input::placeholder { color: rgba(255,255,255,0.35); }
.country-search-input:focus { outline: none; border-color: var(--orange); }
.country-list {
  max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
}
.country-item {
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
  font-size: 0.9rem; color: rgba(255,255,255,0.8); font-weight: 500;
  transition: background 0.15s;
}
.country-item:hover { background: rgba(255,255,255,0.1); }
.country-item.selected {
  background: rgba(249,115,22,0.25); color: #fff; font-weight: 700;
}

/* Lifestyle sliders */
.lifestyle-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.lifestyle-emoji { font-size: 1.5rem; flex-shrink: 0; }
.lifestyle-info { flex: 1; min-width: 0; }
.lifestyle-label { font-size: 0.875rem; font-weight: 700; color: #fff; }
.lifestyle-hint { font-size: 0.72rem; color: rgba(255,255,255,0.5); margin-top: 2px; }
.lifestyle-val {
  font-size: 1.4rem; font-weight: 800; color: var(--orange);
  min-width: 40px; text-align: right; flex-shrink: 0;
}
.styled-range {
  width: 100%; height: 6px; appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,0.2); border-radius: 99px; cursor: pointer;
  margin-bottom: 6px;
}
.styled-range::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); border: 3px solid #fff;
  box-shadow: 0 2px 12px rgba(249,115,22,0.5); cursor: pointer;
  transition: transform 0.1s;
}
.styled-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range-labels {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; color: rgba(255,255,255,0.35);
}

/* Lifestyle gradient cards — WHITE redesign */
.lifestyle-card {
  width: 100%; border-radius: 18px; padding: 18px 20px;
  margin-bottom: 14px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  border: 1.5px solid rgba(0,0,0,0.06);
  position: relative; overflow: hidden;
}
.lifestyle-card--neg {
  border-left: 4px solid #EF4444;
}
.lifestyle-card--pos {
  border-left: 4px solid #10B981;
}
/* Remove the dark pseudo-element overlay */
.lifestyle-card::before { display: none; }

.lc-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.lc-icon-wrap {
  width: 44px; height: 44px; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; flex-shrink: 0;
  background: none !important;
}

.lc-title-wrap { flex: 1; min-width: 0; }
.lc-title { font-size: 0.9rem; font-weight: 700; color: #1E293B; }
.lc-hint { font-size: 0.72rem; color: #94A3B8; margin-top: 2px; }

.lc-badge {
  min-width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900; flex-shrink: 0;
}
.lc-badge--neg { background: #FEF2F2; color: #DC2626; }
.lc-badge--pos { background: #ECFDF5; color: #059669; }

.lc-range {
  width: 100%; height: 6px; appearance: none; -webkit-appearance: none;
  border-radius: 99px; cursor: pointer; margin-bottom: 8px;
  position: relative; z-index: 1;
}
.lc-range--neg { background: #FECACA; }
.lc-range--pos { background: #A7F3D0; }

.lc-range--neg::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #EF4444; border: 3px solid #fff;
  box-shadow: 0 2px 12px rgba(220,38,38,0.4); cursor: pointer;
  transition: transform 0.1s;
}
.lc-range--pos::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #10B981; border: 3px solid #fff;
  box-shadow: 0 2px 12px rgba(5,150,105,0.4); cursor: pointer;
  transition: transform 0.1s;
}
.lc-range::-webkit-slider-thumb:hover { transform: scale(1.15); }

.lc-range-labels {
  display: flex; justify-content: space-between;
  font-size: 0.68rem; color: #CBD5E1;
  position: relative; z-index: 1;
}

/* Outlook grid */
.outlook-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.outlook-option {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px; border-radius: 14px;
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,255,255,0.12);
  cursor: pointer; transition: all 0.2s;
}
.outlook-option:hover { background: rgba(255,255,255,0.14); }
.outlook-option.selected {
  border-color: var(--orange); background: rgba(249,115,22,0.2);
}
.outlook-emoji { font-size: 1.5rem; }
.outlook-lbl { font-size: 0.58rem; font-weight: 700; color: rgba(255,255,255,0.7); text-align: center; }

/* Stepper footer row with back + continue */
.stepper-footer {
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.stepper-footer-row {
  display: flex; align-items: center; gap: 10px;
}
/* Back button inside footer */
.stepper-back-btn--footer {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.stepper-back-btn--footer:hover { background: rgba(255,255,255,0.18); }
.stepper-cta {
  flex: 1; padding: 16px; border-radius: 14px;
  background: var(--orange); color: #fff;
  font-family: var(--font); font-size: 1rem; font-weight: 700;
  border: none; cursor: pointer; transition: all 0.2s;
  letter-spacing: 0.2px;
}
.stepper-cta:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(249,115,22,0.4); }
.stepper-cta:active { transform: scale(0.98); }
.stepper-disclaimer {
  text-align: center; font-size: 0.7rem; color: rgba(255,255,255,0.35);
  margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD v2
═══════════════════════════════════════════════════════════════ */

/* Recalculate button */
.recalc-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--blue-subtle); border: none;
  color: var(--blue); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.recalc-btn:hover { background: #DBEAFE; transform: scale(1.05); }

/* Life Hero v2 */
.life-hero-v2 {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #1D4ED8 100%);
  border-radius: 24px; padding: 28px 24px 24px;
  color: #fff; margin-bottom: 16px; position: relative; overflow: hidden;
  box-shadow: 0 16px 48px rgba(30, 58, 138, 0.35);
}
.life-hero-v2::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,0.25) 0%, transparent 70%);
}
.life-hero-v2::after {
  content: ''; position: absolute; bottom: -80px; left: -40px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%);
}
.lh-eyebrow {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 2px;
  color: var(--orange); text-transform: uppercase; margin-bottom: 12px;
  position: relative; z-index: 1;
}
.lh-main-number {
  font-size: 5rem; font-weight: 900; letter-spacing: -3px; line-height: 1;
  background: linear-gradient(135deg, #fff 30%, #FED7AA 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative; z-index: 1;
  animation: numPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes numPop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.lh-main-unit {
  font-size: 1rem; font-weight: 600; color: rgba(255,255,255,0.55);
  letter-spacing: 2px; text-transform: uppercase; margin-top: 4px;
  position: relative; z-index: 1;
}
.lh-divider {
  height: 1px; background: rgba(255,255,255,0.15); margin: 20px 0;
  position: relative; z-index: 1;
}
.lh-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  position: relative; z-index: 1;
}
.lh-cell { text-align: center; }
.lh-cell-num {
  font-size: 1.15rem; font-weight: 800; color: #fff; line-height: 1;
}
.lh-cell-lbl {
  font-size: 0.6rem; color: rgba(255,255,255,0.45);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}
.lh-tagline {
  font-size: 0.82rem; color: rgba(255,255,255,0.55);
  text-align: center; margin-top: 20px; font-style: italic;
  position: relative; z-index: 1;
}

/* Impact section */
.impact-section { margin-bottom: 16px; }
.impact-title {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 1.5px;
  color: var(--grey-400); text-transform: uppercase; margin-bottom: 10px;
  padding: 0 2px;
}
.impact-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.impact-card {
  flex: 1; min-width: calc(50% - 5px);
  border-radius: 16px; padding: 16px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
}
.impact-card.impact-neg { background: #FEF2F2; }
.impact-card.impact-pos { background: #ECFDF5; }
.impact-icon { font-size: 1.4rem; }
.impact-val {
  font-size: 1.3rem; font-weight: 800; line-height: 1;
}
.impact-card.impact-neg .impact-val { color: var(--red); }
.impact-card.impact-pos .impact-val { color: var(--green); }
.impact-lbl {
  font-size: 0.68rem; font-weight: 600; line-height: 1.4;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.impact-card.impact-neg .impact-lbl { color: #B91C1C; }
.impact-card.impact-pos .impact-lbl { color: #065F46; }

/* Profile summary card */
.profile-summary-grid {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px;
}
.profile-summary-item {
  display: flex; align-items: center; gap: 12px;
}
.ps-icon { font-size: 1.2rem; flex-shrink: 0; }
.ps-label { font-size: 0.7rem; font-weight: 700; color: var(--grey-400); text-transform: uppercase; letter-spacing: 0.5px; }
.ps-val { font-size: 0.9rem; font-weight: 600; color: var(--grey-800); }

/* Quote card */
.quote-card {
  background: linear-gradient(135deg, #1E3A8A, #1D4ED8);
  color: #fff; border: none; text-align: center;
}
.quote-text {
  font-size: 0.875rem; line-height: 1.75; font-style: italic;
  color: rgba(255,255,255,0.9);
}

/* App promo */
.app-promo-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-md); margin-bottom: 16px;
}
.app-promo-inner {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.app-promo-logo { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }
.app-promo-title { font-size: 0.95rem; font-weight: 700; color: var(--blue); }
.app-promo-sub { font-size: 0.78rem; color: var(--grey-400); margin-top: 3px; }
.app-promo-btns { display: flex; gap: 10px; }
.store-pill {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 14px; border-radius: 10px;
  font-family: var(--font); font-size: 0.85rem; font-weight: 700;
  text-decoration: none; transition: all 0.2s;
}
.android-pill { background: #1E3A8A; color: #fff; }
.android-pill:hover { background: #1D4ED8; transform: translateY(-1px); }
.ios-pill { background: var(--grey-100); color: var(--grey-800); border: 1px solid var(--grey-200); }
.ios-pill:hover { background: var(--grey-200); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — Premium Redesign
═══════════════════════════════════════════════════════════════ */

#screen-dashboard { background: #F8FAFF; flex-direction: column; }

/* Header */
.dash-header {
  background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 100;
}
.dash-logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.dash-logo-img { width: 32px; height: 32px; border-radius: 8px; }
.dash-logo-name { font-size: 1rem; font-weight: 800; color: #1E3A8A; }
.dash-redo-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 20px;
  background: #F1F5F9; border: none; cursor: pointer;
  font-family: var(--font); font-size: 0.8rem; font-weight: 700;
  color: #475569; transition: all 0.2s;
}
.dash-redo-btn:hover { background: #E2E8F0; }

/* Scroll container */
.dash-scroll { flex: 1; overflow-y: auto; padding: 0 0 60px; -webkit-overflow-scrolling: touch; }

/* Hero */
.dash-hero {
  background: linear-gradient(160deg, #0F172A 0%, #1E3A8A 55%, #2563EB 100%);
  padding: 28px 20px 32px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.dash-hero::after {
  content: ''; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(249,115,22,0.12);
  bottom: -100px; right: -80px; pointer-events: none;
}
.dash-hero-eyebrow {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 2px;
  color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 6px;
}
.dash-hero-name {
  font-size: 1.3rem; font-weight: 800; margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 30%, #FED7AA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Premium canvas arc chart */
.arc-chart-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* Canvas container with centred HTML overlay */
.arc-canvas-container {
  position: relative; width: 100%; max-width: 300px;
}
#arc-canvas { width: 100%; display: block; }
.arc-center-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: 28px; pointer-events: none;
}
.arc-center-years {
  font-size: 3.2rem; font-weight: 900; line-height: 1;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #ffffff 20%, #86EFAC);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.arc-center-label {
  font-size: 0.58rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.5px; color: rgba(255,255,255,0.45); margin-top: 2px;
}
.arc-center-age {
  font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.55); margin-top: 4px;
}

/* Stat pills row */
.arc-stat-pills {
  display: flex; gap: 8px; width: 100%; max-width: 300px;
  margin-top: 14px;
}
.arc-stat-pill {
  flex: 1; border-radius: 14px; padding: 12px 10px; text-align: center;
}
.arc-pill-gone    { background: rgba(30,41,59,0.30);   border: 1px solid rgba(30,41,59,0.50);   }
.arc-pill-healthy { background: rgba(16,185,129,0.18);  border: 1px solid rgba(16,185,129,0.35); }
.arc-pill-old     { background: rgba(244,63,94,0.18);   border: 1px solid rgba(244,63,94,0.30);  }
.asp-pct {
  font-size: 1.25rem; font-weight: 900; line-height: 1;
}
.arc-pill-gone    .asp-pct { color: rgba(255,255,255,0.90); }
.arc-pill-healthy .asp-pct { color: #34D399; }
.arc-pill-old     .asp-pct { color: #F87171; }
.asp-label {
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: rgba(255,255,255,0.45); margin-top: 3px;
}
.asp-yrs {
  font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.6); margin-top: 2px;
}

/* Info button / row under arc */
.arc-info-row { margin-top: 10px; }
.arc-info-btn {
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.6); border-radius: 20px;
  padding: 5px 12px; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  transition: background 0.2s;
}
.arc-info-btn:hover { background: rgba(255,255,255,0.20); }

/* Info popup — hero (dark bg) */
.arc-info-popup {
  background: rgba(15,23,42,0.75); border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px); border-radius: 14px;
  padding: 14px 16px; font-size: 0.78rem; line-height: 1;
  color: rgba(255,255,255,0.88); text-align: left;
  margin-top: 10px; width: 100%; max-width: 300px; box-sizing: border-box;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.arc-info-popup .aip-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.arc-info-popup .aip-row:last-child { border-bottom: none; }
.aip-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 3px;
}
.aip-dot-blue  { background: #1E293B; box-shadow: 0 0 6px rgba(30,41,59,0.6);   }
.aip-dot-green { background: #10B981; box-shadow: 0 0 6px rgba(16,185,129,0.6); }
.aip-dot-red   { background: #F43F5E; box-shadow: 0 0 6px rgba(244,63,94,0.6);  }
.aip-body { display: flex; flex-direction: column; gap: 1px; }
.aip-title { font-weight: 800; font-size: 0.78rem; }
.aip-desc  { font-size: 0.70rem; color: rgba(255,255,255,0.55); line-height: 1.4; margin-top: 2px; }
/* Grid card info popup override (light card context) */
.dash-card .arc-info-popup {
  background: #fff; border-color: #E2E8F0; color: #1E293B;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.dash-card .arc-info-popup .aip-row { border-color: #F1F5F9; }
.dash-card .arc-info-popup .aip-desc { color: #64748B; }

/* Grid legend row */
.weeks-legend-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-top: 14px; padding: 0 2px;
}
.weeks-legend { display: flex; gap: 20px; align-items: flex-start; }
.wl-item { display: flex; align-items: center; gap: 8px; }
.wl-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; margin-top: 2px; }
.wl-past    { background: #1E293B; }
.wl-healthy { background: #10B981; }
.wl-old     { background: #EF4444; }
.wl-text { display: flex; flex-direction: column; }
.wl-label { font-size: 0.65rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.5px; }
.wl-count { font-size: 0.85rem; font-weight: 900; margin-top: 1px; }
.wl-count-past    { color: #0F172A; }
.wl-count-healthy { color: #059669; }
.wl-count-old     { color: #DC2626; }

/* Info button in light card */
.dash-card .arc-info-btn {
  background: #F1F5F9; border-color: #E2E8F0; color: #64748B;
  border-radius: 50%; width: 28px; height: 28px; padding: 0;
  justify-content: center;
}
.dash-card .arc-info-btn:hover { background: #E2E8F0; }


/* Big years */
.dash-years-wrap { margin-top: 14px; }
.dash-years-num {
  font-size: 4.5rem; font-weight: 900; line-height: 1; letter-spacing: -3px;
  background: linear-gradient(135deg, #fff 30%, #FED7AA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dash-years-lbl { font-size: 0.75rem; color: rgba(255,255,255,0.5); margin-top: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* Time unit pills */
.time-units-section { padding: 20px 16px 4px; }
.section-label { font-size: 0.65rem; font-weight: 800; letter-spacing: 1.5px; color: #94A3B8; text-transform: uppercase; margin-bottom: 10px; }
.time-units-grid {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.time-units-grid::-webkit-scrollbar { display: none; }
.time-unit-pill {
  flex-shrink: 0; min-width: 78px;
  background: #fff; border-radius: 14px; padding: 14px 10px; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05); border: 1.5px solid #F1F5F9;
}
.time-unit-pill.tup-accent { background: linear-gradient(135deg, #F97316, #EA580C); border-color: transparent; }
.time-unit-pill.tup-accent .tup-num,
.time-unit-pill.tup-accent .tup-lbl { color: #fff; }
.tup-num { font-size: 1.15rem; font-weight: 900; color: #1E293B; line-height: 1; }
.tup-lbl { font-size: 0.62rem; font-weight: 700; color: #94A3B8; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Dash card */
.dash-card {
  margin: 16px 16px 0;
  background: #fff; border-radius: 20px; padding: 20px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.05); border: 1.5px solid #F1F5F9;
}
.dash-card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.dash-card-icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.dash-card-title { font-size: 0.95rem; font-weight: 800; color: #1E293B; }
.dash-card-sub { font-size: 0.75rem; color: #94A3B8; margin-top: 3px; }

/* Habit impact bars */
.impact-bars { display: flex; flex-direction: column; gap: 14px; }
.impact-bar-row { display: flex; align-items: center; gap: 10px; }
.ibr-left { display: flex; align-items: center; gap: 6px; min-width: 84px; }
.ibr-icon { font-size: 1.1rem; }
.ibr-label { font-size: 0.78rem; font-weight: 700; color: #1E293B; }
.ibr-bar-wrap { flex: 1; }
.ibr-bar { height: 10px; border-radius: 99px; overflow: hidden; }
.ibr-fill { height: 100%; border-radius: 99px; }
.ibr-val { font-size: 0.78rem; font-weight: 800; min-width: 54px; text-align: right; }
.impact-net {
  margin-top: 18px; padding: 14px; border-radius: 14px; text-align: center;
  background: #F8FAFF; border: 1.5px solid #E2E8F0;
}
.impact-net-num { font-size: 1.4rem; font-weight: 900; }
.impact-net-msg { font-size: 0.78rem; color: #64748B; margin-top: 4px; }

/* Life in Weeks canvas */
.weeks-grid-wrap { width: 100%; background: #F8FAFF; border-radius: 10px; padding: 10px; overflow: hidden; }
.weeks-grid-wrap canvas { display: block; width: 100% !important; height: auto; }
.weeks-legend { display: flex; align-items: center; gap: 16px; margin-top: 12px; font-size: 0.72rem; font-weight: 600; color: #94A3B8; }
.wl-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.wl-past { background: #1E293B; }
.wl-healthy { background: #10B981; }
.wl-old { background: #EF4444; }

/* Life grid tab buttons */
.life-grid-tabs { display: flex; gap: 4px; flex-shrink: 0; }
.lgt-btn {
  padding: 5px 12px; border-radius: 20px; font-family: var(--font);
  font-size: 0.72rem; font-weight: 700; border: 1.5px solid #E2E8F0;
  background: transparent; color: #94A3B8; cursor: pointer; transition: all 0.18s;
}
.lgt-btn:hover { border-color: #CBD5E1; color: #64748B; }
.lgt-btn.lgt-active { background: #1E3A8A; color: #fff; border-color: #1E3A8A; }

/* Profile pills */
.profile-pills { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.profile-pill { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #F8FAFF; border-radius: 12px; border: 1px solid #E2E8F0; }
.pp-icon { font-size: 1.2rem; flex-shrink: 0; }
.pp-lbl { font-size: 0.68rem; font-weight: 700; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.5px; }
.pp-val { font-size: 0.9rem; font-weight: 700; color: #1E293B; }
.dash-edit-btn {
  width: 100%; padding: 12px; border-radius: 12px;
  background: #EFF6FF; color: #1E3A8A;
  font-family: var(--font); font-size: 0.9rem; font-weight: 700;
  border: none; cursor: pointer; transition: background 0.2s;
}
.dash-edit-btn:hover { background: #DBEAFE; }

/* Quote card */
.dash-quote-card {
  margin: 16px 16px 0;
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
  border-radius: 20px; padding: 28px 24px 24px; position: relative; overflow: hidden;
}
.dash-quote-mark {
  font-size: 5rem; line-height: 0.6; color: rgba(255,255,255,0.12);
  font-family: Georgia, serif; position: absolute; top: 12px; left: 16px;
}
.dash-quote-text { font-size: 0.92rem; line-height: 1.7; color: rgba(255,255,255,0.9); font-weight: 500; font-style: italic; position: relative; }
.dash-quote-author { font-size: 0.72rem; color: rgba(255,255,255,0.45); margin-top: 14px; font-weight: 700; letter-spacing: 0.5px; position: relative; }

/* App promo */
.dash-promo-card {
  margin: 16px 16px 0;
  background: #fff; border-radius: 20px; padding: 20px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.05); border: 1.5px solid #F1F5F9;
}
.dash-promo-logo { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 10px; }
.dash-promo-title { font-size: 1rem; font-weight: 800; color: #1E293B; }
.dash-promo-sub { font-size: 0.78rem; color: #94A3B8; margin-top: 4px; margin-bottom: 14px; }
.dash-promo-btns { display: flex; gap: 10px; }
.dash-store-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 12px; border-radius: 12px;
  font-family: var(--font); font-size: 0.85rem; font-weight: 700;
  text-decoration: none; transition: all 0.2s;
  background: #1E3A8A; color: #fff;
}
.dash-store-btn:first-child { background: #000; }
.dash-store-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ═══════════════════════════════════ TAB PANES & BOTTOM TAB BAR ══════ */

/* Screen layout for the dashboard with tabs */
#screen-dashboard {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
.tab-panes-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.tab-pane {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-pane .dash-scroll {
  max-height: none;
  overflow: visible;
}

/* Placeholder screens for non-journey tabs */
.tab-placeholder-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 48px 32px 100px;
  text-align: center;
  background: #F8FAFF;
}
.tab-placeholder-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.tab-placeholder-title {
  font-family: var(--font);
  font-size: 1.7rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.tab-placeholder-body {
  font-family: var(--font);
  font-size: 0.92rem;
  color: #64748B;
  line-height: 1.6;
  max-width: 280px;
}

/* ── Bottom Tab Bar ── */
.bottom-tab-bar {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,0.07);
  padding: 8px 16px max(env(safe-area-inset-bottom), 10px);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
  gap: 0;
}

/* Regular tab button */
.btb-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}
.btb-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  transition: color 0.2s, transform 0.2s;
}
.btb-icon svg {
  width: 22px;
  height: 22px;
}
.btb-label {
  font-family: var(--font);
  font-size: 0.62rem;
  font-weight: 600;
  color: #94A3B8;
  letter-spacing: 0.2px;
  transition: color 0.2s;
  white-space: nowrap;
}

/* Active state for regular tabs */
.btb-tab.btb-active .btb-icon { color: #1E3A8A; }
.btb-tab.btb-active .btb-label { color: #1E3A8A; }
.btb-tab.btb-active .btb-icon { transform: scale(1.1); }

/* Center "My Journey" tab — elevated with gradient pill */
.btb-center {
  flex: 1.2;
  position: relative;
  bottom: 8px;
}
.btb-center-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A 0%, #3B5FC0 100%);
  box-shadow: 0 4px 20px rgba(30,58,138,0.45), 0 2px 8px rgba(30,58,138,0.25);
  color: #fff !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.btb-center-icon svg { width: 26px; height: 26px; stroke: #fff; }
.btb-center.btb-active .btb-center-icon,
.btb-center:active .btb-center-icon {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(30,58,138,0.55);
}
.btb-center .btb-label { color: #1E3A8A !important; }
.btb-center.btb-active .btb-label { font-weight: 800; }


/* Ensure grid canvas fills full card width */
.weeks-canvas-wrap { width: 100%; display: block; }
.weeks-canvas-wrap canvas, #weeks-canvas { display: block; width: 100%; }

/* ══════════════════════════════════ HEADER AVATAR ══ */
.header-avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; padding: 0;
  transition: transform 0.18s, box-shadow 0.18s;
  margin-left: auto;
  flex-shrink: 0;
}
.header-avatar-btn:active { transform: scale(0.93); }
.header-avatar-btn svg { width: 20px; height: 20px; stroke: #fff; }
#header-avatar-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
/* On white header backgrounds show dark icon */
.dash-header .header-avatar-btn {
  background: rgba(30,58,138,0.08);
  border-color: rgba(30,58,138,0.15);
}
.dash-header .header-avatar-btn svg { stroke: #1E3A8A; }

/* ══════════════════════════════════ PROFILE PANEL ══ */
.profile-panel {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-end;
  pointer-events: none; opacity: 0;
  transition: opacity 0.25s;
}
.profile-panel.open { pointer-events: all; opacity: 1; }
.profile-panel-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
}
.profile-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px; margin: 0 auto;
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 12px 20px 40px;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
}
.profile-panel.open .profile-sheet { transform: translateY(0); }
.profile-sheet-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: #E2E8F0; margin: 0 auto 20px;
}

/* Logged-in state */
.prof-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 0 20px; border-bottom: 1px solid #F1F5F9; margin-bottom: 20px;
}
.prof-avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 3px solid #EFF6FF; flex-shrink: 0;
}
.prof-name { font-size: 1.1rem; font-weight: 700; color: #0F172A; }
.prof-email { font-size: 0.82rem; color: #64748B; margin-top: 2px; }
.prof-section-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 1px;
  color: #94A3B8; margin-bottom: 12px;
}
.prof-answers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.prof-answer-pill {
  display: flex; flex-direction: column;
  background: #F8FAFF; border: 1px solid #E2E8F0; border-radius: 12px;
  padding: 8px 12px; min-width: 90px;
}
.pa-label { font-size: 0.65rem; font-weight: 600; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.5px; }
.pa-value { font-size: 0.9rem; font-weight: 700; color: #1E3A8A; margin-top: 2px; }
.prof-signout-btn {
  width: 100%; padding: 13px; border-radius: 14px;
  border: 1.5px solid #E2E8F0; background: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 0.9rem; font-weight: 600; color: #EF4444;
  cursor: pointer; transition: background 0.18s;
}
.prof-signout-btn:hover { background: #FFF5F5; }

/* Logged-out state */
.prof-signin-hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 24px 0 28px;
}
.prof-signin-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg,#EFF6FF,#DBEAFE);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.prof-signin-icon svg { width: 36px; height: 36px; stroke: #1E3A8A; }
.prof-signin-title { font-size: 1.15rem; font-weight: 800; color: #0F172A; margin-bottom: 8px; }
.prof-signin-body { font-size: 0.88rem; color: #64748B; line-height: 1.55; max-width: 260px; }
.prof-google-btn {
  width: 100%; padding: 14px; border-radius: 14px;
  border: 1.5px solid #E2E8F0; background: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-size: 0.95rem; font-weight: 700; color: #1A1A1A;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.18s, transform 0.18s;
}
.prof-google-btn:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-1px); }
