/* style.css - Bright, Fresh, Trustworthy Design */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700&display=swap');

/* ========== CSS Variables ========== */
:root {
    /* Primary Colors - Fresh Greens */
    --primary-green: #00d084;
    --dark-green: #00b872;
    --accent-green: #7ef542;
    --light-green: #e8fff5;
    --pale-green: #f0fdf7;
    
    /* Trust Colors - Blues */
    --trust-blue: #0ea5e9;
    --light-blue: #e0f2fe;
    
    /* Neutral Colors */
    --white: #ffffff;
    --off-white: #fafafa;
    --light-gray: #f5f5f5;
    --border-gray: #e5e5e5;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #737373;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 20px rgba(0, 208, 132, 0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ========== Reset & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f0fdf7 0%, #e0f2fe 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== Navigation Bar ========== */
.navbar {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--light-green);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
}

.nav-logo i {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--light-green);
    color: var(--primary-green);
}

.nav-link.active {
    background: var(--primary-green);
    color: var(--white);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#user-email {
    color: var(--text-medium);
    font-size: 0.9rem;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--error);
    color: var(--white);
}

/* ========== Main Container ========== */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ========== Screen Management ========== */
.screen {
    display: none;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Button Styles ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--dark-green);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--border-gray);
}

.btn-secondary:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== Authentication Screen ========== */
.auth-container {
    max-width: 450px;
    margin: 4rem auto;
}

.auth-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-gray);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-medium);
}

.auth-switch a {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}
/* ========== Dashboard Screen ========== */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-header {
    text-align: center;
    margin-bottom: 2.5rem;
    /* CHANGED .jpg TO .png HERE */
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)), url('images/hero_bg.png');
    background-size: cover;
    background-position: center;
    padding: 4rem 1.5rem;
    border-radius: var(--radius-xl);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.welcome-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    color: var(--white);
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.welcome-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.wallet-card {
    border-color: var(--primary-green);
    background: linear-gradient(135deg, #e8fff5 0%, #ffffff 100%);
}

.wallet-card:hover {
    box-shadow: 0 8px 24px rgba(0, 208, 132, 0.25);
}

.loyalty-card {
    border-color: var(--warning);
    background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
}

.orders-card {
    border-color: var(--trust-blue);
    background: linear-gradient(135deg, var(--light-blue) 0%, #ffffff 100%);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.wallet-card .stat-icon {
    background: var(--primary-green);
    color: var(--white);
}

.loyalty-card .stat-icon {
    background: var(--warning);
    color: var(--white);
}

.orders-card .stat-icon {
    background: var(--trust-blue);
    color: var(--white);
}

.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-action {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Dashboard Section */
.dashboard-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-green);
}

.section-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.view-all {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-gray);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.empty-hint {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* CTA Button */
.btn-cta {
    width: 100%;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--off-white);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-green);
    transition: var(--transition);
}

.order-card:hover {
    background: var(--light-green);
    transform: translateX(4px);
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.order-location {
    font-size: 0.9rem;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-details {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.order-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.order-status {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-completed {
    background: #d1fae5;
    color: var(--success);
}

.status-preparing {
    background: #dbeafe;
    color: var(--info);
}

.status-delivery {
    background: #fef3c7;
    color: var(--warning);
}

.status-pending {
    background: #fee2e2;
    color: var(--error);
}

/* ========== Builder Screen ========== */
.builder-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    position: relative;
}

/* Step Progress */
.step-progress {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.step-item.active .step-circle {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 208, 132, 0.2);
}

.step-item.completed .step-circle {
    background: var(--success);
    color: var(--white);
}

.step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
}

.step-item.active .step-label {
    color: var(--primary-green);
}

.step-divider {
    width: 60px;
    height: 3px;
    background: var(--border-gray);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
}

.step-item.completed + .step-divider {
    background: var(--success);
}

/* ========== Builder Steps Backgrounds (NEW) ========== */
/* Base - Fresh Green */
.builder-step[data-step="1"] { 
    background: linear-gradient(to bottom right, #ffffff, #f0fdf4); 
}

/* Protein - Warm Orange/Beige */
.builder-step[data-step="2"] { 
    background: linear-gradient(to bottom right, #ffffff, #fff7ed); 
}

/* Veggies - Cool Teal/Green */
.builder-step[data-step="3"] { 
    background: linear-gradient(to bottom right, #ffffff, #ecfdf5); 
}

/* Toppings - Sunny Yellow */
.builder-step[data-step="4"] { 
    background: linear-gradient(to bottom right, #ffffff, #fefce8); 
}

/* Dressing - Fresh Blue */
.builder-step[data-step="5"] { 
    background: linear-gradient(to bottom right, #ffffff, #eff6ff); 
}

.builder-step {
    display: none;
    background: var(--white); /* Default fallback */
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.4s ease;
    border: 1px solid var(--border-gray);
}

.builder-step.active {
    display: block;
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.step-header p {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* Salad Type Grid */
.salad-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.type-card {
    background: linear-gradient(135deg, var(--pale-green) 0%, var(--white) 100%);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-gray);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-green);
}

.custom-type {
    background: linear-gradient(135deg, #fef3c7 0%, var(--white) 100%);
}

.type-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--primary-green);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
}

.custom-type .type-icon {
    background: var(--warning);
}

.type-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.type-card p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.btn-select {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-select:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
}

/* Ingredients Grid */
.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.ingredient-card {
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden; /* Keep images inside */
}

.ingredient-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-green);
}

.ingredient-card.selected {
    border-color: var(--primary-green);
    background: #f0fdf4; /* Very light green */
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.2);
}

.ingredient-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.ingredient-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    flex: 1;
    margin-top: 0.25rem;
}

.ingredient-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--success);
    color: var(--white);
}

.ingredient-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.ingredient-price {
    color: var(--primary-green);
    font-weight: 700;
}

.ingredient-calories {
    color: var(--text-light);
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-green);
    background: var(--white);
    color: var(--primary-green);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Builder Navigation */
.builder-navigation {
    grid-column: 1;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.builder-navigation .btn {
    flex: 1;
    max-width: 200px;
}

/* ========== Bowl Summary Sidebar (PREMIUM UPDATE) ========== */
.bowl-summary {
    grid-column: 2;
    grid-row: 2 / 4;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-lg);
}

.bowl-summary h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    border-bottom: 2px solid var(--light-green);
    padding-bottom: 1rem;
}

/* Summary Items List */
.summary-items {
    max-height: 250px; /* Taller */
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
}

.summary-items::-webkit-scrollbar {
    width: 6px;
}

.summary-items::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 3px;
}

.summary-items::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
}

.empty-summary {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 1rem;
    font-size: 0.95rem;
    font-style: italic;
    background: var(--off-white);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-gray);
}

/* NEW: Image-based Summary Item */
.summary-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-green);
}

.summary-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.summary-item-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.2;
}

.summary-item-qty {
    color: var(--text-light);
    font-size: 0.75rem;
}

.summary-item-price {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 0.95rem;
}

/* Summary Totals */
.summary-totals {
    margin-bottom: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-medium);
}

.total-row.total-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 2px solid var(--light-green);
}

.total-row.total-price span:last-child {
    color: var(--primary-green);
}

/* ========== Nutrition Widget (PREMIUM UPDATE) ========== */
.summary-nutrition {
    background: linear-gradient(145deg, #f0fdf4, #e6fffa);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.nutrition-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #166534; /* Darker green for text */
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nutrition-header i {
    color: var(--success);
}

.nutrition-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 0.35rem 0;
}

.nutrition-row span:first-child {
    color: #374151;
    font-weight: 500;
}

.nutrition-row span:last-child {
    color: #111827;
    font-weight: 700;
    background: rgba(255,255,255,0.6);
    padding: 2px 6px;
    border-radius: 4px;
}

.nutrition-row:not(:last-child) {
    border-bottom: 1px dashed rgba(22, 101, 52, 0.2);
}
/* ========== Orders Screen ========== */
.orders-container {
    max-width: 1000px;
    margin: 0 auto;
}

.orders-header {
    text-align: center;
    margin-bottom: 2rem;
}

.orders-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    width: fit-content;
    margin: 0 auto;
}

.filter-tab {
    padding: 0.75rem 2rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-medium);
}

.filter-tab:hover {
    background: var(--light-green);
    color: var(--primary-green);
}

.filter-tab.active {
    background: var(--primary-green);
    color: var(--white);
}

/* Order Tracking List */
.orders-tracking-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-tracking-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-gray);
}

.order-tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-green);
}

.order-tracking-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.order-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-medium);
    font-size: 0.9rem;
}

.order-meta i {
    margin-right: 0.25rem;
}

.order-tracking-amount {
    text-align: right;
}

.order-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

.order-payment-method {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Progress Timeline */
.progress-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.progress-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-gray);
    z-index: 0;
}

.timeline-progress-bar {
    position: absolute;
    top: 20px;
    left: 0;
    height: 4px;
    background: var(--primary-green);
    z-index: 1;
    transition: width 0.5s ease;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.timeline-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-light);
    transition: var(--transition);
}

.timeline-step.completed .timeline-icon {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--white);
}

.timeline-step.active .timeline-icon {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--white);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 208, 132, 0);
    }
}

.timeline-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
}

.timeline-step.completed .timeline-label,
.timeline-step.active .timeline-label {
    color: var(--primary-green);
}

.order-special-instructions {
    background: var(--pale-green);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

.order-special-instructions strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* ========== Wallet Screen ========== */
.wallet-container {
    max-width: 900px;
    margin: 0 auto;
}

.wallet-balance-card {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.balance-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
}

.balance-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.balance-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
}

.wallet-balance-card .btn-success {
    background: var(--white);
    color: var(--primary-green);
}

.wallet-balance-card .btn-success:hover {
    background: var(--off-white);
}

/* Wallet Stats */
.wallet-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.wallet-stat {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wallet-stat .stat-label {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
}

.wallet-stat .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Transaction Section */
.transaction-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.transaction-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--off-white);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--border-gray);
    transition: var(--transition);
}

.transaction-item:hover {
    background: var(--light-green);
}

.transaction-item.credit {
    border-left-color: var(--success);
}

.transaction-item.debit {
    border-left-color: var(--error);
}

.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.transaction-item.credit .transaction-icon {
    background: #d1fae5;
    color: var(--success);
}

.transaction-item.debit .transaction-icon {
    background: #fee2e2;
    color: var(--error);
}

.transaction-details {
    flex: 1;
}

.transaction-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.transaction-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.transaction-amount-section {
    text-align: right;
}

.transaction-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

.transaction-item.credit .transaction-amount {
    color: var(--success);
}

.transaction-item.debit .transaction-amount {
    color: var(--error);
}

.transaction-balance {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ========== Modals ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--light-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light-gray);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-medium);
}

.modal-close:hover {
    background: var(--error);
    color: var(--white);
}

.modal-body {
    padding: 2rem;
}

/* Payment Modal Styles */
.payment-summary {
    background: var(--pale-green);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.payment-row.total {
    font-size: 1.5rem;
    font-weight: 700;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 2px solid var(--primary-green);
}

.payment-row.total span:last-child {
    color: var(--primary-green);
}

.payment-methods h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.payment-method {
    margin-bottom: 0.75rem;
}

.method-radio {
    width: 100%;
}

.method-radio input[type="radio"] {
    display: none;
}

.method-radio label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.method-radio input[type="radio"]:checked + label {
    border-color: var(--primary-green);
    background: var(--light-green);
}

.method-radio label i {
    font-size: 1.5rem;
    color: var(--primary-green);
}

.method-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.method-name {
    font-weight: 600;
    color: var(--text-dark);
}

.method-desc, .method-balance {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Top Up Modal */
.topup-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.topup-amount {
    padding: 1rem;
    border: 2px solid var(--border-gray);
    background: var(--white);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
}

.topup-amount:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.topup-amount.selected {
    background: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--light-green);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .builder-container {
        grid-template-columns: 1fr;
    }
    
    .bowl-summary {
        grid-column: 1;
        grid-row: auto;
        position: static;
    }
}

/* [Replace the existing media query at bottom of style.css] */

@media (max-width: 768px) {
    /* 1. App-Like Compact Navigation */
    .navbar {
        padding: 0.5rem 1rem;
    }

    .nav-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Top Row: Logo and User Profile */
    .nav-logo, .nav-user {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-logo {
        border-bottom: 1px solid var(--light-gray);
        padding-bottom: 0.5rem;
    }

    /* Second Row: Horizontally Scrollable Menu Links */
    .nav-links {
        display: flex;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px; /* Space for scrollbar */
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }
    
    .nav-links::-webkit-scrollbar {
        display: none; /* Hide scrollbar Chrome/Safari */
    }

    .nav-link {
        white-space: nowrap;
        background: var(--off-white);
        border: 1px solid var(--border-gray);
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        flex-shrink: 0; /* Prevent shrinking */
    }
    
    .nav-link.active {
        background: var(--primary-green);
        color: white;
        border-color: var(--primary-green);
    }

    /* 2. Cleaner Step Progress (Remove Background Image) */
    .step-progress {
        background-image: none !important; /* Remove the heavy image */
        background-color: var(--white);
        border: 1px solid var(--border-gray);
        padding: 1rem;
        border-radius: var(--radius-md);
        overflow-x: auto;
        justify-content: flex-start;
        margin-bottom: 1.5rem;
    }
    
    .step-label {
        color: var(--text-dark); /* Make text readable on white */
        font-size: 0.75rem;
    }

    /* 3. Better Grid Layouts */
    .stats-grid {
        grid-template-columns: 1fr; /* Stack cards */
        gap: 1rem;
    }
    
    .ingredients-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 items per row */
        gap: 0.75rem;
    }

    .salad-type-grid {
        grid-template-columns: 1fr;
    }

    /* 4. Fix "Squashed" Cards */
    .ingredient-card {
        padding: 0.5rem;
    }
    
    .ingredient-card img {
        height: 100px !important;
        object-fit: contain;
    }
    
    .ingredient-info {
        flex-direction: column;
        gap: 0.2rem;
    }

    /* 5. Non-Obtrusive Chatbot Button */
    .chatbot-fab {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .chatbot-fab span {
        display: none; /* Hide text "Need Help?" */
    }
    
    .chatbot-fab i {
        font-size: 1.5rem;
        margin: 0;
    }

    /* 6. Typography & Spacing */
    .main-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    .welcome-header h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .welcome-header p {
        font-size: 0.95rem;
    }
    
    /* 7. Bowl Summary (Mobile Adjustment) */
    .builder-container {
        display: flex;
        flex-direction: column;
    }
    
    .bowl-summary {
        order: 10; /* Move to bottom */
        position: relative;
        top: 0;
        margin-top: 2rem;
        width: 100%;
    }
    
    /* Ensure last content isn't hidden behind FAB */
    body {
        padding-bottom: 80px;
    }
}

/* Profile Modal Specific Styles */
#profile-modal .modal-content {
    max-width: 480px;
}

#profile-modal .modal-header p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

#profile-modal .form-input[readonly] {
    background: var(--light-gray);
    cursor: not-allowed;
}

#profile-modal small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ========== Cart Nav Link ========== */
.cart-nav-link {
    position: relative;
    padding: 0.75rem 1rem !important;
}

#cart-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--error);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ========== Cart Modal ========== */
#cart-modal .modal-content {
    max-width: 600px;
}

.cart-items-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.cart-item-ingredients {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0.25rem 0;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-green);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-actions .qty-display {
    font-size: 1rem;
    font-weight: 700;
}

.btn-remove-item {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-order-details {
    margin-bottom: 1.5rem;
}

#cart-modal .form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

#cart-modal .form-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
}

/* Style for disabled form inputs */
.form-input:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ========== Cart Item Nutrition (Cart Modal) ========== */
.cart-item-nutrition {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-medium);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-gray);
}

.cart-item-nutrition span {
    background: var(--light-gray);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-top: 0.5rem; /* Added for spacing */
}

/* ========== Chatbot FAB (Floating Action Button) ========== */
.chatbot-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: var(--white);
    border: none;
    border-radius: 30px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 990;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

.chatbot-fab i {
    font-size: 1.25rem;
}

/* ========== Chatbot Modal & Aesthetics ========== */
#chatbot-modal .modal-content {
    max-width: 420px; /* Slightly narrower for chat feel */
    height: 65vh;
    max-height: 580px;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#chatbot-modal .modal-header {
    background: linear-gradient(135deg, #f0fdf7 0%, #ffffff 100%);
    border-bottom: 1px solid var(--light-green);
    padding: 1rem 1.5rem;
}

#chatbot-modal .modal-header h2 {
    font-size: 1.2rem;
    color: var(--primary-green);
}

#chatbot-modal .modal-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fdfdfd; /* Very subtle grey */
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Chat Bubbles */
.chat-message {
    padding: 0.85rem 1.2rem;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 0.95rem;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.chat-message.bot {
    background: var(--white);
    color: var(--text-dark);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--light-gray);
}

/* Optional: Add a tiny bot icon/avatar next to message */
.chat-message.bot::before {
    /* Simple dot for now, can be image */
    content: '';
    position: absolute;
    left: -10px;
    bottom: 6px;
    width: 6px;
    height: 6px;
    background: var(--primary-green);
    border-radius: 50%;
    opacity: 0.5;
}

.chat-message.user {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 208, 132, 0.2);
}

/* Chat Options Area */
.chat-options {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-gray);
    background: var(--white);
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap if needed */
    gap: 0.6rem;
    justify-content: flex-end; /* Align right like user responses */
}

.chat-option-btn {
    display: inline-block;
    width: auto; /* Auto width based on text */
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--primary-green);
    background: var(--pale-green);
    border-radius: 20px; /* Pill shape */
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary-green);
    text-align: center;
}

.chat-option-btn:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Embedded Form for Chatbot */
.chat-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.5rem 0;
    width: 100%;
}

.chat-form .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-medium);
}

.chat-form .form-input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: var(--off-white);
}

.chat-form .form-input:focus {
    background: var(--white);
}

/* Recipe Card Styles in Chat */
.recipe-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.recipe-header {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recipe-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recipe-row {
    display: flex;
    flex-direction: column; /* Stack on small screens/narrow chat */
    gap: 0.25rem;
    border-bottom: 1px dashed #f3f4f6;
    padding-bottom: 0.5rem;
}

.recipe-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recipe-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
}

.recipe-value {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
    padding-left: 1.2rem; /* Indent slightly */
}

.recipe-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px; /* For border effect */
    background: #f0fdf4;
    border-top: 1px solid #d1fae5;
    margin-top: 0;
}

.macro-item {
    padding: 0.6rem 0.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.macro-item.cal {
    color: var(--primary-green);
    background: rgba(255,255,255,0.5);
}

.macro-val {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.macro-lbl {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
}

/* [Add to style.css] Streak Feature Styles */

.streak-container {
    background: linear-gradient(135deg, #ffedd5 0%, #fff7ed 100%);
    border: 2px solid #fdba74;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: slideDown 0.5s ease;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.15);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.streak-icon-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-fire {
    font-size: 3.5rem;
    background: -webkit-linear-gradient(#ef4444, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
    animation: burn 1.5s infinite alternate;
}

@keyframes burn {
    from { transform: scale(1); filter: brightness(1); }
    to { transform: scale(1.1); filter: brightness(1.2); }
}

.streak-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.streak-info {
    flex: 1;
}

.streak-info h3 {
    color: #9a3412;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    font-family: 'Poppins', sans-serif;
}

.streak-info p {
    color: #c2410c;
    font-size: 0.9rem;
}

.btn-claim-reward {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.btn-claim-reward:hover {
    transform: scale(1.05);
}

/* [Add to bottom of style.css] Mobile Optimization Overrides */

@media (max-width: 768px) {
    /* 1. Fix Navigation Stacking */
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem;
    }

    .nav-links {
        width: 100%;
        overflow-x: auto; /* Allow horizontal scroll for links */
        padding-bottom: 0.5rem;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .nav-link {
        white-space: nowrap; /* Prevent text wrapping */
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .nav-user {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid var(--border-gray);
        padding-top: 1rem;
    }

    /* 2. Fix Stats Grid (Prevent Overflow) */
    .stats-grid {
        grid-template-columns: 1fr; /* Stack vertically */
    }

    .stat-card {
        padding: 1.5rem;
    }

    /* 3. Fix Builder Layout */
    .builder-container {
        display: flex;
        flex-direction: column;
    }

    .bowl-summary {
        position: static; /* Remove sticky on mobile */
        width: 100%;
        margin-top: 2rem;
        order: 10; /* Move to bottom */
    }
    
    /* 4. Fix Step Progress Bar */
    .step-progress {
        padding: 1rem;
        justify-content: flex-start;
        overflow-x: auto; /* Scrollable steps */
    }
    
    .step-item {
        min-width: 60px; /* Ensure click target size */
    }
    
    .step-divider {
        min-width: 30px;
    }

    /* 5. Fix Ingredients Grid */
    .ingredients-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 items per row */
        gap: 0.75rem;
    }
    
    .ingredient-card {
        padding: 0.75rem;
    }
    
    .ingredient-card img {
        height: 100px !important; /* Smaller images */
    }

    /* 6. Streak Container Mobile */
    .streak-container {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .streak-badge {
        right: 50%;
        transform: translateX(50%);
        bottom: -10px;
    }

    /* 7. Modal Fixes */
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 85vh;
    }
    
    .topup-options {
        grid-template-columns: repeat(3, 1fr); /* Tighter grid */
    }
}

/* Extra Small Screens (Small Phones) */
@media (max-width: 480px) {
    .welcome-header h1 {
        font-size: 1.75rem;
    }
    
    .ingredients-grid {
        grid-template-columns: 1fr; /* 1 item per row for very small screens */
    }
    
    .chat-message {
        max-width: 95%; /* Wider bubbles */
    }
}

/* [Replace Visual Bowl Stack section in style.css] */

.visual-bowl-container {
    height: 300px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    padding-bottom: 10px;
    /* Make the container slightly wider to accommodate the new bowl width */
    width: 100%;
    overflow: hidden; 
}

/* The Bowl Shape - Wider & Deeper */
.visual-bowl-shape {
    position: relative;
    /* CHANGE: Increased width to 350px for more text room */
    width: 350px; 
    height: 170px; 
    
    border-radius: 10px 10px 170px 170px; /* Adjusted curve */
    
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border: 4px solid #e5e7eb;
    border-top: 1px solid rgba(0,0,0,0.05);
    overflow: hidden; 
    display: flex;
    flex-direction: column-reverse; 
    align-items: stretch;
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.05),
        inset 0 -10px 20px rgba(0,0,0,0.02);
}

.bowl-layer {
    width: 100%;
    display: flex;
    align-items: stretch; /* Ensure full height */
    transition: all 0.3s ease;
    border-top: 1px solid rgba(255,255,255,0.3);
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.3s forwards;
    /* Prevent layer from expanding if text is too long */
    overflow: hidden; 
}

@keyframes slideIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Individual Tabs - THE FIX */
.layer-item-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    /* CHANGE: Much tighter padding */
    padding: 0 1px; 
    
    /* CHANGE: Smaller, Condensed Font */
    font-size: 0.58rem; /* approx 9px */
    font-weight: 700;
    line-height: 1.0; /* Tight lines */
    letter-spacing: -0.3px; /* Squeeze letters slightly */
    
    color: white;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    border-right: 1px solid rgba(255,255,255,0.2);
    
    /* Allow wrapping but hide overflow */
    word-wrap: break-word;
    overflow: hidden; 
    min-width: 0; /* Flexbox fix for wrapping */
}

.layer-item-tab:last-child {
    border-right: none;
}

/* CHANGE: Less aggressive safe zones to save space */
.layer-item-tab:first-child {
    padding-left: 6px; 
}
.layer-item-tab:last-child {
    padding-right: 6px; 
}

/* Badge for Quantity (e.g., x2) - floating to save space */
.qty-badge {
    position: absolute; /* Float it so it doesn't break text flow */
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border-radius: 3px;
    padding: 0px 2px;
    font-size: 0.55rem;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Layer Definitions */
.type-base { background: #15803d; flex: 2; font-size: 0.8rem; letter-spacing: normal; }
.type-protein { background: #c2410c; flex: 1.5; }
.type-veg { background: #0ea5e9; flex: 1.2; }
.type-topping { background: #db2777; flex: 1; }
.type-dressing { background: #eab308; color: #422006; flex: 0.8; text-shadow: none; }
.type-dressing .layer-item-tab { color: #422006; text-shadow: none; }

/* Mobile Adjustment */
@media (max-width: 768px) {
    .visual-bowl-shape { width: 300px; height: 150px; border-radius: 10px 10px 150px 150px; }
    .layer-item-tab { font-size: 0.5rem; letter-spacing: -0.5px; } /* Even smaller on mobile */
}

.visual-empty-msg {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: #9ca3af; font-size: 0.9rem; width: 100%; text-align: center; pointer-events: none;
}

/* [Add to bottom of style.css] Dynamic Calorie Meter */

.calorie-meter-container {
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.cal-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
}

.cal-progress-bg {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.cal-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--success); /* Default Green */
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
}

.cal-label {
    font-size: 0.75rem;
    text-align: right;
    color: var(--text-light);
    font-weight: 500;
    height: 16px; /* Prevent jumping */
}

/* Status Colors */
.meter-low { background: #10b981; } /* Green */
.meter-med { background: #f59e0b; } /* Orange */
.meter-high { background: #ef4444; } /* Red */

/* Text Colors for the Value */
.text-low { color: #10b981; }
.text-med { color: #f59e0b; }
.text-high { color: #ef4444; }

/* [Add to bottom of style.css] Favorites & Quick Reorder */

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.fav-card {
    background: white;
    /* Dashed gold border to signify 'saved' or 'special' */
    border: 2px dashed #fcd34d; 
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fav-card:hover {
    border-color: #f59e0b;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.fav-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.fav-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.fav-price {
    background: #fffbeb;
    color: #b45309;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
}

.fav-ingredients {
    font-size: 0.85rem;
    color: var(--text-medium);
    line-height: 1.5;
    flex-grow: 1; 
    background: #fafafa;
    padding: 0.5rem;
    border-radius: 6px;
}

.btn-reorder {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-reorder:hover {
    background: var(--dark-green);
}

/* Save Favorite Button (In Cart) */
.btn-icon-only {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-gray);
    background: white;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon-only:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* When active (saved) */
.btn-icon-only.active {
    border-color: #ef4444;
    background: #fef2f2;
}

.btn-icon-only.active i {
    font-weight: 900; /* Solid heart */
    color: #ef4444;
}

/* [Add to bottom of style.css] Hero Timer */

.hero-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark */
    backdrop-filter: blur(4px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    animation: fadeIn 1s ease 0.5s forwards; /* Delay fade in */
    opacity: 0; /* Hidden initially */
}

/* Make it pop on hover */
.hero-timer:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.75);
    border-color: var(--warning);
}

.hero-timer i {
    color: var(--warning); /* Yellow stopwatch icon */
    font-size: 1.2rem;
    animation: pulseIcon 2s infinite;
}

@keyframes pulseIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hero-timer span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
}

.timer-countdown {
    color: var(--white) !important;
    font-family: 'Courier New', monospace; /* Monospace for steady numbers */
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .hero-timer {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem 1rem;
        border-radius: 12px;
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .timer-countdown {
        font-size: 1.25rem !important;
    }
}

/* [Add to bottom of style.css] Non-Linear Navigation */

.step-item {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.step-item:hover {
    transform: translateY(-5px);
}

.step-item:hover .step-circle {
    box-shadow: 0 0 0 4px rgba(0, 208, 132, 0.4);
    background: var(--light-green);
    color: var(--primary-green);
}

.step-item.active:hover {
    transform: none; /* Don't move the active one */
}
.home-logo {
    display: block;
    max-width: 250px;       /* Adjust size here */
    width: 100%;
    height: auto;
    margin: 0 auto 1rem auto;
    object-fit: contain;    /* Ensures PNG aspect ratio stays perfect */
}

/* Adjusts the text below the logo so it doesn't feel cramped */
.welcome-header h1 {
    margin-top: 10px;
}

/* Style for the top-left navigation logo */
.nav-logo-img {
    height: 50px;       /* Restricts height to fit the navbar */
    width: auto;        /* Maintains the correct shape */
    object-fit: contain;
    display: block;
}

/* Ensure the container centers the image vertically */
.nav-logo {
    display: flex;
    align-items: center;
    padding: 5px 0;
}