/**
 * PATO SPA - Consolidated Stylesheet
 * Extracted from: dashboard.html, chat.html, profile.html, login.html, onboarding.html, reset-password.html
 */

/* ============================================
   1. CSS Variables
   ============================================ */
:root {
    --orange-500: #F97316;
    --orange-600: #EA580C;
    --orange-400: #FB923C;
    --yellow-400: #FACC15;
    --green-500: #22C55E;
    --green-400: #4ADE80;
    --blue-500: #3B82F6;
    --blue-400: #60A5FA;
    --purple-500: #A855F7;
    --purple-400: #C084FC;
    --pink-500: #EC4899;
    --cyan-500: #06B6D4;
    --red-500: #EF4444;
    --red-400: #F87171;
    --black: #0A0A0A;
    --gray-900: #171717;
    --gray-850: #1a1a1a;
    --gray-800: #262626;
    --gray-700: #404040;
    --gray-600: #525252;
    --gray-500: #737373;
    --gray-400: #A3A3A3;
    --gray-300: #D4D4D4;
    --white: #FAFAFA;
    --gradient-warm: linear-gradient(135deg, var(--orange-500) 0%, var(--yellow-400) 100%);
    --gradient-blue: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-400) 100%);
    --gradient-green: linear-gradient(135deg, var(--green-500) 0%, var(--green-400) 100%);
    --gradient-purple: linear-gradient(135deg, var(--purple-500) 0%, #A78BFA 100%);
    --glass-bg: rgba(23, 23, 23, 0.7);
    --glass-bg-raised: rgba(38, 38, 38, 0.5);
    --glass-bg-input: rgba(38, 38, 38, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-subtle: rgba(255, 255, 255, 0.05);
    --glass-blur: blur(16px);
    --nav-height: calc(76px + max(8px, env(safe-area-inset-bottom)));

    /* Spacing scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;

    /* Border radius scale */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(249, 115, 22, 0.2);
    --shadow-md: 0 4px 20px rgba(249, 115, 22, 0.3);
    --shadow-lg: 0 8px 32px rgba(249, 115, 22, 0.3);
    --shadow-glow: 0 0 8px rgba(249, 115, 22, 0.5), 0 0 16px rgba(249, 115, 22, 0.25);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ============================================
   2. Reset & Base
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(249, 115, 22, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 5%, rgba(234, 88, 12, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 60%, rgba(252, 204, 21, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(249, 115, 22, 0.04) 0%, transparent 50%),
        var(--black);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ============================================
   3. Layout
   ============================================ */
.page-content {
    padding-top: calc(60px + env(safe-area-inset-top));
    padding-bottom: calc(var(--nav-height) + 14px);
    min-height: 100vh;
}

.container-narrow {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   4. Top Bar
   ============================================ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
    height: calc(60px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
}

/* Alternate glass style (dashboard) */
.top-bar-glass {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-bottom: 1px solid var(--glass-border);
    height: calc(60px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
}

.top-bar-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-back {
    background: none;
    border: none;
    color: var(--orange-400);
    cursor: pointer;
    padding: 4px;
    margin-left: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
}

.top-bar-title {
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-bar-action {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.top-bar-action:hover {
    color: var(--white);
    background: var(--gray-800);
}

.rewards-glow {
    position: relative;
    color: var(--orange-500);
}
.rewards-glow.has-redeemable::after {
    content: '';
    position: absolute;
    top: 2px; right: 2px;
    width: 10px; height: 10px;
    background: var(--green-500, #10B981);
    border-radius: 50%;
    z-index: 2;
    border: 2px solid var(--gray-900);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
    animation: redeemable-pulse 2s ease-in-out infinite;
}
@keyframes redeemable-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.top-bar-action-text {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--gray-400);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.top-bar-action-text:hover {
    color: var(--white);
    background: var(--gray-800);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   5. Bottom Navigation
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(to top, rgba(180, 80, 0, 0.35) 0%, rgba(140, 60, 0, 0.18) 35%, rgba(10, 10, 10, 0.78) 100%);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-top: 1px solid rgba(251, 146, 60, 0.12);
    box-shadow: 0 -2px 20px rgba(249, 115, 22, 0.12), 0 -1px 16px rgba(0, 0, 0, 0.35);
    display: flex;
    justify-content: center;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.bottom-nav-item {
    flex: 1;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--gray-500);
    transition: all 0.2s ease;
    position: relative;
}

.bottom-nav-item:hover { color: var(--gray-400); }

.bottom-nav-item.active {
    color: var(--orange-500);
    background: linear-gradient(to top, rgba(249, 115, 22, 0.18) 0%, rgba(249, 115, 22, 0.06) 50%, transparent 100%);
    border-radius: 12px;
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background: var(--gradient-warm);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.5), 0 0 16px rgba(249, 115, 22, 0.25);
}

.bottom-nav-icon {
    width: 44px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bottom-nav-icon svg { width: 24px; height: 24px; }
.bottom-nav-label { font-size: 12px; font-weight: 600; }

/* Nav Avatar (Me tab) */
.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-avatar svg { width: 20px; height: 20px; }

.bottom-nav-item.active .nav-avatar {
    border-color: var(--primary);
}

/* ============================================
   6. Glass Cards
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
}

.section-action { font-size: 13px; color: var(--orange-400); text-decoration: none; }

/* Profile-style sections */
.section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
}

.section .section-title {
    font-size: 14px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.section .section-title svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.section-divider {
    height: 1px;
    background: var(--gray-700);
    margin: 20px 0;
}

/* ============================================
   7. Buttons
   ============================================ */
.btn {
    padding: 16px;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--gradient-warm);
    color: var(--black);
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(249, 115, 22, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: var(--gray-800);
    color: var(--gray-300);
    border: none;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover { background: var(--gray-700); }

.btn-danger {
    background: transparent;
    border: 2px solid var(--red-400);
    color: var(--red-400);
    margin-top: 8px;
}

.btn-danger:hover { background: rgba(248, 113, 113, 0.1); }

.btn-text {
    background: none;
    color: var(--gray-400);
    padding: 12px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    border: none;
    cursor: pointer;
}

.btn-text:hover { color: var(--white); }

.btn-row { display: flex; gap: 12px; margin-top: 32px; }
.btn-row .btn { flex: 1; }

.btn-loading { display: inline-flex; align-items: center; gap: 8px; }

/* ============================================
   7b. Reusable Utilities
   ============================================ */

/* Glass overlay — base for all modals/overlays */
.glass-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-xl);
}

/* Icon badge — 40x40 rounded icon container */
.icon-badge {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* ============================================
   8. Form Elements
   ============================================ */
.form-group { margin-bottom: 18px; }
.form-group.full { grid-column: span 2; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-300);
    margin-bottom: 8px;
}

.label-optional { color: var(--gray-500); font-weight: 400; }

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--glass-bg-input);
    border: 2px solid var(--gray-700);
    border-radius: 12px;
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    transition: all 0.2s ease;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

input::placeholder { color: var(--gray-500); }
textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; }
select option { background: var(--gray-800); }

.password-field { position: relative; }

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover { color: var(--gray-300); }

/* ============================================
   9. Option Cards (Radio/Checkbox selectors)
   ============================================ */
.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.option-grid.three-col { grid-template-columns: repeat(3, 1fr); }

.option-card {
    padding: 18px 12px;
    background: var(--glass-bg-raised);
    border: 2px solid var(--gray-700);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.option-card:hover {
    border-color: var(--gray-600);
    transform: translateY(-2px);
}

.option-card.selected {
    border-color: var(--orange-500);
    background: rgba(249, 115, 22, 0.1);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] { display: none; }

.option-icon { font-size: 28px; margin-bottom: 8px; }
.option-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.option-desc { font-size: 11px; color: var(--gray-500); }

/* ============================================
   10. Toast Notifications
   ============================================ */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 26px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--gray-700);
    background: var(--gray-800);
    color: white;
}

.toast.success { background: var(--green-500); border-color: var(--green-500); }
.toast.error { background: var(--red-400); border-color: var(--red-400); }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-icon { font-size: 18px; }

/* ============================================
   11. Loading & Spinners
   ============================================ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.loading-spinner,
.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gray-800);
    border-top-color: var(--orange-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(0,0,0,0.2);
    border-top-color: var(--black);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

/* ============================================
   12. Animations
   ============================================ */
@keyframes spin { to { transform: rotate(360deg); } }

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Skeleton Loaders */
.skel-line, .skel-card, .skel-circle, .skel-pill {
    background: var(--gray-800);
    border-radius: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}
.skel-line { height: 14px; border-radius: 6px; }
.skel-circle { border-radius: 50%; }
.skel-pill { width: 64px; height: 32px; border-radius: 16px; }
.skel-card { border-radius: 16px; }
.skeleton-dashboard, .skeleton-profile, .skeleton-rewards {
    padding: 0 4px;
}

@keyframes sendPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.95); }
}

/* SPA View transitions */
@keyframes slideInRight {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes viewFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.view-enter-right {
    animation: slideInRight 0.25s ease-out both;
}

.view-enter-left {
    animation: slideInLeft 0.25s ease-out both;
}

.view-enter-fade {
    animation: viewFadeIn 0.2s ease-out both;
}

/* ============================================
   13. Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 24px;
    color: var(--gray-500);
}

.empty-state-icon { font-size: 32px; margin-bottom: 8px; }

.btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #F97316, #FACC15);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}
.btn-retry:active {
    transform: scale(0.96);
}
.btn-retry svg {
    flex-shrink: 0;
}

/* ============================================
   14. Messages (Error/Success in forms)
   ============================================ */
.form-message {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--red-400);
    display: block;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--green-400);
    display: block;
}

/* ============================================
   15. Splash Screen
   ============================================ */
.splash {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--black);
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.splash.hidden { opacity: 0; pointer-events: none; }

.splash-content { text-align: center; }

.splash-logo {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(90deg, #F97316, #FBBF24, #F97316, #EF4444, #F97316);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: splashPulse 2s ease-in-out infinite;
}

@keyframes splashPulse {
    0%, 100% { background-position: 0% 50%; opacity: 0.7; }
    50% { background-position: 100% 50%; opacity: 1; }
}

/* ============================================
   16. SPA View Container
   ============================================ */
.view-container {
    position: relative;
    min-height: 100vh;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    min-height: 100vh;
}

.view.active { position: relative; }

/* ============================================
   DASHBOARD-SPECIFIC STYLES
   ============================================ */

/* Dashboard container */
.dashboard {
    max-width: 600px;
    margin: 0 auto;
    padding: 27px 20px 0;
}

/* Welcome Header */
.welcome-header { margin-bottom: 24px; }
.welcome-text { font-size: 14px; color: var(--gray-400); margin-bottom: 4px; }
.welcome-name { font-size: 28px; font-weight: 800; }
.welcome-name span {
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.stat-card.calories::before { background: var(--gradient-warm); }
.stat-card.protein::before { background: linear-gradient(90deg, var(--blue-500), var(--cyan-500)); }
.stat-card.workouts::before { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
.stat-card.streak::before { background: linear-gradient(90deg, var(--purple-500), var(--pink-500)); }

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon { font-size: 18px; }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-target { font-size: 13px; color: var(--gray-500); }

.stat-progress {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.stat-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.stat-progress-fill.calories { background: var(--gradient-warm); }
.stat-progress-fill.protein { background: linear-gradient(90deg, var(--blue-500), var(--cyan-500)); }

/* Macro Breakdown */
.macro-breakdown { display: flex; gap: 16px; align-items: center; }

.macro-chart-container {
    position: relative;
    width: 100px;
    height: 100px;
}

.macro-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.macro-chart-calories { font-size: 18px; font-weight: 800; }
.macro-chart-label { font-size: 10px; color: var(--gray-500); }

.macro-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.macro-item { display: flex; align-items: center; gap: 10px; }
.macro-color { width: 12px; height: 12px; border-radius: 3px; }
.macro-color.carbs { background: var(--blue-500); }
.macro-color.protein { background: var(--green-500); }
.macro-color.fats { background: var(--orange-500); }
.macro-info { flex: 1; }
.macro-name { font-size: 13px; font-weight: 600; }
.macro-grams { font-size: 11px; color: var(--gray-500); }
.macro-percent { font-size: 13px; font-weight: 700; }

/* Workout Summary */
.workout-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.workout-stat {
    text-align: center;
    padding: 16px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.workout-stat-icon { font-size: 24px; margin-bottom: 8px; }
.workout-stat-value { font-size: 20px; font-weight: 800; margin-bottom: 2px; }
.workout-stat-label { font-size: 11px; color: var(--gray-500); text-transform: uppercase; }

/* Body Metrics Grid */
.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.metric-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.metric-icon.weight { background: rgba(249, 115, 22, 0.15); }
.metric-icon.bodyfat { background: rgba(59, 130, 246, 0.15); }
.metric-icon.muscle { background: rgba(34, 197, 94, 0.15); }
.metric-icon.water { background: rgba(6, 182, 212, 0.15); }

.metric-value { font-size: 18px; font-weight: 700; }
.metric-label { font-size: 12px; color: var(--gray-500); }
.metric-change { font-size: 11px; font-weight: 600; }
.metric-change.positive { color: var(--green-400); }
.metric-change.negative { color: var(--red-400); }

/* Mood Tracker */
.mood-grid { display: flex; gap: 8px; justify-content: space-between; }

.mood-day {
    flex: 1;
    text-align: center;
    padding: 12px 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}

.mood-day-name { font-size: 11px; color: var(--gray-500); margin-bottom: 8px; }
.mood-emoji { font-size: 20px; margin-bottom: 4px; }
.mood-energy { font-size: 10px; color: var(--gray-400); }

/* Goal Progress */
.goal-section { display: flex; align-items: center; gap: 24px; }

.progress-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.progress-ring { transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 10; }

.progress-ring-fill {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percent { font-size: 28px; font-weight: 800; }
.progress-label { font-size: 12px; color: var(--gray-500); }
.goal-details { flex: 1; }
.goal-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.goal-stats { display: flex; gap: 16px; }
.goal-stat { text-align: center; }
.goal-stat-value { font-size: 20px; font-weight: 800; }
.goal-stat-label { font-size: 11px; color: var(--gray-500); }

/* Progress Chart */
.chart-tabs { display: flex; gap: 8px; margin-bottom: 16px; }

.chart-tab {
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 20px;
    color: var(--gray-400);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-tab:hover { background: rgba(255,255,255,0.08); }
.chart-tab.active { background: var(--gradient-warm); color: var(--black); }
.chart-container { height: 180px; position: relative; }

/* Tappable Stat Cards */
.stat-card.tappable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-card.tappable:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-card.tappable:active { transform: translateY(0); }

.stat-tap-hint {
    font-size: 10px;
    color: var(--gray-600);
    text-align: center;
    margin-top: 8px;
}

/* Stat History Modal */
.stat-history-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    z-index: 1000;
    padding: var(--space-xl);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-history-overlay.visible { opacity: 1; }

.stat-history-modal {
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 20px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    margin: auto 0;
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.stat-history-overlay.visible .stat-history-modal { transform: translateY(0); }

.stat-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-history-header h3 { font-size: 16px; font-weight: 700; }

.stat-history-close {
    width: 32px;
    height: 32px;
    background: var(--gray-800);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-history-close:hover { background: var(--gray-700); }

.stat-history-chart-wrap { height: 200px; margin-bottom: 20px; }

.stat-history-summary {
    display: flex;
    justify-content: space-around;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-item { text-align: center; }
.summary-label { display: block; font-size: 11px; color: var(--gray-500); margin-bottom: 4px; }
.summary-value { font-size: 18px; font-weight: 700; }

/* Activity Timeline */
.activity-list { display: flex; flex-direction: column; gap: 12px; }

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.activity-icon.workout { background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05)); }
.activity-icon.meal { background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.05)); }
.activity-icon.progress { background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.05)); }

.activity-content { flex: 1; }
.activity-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.activity-subtitle { font-size: 12px; color: var(--gray-500); }
.activity-time { font-size: 12px; color: var(--gray-600); }
.activity-chevron { font-size: 20px; color: var(--gray-600); font-weight: 300; margin-left: 4px; }
.activity-item:active { background: rgba(255,255,255,0.06); }

/* Activity Detail Modal */
.activity-detail-grid { text-align: left; width: 100%; margin: 12px 0; }
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--glass-border); }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 13px; color: var(--gray-500); }
.detail-value { font-size: 13px; font-weight: 600; color: var(--white); text-align: right; }

/* Points Display (top bar) */
.points-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.points-icon { font-size: 14px; }
.points-value { font-weight: 700; font-size: 14px; color: var(--orange-400); }

/* Duck Widget — Tamagotchi Layout */
.duck-widget { padding: 20px; }

.duck-main {
    display: flex;
    gap: 16px;
    align-items: center;
}

.duck-screen {
    width: 160px;
    height: 160px;
    min-width: 160px;
    border-radius: 24px;
    overflow: hidden;
    border: 2px solid rgba(251, 146, 60, 0.25);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(251, 146, 60, 0.1);
    transition: filter 0.5s ease;
}

.duck-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.duck-info-title {
    font-size: 18px;
    font-weight: 700;
}

.duck-info-level {
    display: flex;
    align-items: center;
    gap: 8px;
}

.duck-info-health {
    display: flex;
    align-items: center;
    gap: 8px;
}

.duck-info-health .duck-health-bar {
    flex: 1;
    margin-bottom: 0;
}

.duck-info-xp {
    display: flex;
    align-items: center;
    gap: 8px;
}

.duck-info-xp .xp-bar {
    flex: 1;
    margin-bottom: 0;
}

.duck-stats-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.duck-stat-item {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-300);
}

.duck-plan-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--gray-300);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.duck-plan-btn:hover {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.25);
    color: var(--orange-400);
    transform: translateY(-1px);
}
.duck-plan-btn:active {
    transform: translateY(0);
}
.duck-plan-btn span {
    font-size: 16px;
}

.duck-health-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.duck-health-badge.thriving { background: rgba(34, 197, 94, 0.2); color: var(--green-400); }
.duck-health-badge.healthy { background: rgba(250, 204, 21, 0.2); color: var(--yellow-400); }
.duck-health-badge.okay { background: rgba(251, 146, 60, 0.2); color: var(--orange-400); }
.duck-health-badge.tired { background: rgba(251, 146, 60, 0.3); color: var(--orange-500); }
.duck-health-badge.struggling { background: rgba(248, 113, 113, 0.2); color: var(--red-400); }

/* Video element inside duck containers */
.pato-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Health filter states — applied to video containers */
.pato-thriving {
    filter: saturate(1.2) brightness(1.1) drop-shadow(0 0 20px rgba(34, 197, 94, 0.4));
    animation: patoGlow 2s ease-in-out infinite;
}
.pato-healthy {
    filter: saturate(1) brightness(1);
}
.pato-okay {
    filter: saturate(0.7) brightness(0.9);
}
.pato-tired {
    filter: saturate(0.4) brightness(0.75);
}
.pato-struggling {
    filter: saturate(0.1) brightness(0.6);
    animation: patoShake 0.5s ease-in-out infinite;
}

@keyframes patoGlow {
    0%, 100% { filter: saturate(1.2) brightness(1.1) drop-shadow(0 0 20px rgba(34, 197, 94, 0.4)); }
    50% { filter: saturate(1.2) brightness(1.1) drop-shadow(0 0 30px rgba(34, 197, 94, 0.6)); }
}

@keyframes patoShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.duck-health-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.duck-health-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.duck-health-fill.high { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
.duck-health-fill.medium { background: linear-gradient(90deg, var(--orange-500), var(--yellow-400)); }
.duck-health-fill.low { background: linear-gradient(90deg, var(--red-500), var(--red-400)); }

.duck-health-label { font-size: 11px; color: var(--gray-500); white-space: nowrap; }

.level-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--gradient-warm);
    color: var(--black);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.level-title { font-size: 14px; color: var(--gray-400); }

.xp-bar {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.xp-fill {
    height: 100%;
    background: var(--gradient-warm);
    border-radius: 3px;
}

.xp-label { font-size: 11px; color: var(--gray-500); white-space: nowrap; }

/* Daily Checklist */
.checklist-card { padding: 20px; }

.checklist-progress { font-size: 14px; color: var(--green-400); font-weight: 700; }

.checklist-items { margin: 16px 0; }

.checklist-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.checklist-item:last-child { border-bottom: none; }
.checklist-item.completed { opacity: 0.6; }
.checklist-item.completed .checklist-title { text-decoration: line-through; }

.checklist-check { font-size: 18px; margin-right: 12px; width: 24px; }

.checklist-title { flex: 1; font-size: 14px; }

.checklist-points { font-weight: 700; font-size: 13px; color: var(--orange-400); }
.checklist-points.earned { color: var(--green-400); }

.checklist-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: var(--gray-500);
}

.checklist-footer strong { color: var(--orange-400); }

/* Push Notification Prompt */
.push-prompt {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(249, 115, 22, 0.15);
}
.push-prompt-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.push-prompt-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.push-prompt-text p {
    font-size: 13px;
    color: var(--gray-400);
    margin: 2px 0 0;
}
.push-prompt-text strong {
    font-size: 14px;
    color: var(--white);
}
.push-prompt-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.btn-push-dismiss {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
}
.btn-push-dismiss:hover { color: var(--gray-300); }
.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* Badges Preview */
.badges-preview { position: relative; }
.badges-preview::before,
.badges-preview::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    z-index: 2;
    pointer-events: none;
}
.badges-preview::before {
    left: 0;
    background: linear-gradient(to right, rgba(10, 10, 10, 0.78), transparent);
    border-radius: 16px 0 0 16px;
}
.badges-preview::after {
    right: 0;
    background: linear-gradient(to left, rgba(10, 10, 10, 0.78), transparent);
    border-radius: 0 16px 16px 0;
}

.badges-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
}

.badges-row::-webkit-scrollbar { display: none; }

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 72px;
    max-width: 80px;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    text-align: center;
}

.badge-item.new { border: 1px solid var(--orange-500); }

.badge-icon { font-size: 24px; }
.badge-name {
    font-size: 10px;
    color: var(--gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ============================================
   CHAT-SPECIFIC STYLES
   ============================================ */

.chat-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding-top: calc(60px + env(safe-area-inset-top));
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Remove body gradient on chat page */
body.view-chat {
    background: var(--black);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-3xl) var(--space-lg) var(--space-lg);
    padding-bottom: calc(var(--nav-height) + 70px);
}

.messages-area::-webkit-scrollbar { width: 4px; }
.messages-area::-webkit-scrollbar-track { background: transparent; }
.messages-area::-webkit-scrollbar-thumb { background: var(--gray-700); border-radius: 2px; }

/* Load History Bar */
.load-history-bar { display: flex; justify-content: center; padding: 12px 0 4px; }
.load-history-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; background: var(--gray-900); border: 1px solid var(--gray-800);
    border-radius: 20px; color: var(--gray-400); font-family: 'Outfit', sans-serif;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
}
.load-history-btn:hover { color: var(--white); border-color: var(--gray-600); background: var(--gray-800); }
.load-history-btn:disabled { opacity: 0.6; cursor: default; }
.load-history-btn svg { flex-shrink: 0; }

/* Chat Loading State */
.loading-state { display: flex; flex-direction: column; gap: 16px; padding: 20px 0; }

.skeleton-message { display: flex; gap: 10px; animation: pulse 1.5s ease-in-out infinite; }
.skeleton-message.right { flex-direction: row-reverse; }
.skeleton-avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--gray-800); }
.skeleton-bubble { height: 48px; border-radius: 18px; background: var(--gray-800); }
.skeleton-message:nth-child(odd) .skeleton-bubble { width: 65%; }
.skeleton-message:nth-child(even) .skeleton-bubble { width: 45%; }

/* Loading More (pagination) */
.loading-more { display: flex; justify-content: center; padding: 16px; }
.loading-more .spinner-small { width: 20px; height: 20px; border: 2px solid var(--gray-700); border-top-color: var(--orange-500); margin-right: 0; }

/* Chat Welcome State */
.welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    height: 100%;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.3);
}

.welcome-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-subtitle { color: var(--gray-400); font-size: 15px; margin-bottom: 28px; }

/* Quick Actions */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; max-width: 320px; }

.quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 14px;
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.quick-action:hover {
    background: var(--gray-800);
    border-color: var(--gray-700);
    transform: translateY(-2px);
}

.quick-action-icon { font-size: 18px; }

/* Suggestion Chips */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 48px 16px;
    margin-bottom: 80px;
    animation: chipsSlideUp 0.3s ease-out;
}

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

.suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 153, 0, 0.08);
    border: 1px solid rgba(255, 153, 0, 0.25);
    border-radius: 20px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggestion-chip-emoji {
    font-size: 14px;
}

.suggestion-chip:hover {
    background: rgba(255, 153, 0, 0.15);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.suggestion-chip:active {
    transform: translateY(0);
}

/* Date Separator */
.date-separator { text-align: center; margin: 20px 0; position: relative; }

.date-separator::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: var(--gray-800);
}

.date-separator span {
    position: relative;
    background: var(--black);
    padding: 0 12px;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 600;
}

/* Message Bubbles */
.message { display: flex; gap: 10px; margin-bottom: 16px; animation: fadeIn 0.3s ease; }
.message.no-animate { animation: none; }
.message.user { flex-direction: row-reverse; }

.message-avatar { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; }

.message.user .message-avatar {
    background: var(--gradient-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.message-content { max-width: 80%; display: flex; flex-direction: column; gap: 4px; }
.message.user .message-content { align-items: flex-end; max-width: 85%; }

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.assistant .message-bubble {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-bottom-left-radius: 6px;
}

.message.user .message-bubble {
    background: var(--gradient-warm);
    color: var(--black);
    border-bottom-right-radius: 6px;
}

.message.pending .message-bubble { opacity: 0.7; }

/* Failed message - iMessage-style error indicator */
.message.failed { align-items: flex-end; }

.message.failed .message-bubble {
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.message-error-icon {
    display: none;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--red-400);
    color: var(--white);
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 18px;
    cursor: pointer;
}

.message.failed .message-error-icon { display: flex; }

.message-error-text {
    display: none;
    font-size: 12px;
    color: var(--red-400);
    padding: 2px 4px;
}

.message.failed .message-error-text { display: block; }

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--gray-500);
    padding: 0 4px;
}

.message.user .message-meta { justify-content: flex-end; }
.message-status { display: flex; align-items: center; gap: 4px; }

.retry-btn {
    background: none;
    border: none;
    color: var(--orange-400);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.retry-btn:hover { background: var(--gray-800); }

/* Message images */
.message-image {
    max-width: 240px;
    border-radius: 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.message-image:hover { transform: scale(1.02); }
.message-bubble img { max-width: 100%; border-radius: 12px; margin-top: 8px; }

/* Exercise cards in chat */
.ex-card {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.ex-card-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
}
.ex-card-body {
    flex: 1;
    min-width: 0;
}
.ex-card-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}
.ex-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.ex-card-tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--gray-400);
    white-space: nowrap;
}
.ex-card-video {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(249, 115, 22, 0.15);
    color: var(--orange-400);
    text-decoration: none;
    white-space: nowrap;
}
.ex-card-video:active { background: rgba(249, 115, 22, 0.25); }
.ex-card-steps {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 12px;
    color: var(--gray-400);
    line-height: 1.5;
}
.ex-card-steps li { margin-bottom: 2px; }

/* Markdown in messages */
.message-bubble p { margin-bottom: 8px; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-bubble strong { font-weight: 700; }
.message-bubble em { font-style: italic; }

.message-bubble code {
    background: rgba(0,0,0,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
}

.message.user .message-bubble code { background: rgba(0,0,0,0.15); }

.message-bubble pre {
    background: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-bubble pre code { background: none; padding: 0; }
.message-bubble a { color: var(--orange-400); word-break: break-all; }
.message.user .message-bubble a { color: var(--black); text-decoration: underline; }

/* Lists in messages */
.message-bubble ul, .message-bubble ol { margin: 6px 0; padding-left: 20px; }
.message-bubble li { margin-bottom: 4px; line-height: 1.45; }
.message-bubble li:last-child { margin-bottom: 0; }

/* Headers in messages */
.message-bubble h2, .message-bubble h3, .message-bubble h4, .message-bubble h5 {
    font-weight: 700;
    margin: 10px 0 4px;
    line-height: 1.3;
}
.message-bubble h2 { font-size: 17px; }
.message-bubble h3 { font-size: 16px; }
.message-bubble h4 { font-size: 15px; }
.message-bubble h5 { font-size: 14px; color: var(--gray-400); }
.message-bubble h2:first-child, .message-bubble h3:first-child,
.message-bubble h4:first-child, .message-bubble h5:first-child { margin-top: 0; }

/* Horizontal rules */
.message-bubble hr {
    border: none;
    border-top: 1px solid var(--gray-700);
    margin: 10px 0;
}
.message.user .message-bubble hr { border-color: rgba(0,0,0,0.15); }

/* YouTube preview cards */
.yt-preview {
    display: block;
    text-decoration: none !important;
    border-radius: 12px;
    overflow: hidden;
    margin: 8px 0;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--gray-800);
    transition: transform 0.15s ease;
}
.yt-preview:hover { transform: scale(1.01); }
.message.user .yt-preview { background: rgba(0,0,0,0.1); border-color: rgba(0,0,0,0.15); }
.yt-preview-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}
.yt-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.yt-preview-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 36px;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}
.yt-preview:hover .yt-preview-play { opacity: 1; }
.yt-preview-play svg { width: 100%; height: 100%; }
.yt-preview-title {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-200);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.message.user .yt-preview-title { color: var(--black); }

/* Typing Indicator */
.typing-indicator { display: flex; gap: 4px; padding: 8px 0; }

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--gray-500);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Typing Status Text — absolute so it never affects bubble width */
#typingIndicator .message-content {
    position: relative;
    padding-bottom: 22px;
}
.typing-status-text {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 12px;
    color: var(--gray-500);
    padding-left: 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
    white-space: nowrap;
}
.typing-status-text.visible {
    opacity: 1;
}

/* Scroll to Bottom Button */
.scroll-bottom-btn {
    position: fixed;
    bottom: calc(var(--nav-height) + 100px);
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    background: var(--glass-bg-input);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    z-index: 98;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.scroll-bottom-btn.visible { display: flex; }
.scroll-bottom-btn:hover { background: var(--gray-700); transform: translateX(-50%) scale(1.05); }
.scroll-bottom-btn svg { width: 16px; height: 16px; }

/* Chat Input Area */
.input-area {
    position: fixed;
    bottom: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 99;
    padding: 10px 16px;
    background: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.input-container {
    flex: 1;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 24px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s ease;
}

.input-container:focus-within { border-color: var(--orange-500); }
.input-container.disabled { opacity: 0.6; pointer-events: none; }

/* Chat textarea */
.input-row { display: flex; align-items: center; gap: 8px; }

.input-row textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    resize: none;
    outline: none;
    max-height: 120px;
    min-height: 44px;
    line-height: 24px;
    padding: 10px 0;
    width: auto;
}

.input-row textarea::placeholder { color: var(--gray-500); }
.input-row textarea:focus { border-color: transparent; box-shadow: none; }

.input-actions { display: flex; gap: 4px; }

.input-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.input-btn:hover { color: var(--white); background: var(--gray-700); }
.input-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.input-btn svg { width: 20px; height: 20px; }

.input-btn.listening {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
    animation: voicePulse 1.5s ease-in-out infinite;
}

@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); }
}

.send-btn {
    width: 44px;
    height: 44px;
    background: var(--gradient-warm);
    border: none;
    border-radius: 50%;
    color: var(--black);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-btn:hover { transform: scale(1.05); }
.send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.send-btn svg { width: 20px; height: 20px; }
.send-btn.sending {
    background: var(--gray-700);
    animation: none;
}
.send-btn.sending:hover {
    background: var(--gray-600);
}
.send-btn .stop-icon { width: 18px; height: 18px; }

/* Image Preview */
.image-preview { display: none; position: relative; width: fit-content; }
.image-preview.visible { display: block; }
.image-preview img { max-width: 120px; max-height: 80px; border-radius: 10px; object-fit: cover; }

.image-preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: var(--red-400);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Upload Progress */
.upload-progress { display: none; align-items: center; gap: 8px; padding: 8px 0; }
.upload-progress.visible { display: flex; }
.upload-progress-bar { flex: 1; height: 4px; background: var(--gray-700); border-radius: 2px; overflow: hidden; }
.upload-progress-fill { height: 100%; background: var(--gradient-warm); transition: width 0.2s ease; }
.upload-progress-text { font-size: 12px; color: var(--gray-400); }

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-xl);
}

.image-modal.visible { display: flex; }
.image-modal img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Options Menu */
.options-menu {
    position: fixed;
    top: 52px;
    right: 16px;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    display: none;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.options-menu.visible { display: block; }

.options-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.options-menu-item:hover { background: var(--gray-700); }
.options-menu-item svg { color: var(--gray-400); }
.options-menu-item:hover svg { color: var(--red-400); }

/* Confirmation Modal */
.confirm-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-xl);
}

.confirm-modal.visible { display: flex; }

.confirm-modal-content {
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 20px;
    padding: 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
}

.confirm-modal-icon {
    width: 56px;
    height: 56px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.confirm-modal-icon svg { width: 28px; height: 28px; color: var(--red-400); }
.confirm-modal-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.confirm-modal-text { font-size: 14px; color: var(--gray-400); margin-bottom: 24px; line-height: 1.5; }
.confirm-modal-buttons { display: flex; gap: 12px; }

.confirm-modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-modal-btn.cancel {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    color: var(--white);
}

.confirm-modal-btn.cancel:hover { background: var(--gray-700); }

.confirm-modal-btn.danger {
    background: var(--red-500);
    border: none;
    color: white;
}

.confirm-modal-btn.danger:hover { background: var(--red-400); }

/* ============================================
   LOGIN-SPECIFIC STYLES
   ============================================ */

/* Background Effects */
.bg-pattern {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.03;
    background-image:
        radial-gradient(circle at 25% 25%, var(--orange-500) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, var(--yellow-400) 2px, transparent 2px);
    background-size: 60px 60px;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.glow-orb-1 { width: 300px; height: 300px; background: var(--orange-500); opacity: 0.15; top: -100px; right: -50px; }
.glow-orb-2 { width: 250px; height: 250px; background: var(--yellow-400); opacity: 0.1; bottom: -50px; left: -50px; }

/* Login Page (SPA wrapper) */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px;
}

/* Login Card */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 24px;
    padding: 36px 28px;
    animation: fadeInUp 0.5s ease-out;
}

.login-header { text-align: center; margin-bottom: 32px; }

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.3);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p { color: var(--gray-400); font-size: 14px; }

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: var(--gray-800);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-400);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Outfit', sans-serif;
}

.auth-tab:hover { color: var(--white); }
.auth-tab.active { background: var(--gradient-warm); color: var(--black); }

.forgot-link { display: block; text-align: right; margin-top: -10px; margin-bottom: 18px; }
.forgot-link a { color: var(--orange-400); font-size: 13px; text-decoration: none; }
.forgot-link a:hover { text-decoration: underline; }

.signup-only { display: none; }
.signup-only.visible { display: block; }

.invite-hint { margin-top: 6px; font-size: 12px; color: var(--gray-500); }

.forgot-view { display: none; }
.forgot-view.active { display: block; }
.main-view.hidden { display: none; }

.back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-400);
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 24px;
}

.back-link:hover { color: var(--white); }
.back-link svg { width: 18px; height: 18px; }

.login-footer { text-align: center; margin-top: 20px; color: var(--gray-600); font-size: 13px; }

/* Social Login */
.social-login { margin-bottom: 8px; }

.btn-social {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid var(--gray-700);
    margin-bottom: 10px;
}

.btn-social:hover { transform: translateY(-1px); }
.btn-social:active { transform: translateY(0); }

.btn-google {
    background: var(--white);
    color: #1f1f1f;
}
.btn-google:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.social-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--gray-500);
    font-size: 13px;
}
.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-700);
}

/* Email Verification Banner */
.verify-banner {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.25);
    margin-bottom: 18px;
    animation: fadeIn 0.3s ease;
}
.verify-banner.visible { display: flex; }

.verify-banner-icon {
    flex-shrink: 0;
    color: var(--orange-400);
}

.verify-banner-text {
    flex: 1;
    min-width: 0;
}
.verify-banner-text strong {
    display: block;
    font-size: 14px;
    color: var(--white);
    margin-bottom: 2px;
}
.verify-banner-text p {
    font-size: 12px;
    color: var(--gray-400);
    margin: 0;
    word-break: break-all;
}

.verify-resend-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(249, 115, 22, 0.15);
    color: var(--orange-400);
    border: 1px solid rgba(249, 115, 22, 0.3);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}
.verify-resend-btn:hover { background: rgba(249, 115, 22, 0.25); }
.verify-resend-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================
   ONBOARDING-SPECIFIC STYLES
   ============================================ */
.onboarding { max-width: 480px; margin: 0 auto; padding: 0 20px calc(100px + env(safe-area-inset-bottom)); }
.onboarding-header { text-align: center; margin-bottom: 32px; padding-top: 20px; }
.onboarding-close { position: absolute; top: 8px; right: 8px; font-size: 18px; color: var(--gray-400); padding: 4px 10px; min-width: 0; }
.step { position: relative; }

.onboarding-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.3);
}

.onboarding-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.onboarding-title span {
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.onboarding-subtitle { color: var(--gray-400); font-size: 15px; }

.progress-bar { display: flex; gap: 8px; margin-bottom: 32px; }

.progress-step {
    flex: 1;
    height: 4px;
    background: var(--gray-800);
    border-radius: 2px;
    transition: all 0.3s;
}

.progress-step.active { background: var(--gradient-warm); }
.progress-step.completed { background: var(--green-500); }

.step { display: none; animation: fadeIn 0.3s ease; }
.step.active { display: block; }
.step-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.step-desc { color: var(--gray-400); font-size: 14px; margin-bottom: 24px; }
.skip-hint { text-align: center; margin-top: 16px; color: var(--gray-500); font-size: 13px; }

/* ============================================
   PROFILE-SPECIFIC STYLES
   ============================================ */

/* Profile Header */
.profile-page { max-width: 600px; margin: 0 auto; padding: 32px 20px 100px; }
.profile-header { margin-bottom: 24px; }

.profile-header-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

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

.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.profile-meta-item {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-400);
}

.profile-edit-btn {
    margin-top: 10px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-400);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.profile-edit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-300);
}

.avatar-container { position: relative; width: 90px; height: 90px; min-width: 90px; }

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--gradient-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.3);
    overflow: hidden;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-edit-btn {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 36px;
    height: 36px;
    background: var(--gray-800);
    border: 2px solid var(--gray-700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avatar-edit-btn:hover { background: var(--gray-700); border-color: var(--orange-500); }
.avatar-edit-btn svg { width: 16px; height: 16px; color: var(--gray-300); }

.profile-name { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.profile-email { color: var(--gray-400); font-size: 14px; }

/* Profile Stats (3-col) */
.profile-page .stats-grid { grid-template-columns: repeat(3, 1fr); }

.profile-page .stat-card {
    background: var(--glass-bg-raised);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border-subtle);
    text-align: center;
    padding: 16px 12px;
}

.profile-page .stat-card:hover { border-color: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

.profile-page .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 10px;
}

.stat-icon.meals { background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(74, 222, 128, 0.1) 100%); }
.stat-icon.workouts { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.1) 100%); }
.stat-icon.progress { background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(167, 139, 250, 0.1) 100%); }

.profile-page .stat-value { font-size: 24px; }
.stat-value.gradient-green { background: var(--gradient-green); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-value.gradient-blue { background: var(--gradient-blue); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-value.gradient-purple { background: var(--gradient-purple); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.profile-page .stat-label { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.3px; }

/* Macro Target Inputs */
.macro-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.macro-grid.two-col { grid-template-columns: repeat(2, 1fr); gap: 12px; }

.macro-grid .macro-item { text-align: center; }
.macro-grid .macro-item label { display: block; font-size: 11px; color: var(--gray-500); margin-bottom: 6px; }
.macro-grid .macro-item input { text-align: center; padding: 10px 8px; }
.macro-grid .macro-item.calories input { border-color: var(--orange-500); background: rgba(249, 115, 22, 0.1); }
.macro-grid .macro-item.protein input { border-color: var(--blue-400); }
.macro-grid .macro-item.carbs input { border-color: var(--green-400); }
.macro-grid .macro-item.fats input { border-color: var(--yellow-400); }

/* Injuries/Conditions */
.injury-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.injury-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 20px;
    font-size: 13px;
    color: var(--red-400);
}

.injury-tag .remove { cursor: pointer; opacity: 0.7; transition: opacity 0.2s; }
.injury-tag .remove:hover { opacity: 1; }

.add-injury-row { display: flex; gap: 8px; }
.add-injury-row input { flex: 1; }

.add-injury-btn {
    padding: 12px 16px;
    background: var(--gray-700);
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-injury-btn:hover { background: var(--gray-600); }

/* Preferences Card */
.prefs-card { padding: 20px; }

.pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pref-row:last-child { border-bottom: none; }

.pref-info { flex: 1; min-width: 0; padding-right: 12px; }
.pref-label { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.pref-desc { font-size: 12px; color: var(--gray-500); }

/* Notification Preferences */
.notif-prefs {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 4px;
}

.notif-pref-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.notif-pref-row:last-child { border-bottom: none; }

.notif-pref-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }

.notif-pref-info { flex: 1; min-width: 0; }
.notif-pref-label { font-size: 13px; font-weight: 600; color: var(--gray-300); }
.notif-pref-desc { font-size: 11px; color: var(--gray-500); }

.toggle-switch.small { width: 40px; height: 22px; }
.toggle-switch.small .toggle-slider::before { width: 16px; height: 16px; bottom: 3px; left: 3px; }
.toggle-switch.small input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}

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

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--gray-700);
    border-radius: 28px;
    transition: background 0.25s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.25s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--orange-500);
}

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

.toggle-switch.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Metrics row (profile mini cards) */
.metrics-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }

.metric-mini {
    background: var(--glass-bg-raised);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-mini-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: rgba(249, 115, 22, 0.15);
}

.metric-mini-info { flex: 1; }
.metric-mini-value { font-size: 16px; font-weight: 700; }
.metric-mini-label { font-size: 10px; color: var(--gray-500); text-transform: uppercase; }

/* Achievements Card */
.achievements-card { padding: 16px 20px; }

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
}

.achievement-item { padding: 8px 4px; }

.achievement-value {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.achievement-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* PATO Status Card */
.pato-status-card { padding: 20px; }

.pato-status-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pato-status-duck {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    transition: filter 0.5s ease;
}

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

.pato-status-health {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Plan Cards */
.plan-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.plan-card:active { transform: translateY(0); }

.plan-card-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.plan-card-icon { font-size: 28px; flex-shrink: 0; }

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

.plan-card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.plan-card-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-card-arrow {
    font-size: 24px;
    color: var(--gray-600);
    flex-shrink: 0;
}

/* Plan Modal */
.plan-description {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 16px;
}
.plan-targets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.plan-target-item {
    text-align: center;
    padding: 12px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.plan-target-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--orange-400);
    margin-bottom: 4px;
}

.plan-target-label {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
}

.plan-details {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.8;
}

.plan-details strong { color: var(--gray-300); }

/* ============================================
   Full-Page Plan Views (Meal Plan & Workout Plan)
   ============================================ */
.plan-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 27px 20px 100px;
}

/* Hero */
.plan-hero {
    margin-bottom: 16px;
}

.plan-hero-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.3;
}

.plan-hero-desc {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.6;
}

/* Plan Info Grid */
.plan-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.plan-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.plan-info-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-200);
    text-transform: capitalize;
}

/* Notes */
.plan-notes-text {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.6;
}

/* ── Week Tabs ── */
.plan-week-tabs-wrap {
    margin: 0 -20px 16px;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.plan-week-tabs-wrap::-webkit-scrollbar { display: none; }

.plan-week-tabs {
    display: flex;
    gap: 8px;
    padding: 2px 0;
}

.plan-week-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    color: var(--gray-300);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.plan-week-tab.active {
    background: rgba(249, 115, 22, 0.12);
    color: var(--orange-400);
    font-weight: 700;
    border-color: var(--orange-500);
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.15);
}

.plan-week-tab.deload:not(.active) {
    border-color: rgba(59, 130, 246, 0.25);
    color: #60A5FA;
}

/* Week header */
.plan-week-header {
    margin-bottom: 4px;
}

.plan-week-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.plan-week-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.plan-week-info-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--gray-400);
    text-transform: capitalize;
}

.plan-week-info-tag.deload {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.plan-week-notes {
    font-size: 13px;
    color: var(--gray-400);
    line-height: 1.5;
}

/* ── Day Cards ── */
.plan-day-card { padding: 0 !important; overflow: hidden; }

.plan-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.plan-day-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.plan-day-num {
    font-size: 16px;
    font-weight: 700;
}

.plan-day-type {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: capitalize;
}

.plan-day-type.training {
    background: rgba(249, 115, 22, 0.15);
    color: var(--orange-400);
}

.plan-day-type.rest {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.plan-day-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.plan-day-cal {
    font-size: 13px;
    font-weight: 600;
    color: var(--orange-400);
}

.plan-day-chevron {
    color: var(--gray-500);
    display: flex;
    transition: transform 0.2s ease;
}

.plan-day-chevron.expanded { transform: rotate(180deg); }

.plan-day-macros {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-500);
    padding: 0 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-day-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-day-target-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(249, 115, 22, 0.1);
    color: var(--orange-400);
    text-transform: capitalize;
}

.plan-day-meals {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-day-meals.collapsed {
    display: none;
}

/* ── Meal Items (shared by meal plan) ── */
.plan-meals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-meal-item {
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-meal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.plan-meal-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.plan-meal-type {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.plan-meal-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.plan-meal-cal {
    font-size: 13px;
    color: var(--orange-400);
    font-weight: 700;
    white-space: nowrap;
    padding-top: 2px;
}

/* Meta tags row */
.plan-meal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.plan-meal-tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-400);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 6px;
}

.plan-meal-tag.batch {
    background: rgba(34, 197, 94, 0.12);
    color: #4ADE80;
}

/* Macro pills */
.plan-meal-macros {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.macro-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.macro-pill.protein {
    background: rgba(34, 197, 94, 0.12);
    color: #4ADE80;
}

.macro-pill.carbs {
    background: rgba(59, 130, 246, 0.12);
    color: #60A5FA;
}

.macro-pill.fats {
    background: rgba(249, 115, 22, 0.12);
    color: var(--orange-400);
}

/* Sections (Ingredients / Instructions) */
.plan-meal-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-meal-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.plan-meal-foods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-meal-foods li {
    font-size: 13px;
    color: var(--gray-300);
    padding: 3px 0 3px 14px;
    position: relative;
    line-height: 1.4;
}

.plan-meal-foods li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--gray-600);
}

.plan-meal-instructions {
    font-size: 13px;
    color: var(--gray-400);
    line-height: 1.5;
}

/* ── Exercise Items (workout plan) ── */
.plan-exercise-item {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-phase-block {
    border-left: 3px solid rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.03);
}

.plan-exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}

.plan-exercise-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.plan-exercise-video-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--orange-400);
    text-decoration: none;
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 8px;
    transition: background 0.2s;
}
.plan-exercise-video-link:active {
    background: rgba(249, 115, 22, 0.2);
}

.plan-exercise-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.plan-exercise-phase-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--orange-400);
}

.plan-exercise-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.plan-exercise-order {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    background: rgba(255, 255, 255, 0.06);
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.plan-exercise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.plan-exercise-subs {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 6px;
    line-height: 1.4;
}

.plan-exercise-subs-label {
    font-weight: 600;
    color: var(--gray-400);
}

/* Adjust button */
.plan-adjust-btn {
    width: 100%;
    margin-top: 12px;
    font-family: 'Outfit', sans-serif;
}

/* Progress bar (workout plan) */
.plan-progress-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-progress-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-300);
}

.plan-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.plan-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange-500), var(--yellow-400));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.plan-progress-pct {
    font-size: 13px;
    color: var(--gray-500);
    text-align: right;
}

/* Empty state */
.plan-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.plan-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.plan-empty-state h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.plan-empty-state p {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

/* Profile Goals */
.profile-goal-row { padding: 4px 0; }

.profile-goal-label {
    font-size: 14px;
    color: var(--gray-300);
    margin-bottom: 10px;
}

.profile-goal-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.profile-goal-fill {
    height: 100%;
    background: var(--gradient-warm);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.profile-goal-percent {
    font-size: 12px;
    color: var(--gray-500);
}

/* Body Stats List */
.body-stats-list { display: flex; flex-direction: column; }

.body-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.body-stat-row:last-child { border-bottom: none; }

.body-stat-label {
    font-size: 14px;
    color: var(--gray-400);
}

.body-stat-value {
    font-size: 14px;
    font-weight: 700;
}

/* Pantry */
.pantry-list { display: flex; flex-direction: column; gap: 2px; }

.pantry-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-800);
}

.pantry-item:last-child { border-bottom: none; }

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

.pantry-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pantry-item-meta {
    display: flex;
    gap: 8px;
    margin-top: 2px;
    font-size: 12px;
    color: var(--gray-400);
}

.pantry-item-macros {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.pantry-macro {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--gray-800);
}

.pantry-macro.cal { color: var(--primary); }
.pantry-macro.pro { color: #60a5fa; }
.pantry-macro.carb { color: #fbbf24; }
.pantry-macro.fat { color: #f87171; }

.pantry-delete-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    margin-left: 8px;
}

.pantry-delete-btn:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

/* Pantry Full Page */
.pantry-product-list { display: flex; flex-direction: column; gap: 2px; }

.pantry-product-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pantry-product-card:last-child { border-bottom: none; }

.pantry-product-emoji {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--glass-bg-raised);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

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

.pantry-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pantry-product-detail {
    display: flex;
    gap: 8px;
    margin-top: 2px;
    font-size: 12px;
    color: var(--gray-400);
    flex-wrap: wrap;
}

.pantry-product-brand { font-weight: 500; }
.pantry-product-serving { opacity: 0.8; }
.pantry-product-notes { font-style: italic; opacity: 0.7; }

.pantry-product-macros {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.pantry-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--gray-800);
}

.pantry-pill.cal { color: var(--orange-500); }
.pantry-pill.pro { color: #60a5fa; }
.pantry-pill.carb { color: #fbbf24; }
.pantry-pill.fat { color: #f87171; }

.pantry-product-delete {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}

.pantry-product-delete:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.saved-meal-actions { display: flex; flex-direction: column; gap: 6px; align-items: center; flex-shrink: 0; }
.saved-meal-log { width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(249, 115, 22, 0.12); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; padding: 0; }
.saved-meal-log:hover { background: rgba(249, 115, 22, 0.25); }
.saved-meal-delete.pantry-product-delete { position: static; }

.pantry-add-hint {
    text-align: center;
    padding: 24px 16px;
    color: var(--gray-400);
    font-size: 13px;
}

.pantry-add-hint p { margin-bottom: 14px; }

.pantry-empty-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
    text-align: left;
}

.pantry-tip {
    font-size: 14px;
    padding: 12px 16px;
    background: var(--glass-bg-raised);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--gray-300);
}

.empty-state-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Kebab Menu */
.kebab-menu {
    position: absolute;
    top: 44px;
    right: 0;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    padding: 6px;
    min-width: 180px;
    display: none;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.kebab-menu.visible { display: block; }

.kebab-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.kebab-item:hover { background: var(--gray-700); }

.kebab-item.danger { color: var(--red-400); }

.kebab-divider {
    height: 1px;
    background: var(--gray-700);
    margin: 4px 0;
}

/* Top bar actions relative for kebab positioning */
.top-bar-actions { position: relative; }

/* ============================================
   RESET PASSWORD STYLES
   ============================================ */
.reset-container { width: 100%; max-width: 400px; }

.reset-card {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 24px;
    padding: 36px 28px;
}

.reset-header { text-align: center; margin-bottom: 32px; }

.reset-header-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.reset-header h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reset-header p { color: var(--gray-400); font-size: 14px; }

.success-view { display: none; text-align: center; }
.success-view.active { display: block; }
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-view h2 { font-size: 22px; margin-bottom: 8px; }
.success-view p { color: var(--gray-400); margin-bottom: 24px; }
.form-view.hidden { display: none; }

/* ============================================
   REWARDS-SPECIFIC STYLES
   ============================================ */

/* Rewards Page */
.rewards-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 32px 20px 100px;
}

/* Reward Hero (level/duck status) */
.reward-hero {
    text-align: center;
    padding: 24px 20px;
}

.reward-hero-duck {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    transition: filter 0.5s ease;
}

.reward-hero-info { margin-bottom: 16px; }

.reward-hero-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

.reward-hero-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-300);
}

.reward-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.reward-hero-stat { text-align: center; }

.reward-hero-stat-value {
    display: block;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 2px;
}

.reward-hero-stat-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
}

/* Badges Grid (full grid for rewards page) */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.badge-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.badge-grid-item:active { transform: scale(0.95); }

.badge-grid-item.earned { border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-grid-item.locked { opacity: 0.4; filter: grayscale(0.6); }

.badge-grid-icon { font-size: 24px; position: relative; display: inline-flex; }
.badge-lock-overlay { position: absolute; bottom: -4px; right: -6px; font-size: 12px; filter: none; }
.badge-grid-name { font-size: 10px; color: var(--gray-400); }
.badge-grid-hint { font-size: 9px; color: var(--gray-600); display: none; }

/* Badge Detail Modal */
.badge-detail-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.badge-detail-icon {
    font-size: 48px;
    line-height: 1;
}

.badge-detail-icon.locked {
    filter: grayscale(1);
    opacity: 0.5;
}

.badge-detail-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}

.badge-detail-rarity {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.badge-detail-desc {
    font-size: 14px;
    color: var(--gray-400);
    margin-top: 4px;
}

.badge-detail-earned-date {
    font-size: 13px;
    color: var(--green-400);
    margin-top: 4px;
}

.badge-detail-progress {
    width: 100%;
    margin-top: 12px;
}

.badge-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.badge-progress-fill {
    height: 100%;
    background: var(--gradient-warm);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.badge-progress-text {
    display: block;
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 6px;
}

.badge-detail-rewards {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.badge-reward-tag {
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    color: var(--gray-300);
}

/* Reward Filters */
.reward-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.reward-filters::-webkit-scrollbar { display: none; }

.reward-filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 20px;
    color: var(--gray-400);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.reward-filter-btn:hover { background: rgba(255, 255, 255, 0.08); }
.reward-filter-btn.active { background: var(--gradient-warm); color: var(--black); }

/* Reward Cards */
.rewards-list { display: flex; flex-direction: column; gap: 10px; }

.reward-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reward-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.reward-card.locked { opacity: 0.5; }

.reward-card-icon { font-size: 28px; flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }

.reward-card-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}

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

.reward-card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.reward-card-cost {
    font-size: 13px;
    color: var(--orange-400);
    font-weight: 600;
}

.reward-card-status { flex-shrink: 0; text-align: right; }

.reward-lock {
    font-size: 11px;
    color: var(--gray-500);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 8px;
}

.reward-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--green-400);
    background: rgba(34, 197, 94, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
}

.reward-need {
    font-size: 11px;
    color: var(--gray-500);
}

/* Reward Detail Modal */
.reward-detail-image {
    margin-bottom: 16px;
    border-radius: 14px;
    overflow: hidden;
}

.reward-detail-image img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.reward-detail-body { padding: 4px 0; }

.reward-detail-desc {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 16px;
}

.reward-detail-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 8px;
}

.reward-detail-cost-label {
    font-size: 13px;
    color: var(--gray-500);
}

.reward-detail-cost-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--orange-400);
}

.reward-detail-balance {
    font-size: 13px;
    color: var(--gray-500);
    text-align: right;
    margin-bottom: 12px;
}

.reward-detail-locked {
    font-size: 13px;
    color: var(--red-400);
    text-align: center;
    padding: 8px;
}

/* Redemption Success */
.redemption-success-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.redemption-code-display {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--gray-700);
    border-radius: 16px;
    padding: 20px;
    margin: 0 auto;
}

.redemption-code-label {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.redemption-code-big {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--orange-400);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.redemption-code-expires {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
}

/* Redemption History */
.redemptions-list { display: flex; flex-direction: column; gap: 8px; }

.redemption-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.redemption-item:last-child { border-bottom: none; }
.redemption-item.expired { opacity: 0.5; }
.redemption-item.used { opacity: 0.5; }

.redemption-info { flex: 1; }

.redemption-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.redemption-meta {
    font-size: 12px;
    color: var(--gray-500);
}

.redemption-code {
    font-size: 13px;
    font-weight: 700;
    color: var(--orange-400);
    font-family: monospace;
}

.redemption-code.expired { color: var(--gray-600); }

/* Reward Section Subtitle */
.reward-section-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    margin: -8px 0 14px 0;
}

/* Shipping Form */
.shipping-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.shipping-form-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-300);
    margin-bottom: 12px;
}

.form-group { margin-bottom: 10px; }

.shipping-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(38, 38, 38, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.shipping-input::placeholder { color: var(--gray-600); }

.shipping-input:focus {
    border-color: var(--orange-500);
}

.form-row {
    display: flex;
    gap: 10px;
}

/* Redemption Status Badges */
.redemption-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.redemption-status.pending {
    color: var(--orange-400);
    background: rgba(249, 115, 22, 0.15);
}

.redemption-status.shipped {
    color: var(--blue-400);
    background: rgba(59, 130, 246, 0.15);
}

.redemption-status.fulfilled {
    color: var(--green-400);
    background: rgba(34, 197, 94, 0.15);
}

/* Points Info (How to Earn) */
.points-info-list { display: flex; flex-direction: column; }

.points-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.points-info-item:last-child { border-bottom: none; }

.points-info-item.highlight {
    background: rgba(249, 115, 22, 0.05);
    margin: 4px -12px 0;
    padding: 10px 12px;
    border-radius: 10px;
    border-bottom: none;
}

.points-info-action {
    font-size: 14px;
    color: var(--gray-300);
}

.points-info-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--orange-400);
}

/* Level Up Modal */
.level-up-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: var(--space-xl);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.level-up-overlay.visible { opacity: 1; }

.level-up-modal {
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 24px;
    padding: 32px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.level-up-overlay.visible .level-up-modal { transform: scale(1); }

.level-up-icon { font-size: 56px; margin-bottom: 12px; }

.level-up-title {
    font-size: 24px;
    font-weight: 800;
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.level-up-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
}

.level-up-badge .arrow { color: var(--gray-500); }

.level-up-name {
    font-size: 16px;
    color: var(--gray-300);
    margin-bottom: 20px;
}

/* Badge Earned Toast */
.badge-toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--gray-900);
    border: 1px solid var(--orange-500);
    border-radius: 16px;
    z-index: 1100;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.2);
}

.badge-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.badge-toast-icon { font-size: 28px; }

.badge-toast-content { display: flex; flex-direction: column; }

.badge-toast-title {
    font-size: 11px;
    color: var(--orange-400);
    text-transform: uppercase;
    font-weight: 700;
}

.badge-toast-name {
    font-size: 15px;
    font-weight: 700;
}

/* ============================================
   Leaderboard
   ============================================ */

/* Filter toggle */
.lb-toggle {
    display: flex;
    background: var(--glass-bg-raised);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3px;
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.lb-toggle::-webkit-scrollbar { display: none; }

.lb-toggle-btn {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: none;
    border-radius: calc(var(--radius-lg) - 3px);
    background: transparent;
    color: var(--gray-400);
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.lb-toggle-btn.active {
    background: var(--gradient-warm);
    color: var(--black);
}

/* Podium */
.lb-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-md) 0;
    position: relative;
    margin-bottom: var(--space-lg);
}
.lb-podium::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary, #0a0a0a));
    pointer-events: none;
}

.lb-podium-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    max-width: 120px;
}

.lb-podium-slot.gold { order: 2; }
.lb-podium-slot.silver { order: 1; }
.lb-podium-slot.bronze { order: 3; }

.lb-podium-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gray-600);
}

.lb-podium-slot.gold .lb-podium-avatar {
    width: 80px;
    height: 80px;
    border-color: #FFD700;
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}

.lb-podium-slot.silver .lb-podium-avatar {
    border-color: #C0C0C0;
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.25);
}

.lb-podium-slot.bronze .lb-podium-avatar {
    border-color: #CD7F32;
    box-shadow: 0 0 12px rgba(205, 127, 50, 0.25);
}

.lb-podium-fallback {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: var(--glass-bg-raised);
    border: 3px solid var(--gray-600);
}

.lb-podium-slot.gold .lb-podium-fallback {
    width: 80px;
    height: 80px;
    font-size: 36px;
    border-color: #FFD700;
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}

.lb-podium-slot.silver .lb-podium-fallback {
    border-color: #C0C0C0;
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.25);
}

.lb-podium-slot.bronze .lb-podium-fallback {
    border-color: #CD7F32;
    box-shadow: 0 0 12px rgba(205, 127, 50, 0.25);
}

.lb-podium-medal {
    font-size: 20px;
    line-height: 1;
}

.lb-podium-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-podium-xp {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
}

.lb-podium-base {
    width: 100%;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: var(--glass-bg-raised);
    border: 1px solid var(--glass-border);
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--gray-400);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.lb-podium-slot.gold .lb-podium-base {
    height: 72px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.15) 0%, var(--glass-bg-raised) 100%);
    color: #FFD700;
}

.lb-podium-slot.silver .lb-podium-base {
    height: 52px;
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.1) 0%, var(--glass-bg-raised) 100%);
    color: #C0C0C0;
}

.lb-podium-slot.bronze .lb-podium-base {
    height: 36px;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.1) 0%, var(--glass-bg-raised) 100%);
    color: #CD7F32;
}

/* Your Position card */
.lb-me-card {
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin: 0 0 var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.lb-me-card .lb-rank {
    background: var(--gradient-warm);
    color: var(--black);
    font-weight: 700;
}

.lb-me-card .lb-name {
    color: var(--orange-400);
    font-weight: 700;
}

.lb-me-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--orange-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-xs);
}

/* List rows */
.lb-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    transition: background 0.15s;
}

.lb-row.lb-row-me {
    background: rgba(249, 115, 22, 0.06);
}

.lb-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-400);
    background: var(--glass-bg-raised);
    flex-shrink: 0;
}

.lb-rank-medal {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.lb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.lb-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--glass-bg-raised);
    flex-shrink: 0;
}

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

.lb-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-meta {
    font-size: 11px;
    color: var(--gray-500);
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.lb-you-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--orange-400);
    background: rgba(249, 115, 22, 0.15);
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.lb-xp {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-300);
    white-space: nowrap;
    flex-shrink: 0;
}

.lb-xp span {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-500);
}

.lb-separator {
    text-align: center;
    color: var(--gray-600);
    font-size: 18px;
    letter-spacing: 4px;
    padding: var(--space-sm) 0;
}

/* Dashboard preview card */
.lb-preview-card {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.lb-preview-card:active {
    transform: scale(0.98);
}

.lb-preview-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.lb-preview-icon {
    font-size: 32px;
    line-height: 1;
}

.lb-preview-info {
    flex: 1;
}

.lb-preview-xp {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}

.lb-preview-xp span {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-400);
}

.lb-preview-cta {
    font-size: 12px;
    color: var(--gray-500);
}

.lb-preview-arrow {
    font-size: 18px;
    color: var(--gray-600);
}

/* Leaderboard empty state */
.lb-empty {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--gray-500);
}

.lb-empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
}

/* Skeleton loading */
.lb-skel-podium {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-md);
}

.lb-skel-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--glass-bg-raised);
    animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.lb-skel-circle.lg {
    width: 80px;
    height: 80px;
}

.lb-skel-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
}

.lb-skel-bar {
    height: 14px;
    border-radius: 4px;
    background: var(--glass-bg-raised);
    animation: skeleton-pulse 1.2s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ============================================
   Classes View (Member App)
   ============================================ */
.classes-view {
    padding: var(--space-lg);
    padding-top: calc(var(--space-lg) + 40px);
}

/* Date strip — horizontal scrollable day picker */
.classes-date-strip-wrap {
    position: relative;
}
.classes-date-strip-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 2;
}
.classes-date-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-lg);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.classes-date-strip::-webkit-scrollbar { display: none; }

.date-strip-month {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    min-width: 40px;
    flex-shrink: 0;
    padding: 0 2px;
}

.date-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    padding: 8px 6px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.date-chip:hover {
    border-color: var(--glass-border-subtle);
    background: var(--glass-bg-raised);
}
.date-chip.active {
    background: var(--orange-500);
    border-color: var(--orange-500);
    color: #fff;
}
.date-chip-day {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.date-chip-num {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.date-chip-dots {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-top: 3px;
    min-height: 5px;
}
.date-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}
.date-chip.active .date-dot {
    opacity: 0.8;
}
@keyframes spin-once {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Session cards */
.class-session-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.class-session-card.booked {
    border-color: rgba(34, 197, 94, 0.3);
}
.class-session-color {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
    align-self: stretch;
}
.class-session-image {
    width: 80px;
    min-height: 80px;
    border-radius: 10px 0 0 10px;
    flex-shrink: 0;
    align-self: stretch;
    background-size: cover;
    background-position: center;
}
.class-session-body {
    flex: 1;
    min-width: 0;
}
.class-session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}
.class-session-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--white);
}
.class-session-time {
    font-size: 13px;
    color: var(--gray-400);
    white-space: nowrap;
    margin-left: 8px;
}
.class-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}
.class-session-meta span::after {
    content: '\00b7';
    margin-left: 6px;
    color: var(--gray-600);
}
.class-session-meta span:last-child::after { content: ''; }
.class-meta-trainer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.class-trainer-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}
.class-session-desc {
    font-size: 13px;
    color: var(--gray-400);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.class-session-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}
.class-session-spots {
    font-size: 13px;
    color: var(--green-500);
    font-weight: 500;
}
.class-session-spots.full {
    color: var(--red-400);
}
.class-session-card.booked .class-session-spots {
    color: var(--green-400);
}

/* Book / Cancel buttons */
.class-btn {
    padding: 8px 18px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.class-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.class-btn-book {
    background: var(--orange-500);
    color: #fff;
}
.class-btn-book:hover:not(:disabled) {
    background: var(--orange-600);
}
.class-btn-cancel {
    background: transparent;
    color: var(--gray-400);
    border: 1px solid var(--glass-border);
}
.class-btn-cancel:hover {
    color: var(--red-400);
    border-color: var(--red-400);
}
.class-btn-full {
    background: var(--gray-800);
    color: var(--gray-500);
    font-size: 12px;
    padding: 6px 12px;
}

/* Refresh button next to title */
.classes-refresh-btn {
    background: none;
    border: none;
    color: var(--orange-500);
    cursor: pointer;
    padding: 4px;
    margin-left: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    transition: color 0.3s;
}
.classes-refresh-btn:hover {
    color: var(--yellow-400, #FBBF24);
}
.classes-refresh-btn.spinning svg {
    animation: classes-refresh-spin 0.8s ease;
}
@keyframes classes-refresh-spin {
    0%   { transform: rotate(0deg);   color: var(--orange-500); }
    33%  { transform: rotate(120deg); color: #FBBF24; }
    66%  { transform: rotate(240deg); color: #22C55E; }
    100% { transform: rotate(360deg); color: var(--orange-500); }
}

/* Past / completed sessions */
.class-session-card.past {
    opacity: 0.5;
}
.class-session-badge-past {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.1);
    color: var(--gray-400);
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Class detail bottom sheet */
.class-detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.class-detail-overlay.visible { opacity: 1; }
.class-detail-sheet {
    width: 100%;
    max-width: 500px;
    background: var(--gray-900);
    border-radius: 20px 20px 0 0;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}
.class-detail-overlay.visible .class-detail-sheet { transform: translateY(0); }
.class-detail-bar {
    height: 4px;
    border-radius: 20px 20px 0 0;
}
.class-detail-hero {
    height: 160px;
    border-radius: 20px 20px 0 0;
    background-size: cover;
    background-position: center;
}
.class-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.class-detail-content {
    padding: var(--space-xl);
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
}
.class-detail-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}
.class-detail-date {
    font-size: 14px;
    color: var(--gray-400);
}
.class-detail-time {
    font-size: 16px;
    font-weight: 600;
    color: var(--orange-500);
    margin-bottom: var(--space-md);
}
.class-detail-desc {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.5;
    margin-bottom: var(--space-lg);
}
.class-detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}
.class-detail-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    color: var(--gray-300);
}
.class-detail-icon { font-size: 16px; width: 24px; text-align: center; }
.class-detail-trainer-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.class-detail-booked-badge {
    background: rgba(34,197,94,0.15);
    color: #22C55E;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-md);
}
.class-detail-past-badge {
    background: rgba(255,255,255,0.05);
    color: var(--gray-500);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    margin-bottom: var(--space-md);
}

.class-session-card { cursor: pointer; }

.classes-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--gray-500);
    font-size: 14px;
}

.classes-skeleton {
    padding: 0;
}
}
