/* App-level overrides for SPA */
.screen { display: none; }
.screen.active { display: block; animation: screenIn 0.4s ease-out; }
#app { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════ */
:root {
  --bg-deep: #080510;
  --bg-surface: #110c1e;
  --bg-card: #18102b;
  --bg-card-hover: #221640;
  --purple-900: #160b28;
  --purple-800: #2a1450;
  --purple-700: #3c1d75;
  --purple-600: #552a96;
  --purple-500: #7a3fc8;
  --purple-400: #9b5fe0;
  --purple-300: #bf90f5;
  --gold-600: #b8922e;
  --gold-500: #d4a843;
  --gold-400: #e8c15d;
  --gold-300: #f0d47a;
  --gold-200: #f5e2a0;
  --gold-100: #faf0cc;
  --gold-glow: rgba(212, 168, 67, 0.35);
  --text-primary: #f2ede5;
  --text-secondary: #b0a3c2;
  --text-muted: #6b5d7e;
  --text-gold: #e8c15d;
  --success: #5ae88e;
  --success-glow: rgba(90, 232, 142, 0.2);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 6px rgba(0,0,0,0.3);
  --shadow-glow-gold: 0 0 40px rgba(212, 168, 67, 0.2), 0 0 80px rgba(212, 168, 67, 0.08);
  --shadow-glow-purple: 0 0 50px rgba(122, 63, 200, 0.25);
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Outfit', sans-serif;
  --nav-height: 72px;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* ═══════════════════════════════════════════════
   GEOMETRIC PATTERN OVERLAY
   ═══════════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d4a843' stroke-width='0.4'%3E%3Cpath d='M50 0 L100 50 L50 100 L0 50 Z'/%3E%3Cpath d='M50 12 L88 50 L50 88 L12 50 Z'/%3E%3Cpath d='M50 24 L76 50 L50 76 L24 50 Z'/%3E%3Cpath d='M50 36 L64 50 L50 64 L36 50 Z'/%3E%3Ccircle cx='50' cy='50' r='6'/%3E%3Ccircle cx='50' cy='0' r='3'/%3E%3Ccircle cx='100' cy='50' r='3'/%3E%3Ccircle cx='50' cy='100' r='3'/%3E%3Ccircle cx='0' cy='50' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100px 100px;
}

/* Warm ambient glow at top */
body::after {
  content: '';
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(122, 63, 200, 0.15) 0%, rgba(212, 168, 67, 0.06) 35%, transparent 65%);
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   SCREEN CONTAINER
   ═══════════════════════════════════════════════ */
.screen {
  display: none;
  position: relative;
  z-index: 1;
  max-width: 428px;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-height) + 20px);
  min-height: 100dvh;
}

.screen.active {
  display: block;
  animation: screenIn 0.4s ease-out;
}

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

/* ═══════════════════════════════════════════════
   SCREEN 1: TODAY'S DHIKR
   ═══════════════════════════════════════════════ */

/* -- Top Header -- */
.today-header {
  padding: 16px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--purple-800), var(--purple-700));
  border: 1px solid rgba(155, 95, 224, 0.2);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-300);
}

.day-badge .day-num {
  color: var(--gold-400);
  font-weight: 700;
}

.header-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid rgba(155, 95, 224, 0.15);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.header-icon:hover { border-color: var(--purple-400); color: var(--text-primary); }

/* -- Episode Title -- */
.episode-title-section {
  padding: 24px 24px 0;
}

.episode-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.episode-label::before,
.episode-label::after {
  content: '\2726';
  font-size: 0.4rem;
  opacity: 0.5;
}

.episode-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* -- Divider -- */
.divider {
  margin: 20px 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.2), transparent);
  position: relative;
}

.divider::after {
  content: '\2726';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.4rem;
  color: var(--gold-500);
  opacity: 0.4;
  background: var(--bg-deep);
  padding: 0 12px;
}

/* -- Audio Player -- */
.audio-section {
  padding: 0 20px;
  margin-bottom: 28px;
}

.audio-player {
  background: linear-gradient(135deg, var(--bg-card), var(--purple-900));
  border: 1px solid rgba(155, 95, 224, 0.12);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
}

.audio-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(122, 63, 200, 0.3);
  transition: all 0.2s;
  opacity: 0.5;
}

.audio-play-btn svg { width: 18px; height: 18px; fill: white; }

.audio-info {
  flex: 1;
  min-width: 0;
}

.audio-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.audio-status {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

.audio-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  opacity: 0.3;
}

.audio-waveform span {
  width: 3px;
  border-radius: 3px;
  background: var(--purple-400);
}

/* -- Dhikr Card Background Glow -- */
.dhikr-card-glow {
  position: relative;
  z-index: 1;
  max-width: 428px;
  margin: -20px auto 0;
  height: 0;
}

.dhikr-card-glow::after {
  content: '';
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(212, 168, 67, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* -- Dhikr Content Card -- */
.dhikr-card {
  margin: 0 20px 28px;
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(40, 18, 78, 0.7) 100%);
  border: 1px solid rgba(212, 168, 67, 0.12);
  border-top: 1px solid rgba(212, 168, 67, 0.18);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow-gold);
  position: relative;
  animation: cardGlow 5s ease-in-out infinite alternate;
}

@keyframes cardGlow {
  0% { box-shadow: var(--shadow-card), 0 0 30px rgba(212, 168, 67, 0.12), 0 0 60px rgba(212, 168, 67, 0.04); }
  100% { box-shadow: var(--shadow-card), 0 0 50px rgba(212, 168, 67, 0.2), 0 0 100px rgba(212, 168, 67, 0.06); }
}

/* Top corner ornament - larger and more prominent */
.dhikr-card::before {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 80px;
  height: 80px;
  background: linear-gradient(225deg, rgba(212, 168, 67, 0.1) 0%, transparent 55%);
  border-radius: 0 var(--radius-lg) 0 0;
  z-index: 1;
}

.dhikr-card::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: -1px;
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, rgba(212, 168, 67, 0.1) 0%, transparent 55%);
  border-radius: 0 0 0 var(--radius-lg);
  z-index: 1;
}

.arabic-section {
  padding: 36px 20px 28px;
  text-align: center;
  position: relative;
  background: radial-gradient(ellipse at center, rgba(212, 168, 67, 0.03) 0%, transparent 70%);
}

/* Bismillah ornament line */
.arabic-section::before {
  content: '\FDFD';
  display: block;
  font-family: var(--font-arabic);
  font-size: 1.3rem;
  color: var(--gold-500);
  opacity: 0.6;
  margin-bottom: 24px;
  letter-spacing: 0.08em;
}

/* Decorative star below Bismillah */
.arabic-section::after {
  content: '\2726';
  display: block;
  font-size: 0.5rem;
  color: var(--gold-500);
  opacity: 0.35;
  margin-top: 20px;
  letter-spacing: 1.2em;
}

.arabic-text {
  font-family: var(--font-arabic);
  font-size: 2.2rem;
  line-height: 2.4;
  direction: rtl;
  color: var(--text-primary);
  font-weight: 700;
  text-align: center;
  padding: 0 2px;
  text-shadow: 0 0 40px rgba(212, 168, 67, 0.08);
  animation: arabicGlow 4s ease-in-out infinite alternate;
}

@keyframes arabicGlow {
  0% { text-shadow: 0 0 30px rgba(212, 168, 67, 0.05); }
  100% { text-shadow: 0 0 50px rgba(212, 168, 67, 0.12), 0 0 80px rgba(212, 168, 67, 0.04); }
}

.transliteration-section {
  padding: 0 22px 22px;
  text-align: center;
  border-top: 1px solid rgba(212, 168, 67, 0.06);
  margin-top: 0;
  padding-top: 20px;
  position: relative;
}

/* Ornamental dot divider between Arabic and transliteration */
.transliteration-section::before {
  content: '\00B7 \00B7 \00B7';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  padding: 0 16px;
  font-size: 0.7rem;
  color: var(--gold-500);
  opacity: 0.4;
  letter-spacing: 0.3em;
}

.transliteration {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.14rem;
  line-height: 1.65;
  color: #d2b4f7;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.translation-section {
  padding: 22px 24px;
  background: rgba(0,0,0,0.18);
  border-top: 1px solid rgba(155, 95, 224, 0.06);
}

.translation {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.75;
  color: #c4b8d4;
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.005em;
}

/* -- Dhikr Nav Pill -- */
.dhikr-nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: -18px auto 20px;
  padding: 3px 4px;
  background: rgba(24, 16, 43, 0.7);
  border: 1px solid rgba(155, 95, 224, 0.1);
  border-radius: 100px;
  width: fit-content;
}

.dhikr-nav-arrow {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--gold-400);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-body);
  line-height: 1;
}

.dhikr-nav-arrow:active {
  background: rgba(212, 168, 67, 0.1);
}

.dhikr-nav-arrow[aria-disabled="true"] {
  color: var(--text-muted);
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.dhikr-nav-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 65px;
  text-align: center;
}

/* -- Page-level slide transitions -- */
@keyframes screenSlideInFromLeft {
  from { opacity: 1; transform: translateX(-100%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes screenSlideInFromRight {
  from { opacity: 1; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

.screen.slide-out-left {
  transform: translateX(-100%);
  transition: transform 0.25s ease-in;
}

.screen.slide-out-right {
  transform: translateX(100%);
  transition: transform 0.25s ease-in;
}

.screen.enter-from-left {
  animation: screenSlideInFromLeft 0.3s ease-out !important;
}

.screen.enter-from-right {
  animation: screenSlideInFromRight 0.3s ease-out !important;
}

@keyframes dayNavHint {
  0%   { transform: translateX(0); }
  40%  { transform: translateX(-40px); }
  100% { transform: translateX(0); }
}

.day-nav-hint {
  animation: dayNavHint 0.6s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .screen.enter-from-left,
  .screen.enter-from-right {
    animation: none !important;
  }
  .day-nav-hint {
    animation: none;
  }
}

/* -- Promise / Hadith -- */
.hadith-section {
  margin: 0 20px 32px;
  padding: 24px 22px;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.07), rgba(212, 168, 67, 0.02));
  border: 1px solid rgba(212, 168, 67, 0.1);
  border-left: 3px solid var(--gold-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
  overflow: hidden;
}

/* Decorative quote mark */
.hadith-section::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  right: 16px;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--gold-500);
  opacity: 0.1;
  line-height: 1;
  pointer-events: none;
}

/* Subtle inner glow */
.hadith-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(90deg, rgba(212, 168, 67, 0.04), transparent);
  pointer-events: none;
}

.hadith-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hadith-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 168, 67, 0.2), transparent);
}

.hadith-text {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--gold-200);
  font-style: italic;
  position: relative;
  z-index: 1;
}

/* -- Check-in Button -- */
.checkin-section {
  padding: 0 20px 32px;
}

.checkin-btn {
  width: 100%;
  min-height: 60px;
  border: none;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.checkin-btn.unchecked {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500), var(--gold-400));
  color: var(--bg-deep);
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.35), 0 0 50px rgba(212, 168, 67, 0.12), inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 0 1px 0 rgba(212, 168, 67, 0.3);
  letter-spacing: 0.02em;
}

.checkin-btn.unchecked:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 168, 67, 0.45), 0 0 70px rgba(212, 168, 67, 0.18), inset 0 1px 0 rgba(255,255,255,0.2);
}

.checkin-btn.unchecked:active {
  transform: translateY(0) scale(0.97);
}

.checkin-btn.checked {
  background: linear-gradient(135deg, rgba(90, 232, 142, 0.12), rgba(90, 232, 142, 0.06));
  border: 1px solid rgba(90, 232, 142, 0.25);
  color: var(--success);
  box-shadow: 0 0 24px rgba(90, 232, 142, 0.1), 0 0 48px rgba(90, 232, 142, 0.04);
  animation: checkedPulse 0.6s ease-out;
}

@keyframes checkedPulse {
  0% { box-shadow: 0 0 0 0 rgba(90, 232, 142, 0.3); }
  50% { box-shadow: 0 0 30px 4px rgba(90, 232, 142, 0.15); }
  100% { box-shadow: 0 0 24px rgba(90, 232, 142, 0.1), 0 0 48px rgba(90, 232, 142, 0.04); }
}

.checkin-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.checkin-btn.unchecked svg { color: var(--bg-deep); fill: none; }
.checkin-btn.checked svg { color: var(--success); fill: none; }

/* Shimmer effect on unchecked */
.checkin-btn.unchecked::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

/* -- Reflection Section -- */
.reflection-section {
  padding: 0 20px 32px;
}

.reflection-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.reflection-header svg {
  width: 18px;
  height: 18px;
  fill: var(--gold-500);
  opacity: 0.7;
}

.reflection-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
}

.reflection-prompts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.prompt-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 6px 12px;
  background: rgba(155, 95, 224, 0.06);
  border: 1px solid rgba(155, 95, 224, 0.08);
  border-radius: 100px;
  width: fit-content;
  transition: all 0.2s;
  cursor: default;
}

.prompt-tag:hover {
  background: rgba(155, 95, 224, 0.1);
  color: var(--text-secondary);
  border-color: rgba(155, 95, 224, 0.15);
}

.prompt-tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  flex-shrink: 0;
}

.reflection-textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg-card);
  border: 1px solid rgba(155, 95, 224, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  resize: vertical;
  transition: border-color 0.2s;
  outline: none;
}

.reflection-textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.reflection-textarea:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(122, 63, 200, 0.1);
}

.autosave-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* -- Reflection Submit Button (inline, compact) -- */
.share-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  margin-bottom: 4px;
  gap: 10px;
}

.share-submit-row .share-toggle-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reflection-submit-btn {
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
}

.reflection-submit-btn.ready {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
  border: 1px solid rgba(155, 95, 224, 0.3);
  color: var(--purple-300);
}

.reflection-submit-btn.ready:hover {
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  color: var(--text-primary);
  transform: scale(1.03);
}

.reflection-submit-btn.ready:active {
  transform: scale(0.97);
}

.reflection-submit-btn.submitting {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
  border: 1px solid rgba(155, 95, 224, 0.3);
  color: var(--purple-300);
  pointer-events: none;
}

.reflection-submit-btn.submitted {
  background: rgba(90, 232, 142, 0.08);
  border: 1px solid rgba(90, 232, 142, 0.2);
  color: var(--success);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   SCREEN 2: 30-DAY PROGRESS VIEW
   ═══════════════════════════════════════════════ */

.progress-header {
  padding: 20px 24px 0;
  text-align: center;
}

.progress-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.progress-subtitle {
  font-size: 0.78rem;
  color: var(--gold-500);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats-row {
  display: flex;
  gap: 12px;
  padding: 24px;
}

.stat-card {
  flex: 1;
  background: linear-gradient(160deg, var(--bg-card), rgba(28, 16, 50, 0.8));
  border: 1px solid rgba(155, 95, 224, 0.1);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.2), transparent);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-value.gold { color: var(--gold-400); }
.stat-value.purple { color: var(--purple-400); }

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* -- 30-Day Grid -- */
.grid-section {
  padding: 0 24px 32px;
}

.grid-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.grid-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(155, 95, 224, 0.12), transparent);
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.grid-cell {
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid transparent;
}

.grid-cell .cell-day {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  font-family: var(--font-display);
}

.grid-cell .cell-name {
  font-size: 0.5rem;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 90%;
  text-align: center;
  font-weight: 500;
}

/* States */
.grid-cell.checked-in {
  background: linear-gradient(145deg, var(--gold-500), var(--gold-400));
  box-shadow: 0 2px 10px rgba(212, 168, 67, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.grid-cell.checked-in .cell-day { color: var(--bg-deep); font-weight: 700; }
.grid-cell.checked-in .cell-name { color: var(--bg-deep); opacity: 0.7; }
.grid-cell.checked-in:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(212, 168, 67, 0.4);
}

.grid-cell.today {
  background: linear-gradient(145deg, var(--purple-600), var(--purple-500));
  border: 2px solid var(--purple-400);
}
.grid-cell.today .cell-day { color: white; font-weight: 700; }
.grid-cell.today .cell-name { color: rgba(255,255,255,0.85); }

.grid-cell.today::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 25px rgba(122, 63, 200, 0.45), 0 0 50px rgba(122, 63, 200, 0.15);
  animation: todayPulseGlow 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes todayPulseGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.grid-cell.unlocked {
  background: var(--bg-card);
  border-color: rgba(155, 95, 224, 0.15);
  box-shadow: inset 0 0 0 1px rgba(155, 95, 224, 0.05);
}
.grid-cell.unlocked .cell-day { color: var(--text-secondary); }
.grid-cell.unlocked .cell-name { color: var(--text-muted); }
.grid-cell.unlocked:hover {
  background: var(--bg-card-hover);
  border-color: rgba(155, 95, 224, 0.25);
  transform: translateY(-1px);
}

.grid-cell.locked {
  background: rgba(12, 7, 20, 0.6);
  border-color: rgba(107, 93, 126, 0.08);
  cursor: default;
  opacity: 0.4;
  box-shadow: 0 0 12px rgba(155, 95, 224, 0.06), 0 0 24px rgba(212, 168, 67, 0.03);
}
.grid-cell.locked .cell-day { color: var(--text-muted); }
.grid-cell.locked .cell-name { display: none; }

/* -- Motivational Quote -- */
.motivation-card {
  margin: 0 24px 28px;
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.07), rgba(212, 168, 67, 0.02));
  border: 1px solid rgba(212, 168, 67, 0.12);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.motivation-card::before {
  content: '\201C';
  position: absolute;
  top: -5px;
  left: 16px;
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--gold-500);
  opacity: 0.12;
  line-height: 1;
}

.motivation-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.15), transparent);
}

.motivation-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--gold-200);
  font-style: italic;
  position: relative;
  z-index: 1;
}

.motivation-source {
  margin-top: 14px;
  font-size: 0.68rem;
  color: var(--gold-500);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.motivation-source::before,
.motivation-source::after {
  content: '';
  width: 20px;
  height: 1px;
  background: rgba(212, 168, 67, 0.3);
}

/* -- Recent Activity -- */
.recent-section {
  padding: 0 24px 28px;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(155, 95, 224, 0.12), transparent);
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(155, 95, 224, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.recent-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(155, 95, 224, 0.15);
}

.recent-item-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.recent-item-num.gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--bg-deep);
}

.recent-item-info {
  flex: 1;
  min-width: 0;
}

.recent-item-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.recent-item-check {
  color: var(--success);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════
   BOTTOM NAVIGATION
   ═══════════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-inner {
  max-width: 428px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 5, 16, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(155, 95, 224, 0.1);
  padding: 0 40px;
  gap: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: none;
  text-decoration: none;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  transition: all 0.2s;
}

.nav-item span {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.nav-item.inactive svg { fill: var(--text-muted); }
.nav-item.inactive span { color: var(--text-muted); }
.nav-item.inactive:hover svg { fill: var(--text-secondary); }
.nav-item.inactive:hover span { color: var(--text-secondary); }

.nav-item.active svg { fill: var(--gold-400); }
.nav-item.active span { color: var(--gold-400); }

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--gold-400);
}

/* ═══════════════════════════════════════════════
   STAGGERED ENTRANCE ANIMATIONS
   ═══════════════════════════════════════════════ */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }
.delay-6 { animation-delay: 0.48s; }
.delay-7 { animation-delay: 0.56s; }
.delay-8 { animation-delay: 0.64s; }

/* Grid cell stagger */
.grid-cell {
  opacity: 0;
  animation: cellIn 0.35s ease-out forwards;
}

@keyframes cellIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--purple-800);
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════
   SAFE AREA (notch devices)
   ═══════════════════════════════════════════════ */
@supports (padding-top: env(safe-area-inset-top)) {
  .today-header, .progress-header, .profile-header {
    padding-top: calc(16px + env(safe-area-inset-top));
  }
  .bottom-nav-inner {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  }
}


/* ═══════════════════════════════════════════════
   NEW COMPONENTS — Profile, Auth, Community,
   YouTube Link, Share Toggle, Donation CTA
   ═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   PROFILE SCREEN
   ═══════════════════════════════════════════════ */
.profile-header {
  padding: 20px 24px 0;
  text-align: center;
}

.profile-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.profile-subtitle {
  font-size: 0.78rem;
  color: var(--gold-500);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* -- User Card -- */
.user-card {
  margin: 24px 20px 0;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid rgba(155, 95, 224, 0.1);
  border-radius: var(--radius-lg);
  text-align: center;
}

.user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-600), var(--gold-400));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.25);
}

.user-avatar-initials {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--bg-deep);
  letter-spacing: 0.02em;
}

.user-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.user-email {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* -- Profile Link Rows -- */
.profile-links {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(155, 95, 224, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.profile-link:hover {
  background: var(--bg-card-hover);
  border-color: rgba(155, 95, 224, 0.15);
}

.profile-link-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple-800), var(--purple-700));
  border: 1px solid rgba(155, 95, 224, 0.15);
}

.profile-link-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--purple-300);
}

.profile-link-icon.gold-icon {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(212, 168, 67, 0.08));
  border: 1px solid rgba(212, 168, 67, 0.15);
}

.profile-link-icon.gold-icon svg {
  fill: var(--gold-400);
}

.profile-link-text {
  flex: 1;
  min-width: 0;
}

.profile-link-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.profile-link-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.profile-link-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: color 0.2s;
}

.profile-link:hover .profile-link-arrow {
  color: var(--text-secondary);
}

/* -- Logout -- */
.logout-section {
  padding: 0 20px 32px;
  margin-top: 8px;
}

.logout-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid rgba(155, 95, 224, 0.1);
  color: #c27070;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  border-color: rgba(194, 112, 112, 0.25);
  background: rgba(194, 112, 112, 0.06);
}

/* ═══════════════════════════════════════════════
   YOUTUBE EPISODE LINK
   ═══════════════════════════════════════════════ */
.youtube-section {
  padding: 0 20px;
  margin-bottom: 28px;
}

.youtube-link {
  background: linear-gradient(135deg, var(--bg-card), var(--purple-900));
  border: 1px solid rgba(155, 95, 224, 0.12);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.youtube-link:hover {
  border-color: rgba(155, 95, 224, 0.22);
  background: linear-gradient(135deg, var(--bg-card-hover), var(--purple-900));
}

.youtube-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cc0000, #ff0000);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(204, 0, 0, 0.25);
}

.youtube-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.youtube-info {
  flex: 1;
  min-width: 0;
}

.youtube-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.youtube-status {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

.youtube-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.2s;
}

.youtube-link:hover .youtube-arrow {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════
   SHARE TOGGLE
   ═══════════════════════════════════════════════ */
/* Legacy single-row layout (kept for compat) */
.share-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 4px;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(155, 95, 224, 0.15);
  border: 1px solid rgba(155, 95, 224, 0.2);
  border-radius: 12px;
  transition: all 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  border-color: var(--purple-400);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--gold-400);
}

.share-toggle-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.share-consent {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 4px;
  display: none;
}

.share-consent.visible {
  display: block;
}

/* ═══════════════════════════════════════════════
   COMMUNITY REFLECTIONS FEED
   ═══════════════════════════════════════════════ */
.community-section {
  padding: 0 20px 32px;
}

.community-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.community-card {
  background: var(--bg-card);
  border: 1px solid rgba(155, 95, 224, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
}

.community-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.community-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.community-card-time {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.community-card-text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════
   DONATION CTA
   ═══════════════════════════════════════════════ */
.donation-cta {
  text-align: center;
  padding: 24px 20px 40px;
}

.donation-cta a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.donation-cta a:hover {
  color: var(--gold-500);
}

/* Footer logo (today screen bottom) */
.app-footer-logo {
  text-align: center;
  padding: 16px 20px 32px;
  opacity: 0.35;
}

.footer-logo-img {
  height: 28px;
  width: auto;
}

/* Profile header logo */
.profile-header-logo {
  height: 28px;
  width: auto;
  opacity: 0.4;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════
   AUTH SCREEN
   ═══════════════════════════════════════════════ */
.auth-screen {
  padding-bottom: 40px;
}

/* Auth hero image */
.auth-hero {
  width: 100%;
  max-width: 428px;
  margin: 0 auto;
  position: relative;
}

.auth-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.auth-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, transparent, var(--bg-deep));
}

/* Auth AlMaghrib logo (below hero) */
.auth-institute-logo {
  height: 24px;
  width: auto;
  opacity: 0.5;
  margin-bottom: 24px;
}

.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 40px;
}

.auth-headline {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  text-align: center;
}

.auth-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.5;
}

.auth-form {
  width: 100%;
  max-width: 340px;
}

.auth-input {
  width: 100%;
  height: 56px;
  background: var(--bg-card);
  border: 1px solid rgba(155, 95, 224, 0.1);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-input:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(122, 63, 200, 0.1);
}

.auth-btn {
  width: 100%;
  min-height: 60px;
  border: none;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500), var(--gold-400));
  color: var(--bg-deep);
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.35), 0 0 50px rgba(212, 168, 67, 0.12), inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 0 1px 0 rgba(212, 168, 67, 0.3);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 168, 67, 0.45), 0 0 70px rgba(212, 168, 67, 0.18), inset 0 1px 0 rgba(255,255,255,0.2);
}

.auth-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Shimmer on auth button */
.auth-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

/* -- Check Email State -- */
.auth-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.12), rgba(212, 168, 67, 0.06));
  border: 1px solid rgba(212, 168, 67, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.auth-icon svg {
  width: 36px;
  height: 36px;
  fill: var(--gold-400);
}

.auth-email-highlight {
  color: var(--text-primary);
  font-weight: 500;
}

.auth-link {
  color: var(--purple-300);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.auth-link:hover {
  color: var(--purple-400);
}

.auth-link-muted {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.2s;
  margin-top: 8px;
  display: inline-block;
}

.auth-link-muted:hover {
  color: var(--text-secondary);
}

.auth-legal {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

.auth-legal a {
  color: var(--purple-300);
  text-decoration: none;
}

.auth-legal a:hover {
  color: var(--purple-400);
}

/* Auth states */
.auth-state {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.auth-state.active {
  display: flex;
}

/* ========================================
   BROWSE SCREEN
   ======================================== */
.browse-header {
  padding: 50px 24px 16px;
  text-align: center;
}

.browse-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.browse-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.browse-list {
  padding: 8px 16px 120px;
}

.browse-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 4px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.browse-item:hover:not(.locked) {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.06);
}

.browse-item.today {
  background: rgba(180,160,100,0.06);
  border-color: rgba(180,160,100,0.12);
}

.browse-item.locked {
  opacity: 0.4;
  cursor: default;
}

.browse-item.locked .browse-item-arrow {
  display: none;
}

.browse-item.locked .browse-item-lock {
  display: flex;
}

.browse-day-num {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.browse-day-num.completed {
  background: rgba(180,160,100,0.15);
  color: var(--gold-400);
}

.browse-day-num.current {
  background: var(--gold-gradient);
  color: var(--bg-primary);
}

.browse-day-num.upcoming {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}

.browse-item-info {
  flex: 1;
  min-width: 0;
}

.browse-item-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.browse-today-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-400);
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(180,160,100,0.12);
  border-radius: 4px;
}

.browse-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.browse-item-arrow {
  color: var(--text-muted);
  opacity: 0.5;
  flex-shrink: 0;
}

.browse-item-lock {
  display: none;
  color: var(--text-muted);
  opacity: 0.4;
  flex-shrink: 0;
}

.checked-badge {
  font-size: 0.72rem;
  color: var(--gold-400);
  background: rgba(180,160,100,0.1);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════
   TERMS & PRIVACY
   ═══════════════════════════════════════════════ */
.terms-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid rgba(155, 95, 224, 0.15);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.back-btn:hover {
  border-color: var(--purple-400);
  color: var(--text-primary);
}

.terms-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.terms-body {
  padding: 8px 24px 40px;
}

.terms-updated {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding: 0;
}

.terms-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 10px;
  margin-top: 28px;
}

.terms-section-title:first-of-type {
  margin-top: 0;
}

.terms-text {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.terms-text a {
  color: var(--purple-300);
  text-decoration: none;
}

.terms-text a:hover {
  color: var(--purple-400);
}

.terms-list {
  padding-left: 20px;
  margin-bottom: 12px;
}

.terms-list li {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.terms-list li::marker {
  color: var(--gold-500);
}

.terms-list li strong {
  color: var(--text-primary);
  font-weight: 500;
}

.terms-highlight {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.07), rgba(212, 168, 67, 0.02));
  border: 1px solid rgba(212, 168, 67, 0.1);
  border-left: 3px solid var(--gold-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 18px;
  margin: 16px 0;
}

.terms-highlight p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--gold-200);
  font-style: italic;
}

.terms-contact {
  margin-top: 28px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid rgba(155, 95, 224, 0.08);
  border-radius: var(--radius-md);
  text-align: center;
}

.terms-contact-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.terms-contact-email {
  font-size: 0.9rem;
  color: var(--purple-300);
  text-decoration: none;
}

.terms-contact-email:hover {
  color: var(--purple-400);
}

.terms-contact-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  margin-bottom: 10px;
}
