/* =====================================================
   NutriAI — Complete Stylesheet
   Design: Organic/Natural with botanical emerald palette
   Fonts: Playfair Display (headings) + DM Sans (body)
   ===================================================== */

:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --red-400: #f87171;
    --red-500: #ef4444;
    --blue-500: #3b82f6;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 50px -10px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Reset ── */
* { box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--slate-800);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .brand-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
}

a { text-decoration: none; color: var(--green-600); }
a:hover { color: var(--green-700); }
.fw-600 { font-weight: 600; }

/* ── Navbar ── */
.navbar-custom {
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.brand-icon { font-size: 1.4rem; margin-right: 6px; }
.brand-name { font-size: 1.4rem; color: var(--slate-900); letter-spacing: -0.3px; }

.navbar-custom .nav-link {
    color: var(--slate-600);
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.navbar-custom .nav-link:hover { color: var(--green-600); background: var(--green-50); }

.btn-nav-cta {
    background: var(--green-600) !important;
    color: var(--white) !important;
    padding: 8px 18px !important;
    border-radius: 100px !important;
    font-size: 0.875rem;
}
.btn-nav-cta:hover { background: var(--green-700) !important; transform: translateY(-1px); }

/* ── Buttons ── */
.btn-primary-custom {
    background: var(--green-600);
    color: var(--white);
    border: none;
    border-radius: 100px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}
.btn-primary-custom:hover {
    background: var(--green-700);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}

.btn-success-custom {
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    color: var(--white);
    border: none;
    border-radius: 100px;
    padding: 14px 36px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}
.btn-success-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
    color: var(--white);
}

.btn-outline-primary-custom {
    background: transparent;
    color: var(--green-600);
    border: 2px solid var(--green-600);
    border-radius: 100px;
    padding: 10px 24px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-outline-primary-custom:hover {
    background: var(--green-600);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-cta-white {
    background: var(--white);
    color: var(--green-700);
    border: none;
    border-radius: 100px;
    padding: 14px 36px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}
.btn-cta-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: var(--green-700);
}

/* ── Section Common ── */
.section-tag {
    display: inline-block;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--slate-900);
    margin-bottom: 10px;
}

.section-sub {
    color: var(--slate-600);
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto;
}

/* ── Hero ── */
.hero-section {
    background: var(--slate-50);
    padding: 80px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-bg-decor {
    position: absolute;
    top: -200px;
    right: -300px;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,197,94,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
}

/* Trust badges row beneath Hero CTA */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--white);
    color: var(--slate-800) !important;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1.5px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    color: var(--slate-900);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.text-accent { color: var(--green-600); }

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--slate-600);
    max-width: 500px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
}

.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.3rem; font-weight: 700; color: var(--slate-900); font-family: 'Playfair Display', serif; }
.stat-label { font-size: 0.75rem; color: var(--slate-500); }
.stat-divider { width: 1px; height: 36px; background: var(--slate-300); }

/* ── Hero Visual Cards (3D Glassmorphism) ── */
.hero-graphic-col {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.cards-3d-scene {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 460px;
    transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.cards-3d-scene:hover {
    transform: rotateY(-5deg) rotateX(2deg);
}

.card-3d {
    position: absolute;
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.6);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform-style: preserve-3d;
}

.float-anim-1 { animation: float3d 6s ease-in-out infinite; }
.float-anim-2 { animation: float3d 8s ease-in-out infinite 1s; }
.float-anim-3 { animation: float3d 7s ease-in-out infinite 2s; }

@keyframes float3d {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-15px) translateZ(15px); }
}

/* Specific Cards */
.card-main-meal {
    top: 10%;
    left: 10%;
    width: 280px;
    z-index: 3;
    transform: translateZ(40px);
}

.card-sub-macro {
    top: 55%;
    right: 0%;
    width: 220px;
    z-index: 2;
    transform: translateZ(10px);
    display: flex;
    align-items: center;
}

.card-sub-tip {
    bottom: 5%;
    left: 0%;
    width: 240px;
    z-index: 4;
    transform: translateZ(60px);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}

/* Card Interiors */
.card-header-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.badge-tag {
    background: var(--green-100);
    color: var(--green-700);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
}
.card-main-meal .time { font-size: 0.8rem; color: var(--slate-500); font-weight: 600; }
.meal-name { font-size: 1.1rem; color: var(--slate-900); margin-bottom: 16px; font-family: 'DM Sans', sans-serif;}

.macro-bars { display: flex; flex-direction: column; gap: 10px; }
.m-bar { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; font-weight: 600; }
.m-bar .label { color: var(--slate-500); width: 14px; }
.m-bar .track { flex: 1; height: 6px; background: rgba(0,0,0,0.05); border-radius: 10px; overflow: hidden; }
.m-bar .fill { height: 100%; border-radius: 10px; }
.fill-p { background: #3b82f6; }
.fill-c { background: #f59e0b; }
.fill-f { background: #ec4899; }
.m-bar .val { color: var(--slate-700); width: 28px; text-align: right; }

.macro-ring-container {
    position: relative;
    width: 70px;
    height: 70px;
}
.circular-chart { display: block; margin: 0 auto; max-width: 100%; max-height: 250px; }
.circle-bg { fill: none; stroke: rgba(34,197,94,0.15); stroke-width: 3.8; }
.circle { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke: #22c55e; animation: progress 1s ease-out forwards; }
.macro-val {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
    line-height: 1.1;
    color: var(--slate-900);
}
.macro-val small { font-size: 0.6rem; color: var(--slate-500); }

.card-sub-tip .icon-box {
    width: 40px; height: 40px;
    background: #fef2f2;
    color: #ef4444;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.tip-content h6 { margin: 0 0 2px; font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 700; color: var(--slate-900); }
.tip-content p { margin: 0; font-size: 0.8rem; color: var(--slate-500); }

@media (max-width: 991px) {
    .cards-3d-scene { transform: rotateY(0) rotateX(0); max-width: 380px; margin: 0 auto; min-height: 480px; }
    .hero-graphic-col { min-height: 480px; }
}

/* ── 3D Scene Hero & Glassmorphism ── */
.glass-hero-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Micro-Interaction: Liquid Button */
.btn-liquid {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-liquid:hover {
    transform: translateY(-2px) scale(1.02);
}
.btn-liquid .liquid-bg {
    position: absolute;
    top: -50px;
    left: 0;
    width: 200%;
    height: 200px;
    background: var(--green-500);
    border-radius: 40%;
    transition: transform 0.6s ease;
    z-index: 1;
}
.btn-liquid:hover .liquid-bg {
    transform: translateY(-20px) rotate(15deg);
}

/* ── How It Works ── */
.section-how {
    padding: 90px 0;
    background: var(--white);
}

.section-header { margin-bottom: 20px; }

.how-card {
    background: var(--slate-50);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    height: 100%;
}

.how-card:hover {
    border-color: var(--green-300);
    background: var(--white);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.how-card-featured {
    background: var(--green-600);
    color: var(--white);
}
.how-card-featured h4, .how-card-featured p { color: var(--white); }
.how-card-featured:hover { background: var(--green-700); border-color: transparent; }

.how-step {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--green-200);
    font-family: 'Playfair Display', serif;
    line-height: 1;
    margin-bottom: 12px;
}
.how-card-featured .how-step { color: rgba(255,255,255,0.3); }

.how-icon { font-size: 2rem; margin-bottom: 12px; }
.how-card h4 { font-size: 1.2rem; margin-bottom: 10px; color: var(--slate-900); }
.how-card p { color: var(--slate-600); font-size: 0.9rem; margin: 0; }

/* ── Benefits ── */
.section-benefits {
    padding: 90px 0;
    background: var(--slate-50);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.benefit-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--transition);
    border: 1px solid var(--slate-200);
}

.benefit-item:hover { border-color: var(--green-300); box-shadow: var(--shadow); }
.benefit-icon { font-size: 1.5rem; flex-shrink: 0; }
.benefit-item h5 { font-size: 0.95rem; margin-bottom: 4px; color: var(--slate-900); }
.benefit-item p { font-size: 0.82rem; color: var(--slate-500); margin: 0; }

/* ── Metrics Grid ── */
.section-metrics { padding: 80px 0; background: var(--white); }

.metric-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    transition: var(--transition);
}
.metric-card:hover { border-color: var(--green-400); background: var(--green-50); transform: translateY(-2px); }
.metric-icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.metric-card h6 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.metric-card small { color: var(--slate-500); font-size: 0.78rem; }

/* ── CTA Banner ── */
.section-cta {
    background: linear-gradient(135deg, var(--green-700), var(--green-500));
    padding: 80px 0;
    color: var(--white);
}
.section-cta h2 { color: var(--white); font-size: 2.2rem; margin-bottom: 12px; }
.section-cta p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 30px; }

/* ── Footer ── */
.site-footer {
    background: var(--slate-900);
    color: var(--slate-300);
    padding: 60px 0 20px;
}
.footer-brand .brand-name { color: var(--white); }
.footer-desc { font-size: 0.875rem; color: var(--slate-400); line-height: 1.7; }
.footer-heading { color: var(--white); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--slate-400); font-size: 0.875rem; transition: var(--transition); }
.footer-links a:hover { color: var(--green-400); }
.footer-small { font-size: 0.8rem; color: var(--slate-400); line-height: 1.7; }
.footer-bottom { border-top: 1px solid var(--slate-800); padding-top: 20px; margin-top: 20px; text-align: center; font-size: 0.8rem; color: var(--slate-500); }

/* ── Questionnaire ── */
.questionnaire-page { background: var(--slate-50); min-height: 100vh; }
.page-title { font-size: 2rem; color: var(--slate-900); }
.page-sub { color: var(--slate-500); font-size: 1rem; }

.q-progress-container { max-width: 600px; margin: 0 auto; }
.q-progress-bar { height: 6px; background: var(--slate-200); border-radius: 10px; overflow: hidden; }
.q-progress-fill { height: 100%; background: linear-gradient(90deg, var(--green-500), var(--green-400)); border-radius: 10px; transition: width 0.4s ease; }
.q-progress-text { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--slate-500); margin-top: 6px; }

.step-indicators {
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: var(--slate-200);
    color: var(--slate-500);
    border: 2px solid transparent;
}
.step-dot.active { background: var(--green-600); color: var(--white); transform: scale(1.1); }
.step-dot.done { background: var(--green-100); color: var(--green-600); border-color: var(--green-300); }

.q-section { display: none; animation: fadeIn 0.35s ease; }
.q-section.active { display: block; }

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

.q-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 36px 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--slate-200);
    max-width: 800px;
    margin: 0 auto;
}

.q-section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--slate-100);
}

.q-section-icon {
    width: 50px;
    height: 50px;
    background: var(--green-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.q-section-header h4 { margin-bottom: 4px; font-size: 1.2rem; color: var(--slate-900); }
.q-section-header p { margin: 0; color: var(--slate-500); font-size: 0.875rem; }

.q-input {
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--slate-800);
    transition: var(--transition);
}
.q-input:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    outline: none;
}

/* Goal Cards */
.goal-cards { display: flex; gap: 16px; flex-wrap: wrap; }
.goal-card { cursor: pointer; flex: 1; min-width: 150px; }
.goal-card input { display: none; }
.goal-card-inner {
    background: var(--slate-50);
    border: 2px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
    transition: var(--transition);
}
.goal-card input:checked + .goal-card-inner {
    border-color: var(--green-500);
    background: var(--green-50);
}
.goal-card:hover .goal-card-inner { border-color: var(--green-300); }
.goal-icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.goal-card h5 { font-size: 0.95rem; margin-bottom: 4px; color: var(--slate-900); }
.goal-card p { font-size: 0.78rem; color: var(--slate-500); margin: 0; }

/* Radio/Checkbox Pills */
.radio-pills, .checkbox-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill, .checkbox-pill { cursor: pointer; }
.radio-pill input, .checkbox-pill input { display: none; }
.radio-pill span, .checkbox-pill span {
    display: inline-block;
    padding: 8px 18px;
    background: var(--slate-100);
    border: 1.5px solid var(--slate-200);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--slate-700);
}
.radio-pill input:checked + span,
.checkbox-pill input:checked + span {
    background: var(--green-600);
    border-color: var(--green-600);
    color: var(--white);
}
.radio-pill:hover span, .checkbox-pill:hover span {
    border-color: var(--green-400);
    color: var(--green-700);
}

/* Stress Cards */
.stress-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.stress-card { cursor: pointer; flex: 1; min-width: 100px; }
.stress-card input { display: none; }
.stress-card > div {
    border: 2px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    transition: var(--transition);
    font-size: 0.85rem;
}
.stress-card input:checked + div { border-color: var(--green-500); background: var(--green-50); }
.stress-low input:checked + div { border-color: #22c55e; background: #f0fdf4; }
.stress-mod input:checked + div { border-color: #f59e0b; background: #fffbeb; }
.stress-high input:checked + div { border-color: #ef4444; background: #fef2f2; }

/* Work Cards */
.work-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.work-card { cursor: pointer; flex: 1; min-width: 120px; }
.work-card input { display: none; }
.work-card-inner {
    border: 2px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    transition: var(--transition);
    font-size: 0.85rem;
}
.work-card-inner span { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.work-card-inner strong { display: block; margin-bottom: 4px; }
.work-card-inner small { color: var(--slate-500); font-size: 0.75rem; }
.work-card input:checked + .work-card-inner { border-color: var(--green-500); background: var(--green-50); }

/* Water Cards */
.water-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.water-card { cursor: pointer; flex: 1; min-width: 130px; }
.water-card input { display: none; }
.water-card-inner {
    border: 2px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 20px 14px;
    text-align: center;
    transition: var(--transition);
}
.water-icon { font-size: 1.4rem; display: block; margin-bottom: 8px; }
.water-card-inner strong { display: block; font-size: 0.9rem; margin-bottom: 4px; }
.water-card-inner small { color: var(--slate-500); font-size: 0.75rem; }
.water-card input:checked + .water-card-inner { border-color: var(--blue-500); background: #eff6ff; }

/* BMI Preview */
.bmi-preview {
    background: var(--slate-50);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
}
.bmi-preview-label { font-size: 0.75rem; color: var(--slate-500); margin-bottom: 4px; }
.bmi-value-large { font-size: 2.5rem; font-weight: 800; font-family: 'Playfair Display', serif; color: var(--slate-900); }
.bmi-category { font-size: 0.85rem; font-weight: 600; }
.bmi-normal { color: var(--green-600); }
.bmi-low { color: var(--blue-500); }
.bmi-over { color: var(--amber-500); }
.bmi-obese { color: var(--red-500); }

.final-review {
    background: var(--green-50);
    border: 1.5px solid var(--green-200);
    border-radius: var(--radius);
    padding: 20px 24px;
}
.final-review h5 { color: var(--green-700); }
.final-review p { color: var(--slate-600); margin: 0; font-size: 0.9rem; }

.q-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 800px;
    margin: 30px auto;
    padding: 0 16px;
}

/* ── AI Loading Overlay ── */
.ai-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.ai-loading-content {
    text-align: center;
    color: var(--white);
    max-width: 400px;
    padding: 40px;
}

.ai-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
}
.spinner-ring:nth-child(1) { border-top-color: var(--green-400); animation: spin 1.2s linear infinite; }
.spinner-ring:nth-child(2) { width: 70%; height: 70%; top: 15%; left: 15%; border-top-color: var(--amber-400); animation: spin 0.9s linear infinite reverse; }
.spinner-ring:nth-child(3) { width: 40%; height: 40%; top: 30%; left: 30%; border-top-color: var(--white); animation: spin 0.6s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.ai-loading-icon { font-size: 2.5rem; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.ai-spinner { position: relative; }

.ai-loading-title { font-size: 1.4rem; margin-bottom: 8px; }
.ai-loading-sub { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 24px; }

.loading-steps { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.loading-step {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}
.loading-step.active {
    background: var(--green-600);
    color: var(--white);
}
.loading-step.done {
    color: var(--green-400);
    background: rgba(34,197,94,0.1);
}

/* ── Results Page ── */
.results-page { background: var(--slate-50); min-height: 100vh; }

.results-header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--slate-900); }
.results-sub { color: var(--slate-500); margin-bottom: 24px; }
.results-celebration { font-size: 3rem; margin-bottom: 12px; }
.results-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.metric-result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    border: 1.5px solid var(--slate-200);
    transition: var(--transition);
}
.metric-result-card.featured { border-color: var(--green-400); background: var(--green-50); }
.metric-result-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.metric-result-icon { font-size: 1.8rem; margin-bottom: 8px; }
.metric-result-value { font-size: 1.9rem; font-weight: 800; color: var(--slate-900); font-family: 'Playfair Display', serif; }
.metric-result-label { font-size: 0.75rem; color: var(--slate-500); margin-bottom: 8px; }
.metric-result-badge { font-size: 0.72rem; font-weight: 600; padding: 3px 10px; border-radius: 100px; }
.badge-success { background: var(--green-100); color: var(--green-700); }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-info { background: #eff6ff; color: #1d4ed8; }

.results-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 28px 30px;
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
}

.card-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

/* Macros Display */
.macros-display { display: flex; gap: 16px; justify-content: center; margin-bottom: 20px; }
.macro-item { text-align: center; }
.macro-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-weight: 700;
    font-size: 0.9rem;
}
.macro-protein .macro-circle { background: #dcfce7; color: #166534; }
.macro-carbs .macro-circle { background: #fef3c7; color: #92400e; }
.macro-fats .macro-circle { background: #fee2e2; color: #991b1b; }
.macro-name { font-size: 0.75rem; font-weight: 600; color: var(--slate-700); }
.macro-cal { font-size: 0.7rem; color: var(--slate-400); }

/* Health Score */
.health-score-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 8px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    flex-direction: column;
}
.score-success { border-color: var(--green-500); }
.score-info { border-color: var(--blue-500); }
.score-warning { border-color: var(--amber-500); }
.score-danger { border-color: var(--red-500); }
.health-score-num { font-size: 2rem; font-weight: 800; font-family: 'Playfair Display', serif; }
.health-score-100 { font-size: 0.7rem; color: var(--slate-400); }
.health-score-label { font-size: 0.9rem; font-weight: 600; }

.health-insights { display: flex; flex-direction: column; gap: 8px; }
.insight-item { font-size: 0.82rem; padding: 8px 12px; border-radius: var(--radius-sm); }
.insight-positive { background: var(--green-50); color: var(--green-700); }
.insight-warning { background: #fffbeb; color: #92400e; }

/* Meal Cards */
.meal-day-tabs { gap: 4px; }
.meal-day-tabs .nav-link {
    background: var(--slate-100);
    color: var(--slate-600);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    padding: 6px 14px;
    font-weight: 500;
    white-space: nowrap;
}
.meal-day-tabs .nav-link.active { background: var(--green-600); color: var(--white); }

.meal-card {
    background: var(--slate-50);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}
.meal-card:hover { border-color: var(--green-300); box-shadow: var(--shadow); }
.meal-card-header {
    background: var(--white);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--slate-200);
}
.meal-icon { font-size: 1rem; }
.meal-type { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--slate-600); flex: 1; }
.meal-calories { font-size: 0.72rem; font-weight: 700; color: var(--green-600); }
.meal-card-body { padding: 14px; }
.meal-name { font-size: 0.9rem; font-weight: 700; color: var(--slate-900); margin-bottom: 4px; }
.meal-desc { font-size: 0.78rem; color: var(--slate-500); margin-bottom: 10px; line-height: 1.4; }
.meal-macros { display: flex; gap: 6px; flex-wrap: wrap; }
.macro-tag { font-size: 0.7rem; padding: 2px 8px; border-radius: 100px; font-weight: 600; }
.protein-tag { background: #dcfce7; color: #166534; }
.carb-tag { background: #fef3c7; color: #92400e; }
.fat-tag { background: #fee2e2; color: #991b1b; }

/* Lifestyle Tips */
.tips-list { display: flex; flex-direction: column; gap: 10px; }
.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--slate-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--green-400);
}
.tip-number {
    width: 24px;
    height: 24px;
    background: var(--green-600);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}
.tip-item p { margin: 0; font-size: 0.875rem; color: var(--slate-700); }

/* User Summary Grid */
.user-summary-grid { display: flex; flex-direction: column; gap: 10px; }
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.85rem;
}
.summary-label { color: var(--slate-500); font-weight: 500; }
.summary-value { font-weight: 600; color: var(--slate-800); }

/* ── Dashboard ── */
.dashboard-page { background: var(--slate-50); min-height: 100vh; }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}
.dashboard-greeting { font-size: 1.8rem; color: var(--slate-900); margin-bottom: 4px; }
.dashboard-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.dash-stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    border: 1.5px solid var(--slate-200);
    transition: var(--transition);
}
.dash-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dash-stat-icon { font-size: 1.5rem; margin-bottom: 6px; }
.dash-stat-value { font-size: 1.7rem; font-weight: 800; color: var(--slate-900); font-family: 'Playfair Display', serif; }
.dash-stat-label { font-size: 0.75rem; color: var(--slate-500); }
.dash-stat-sub { font-size: 0.75rem; font-weight: 500; margin-top: 2px; }

.dash-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--slate-200);
    overflow: hidden;
}
.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--slate-100);
}
.dash-card-header h5 { margin: 0; font-size: 0.95rem; font-family: 'DM Sans', sans-serif; font-weight: 700; }
.dash-card-body { padding: 20px 24px; }

.empty-chart-state { text-align: center; padding: 40px; color: var(--slate-400); }
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; }

.macro-legend { display: flex; flex-direction: column; gap: 4px; }
.macro-leg-item { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--slate-600); }
.macro-leg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.protein-dot { background: var(--green-500); }
.carb-dot { background: var(--amber-500); }
.fat-dot { background: var(--red-500); }

.goal-tracker-item { font-size: 0.85rem; }
.goal-tracker-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.goal-progress { height: 6px; border-radius: 10px; }

.dash-meal-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    padding: 12px;
}
.dash-meal-header { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--slate-500); margin-bottom: 4px; }
.dash-meal-name { font-size: 0.85rem; font-weight: 600; color: var(--slate-800); margin-bottom: 4px; }
.dash-meal-cal { font-size: 0.75rem; color: var(--green-600); font-weight: 600; }

.dash-tip-item {
    padding: 10px 12px;
    background: var(--slate-50);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--slate-700);
    border-left: 3px solid var(--green-400);
}

/* Modal */
.modal-custom { border-radius: var(--radius-xl); border: none; box-shadow: var(--shadow-lg); }
.modal-custom .modal-header { border-bottom: 1px solid var(--slate-100); padding: 20px 24px; }
.modal-custom .modal-body { padding: 20px 24px; }
.modal-custom .modal-footer { border-top: 1px solid var(--slate-100); padding: 16px 24px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .q-card { padding: 24px 20px; }
    .goal-cards { flex-direction: column; }
    .hero-stats { flex-direction: column; gap: 12px; }
    .stat-divider { display: none; }
    .q-nav-buttons { flex-direction: column; align-items: stretch; }
    .results-cta-row { flex-direction: column; }
    .dashboard-header { flex-direction: column; }
    .benefits-grid { grid-template-columns: 1fr; }
    .macros-display { justify-content: space-around; }
    .water-cards { flex-direction: column; }
    .work-cards { flex-direction: column; }
    .stress-cards { flex-direction: column; }
}

@media (max-width: 480px) {
    .hero-section { padding: 50px 0; }
    .section-how, .section-benefits, .section-metrics { padding: 60px 0; }
}

/* ── Print Styles ── */
@media print {
    .navbar-custom, .site-footer, .btn, nav { display: none !important; }
    .results-page { background: white; }
    .results-card { box-shadow: none; border: 1px solid #ccc; }
}

/* ═══════════════════════════════════════════════════════
   EATWELL + HARVARD PLATE ENHANCEMENTS
   ═══════════════════════════════════════════════════════ */

/* Eatwell section card */
.eatwell-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #fefce8 100%);
    border: 1.5px solid var(--green-200);
}

/* Plate Visual */
.plate-visual-container {
    position: relative;
    display: inline-block;
}
.plate-center-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-700);
    line-height: 1.2;
    pointer-events: none;
}
.plate-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.plate-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--slate-600);
    font-weight: 500;
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Plate Rules Grid */
.plate-rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.plate-rule-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1.5px solid;
    transition: var(--transition);
}
.plate-rule-card:hover { transform: translateY(-1px); }
.plate-rule-icon { font-size: 1.4rem; flex-shrink: 0; }
.plate-rule-content strong { display: block; font-size: 0.82rem; margin-bottom: 4px; color: var(--slate-800); }
.plate-rule-content p { font-size: 0.75rem; color: var(--slate-600); margin: 0; line-height: 1.5; }

.veg-card     { background: #f0fdf4; border-color: #86efac; }
.grain-card   { background: #fefce8; border-color: #fde68a; }
.protein-card { background: #fff1f2; border-color: #fca5a5; }
.fruit-card   { background: #fff7ed; border-color: #fdba74; }
.oil-card     { background: #f0fdf4; border-color: #a3e635; }
.water-card   { background: #eff6ff; border-color: #93c5fd; }

/* Eatwell Traffic Light */
.eatwell-traffic-light {
    background: var(--white);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 16px 20px;
}
.eatwell-traffic-light h6 { font-size: 0.9rem; font-weight: 700; color: var(--slate-800); }
.traffic-lights-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.traffic-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    min-width: 80px;
}
.traffic-item strong { font-size: 0.85rem; }
.traffic-item small { font-size: 0.7rem; color: var(--slate-500); }
.traffic-low { background: #f0fdf4; }
.traffic-high { background: #fef2f2; }
.traffic-dot {
    width: 20px; height: 20px;
    background: var(--green-500);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34,197,94,0.4);
}
.traffic-dot-red {
    background: var(--red-500);
    box-shadow: 0 0 8px rgba(239,68,68,0.4);
}
.traffic-ref-text {
    font-size: 0.73rem;
    color: var(--slate-400);
    margin: 8px 0 0;
    font-style: italic;
}

/* Eatwell segment tags on meal cards */
.eatwell-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.eatwell-tag {
    font-size: 0.62rem;
    padding: 2px 7px;
    border-radius: 100px;
    font-weight: 600;
    border: 1px solid;
}
.eatwell-vegetables  { background: #dcfce7; color: #166534; border-color: #86efac; }
.eatwell-whole-grains { background: #fef9c3; color: #713f12; border-color: #fde047; }
.eatwell-protein     { background: #ffe4e6; color: #9f1239; border-color: #fca5a5; }
.eatwell-fruits      { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.eatwell-dairy       { background: #eff6ff; color: #1e40af; border-color: #93c5fd; }
.eatwell-oils, .eatwell-healthy-oils { background: #f7fee7; color: #365314; border-color: #a3e635; }

/* Foods to Limit card */
.limit-card { border-left: 4px solid var(--red-400); }
.limit-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.limit-pill {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 100px;
    font-weight: 500;
}

/* Source attribution */
.source-attribution {
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 12px 18px;
    font-size: 0.78rem;
    color: var(--slate-500);
    margin-top: 8px;
    line-height: 1.6;
}

/* Responsive plate rules */
@media (max-width: 576px) {
    .plate-rules-grid { grid-template-columns: 1fr; }
    .traffic-lights-row { justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════════════════
   FLASH MESSAGES (global)
════════════════════════════════════════════════════════════════════════════ */
.flash-global {
  position: fixed; top: 72px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; max-width: 360px;
}
.flash-item {
  display: flex; align-items: center;
  background: #fff; border-radius: 12px;
  padding: 12px 16px; font-size: 0.85rem; font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  border-left: 4px solid;
  animation: slideInRight 0.3s ease;
}
.flash-success { border-color: #22c55e; color: #166534; }
.flash-danger  { border-color: #ef4444; color: #991b1b; }
.flash-warning { border-color: #f59e0b; color: #92400e; }
.flash-info    { border-color: #3b82f6; color: #1e40af; }
.flash-close {
  background: none; border: none; margin-left: auto;
  font-size: 1.1rem; cursor: pointer; opacity: 0.5; line-height: 1;
}
.flash-close:hover { opacity: 1; }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════
   NAVBAR AUTH ELEMENTS
════════════════════════════════════════════════════════════════════════════ */
.btn-nav-cta {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  color: #fff !important;
  border-radius: 100px !important;
  padding: 8px 18px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  transition: all 0.2s !important;
}
.btn-nav-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(22,163,74,0.35) !important; }
.nav-user-btn {
  display: flex !important; align-items: center; gap: 8px;
  background: #f0fdf4; border-radius: 100px;
  padding: 6px 14px 6px 6px !important;
  font-weight: 600; font-size: 0.85rem;
}
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #16a34a; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}
.user-dropdown { border-radius: 16px !important; border: 1px solid #e2e8f0 !important; padding: 6px !important; box-shadow: 0 10px 40px rgba(0,0,0,0.12) !important; min-width: 220px !important; }
.dropdown-header-info { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.dh-avatar { width: 38px; height: 38px; border-radius: 50%; background: #16a34a; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.dh-name  { font-weight: 700; font-size: 0.85rem; color: #0f172a; }
.dh-email { font-size: 0.73rem; color: #64748b; }
.user-dropdown .dropdown-item { border-radius: 10px; font-size: 0.85rem; font-weight: 500; padding: 8px 12px; }
.user-dropdown .dropdown-item:hover { background: #f0fdf4; color: #16a34a; }

/* ══════════════════════════════════════════════════════════════════════════
   AUTH PAGES (login / register)
════════════════════════════════════════════════════════════════════════════ */
.auth-page { min-height: 100vh; background: #f8fafc; }
.auth-split { display: flex; min-height: calc(100vh - 72px); }

/* Left decorative panel */
.auth-left {
  flex: 0 0 42%;
  background: linear-gradient(155deg, #0f172a 0%, #14532d 60%, #166534 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 44px;
}
.auth-left-content { max-width: 380px; }
.auth-logo-mark { font-size: 3rem; margin-bottom: 20px; display: block; }
.auth-left-title { font-family: 'Playfair Display', serif; font-size: 2rem; color: #fff; margin-bottom: 12px; line-height: 1.25; }
.auth-left-sub   { color: #94a3b8; font-size: 0.9rem; margin-bottom: 28px; line-height: 1.7; }
.auth-perks      { margin-bottom: 32px; }
.auth-perk       { display: flex; align-items: center; gap: 10px; color: #e2e8f0; font-size: 0.88rem; margin-bottom: 10px; }
.perk-icon       { font-size: 1rem; }
.auth-quote {
  background: rgba(255,255,255,0.06);
  border-left: 3px solid #4ade80;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
}
.quote-text   { color: #d1fae5; font-style: italic; font-size: 0.88rem; line-height: 1.6; }
.quote-author { color: #86efac; font-size: 0.78rem; margin-top: 6px; font-weight: 600; }

/* Right form panel */
.auth-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
}
.auth-form-wrap { width: 100%; max-width: 420px; }
.auth-form-header { margin-bottom: 28px; }
.auth-form-header h3 { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: #0f172a; margin-bottom: 6px; }
.auth-form-header p  { font-size: 0.85rem; color: #64748b; }
.auth-form-header a  { color: #16a34a; font-weight: 600; }

.auth-error {
  background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
  border-radius: 12px; padding: 11px 14px; font-size: 0.85rem; margin-bottom: 20px;
  display: flex; align-items: center;
}
.auth-field { margin-bottom: 18px; }
.auth-field label { font-size: 0.83rem; font-weight: 700; color: #334155; display: block; margin-bottom: 6px; }
.auth-input-wrap { position: relative; }
.auth-input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 0.9rem; pointer-events: none; }
.auth-input {
  width: 100%; border: 1.5px solid #e2e8f0; border-radius: 12px;
  padding: 11px 40px 11px 38px; font-size: 0.9rem; font-family: 'DM Sans', sans-serif;
  transition: all 0.2s; background: #fff; color: #0f172a;
}
.auth-input:focus { outline: none; border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.1); }
.auth-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 1rem; padding: 0;
}
.auth-eye:hover { color: #475569; }
.pw-strength-bar { height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden; }
.pw-strength-bar div { height: 100%; border-radius: 2px; transition: all 0.3s; width: 0; }
.pw-strength-label { font-size: 0.73rem; font-weight: 600; margin-top: 3px; min-height: 16px; }
.match-msg { font-size: 0.78rem; font-weight: 600; margin-top: 4px; min-height: 16px; }
.auth-terms { margin-bottom: 20px; }
.auth-check-label { display: flex; align-items: flex-start; gap: 10px; font-size: 0.82rem; color: #475569; cursor: pointer; }
.auth-check-label input { margin-top: 2px; accent-color: #16a34a; }
.auth-check-label a { color: #16a34a; font-weight: 600; }
.auth-btn {
  width: 100%; background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff; border: none; border-radius: 12px;
  padding: 13px; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(22,163,74,0.35); }
.auth-btn:disabled { opacity: 0.7; transform: none; }
.auth-divider { text-align: center; color: #94a3b8; font-size: 0.78rem; margin: 16px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #e2e8f0; }
.auth-divider span { background: #f8fafc; padding: 0 12px; position: relative; }
.auth-btn-ghost {
  width: 100%; background: transparent;
  color: #475569; border: 1.5px solid #e2e8f0; border-radius: 12px;
  padding: 11px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: all 0.2s;
}
.auth-btn-ghost:hover { border-color: #94a3b8; color: #0f172a; background: #f1f5f9; }

@media (max-width: 768px) {
  .auth-left { display: none; }
  .auth-right { padding: 32px 20px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MY DASHBOARD PAGE
════════════════════════════════════════════════════════════════════════════ */
.mydb-page { background: #f8fafc; min-height: 100vh; }
.mydb-hero {
  background: linear-gradient(135deg, #0f172a 0%, #14532d 100%);
  padding: 40px 0 36px;
}
.mydb-hero-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.mydb-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; font-size: 1.6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid rgba(255,255,255,0.2); flex-shrink: 0;
}
.mydb-greeting { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: #fff; margin: 0; }
.mydb-sub      { color: #94a3b8; font-size: 0.82rem; margin: 4px 0 0; }
.mydb-hero-actions { margin-left: auto; display: flex; gap: 10px; }
.btn-mydb-primary {
  background: linear-gradient(135deg,#22c55e,#16a34a); color:#fff;
  border:none; border-radius:100px; padding:10px 22px;
  font-size:0.88rem; font-weight:700; text-decoration:none;
  display:inline-flex; align-items:center; transition:all 0.2s;
}
.btn-mydb-primary:hover { color:#fff; transform:translateY(-2px); box-shadow:0 6px 18px rgba(34,197,94,0.35); }
.btn-mydb-outline {
  background:rgba(255,255,255,0.08); color:#e2e8f0;
  border:1.5px solid rgba(255,255,255,0.2); border-radius:100px;
  padding:9px 18px; font-size:0.85rem; font-weight:600;
  text-decoration:none; display:inline-flex; align-items:center; gap:6px; transition:all 0.2s;
}
.btn-mydb-outline:hover { background:rgba(255,255,255,0.15); color:#fff; }

.mydb-content { padding: 32px 0 60px; }

/* Stats row */
.mydb-stats-row { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:28px; }
.mydb-stat-card { background:#fff; border-radius:16px; padding:20px 18px; border:1.5px solid #e2e8f0; display:flex; flex-direction:column; align-items:center; text-align:center; }
.mydb-stat-icon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.3rem; margin-bottom:10px; }
.mydb-stat-val  { font-family:'Playfair Display',serif; font-size:1.8rem; font-weight:700; color:#0f172a; line-height:1; }
.mydb-stat-label{ font-size:0.75rem; color:#64748b; margin-top:4px; }

/* Section title */
.mydb-section-title { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.mydb-section-title h2 { font-family:'Playfair Display',serif; font-size:1.3rem; color:#0f172a; margin:0; }
.mydb-add-btn {
  background:#f0fdf4; color:#16a34a; border:1.5px solid #86efac;
  border-radius:100px; padding:7px 16px; font-size:0.82rem; font-weight:700;
  text-decoration:none; display:flex; align-items:center; gap:6px; transition:all 0.15s;
}
.mydb-add-btn:hover { background:#16a34a; color:#fff; }

/* Plans grid */
.mydb-plans-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:20px; }
.mydb-plan-card  { background:#fff; border-radius:18px; border:1.5px solid #e2e8f0; overflow:hidden; transition:all 0.2s; }
.mydb-plan-card:hover { transform:translateY(-3px); box-shadow:0 10px 30px rgba(0,0,0,0.08); }
.mydb-plan-card-header { display:flex; align-items:center; gap:12px; padding:18px 18px 14px; }
.mydb-plan-avatar { width:42px; height:42px; border-radius:50%; color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.1rem; font-weight:800; flex-shrink:0; }
.mydb-plan-name  { font-weight:700; font-size:0.95rem; color:#0f172a; }
.mydb-plan-meta  { font-size:0.75rem; color:#64748b; }
.mydb-goal-badge { font-size:0.68rem; padding:3px 10px; border-radius:100px; font-weight:700; margin-left:auto; white-space:nowrap; }
.goal-weight_loss{ background:#fee2e2;color:#991b1b; }
.goal-muscle_gain{ background:#dcfce7;color:#166534; }
.goal-maintain   { background:#eff6ff;color:#1e40af; }

/* Metrics */
.mydb-plan-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:0; padding:10px 18px; background:#f8fafc; border-top:1px solid #f1f5f9; border-bottom:1px solid #f1f5f9; }
.mpmetric { text-align:center; padding:8px 4px; }
.mpmetric-val   { font-size:1.1rem; font-weight:800; color:#0f172a; font-family:'Playfair Display',serif; }
.mpmetric-label { font-size:0.65rem; color:#94a3b8; margin-top:2px; }
.mpmetric-cat   { font-size:0.62rem; font-weight:700; margin-top:2px; }
.val-green { color:#16a34a; }
.val-amber { color:#d97706; }
.val-red   { color:#dc2626; }

/* Macro bar */
.mydb-macro-bar { display:flex; height:6px; margin:12px 18px 4px; border-radius:3px; overflow:hidden; gap:2px; }
.mydb-macro-bar div { border-radius:2px; }
.mydb-macro-labels { display:flex; justify-content:space-between; padding:0 18px; font-size:0.72rem; font-weight:700; margin-bottom:8px; }

.mydb-weight-row { padding:6px 18px 10px; font-size:0.8rem; color:#475569; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.mydb-plan-card-footer { display:flex; align-items:center; justify-content:space-between; padding:12px 18px; border-top:1px solid #f1f5f9; }
.mydb-date { font-size:0.72rem; color:#94a3b8; }
.mydb-card-actions { display:flex; gap:8px; }
.btn-card-view {
  background:#f0fdf4; color:#16a34a; border:1px solid #86efac;
  border-radius:8px; padding:5px 12px; font-size:0.78rem; font-weight:700;
  text-decoration:none; display:inline-flex; align-items:center; gap:5px; transition:all 0.15s;
}
.btn-card-view:hover { background:#16a34a; color:#fff; }
.btn-card-track {
  background:#eff6ff; color:#2563eb; border:1px solid #bfdbfe;
  border-radius:8px; padding:5px 12px; font-size:0.78rem; font-weight:700;
  text-decoration:none; display:inline-flex; align-items:center; gap:5px; transition:all 0.15s;
}
.btn-card-track:hover { background:#2563eb; color:#fff; }
.mydb-no-plan { text-align:center; padding:24px; color:#94a3b8; font-size:0.85rem; }

/* Empty state */
.mydb-empty { text-align:center; padding:80px 20px; }
.mydb-empty-icon { font-size:4rem; margin-bottom:16px; }
.mydb-empty h3   { font-family:'Playfair Display',serif; font-size:1.5rem; color:#0f172a; margin-bottom:8px; }
.mydb-empty p    { color:#64748b; font-size:0.9rem; }

/* ══════════════════════════════════════════════════════════════════════════
   SETTINGS PAGE
════════════════════════════════════════════════════════════════════════════ */
.settings-page { background:#f8fafc; min-height:100vh; }
.settings-header { margin-bottom:28px; }
.settings-back { font-size:0.82rem; color:#64748b; text-decoration:none; display:inline-flex; align-items:center; gap:4px; margin-bottom:10px; }
.settings-back:hover { color:#16a34a; }
.settings-title { font-family:'Playfair Display',serif; font-size:1.8rem; color:#0f172a; margin:0; }
.settings-card  { background:#fff; border-radius:18px; border:1.5px solid #e2e8f0; padding:24px 28px; margin-bottom:20px; }
.settings-card-header { display:flex; align-items:center; gap:16px; }
.settings-avatar { width:64px; height:64px; border-radius:50%; background:linear-gradient(135deg,#22c55e,#16a34a); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.6rem; font-weight:800; flex-shrink:0; }
.settings-name     { font-weight:700; font-size:1.05rem; color:#0f172a; }
.settings-email-tag{ font-size:0.82rem; color:#64748b; }
.settings-member   { font-size:0.75rem; color:#94a3b8; margin-top:2px; }
.settings-card-title { font-size:0.9rem; font-weight:700; color:#334155; margin-bottom:18px; display:flex; align-items:center; }
.settings-form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:18px; }
.settings-field label { font-size:0.82rem; font-weight:700; color:#334155; display:block; margin-bottom:6px; }
.settings-input {
  width:100%; border:1.5px solid #e2e8f0; border-radius:12px;
  padding:10px 40px 10px 14px; font-size:0.88rem; font-family:'DM Sans',sans-serif;
  transition:all 0.2s; background:#fff; color:#0f172a;
}
.settings-input:focus { outline:none; border-color:#16a34a; box-shadow:0 0 0 3px rgba(22,163,74,0.1); }
.settings-btn-save {
  background:linear-gradient(135deg,#16a34a,#15803d); color:#fff;
  border:none; border-radius:100px; padding:10px 22px;
  font-size:0.88rem; font-weight:700; cursor:pointer;
  display:inline-flex; align-items:center; transition:all 0.2s;
}
.settings-btn-save:hover { transform:translateY(-1px); box-shadow:0 5px 15px rgba(22,163,74,0.3); }
.settings-danger-card { border-color:#fca5a5; }
.settings-btn-danger {
  background:#fef2f2; color:#dc2626; border:1.5px solid #fca5a5;
  border-radius:100px; padding:9px 20px; font-size:0.85rem; font-weight:700;
  text-decoration:none; display:inline-flex; align-items:center; transition:all 0.2s;
}
.settings-btn-danger:hover { background:#dc2626; color:#fff; }

@media (max-width: 640px) {
  .mydb-stats-row     { grid-template-columns: 1fr 1fr; }
  .mydb-hero-actions  { width:100%; }
  .settings-form-row  { grid-template-columns: 1fr; }
  .mydb-plans-grid    { grid-template-columns: 1fr; }
}

/* Diet type notice banners */
.diet-notice {
  background: #f0fdf4; border: 1.5px solid #86efac; color: #166534;
  border-radius: 12px; padding: 12px 16px; margin-top: 14px;
  font-size: 0.88rem; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.diet-notice-blue { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
.diet-notice i { font-size: 1.1rem; }

/* Work card 4-col variant */
.work-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 768px) { .work-cards { grid-template-columns: repeat(2,1fr); } }

/* Final review grid */
.final-review-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.review-item { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; }
.review-key  { display: block; font-size: 0.72rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.review-val  { display: block; font-size: 0.9rem; font-weight: 700; color: #0f172a; margin-top: 2px; }
@media (max-width: 640px) { .final-review-grid { grid-template-columns: 1fr 1fr; } }

/* Admin extra detail panels */
.admin-detail-section { margin-bottom: 20px; }
.admin-detail-section .section-label {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  color: #64748b; margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.detail-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.detail-item { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 13px; }
.detail-item .dk { font-size: 0.7rem; color: #94a3b8; font-weight: 700; text-transform: uppercase; }
.detail-item .dv { font-size: 0.85rem; font-weight: 700; color: #0f172a; margin-top: 2px; word-break: break-word; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr 1fr; } }

/* ══════════════════════════════════════════════════════════════════════
   STATS BANNER (live user counts)
══════════════════════════════════════════════════════════════════════ */
.stats-banner {
  background: linear-gradient(135deg, #0f172a, #14532d);
  padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.stats-banner-inner {
  display: flex; justify-content: center; align-items: center;
  gap: 0; flex-wrap: wrap;
}
.sb-stat { text-align: center; padding: 8px 32px; }
.sb-num  { display: block; font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700; color: #4ade80; line-height: 1; }
.sb-label{ display: block; font-size: 0.72rem; color: #94a3b8; margin-top: 3px; font-weight: 500; }
.sb-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.1); }

/* Trust badges */
.trust-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.trust-badge {
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2);
  color: #d1fae5; padding: 5px 12px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════════
   DIET TYPE CARDS
══════════════════════════════════════════════════════════════════════ */
.section-diet-types { background: #f8fafc; padding: 72px 0; }
.diet-type-card {
  background: #fff; border-radius: 18px; padding: 28px 24px;
  border: 2px solid; text-align: center; height: 100%;
  transition: transform 0.2s;
}
.diet-type-card:hover { transform: translateY(-4px); }
.diet-veg   { border-color: #86efac; }
.diet-vegan { border-color: #6ee7b7; }
.diet-nonveg{ border-color: #fcd34d; }
.dtc-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.diet-type-card h5 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 8px; }
.diet-type-card p  { font-size: 0.85rem; color: #64748b; line-height: 1.6; margin-bottom: 14px; }
.dtc-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 4px 12px; border-radius: 100px;
  background: #dcfce7; color: #166534;
}

/* ══════════════════════════════════════════════════════════════════════
   MEDICAL CONDITIONS GRID
══════════════════════════════════════════════════════════════════════ */
.section-medical { padding: 80px 0; }
.medical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.medical-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border-radius: 14px; padding: 14px 16px;
  border: 1.5px solid #e2e8f0; transition: all 0.15s;
}
.medical-item:hover { border-color: #86efac; box-shadow: 0 4px 12px rgba(22,163,74,0.08); }
.medical-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.medical-name { font-weight: 700; font-size: 0.88rem; color: #0f172a; }
.medical-tip  { font-size: 0.75rem; color: #64748b; margin-top: 2px; }

/* CTA outline button */
.btn-cta-outline {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,0.4); border-radius: 100px;
  padding: 12px 28px; font-weight: 700; font-size: 1rem;
  text-decoration: none; display: inline-flex; align-items: center;
  transition: all 0.2s;
}
.btn-cta-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ══════════════════════════════════════════════════════════════════════
   FOOD DIARY (dashboard)
══════════════════════════════════════════════════════════════════════ */
.diary-section { background: #fff; border-radius: 18px; border: 1.5px solid #e2e8f0; margin-bottom: 24px; overflow: hidden; }
.diary-header  { padding: 18px 22px 14px; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.diary-header h5 { margin: 0; font-size: 0.95rem; font-weight: 700; }
.diary-totals  { display: flex; gap: 16px; font-size: 0.78rem; flex-wrap: wrap; }
.dt-item { text-align: center; }
.dt-val  { font-weight: 800; font-size: 1rem; color: #0f172a; display: block; }
.dt-lbl  { color: #94a3b8; font-size: 0.68rem; }
.diary-add-form { padding: 16px 22px; background: #f8fafc; border-bottom: 1px solid #f1f5f9; }
.diary-add-form .row { gap: 0; }
.diary-form-input { border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 8px 12px; font-size: 0.85rem; width: 100%; }
.diary-form-input:focus { outline: none; border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.1); }
.btn-diary-add { background: #16a34a; color: #fff; border: none; border-radius: 10px; padding: 9px 20px; font-size: 0.85rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn-diary-add:hover { background: #15803d; }
.diary-entries { padding: 12px 22px; }
.diary-entry { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.83rem; }
.diary-entry:last-child { border-bottom: none; }
.de-type { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 100px; flex-shrink: 0; }
.de-breakfast { background: #fef3c7; color: #92400e; }
.de-lunch     { background: #dcfce7; color: #166534; }
.de-dinner    { background: #eff6ff; color: #1e40af; }
.de-snack     { background: #fdf4ff; color: #7e22ce; }
.de-name { flex: 1; font-weight: 600; color: #0f172a; }
.de-cal  { font-size: 0.78rem; color: #16a34a; font-weight: 700; margin-left: auto; }
.de-del  { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 0.85rem; padding: 0 4px; }
.de-del:hover { color: #ef4444; }
.diary-empty { text-align: center; padding: 28px; color: #94a3b8; font-size: 0.85rem; }

/* ══════════════════════════════════════════════════════════════
   MEAL SWAP BUTTON
══════════════════════════════════════════════════════════════ */
.btn-swap-meal {
  width: 100%; margin-top: 10px;
  background: #f8fafc; color: #475569;
  border: 1.5px solid #e2e8f0; border-radius: 100px;
  padding: 7px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.btn-swap-meal:hover { background: #16a34a; color: #fff; border-color: #16a34a; }

/* ══════════════════════════════════════════════════════════════
   GROCERY LIST
══════════════════════════════════════════════════════════════ */
.grocery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.grocery-category { background: #f8fafc; border-radius: 12px; padding: 12px 14px; border: 1px solid #e2e8f0; }
.grocery-cat-header { font-size: 0.82rem; font-weight: 700; color: #334155; margin-bottom: 8px; }
.grocery-item { font-size: 0.82rem; color: #475569; padding: 4px 0; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; }
.grocery-item:last-child { border-bottom: none; }

/* ══════════════════════════════════════════════════════════════
   FOOD SCAN & VOICE ZONES
══════════════════════════════════════════════════════════════ */
.scan-zone {
  background: #f8fafc; border: 2px dashed #e2e8f0; border-radius: 16px;
  padding: 16px; cursor: pointer; transition: all 0.2s; min-height: 160px;
  display: flex; flex-direction: column; justify-content: center;
}
.scan-zone:hover { border-color: #16a34a; background: #f0fdf4; }
.scan-placeholder { text-align: center; }
.btn-voice {
  width: 100%; background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff; border: none; border-radius: 100px;
  padding: 10px; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.btn-voice:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(22,163,74,0.35); }

@media (max-width: 640px) {
  .grocery-grid { grid-template-columns: 1fr 1fr; }
  .scan-zone { min-height: 120px; }
}
