/* ==========================================================================
   KALORIA HOME PAGE — PREMIUM UNIFIED NAVBAR & USER DROPDOWN
   ========================================================================== */
:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;

    --emerald-800: #047857;
    --emerald-600: #10B981;
    --emerald-500: #34D399;
    --emerald-50: #ECFDF5;

    --slate-900: #0F172A;
    --slate-800: #1E293B;
    --slate-700: #334155;
    --slate-500: #64748B;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;
    --slate-50: #F8FAFC;
    --white: #FFFFFF;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 9999px;

    --shadow-card: 0 12px 32px -4px rgba(15, 23, 42, 0.06);
    --shadow-dropdown: 0 20px 40px -6px rgba(15, 23, 42, 0.16);
    --shadow-glow: 0 16px 40px -8px rgba(16, 185, 129, 0.25);

    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: all 0.3s var(--ease-spring);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--slate-50);
    color: var(--slate-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* HEADER & NAVBAR */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--slate-200);
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600));
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--slate-900);
}

.logo-text span {
    color: var(--emerald-600);
}

/* UNIFIED NAVIGATION MENU */
.nav-menu-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--slate-100);
    padding: 5px;
    border-radius: var(--radius-full);
    border: 1px solid var(--slate-200);
}

.nav-link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--slate-700);
    font-weight: 700;
    font-size: 0.88rem;
    transition: var(--transition-smooth);
}

.nav-link-item svg {
    color: var(--slate-500);
    transition: var(--transition-smooth);
}

.nav-link-item:hover {
    background: var(--white);
    color: var(--slate-900);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.nav-link-item:hover svg {
    color: var(--emerald-600);
}

.nav-link-item.nav-ai-badge {
    background: var(--emerald-50);
    color: var(--emerald-800);
    border: 1px solid #A7F3D0;
}

.nav-link-item.nav-ai-badge svg {
    color: var(--emerald-600);
}

.nav-link-item.nav-ai-badge:hover {
    background: var(--slate-900);
    color: var(--white);
    border-color: var(--slate-900);
}

.nav-link-item.nav-ai-badge:hover svg {
    color: var(--emerald-500);
}

.btn-primary-sm {
    background: var(--slate-900);
    color: var(--white);
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary-sm:hover {
    background: var(--emerald-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* foydalanuvchi PROFILI VA DROPDOWN MENYU */
.user-profile-wrapper {
    position: relative;
}

.profile-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    padding: 5px 12px 5px 6px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.profile-avatar-btn:hover {
    border-color: var(--slate-900);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
    color: var(--emerald-500);
    border-radius: 50%;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chevron-icon {
    color: var(--slate-500);
    transition: var(--transition-smooth);
}

.profile-avatar-btn:hover .chevron-icon {
    color: var(--slate-900);
}

.user-dropdown-card {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-dropdown);
    animation: dropdownSlide 0.25s var(--ease-spring);
    z-index: 200;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
}

.dropdown-avatar-lg {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600));
    color: var(--white);
    border-radius: 50%;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--slate-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.78rem;
    color: var(--slate-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: var(--slate-200);
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--slate-700);
    font-size: 0.88rem;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dropdown-item:hover {
    background: var(--slate-900);
    color: var(--white);
}

.dropdown-item:hover svg {
    color: var(--emerald-500);
}

.dropdown-item.btn-logout {
    color: #E11D48;
}

.dropdown-item.btn-logout:hover {
    background: #FFE4E6;
    color: #E11D48;
}

/* HERO */
.hero-section {
    position: relative;
    padding: 140px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--emerald-50);
    border: 1px solid #A7F3D0;
    color: var(--emerald-800);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 18px;
    font-weight: 800;
}

.hero-title span {
    color: var(--emerald-600);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--slate-500);
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn-hero-primary {
    background: var(--emerald-600);
    color: var(--white);
    padding: 14px 30px;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-glow);
    transition: var(--transition-smooth);
}

.btn-hero-primary:hover {
    background: var(--slate-900);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.btn-hero-secondary {
    color: var(--slate-700);
    text-decoration: none;
    font-weight: 700;
    padding: 14px 20px;
    transition: var(--transition-smooth);
}

.btn-hero-secondary:hover {
    color: var(--emerald-600);
}

/* WIDGET CARD */
.hero-widget-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.hero-widget-card:hover {
    border-color: var(--slate-900);
    transform: translateY(-4px);
    box-shadow: 0 20px 45px -8px rgba(15, 23, 42, 0.12);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-size: 0.88rem;
    font-weight: 700;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--emerald-600);
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 8px var(--emerald-600);
}

.widget-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.widget-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.widget-input-group input:focus {
    border-color: var(--emerald-600);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-add-item {
    width: 46px;
    height: 46px;
    background: var(--emerald-600);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-add-item:hover {
    background: var(--slate-900);
}

.food-items-container {
    min-height: 100px;
    max-height: 160px;
    overflow-y: auto;
    margin-bottom: 18px;
}

.empty-state-text {
    text-align: center;
    color: var(--slate-500);
    font-size: 0.85rem;
    padding: 30px 0;
}

.food-row-item {
    display: flex;
    justify-content: space-between;
    background: var(--slate-50);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-200);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition-smooth);
}

.food-row-item:hover {
    background: var(--slate-900);
    color: var(--white);
    border-color: var(--slate-900);
}

.widget-summary {
    background: var(--slate-900);
    color: var(--white);
    padding: 18px 20px;
    border-radius: var(--radius-md);
}

.summary-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.88rem;
}

.summary-val {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--emerald-500);
}

.progress-bar-track {
    height: 6px;
    background: var(--slate-800);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--emerald-500);
    transition: width 0.3s ease;
}

/* SECTIONS */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-eyebrow {
    color: var(--emerald-600);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
}

.section-desc {
    color: var(--slate-500);
    margin-top: 6px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    padding: 36px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    background: var(--slate-900);
    color: var(--white);
    border-color: var(--slate-900);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.22);
}

.feature-card:hover .feat-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--emerald-500);
    transform: scale(1.1);
}

.feature-card:hover p {
    color: #94A3B8;
}

.feat-icon {
    width: 52px;
    height: 52px;
    background: var(--emerald-50);
    color: var(--emerald-600);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--slate-500);
    font-size: 0.92rem;
    transition: var(--transition-smooth);
}

/* HOW IT WORKS */
.how-section {
    background: var(--slate-900);
    color: var(--white);
    padding: 80px 24px;
}

.how-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header.dark-theme .section-title {
    color: var(--white);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.step-card {
    background: var(--slate-800);
    padding: 36px 28px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.step-card:hover {
    background: #1E293B;
    border-color: var(--emerald-500);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--emerald-500);
    font-weight: 800;
    margin-bottom: 12px;
}

.step-card h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.step-card p {
    color: #94A3B8;
    font-size: 0.9rem;
}

/* FOOTER */
.site-footer {
    background: var(--slate-900);
    color: var(--slate-500);
    padding: 28px 24px;
    border-top: 1px solid var(--slate-800);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text.light {
    color: var(--white);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--emerald-500);
    border-radius: 50%;
    margin-right: 6px;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-window {
    background: var(--white);
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.btn-close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--slate-500);
}

.modal-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--slate-200);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    font-weight: 700;
    color: var(--slate-500);
    cursor: pointer;
}

.tab-btn.active {
    color: var(--emerald-600);
    border-bottom: 2px solid var(--emerald-600);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.input-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: inherit;
}

.btn-submit-form {
    background: var(--emerald-600);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-submit-form:hover {
    background: var(--slate-900);
}

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
    }

    .nav-menu-list {
        display: none;
    }
}