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

:root {
    --teal: #0D9488;
    --teal-light: #CCFBF1;
    --teal-dark: #0F766E;
    --blue: #3B82F6;
    --blue-light: #DBEAFE;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --radius: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    background: var(--white);
    display: flex;
    flex-direction: column;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.nav-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--teal);
    border-radius: 50%;
}

.hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-text { max-width: 500px; }

.hero-tag {
    display: inline-block;
    background: var(--teal-light);
    color: var(--teal-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--teal) 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 17px;
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 28px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--gray-700);
    font-weight: 500;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--teal);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(13,148,136,0.35);
    font-family: inherit;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13,148,136,0.4);
    background: var(--teal-dark);
}

.cta-button.secondary {
    background: var(--gray-700);
    box-shadow: 0 4px 14px rgba(55,65,81,0.25);
}

.cta-button.secondary:hover {
    background: var(--gray-800);
}

.cta-icon-wrap {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-sub {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 12px;
}

/* ===== DOCTOR CARD ===== */
.hero-visual { flex-shrink: 0; }

.doctor-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 40px 36px;
    width: 320px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.doctor-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(135deg, var(--teal-light) 0%, #E0F2FE 100%);
    border-radius: 20px 20px 0 0;
}

.doctor-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    position: relative;
    z-index: 1;
    background: var(--white);
    border-radius: 50%;
    padding: 8px;
    box-shadow: var(--shadow-md);
}

.doctor-avatar svg { width: 100%; height: 100%; }

.doctor-info { margin-bottom: 20px; position: relative; z-index: 1; }

.doctor-info h3 { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.doctor-info p { font-size: 14px; color: var(--gray-500); margin-top: 2px; }

.doctor-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--teal);
    font-weight: 600;
    margin-top: 8px;
}

.status-dot {
    width: 8px; height: 8px;
    background: var(--teal);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.doctor-credentials {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--gray-200);
    padding-top: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.credential { text-align: center; }
.cred-number { display: block; font-size: 22px; font-weight: 800; color: var(--teal); }
.cred-label { font-size: 11px; color: var(--gray-400); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== CONSULTATION SECTION ===== */
.consultation-section {
    height: 100vh;
    background: var(--gray-50);
    overflow: hidden;
}

.consult-container {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    height: 100vh;
}

/* Sidebar */
.consult-sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex-shrink: 0;
    overflow-y: auto;
}

.sidebar-doctor { text-align: center; }

.sidebar-avatar {
    width: 70px; height: 70px;
    margin: 0 auto 10px;
    background: var(--gray-50);
    border-radius: 50%;
    padding: 4px;
    border: 2px solid var(--gray-200);
}

.sidebar-avatar svg { width: 100%; height: 100%; }

.sidebar-doctor h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.sidebar-doctor p { font-size: 12px; color: var(--gray-400); }

.sidebar-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--teal);
    font-weight: 600;
    margin-top: 6px;
}

.sidebar-progress h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin-bottom: 14px;
    font-weight: 600;
}

.progress-steps { display: flex; flex-direction: column; gap: 0; }

.progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 13px;
    color: var(--gray-400);
    position: relative;
    font-weight: 500;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 30px;
    width: 2px;
    height: calc(100% - 16px);
    background: var(--gray-200);
}

.progress-step.completed::after { background: var(--teal); }
.progress-step.active::after { background: var(--teal); }

.step-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    background: var(--white);
}

.progress-step.completed .step-dot {
    background: var(--teal);
    border-color: var(--teal);
}

.progress-step.completed { color: var(--teal); }

.progress-step.active .step-dot {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(13,148,136,0.2);
}

.progress-step.active { color: var(--gray-800); font-weight: 600; }

.sidebar-tech {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--gray-50);
    border-radius: 8px;
}

.tech-icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tech-icon.voice { background: var(--teal-light); color: var(--teal); }
.tech-icon.brain { background: #EDE9FE; color: #7C3AED; }

.tech-name { display: block; font-size: 12px; font-weight: 600; color: var(--gray-800); }
.tech-desc { display: block; font-size: 10px; color: var(--gray-400); }

/* ===== CHAT AREA ===== */
.consult-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
    flex-shrink: 0;
}

.chat-header h2 { font-size: 18px; font-weight: 700; color: var(--gray-900); }

.session-badge {
    font-size: 12px;
    background: var(--teal-light);
    color: var(--teal-dark);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 0;
}

/* Messages */
.message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: msgIn 0.4s ease-out;
    max-width: 85%;
}

.message.user { flex-direction: row-reverse; margin-left: auto; }

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

.msg-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.msg-avatar.ai {
    background: var(--teal-light);
    color: var(--teal);
}

.msg-avatar.user {
    background: var(--blue-light);
    color: var(--blue);
}

.msg-bubble {
    padding: 14px 18px;
    border-radius: 16px;
    position: relative;
}

.message.ai .msg-bubble {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-top-left-radius: 4px;
}

.message.user .msg-bubble {
    background: var(--teal);
    color: var(--white);
    border-top-right-radius: 4px;
}

.msg-label {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.6;
}

.msg-text {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Voice Indicator */
.voice-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    flex-shrink: 0;
}

.voice-indicator.active { display: flex; }

.voice-wave {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 50px;
    margin-bottom: 16px;
}

.wave-bar {
    width: 4px;
    background: var(--teal);
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; height: 12px; }
.wave-bar:nth-child(2) { animation-delay: 0.08s; height: 20px; }
.wave-bar:nth-child(3) { animation-delay: 0.16s; height: 28px; }
.wave-bar:nth-child(4) { animation-delay: 0.24s; height: 36px; }
.wave-bar:nth-child(5) { animation-delay: 0.32s; height: 28px; }
.wave-bar:nth-child(6) { animation-delay: 0.40s; height: 20px; }
.wave-bar:nth-child(7) { animation-delay: 0.48s; height: 12px; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(2); }
}

.voice-label { text-align: center; font-size: 13px; color: var(--gray-500); }

.voice-badge {
    display: inline-block;
    background: var(--teal);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 6px;
}

/* AI Processing */
.ai-processing {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    flex-shrink: 0;
}

.ai-processing.active { display: flex; }

.processing-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.processing-dots span {
    width: 10px; height: 10px;
    background: var(--teal);
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out both;
}

.processing-dots span:nth-child(1) { animation-delay: -0.32s; }
.processing-dots span:nth-child(2) { animation-delay: -0.16s; }
.processing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

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

.processing-badge {
    display: inline-block;
    background: #EDE9FE;
    color: #7C3AED;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 6px;
}

.chat-footer {
    padding: 14px 30px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    flex-shrink: 0;
}

.chat-footer-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-400);
}

/* ===== RESULTS SECTION ===== */
.results-section {
    background: #E8ECEF;
    padding: 48px 20px;
    min-height: 100vh;
}

.patient-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.patient-stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12px; color: var(--gray-400); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.stat-value small { font-size: 12px; font-weight: 500; color: var(--gray-400); }
.stat-value.bmi-warning { color: #D97706; }
.stat-value.highlight { color: var(--teal); }

/* Section tag (used in water section) */
.section-tag {
    font-size: 12px;
    background: var(--blue-light);
    color: var(--blue);
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
}

/* Meal Cards */
.meals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.meal-card {
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
}

.meal-card:hover {
    border-color: var(--teal);
    box-shadow: 0 2px 12px rgba(13,148,136,0.1);
}

.meal-card-time {
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.meal-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.meal-emoji { font-size: 28px; }

.meal-card-header h4 { font-size: 15px; font-weight: 700; color: var(--gray-800); }

.meal-cal {
    font-size: 12px;
    color: var(--teal);
    font-weight: 600;
}

.meal-card ul {
    list-style: none;
    margin-bottom: 12px;
}

.meal-card li {
    padding: 4px 0 4px 18px;
    position: relative;
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
}

.meal-card li::before {
    content: '';
    position: absolute;
    left: 0; top: 11px;
    width: 6px; height: 6px;
    background: var(--teal);
    border-radius: 50%;
}

.meal-macros {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.macro {
    font-size: 11px;
    background: var(--gray-50);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--gray-500);
}

.macro b { color: var(--gray-700); margin-right: 2px; }

.meal-why {
    font-size: 12px;
    color: var(--teal-dark);
    background: var(--teal-light);
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.5;
}

/* Water Plan */
.lp-section-water { background: linear-gradient(135deg, #F0F9FF 0%, #EFF6FF 100%); }

.water-grid, .water-schedule { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.water-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--gray-600);
}

.water-amt { font-weight: 700; color: #1E40AF; }

.water-tip {
    text-align: center;
    font-size: 12px;
    color: #3B82F6;
    font-style: italic;
}

/* ===== RECOMMENDATIONS ===== */
.rec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.rec-card {
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 18px;
    transition: all 0.2s ease;
}

.rec-card:hover {
    border-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,148,136,0.08);
}

.rec-card-icon { font-size: 28px; margin-bottom: 10px; }
.rec-card h4 { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 10px; }

.rec-card ul { list-style: none; }

.rec-card li {
    padding: 3px 0 3px 14px;
    position: relative;
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.5;
}

.rec-card li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 4px; height: 4px;
    background: var(--teal);
    border-radius: 50%;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 18px; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--teal) 0%, #06B6D4 100%);
}

.tl-item {
    position: relative;
    margin-bottom: 24px;
}

.tl-marker {
    position: absolute;
    left: -50px;
    width: 38px; height: 38px;
    background: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--white);
    z-index: 1;
}

.tl-content {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 16px 20px;
}

.tl-content h4 { font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.tl-content p { font-size: 13px; color: var(--gray-500); margin: 0; line-height: 1.5; }

/* ===== ACTIONS ===== */
.results-actions { text-align: center; padding: 28px 0 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        gap: 40px;
        text-align: center;
        padding: 20px;
    }

    .hero-text h1 { font-size: 36px; }
    .hero-features { align-items: center; }

    .doctor-card { width: 280px; }

    .consult-container { flex-direction: column; }
    .consult-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }

    .sidebar-doctor { display: flex; align-items: center; gap: 12px; text-align: left; }
    .sidebar-avatar { width: 40px; height: 40px; margin: 0; }
    .sidebar-progress { display: none; }
    .sidebar-tech { flex-direction: row; margin-top: 0; }

    .consult-main { min-height: auto; }

    .patient-grid { grid-template-columns: repeat(2, 1fr); }
    .meals-grid { grid-template-columns: 1fr; }
    .rec-grid { grid-template-columns: 1fr; }

    .top-nav { padding: 16px 20px; }
    .nav-badge { display: none; }

    .lp-header { flex-direction: column; gap: 16px; align-items: flex-start; padding: 20px 20px 16px; }
    .lp-doctor-block { align-self: flex-start; }
    .lp-dr-info { text-align: left; }
    .lp-meta { padding: 12px 20px; gap: 16px; }
    .lp-section { padding: 20px; }
    .lp-section-num { display: none; }
    .lp-report-title { padding: 24px 20px 8px; }
    .lp-report-title h2 { font-size: 22px; }
    .lp-signature { padding: 24px 20px; }
    .lp-footer-bar { flex-direction: column; padding: 12px 20px; gap: 4px; }
    .lp-divider { margin: 0 20px; }
    .lp-sig-line { flex-direction: column; gap: 16px; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 30px; }
    .patient-grid { grid-template-columns: 1fr; }
    .chat-messages { padding: 16px; }
    .message { max-width: 95%; }
}


/* ===== LETTERPAD ===== */
.letterpad {
    max-width: 780px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    box-shadow: 0 4px 40px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.lp-topbar {
    height: 6px;
    background: linear-gradient(90deg, #0D9488 0%, #06B6D4 50%, #0D9488 100%);
}

.lp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 36px 18px;
}

.lp-logo-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lp-logo-icon { flex-shrink: 0; }

.lp-brand {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.3px;
}

.lp-tagline {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.lp-doctor-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lp-dr-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    padding: 3px;
    flex-shrink: 0;
}

.lp-dr-avatar svg { width: 100%; height: 100%; }

.lp-dr-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.lp-dr-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
}

.lp-dr-title {
    font-size: 11px;
    color: var(--gray-500);
}

.lp-dr-id {
    font-size: 10px;
    color: var(--teal);
    font-weight: 600;
    font-family: monospace;
}

.lp-divider {
    height: 1px;
    margin: 0 36px;
    background: linear-gradient(90deg, transparent 0%, var(--gray-200) 15%, var(--gray-200) 85%, transparent 100%);
}

.lp-meta {
    display: flex;
    gap: 24px;
    padding: 14px 36px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.lp-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lp-meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    font-weight: 600;
}

.lp-meta-val {
    font-size: 13px;
    color: var(--gray-700);
    font-weight: 600;
}

.lp-report-title {
    text-align: center;
    padding: 28px 36px 8px;
}

.lp-report-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.lp-report-title p {
    font-size: 13px;
    color: var(--gray-400);
}

/* Letterpad sections */
.lp-section {
    padding: 24px 36px;
    border-top: 1px solid var(--gray-100);
    position: relative;
}

.lp-section-num {
    position: absolute;
    top: 24px;
    right: 36px;
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-100);
    line-height: 1;
    font-family: 'Playfair Display', serif;
}

.lp-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--teal);
    display: inline-block;
}

.lp-section-water .section-tag {
    position: absolute;
    top: 28px;
    right: 36px;
}

/* Signature */
.lp-signature {
    padding: 28px 36px;
    border-top: 1px solid var(--gray-100);
}

.lp-sig-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.lp-sig-doctor {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lp-sig-svg {
    width: 160px;
    height: 44px;
    margin-bottom: 4px;
}

.sig-draw {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: sigAnim 2s 0.5s ease forwards;
}

@keyframes sigAnim {
    to { stroke-dashoffset: 0; }
}

.lp-sig-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-800);
    border-top: 1px solid var(--gray-300);
    padding-top: 6px;
}

.lp-sig-date {
    font-size: 11px;
    color: var(--gray-400);
}

.lp-stamp {
    opacity: 0;
    animation: stampIn 0.4s 1.8s ease forwards;
}

@keyframes stampIn {
    from { opacity: 0; transform: scale(1.5) rotate(-15deg); }
    to { opacity: 1; transform: scale(1) rotate(-8deg); }
}

.lp-footer-bar {
    display: flex;
    justify-content: space-between;
    padding: 12px 36px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    font-size: 10px;
    color: var(--gray-400);
    gap: 20px;
}

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

/* ===== SCROLL ANIMATIONS ===== */
.anim-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.anim-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== BMI RING ===== */
.bmi-ring-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-right: 8px;
}

.bmi-ring { position: absolute; top: 0; left: 0; }

.bmi-ring-fill {
    animation: bmiDraw 1.2s 0.8s ease forwards;
}

@keyframes bmiDraw {
    to { stroke-dashoffset: 43; }
}

.bmi-ring-val {
    font-size: 13px;
    font-weight: 800;
    color: #D97706;
    position: relative;
    z-index: 1;
}

.stat-value.highlight {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cal-flame { flex-shrink: 0; }

/* ===== DONUT CHART ===== */
.macro-chart-row {
    display: flex;
    align-items: center;
    gap: 40px;
    justify-content: center;
}

.donut-wrap {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.donut-chart { width: 100%; height: 100%; }

.donut-protein { animation: donutProt 1s 0.6s ease forwards; }
.donut-carbs { animation: donutCarb 1s 0.9s ease forwards; }
.donut-fat { animation: donutFat 1s 1.2s ease forwards; }

@keyframes donutProt { to { stroke-dashoffset: 195; } }
@keyframes donutCarb { to { stroke-dashoffset: 198; } }
@keyframes donutFat { to { stroke-dashoffset: 235; } }

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

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-label {
    font-weight: 600;
    color: var(--gray-700);
    min-width: 60px;
}

.legend-val {
    color: var(--gray-500);
    font-weight: 500;
}

/* ===== WATER VISUAL ===== */
.water-visual {
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

.water-bottle-wrap {
    width: 80px;
    flex-shrink: 0;
}

.bottle-svg { width: 100%; height: auto; }

.water-fill-anim {
    opacity: 0.3;
    animation: waterRise 2s 0.5s ease forwards;
}

@keyframes waterRise {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 0.3; transform: translateY(0); }
}

.water-schedule { flex: 1; }

/* ===== TIMELINE PROGRESS BARS ===== */
.tl-progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.tl-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--teal) 0%, #06B6D4 100%);
    border-radius: 3px;
    animation: barGrow 1.2s 0.8s ease forwards;
}

.tl-bar-complete {
    background: linear-gradient(90deg, var(--teal) 0%, #10B981 100%);
}

@keyframes barGrow {
    to { width: var(--tw); }
}

.tl-marker-goal {
    background: #10B981 !important;
    box-shadow: 0 0 0 4px rgba(16,185,129,0.2);
}

.tl-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== RESPONSIVE ADDITIONS ===== */
@media (max-width: 900px) {
    .macro-chart-row { flex-direction: column; gap: 20px; }
    .donut-wrap { width: 130px; height: 130px; }
    .water-visual { flex-direction: column; align-items: center; }
    .water-bottle-wrap { width: 60px; }
    .consult-main { height: auto; min-height: 100vh; }
}


/* ===== TYPING CURSOR ===== */
.typing-cursor::after {
    content: '|';
    animation: blink-cursor 0.6s step-end infinite;
    color: var(--teal);
    font-weight: 300;
    margin-left: 1px;
}

.message.user .typing-cursor::after {
    color: rgba(255,255,255,0.7);
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
