/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f8fafc; color: #1e293b; line-height: 1.6; }

/* Navbar */
.navbar { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.nav-brand { font-weight: 700; font-size: 18px; color: #2563eb; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-email { color: #64748b; font-size: 14px; }
.nav-link { color: #2563eb; text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-link:hover { text-decoration: underline; }

/* Main */
.main-content { min-height: calc(100vh - 112px); padding: 32px 16px; }
.container { max-width: 900px; margin: 0 auto; }
.container-narrow { max-width: 680px; margin: 0 auto; }

/* Footer */
.footer { background: #fff; border-top: 1px solid #e2e8f0; padding: 16px 24px; text-align: center; color: #64748b; font-size: 14px; }
.footer a { color: #2563eb; text-decoration: none; }

/* Auth */
.auth-body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { background: #fff; border-radius: 16px; padding: 48px 40px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.auth-logo { font-size: 48px; text-align: center; margin-bottom: 12px; }
.auth-title { font-size: 28px; font-weight: 700; text-align: center; color: #1e293b; margin-bottom: 8px; }
.auth-subtitle { color: #64748b; text-align: center; margin-bottom: 32px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 500; color: #374151; }
.form-group input, .form-group textarea { border: 1.5px solid #d1d5db; border-radius: 8px; padding: 10px 14px; font-size: 16px; transition: border-color 0.2s; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: #2563eb; }
.form-group textarea { resize: vertical; font-family: inherit; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-secondary { background: #f1f5f9; color: #374151; border: 1.5px solid #e2e8f0; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-accent { background: #7c3aed; color: #fff; }
.btn-accent:hover { background: #6d28d9; }
.btn-full { width: 100%; }

/* Alerts */
.alert { padding: 14px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Page Title */
.page-title { font-size: 28px; font-weight: 700; margin-bottom: 24px; }

/* Challenge Cards */
.challenges-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.challenge-card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border: 1px solid #e2e8f0; }
.challenge-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.challenge-title { font-size: 18px; font-weight: 700; }
.challenge-badge { background: #dbeafe; color: #1d4ed8; padding: 4px 10px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Progress */
.progress-container { margin-bottom: 20px; }
.progress-bar { background: #e2e8f0; border-radius: 999px; height: 8px; overflow: hidden; margin-bottom: 6px; }
.progress-fill { background: #2563eb; height: 100%; border-radius: 999px; transition: width 0.4s; }
.progress-stats { display: flex; justify-content: space-between; font-size: 13px; color: #64748b; }

/* Empty State */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: #64748b; margin-bottom: 24px; }

/* Day View */
.day-progress-bar { background: #e2e8f0; height: 6px; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.day-progress-fill { background: #2563eb; height: 100%; border-radius: 999px; }
.day-counter { color: #64748b; font-size: 14px; margin-bottom: 24px; }
.day-card { background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border: 1px solid #e2e8f0; margin-bottom: 24px; }
.day-theme-tag { display: inline-block; background: #f0fdf4; color: #166534; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.day-title { font-size: 26px; font-weight: 800; margin-bottom: 24px; }
.day-affirmation { background: linear-gradient(135deg, #667eea22, #764ba222); border-radius: 12px; padding: 20px 24px; margin-bottom: 24px; border-left: 4px solid #7c3aed; }
.affirmation-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #7c3aed; margin-bottom: 8px; }
.day-affirmation blockquote { font-size: 17px; font-style: italic; color: #374151; }
.day-section { margin-bottom: 24px; }
.day-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: #374151; }
.day-section p { color: #4b5563; }
.day-journal { background: #fffbeb; border-radius: 12px; padding: 20px 24px; border: 1px solid #fde68a; }
.day-journal h3 { color: #92400e; }
.day-journal p { color: #78350f; }

/* Completion */
.completion-badge { background: #dcfce7; color: #166534; border: 1px solid #86efac; border-radius: 8px; padding: 16px; text-align: center; font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.complete-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }

/* Day Navigation */
.day-nav { display: flex; justify-content: space-between; margin-bottom: 24px; }

/* Upsell */
.upsell-card { background: linear-gradient(135deg, #7c3aed, #2563eb); border-radius: 16px; padding: 28px; text-align: center; color: #fff; }
.upsell-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.upsell-card p { opacity: 0.9; margin-bottom: 20px; }
