﻿/* ==========================================================================
   HÔM NAY ĂN GÌ? - GIAO DIỆN SOFT-TECH PASTEL (DAWN LAVENDER & PEACH)
   Bạn có thể dễ dàng tùy chỉnh toàn bộ bảng màu ở khối :root bên dưới
========================================================================== */

:root {
    /* 1. Bảng màu chính */
    --bg-opal: #F6F5FC; /* Nền chính Trắng Ánh Tím */
    --text-title: #282055; /* Chữ tiêu đề tím than thanh lịch */
    --text-main: #2D2A44; /* Chữ nội dung chính */
    --text-sub: #7C7994; /* Chữ phụ / ghi chú */

    --lavender: #8E7BF4; /* Điểm nhấn Oải hương nhạt */
    --lavender-soft: rgba(142, 123, 244, 0.14);
    --peach-start: #FF9A76; /* Gradient Đào & San Hô (Active / Lock) */
    --peach-end: #FF6B6B;
    --peach-soft-bg: rgba(255, 142, 114, 0.12);
    --peach-soft-border: rgba(255, 130, 102, 0.35);
    --peach-text: #C95A42;
    --teal-start: #1AA6B7; /* Gradient Ngọc biển (CTA) */
    --teal-end: #4CE2C6;
    --mint-selected-bg: rgba(212, 247, 238, 0.72);
    --mint-selected-border: #6EDCC8;
    --foggy-grey: rgba(235, 236, 244, 0.78); /* Xám Sương Mờ (Trạng thái thường) */
    --glass-bg: rgba(255, 255, 255, 0.74); /* Nền kính mờ Glassmorphism */
    --glass-border: rgba(255, 255, 255, 0.92);
    /* 2. Thông số bo góc & đổ bóng mềm */
    --radius-card: 26px;
    --radius-input: 20px;
    --radius-pill: 999px;
    --shadow-soft: 0 10px 30px rgba(114, 102, 178, 0.08);
    --shadow-chip: 0 4px 14px rgba(114, 102, 178, 0.06);
}

/* Nền tổng thể với hiệu ứng ánh sáng Bình Minh (Lavender + Peach + Aqua) */
html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-opal);
    background-image: radial-gradient(circle at 12% 8%, rgba(214, 200, 255, 0.55) 0%, transparent 45%), radial-gradient(circle at 90% 10%, rgba(255, 214, 194, 0.52) 0%, transparent 48%), radial-gradient(circle at 82% 88%, rgba(196, 244, 236, 0.55) 0%, transparent 48%), radial-gradient(circle at 15% 85%, rgba(230, 222, 255, 0.4) 0%, transparent 45%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
}

main, .content {
    background: transparent !important;
}

/* Khung chính chuẩn Mobile-first */
.mobile-container {
    max-width: 460px;
    margin: 0 auto;
    padding: 12px 16px 104px 16px; /* Chừa khoảng trống cho thanh Bottom Nav nổi */
}

/* ==========================================================================
   HEADER & CỤM CHỌN SỐ NGƯỜI ĂN
========================================================================== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.app-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-title);
    margin: 0;
}

.people-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--text-main);
}

.people-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 198, 178, 0.45), rgba(216, 204, 255, 0.55));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-title);
}

.people-input-box {
    width: 42px;
    height: 32px;
    border-radius: 12px;
    border: 1.5px solid rgba(142, 123, 244, 0.25);
    background: rgba(255, 255, 255, 0.88);
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-title);
    box-shadow: 0 2px 8px rgba(114, 102, 178, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .people-input-box:focus {
        outline: none;
        border-color: var(--lavender);
        box-shadow: 0 0 0 3px var(--lavender-soft);
    }

    /* Ẩn mũi tên tăng/giảm mặc định của trình duyệt để ô số gọn gàng hơn */
    .people-input-box::-webkit-inner-spin-button,
    .people-input-box::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

/* ==========================================================================
   Ô NHẬP NGUYÊN LIỆU TỦ LẠNH (GLASS 1 DÒNG)
========================================================================== */
.fridge-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-input);
    padding: 9px 14px;
    box-shadow: var(--shadow-chip);
    margin-bottom: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .fridge-input-wrap:focus-within {
        border-color: rgba(142, 123, 244, 0.55);
        box-shadow: 0 6px 20px rgba(142, 123, 244, 0.14);
    }

.fridge-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.92rem;
    color: var(--text-main);
    outline: none;
}

    .fridge-input::placeholder {
        color: #9A97B0;
    }

.fridge-clear-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--foggy-grey);
    color: var(--text-sub);
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

    .fridge-clear-btn:hover {
        background: rgba(255, 107, 107, 0.16);
        color: var(--peach-end);
    }

/* ==========================================================================
   CỤM NÚT RANDOM (PEACH-CORAL GRADIENT & SOFT PEACH)
========================================================================== */
.random-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-random-soft {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--peach-soft-border);
    background: var(--peach-soft-bg);
    color: var(--peach-text);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

    .btn-random-soft.active {
        border: none;
        background: linear-gradient(135deg, var(--peach-start), var(--peach-end));
        color: #FFFFFF;
        box-shadow: 0 8px 18px rgba(255, 114, 102, 0.34);
    }

    .btn-random-soft:active {
        transform: scale(0.96);
    }

/* ==========================================================================
   TIÊU ĐỀ DANH MỤC (3 ICON 3D THỦY TINH MỜ) & THẺ MÓN DẠNG VIÊN THUỐC
========================================================================== */
.category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-title);
    margin: 12px 0 8px 2px;
}

.category-hint {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-sub);
}

.icon-3d-badge {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.icon-3d-soup {
    background: linear-gradient(135deg, rgba(167, 243, 208, 0.55), rgba(52, 211, 153, 0.28));
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 4px 10px rgba(52, 211, 153, 0.18);
}

.icon-3d-meat {
    background: linear-gradient(135deg, rgba(255, 196, 179, 0.65), rgba(255, 107, 107, 0.28));
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 4px 10px rgba(255, 107, 107, 0.18);
}

.icon-3d-veggie {
    background: linear-gradient(135deg, rgba(187, 247, 208, 0.65), rgba(74, 222, 128, 0.28));
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 4px 10px rgba(74, 222, 128, 0.18);
}

.scroll-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 10px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

    .scroll-container::-webkit-scrollbar {
        display: none;
    }

/* Thẻ món ăn dạng viên thuốc tối giản - KHÔNG có icon thừa bên trong */
.dish-capsule {
    flex: 0 0 auto;
    border-radius: var(--radius-pill);
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-chip);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s ease;
}

    .dish-capsule:active {
        transform: scale(0.96);
    }

    .dish-capsule.selected {
        background: var(--mint-selected-bg);
        border-color: var(--mint-selected-border);
        color: #135D54;
        box-shadow: 0 6px 16px rgba(76, 226, 198, 0.26);
    }

/* ==========================================================================
   THẺ KÍNH MỜ (GLASS CARD) & KHAY MÂM CƠM ĐÃ CHỌN
========================================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 18px;
    margin-bottom: 16px;
}

.tray-handle {
    width: 38px;
    height: 4px;
    border-radius: 99px;
    background: rgba(142, 123, 244, 0.22);
    margin: -4px auto 14px auto;
}

.tray-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-title);
    margin-bottom: 10px;
}

    .tray-title span {
        font-weight: 600;
        color: var(--text-sub);
    }

.meal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(142, 123, 244, 0.1);
}

    .meal-row:last-of-type {
        border-bottom: none;
        margin-bottom: 6px;
    }

.meal-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.meal-meta {
    font-size: 0.78rem;
    color: var(--text-sub);
    margin-top: 2px;
}

/* Nút Chốt Khóa Tròn Dạng Bong Bóng (Bubble Lock) */
.btn-bubble-lock {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--foggy-grey);
    color: #8E8CA8;
    cursor: pointer;
    transition: transform 0.16s, background 0.2s, box-shadow 0.2s;
}

    .btn-bubble-lock.locked {
        background: linear-gradient(135deg, var(--peach-start), var(--peach-end));
        color: #FFFFFF;
        box-shadow: 0 6px 14px rgba(255, 114, 102, 0.35);
    }

    .btn-bubble-lock:active {
        transform: scale(0.9);
    }

/* ==========================================================================
   NÚT HÀNH ĐỘNG CHÍNH CTA (TEAL TO AQUA GRADIENT)
========================================================================== */
.btn-cta-aqua {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--teal-start), var(--teal-end));
    color: #FFFFFF;
    font-size: 0.96rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 22px rgba(34, 184, 184, 0.3);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}

    .btn-cta-aqua:active {
        transform: scale(0.97);
    }

/* ==========================================================================
   TAB 2 (ĐI CHỢ) & TAB 3 (CHI TIÊU) - ĐỒNG BỘ SOFT-TECH PASTEL
========================================================================== */
.page-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-title);
    text-align: center;
    margin-bottom: 16px;
}

.shopping-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-title);
    margin-bottom: 10px;
}

.shopping-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(142, 123, 244, 0.09);
}

    .shopping-row:last-child {
        border-bottom: none;
    }

.soft-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--teal-start);
    cursor: pointer;
    margin-right: 12px;
}

.qty-pill-fresh {
    font-size: 0.84rem;
    font-weight: 700;
    color: #137A7F;
    background: rgba(76, 226, 198, 0.18);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.qty-pill-pantry {
    font-size: 0.84rem;
    font-weight: 700;
    color: #6B5B95;
    background: var(--lavender-soft);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

/* Ô nhập tiền chợ */
.cost-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(142, 123, 244, 0.25);
    border-radius: var(--radius-input);
    padding: 6px 14px;
    margin-bottom: 14px;
}

.cost-input {
    flex: 1;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-title);
    outline: none;
}

.cost-unit {
    font-weight: 700;
    color: var(--lavender);
    font-size: 0.9rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.stat-card-wide {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 232, 224, 0.65));
    border: 1.5px solid var(--glass-border);
    border-radius: 22px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-chip);
}

.stat-card-mini {
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: 22px;
    padding: 14px 10px;
    text-align: center;
    box-shadow: var(--shadow-chip);
}

.btn-delete-soft {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 107, 107, 0.12);
    color: var(--peach-end);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

    .btn-delete-soft:hover {
        background: rgba(255, 107, 107, 0.24);
    }

.toast-saved {
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: rgba(76, 226, 198, 0.2);
    color: #0E6B63;
    font-size: 0.86rem;
    font-weight: 700;
}

/* ==========================================================================
   THANH ĐIỀU HƯỚNG DƯỚI CÙNG (FLOATING GLASS BOTTOM DOCK)
========================================================================== */
.bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
    width: calc(100% - 28px);
    max-width: 432px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 32px rgba(102, 92, 168, 0.14);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 22px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #6E6D86;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .nav-item.active {
        background: #FFFFFF;
        color: var(--peach-text);
        box-shadow: 0 4px 14px rgba(114, 102, 178, 0.1);
    }

/* ==========================================================================
   GIỮ NGUYÊN CSS HỆ THỐNG MẶC ĐỊNH CỦA BLAZOR (KHÔNG XÓA)
========================================================================== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #E4E1F5;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--lavender);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: var(--text-title);
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Đang tải...");
    }
/* ==========================================================================
   BỔ SUNG: ICON BÁNH RĂNG CÀI ĐẶT, BẢNG CÀI ĐẶT KÍNH MỜ & TAB ĐI CHỢ MỚI
========================================================================== */

/* Chỉnh lại nhẹ cỡ tiêu đề để header thoáng khi có thêm nút bánh răng */
.app-title {
    font-size: 1.4rem;
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Nút bánh răng nhỏ kính mờ góc trên */
.btn-gear-soft {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-title);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-chip);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s, border-color 0.2s;
}

    .btn-gear-soft:hover {
        color: var(--lavender);
        border-color: rgba(142, 123, 244, 0.45);
    }

    .btn-gear-soft:active {
        transform: rotate(35deg) scale(0.92);
    }

/* Header cho Tab 2 & Tab 3 để luôn có nút bánh răng ở góc phải */
.subpage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

    .subpage-header .page-section-title {
        margin-bottom: 0;
        text-align: left;
        font-size: 1.28rem;
    }

/* Nền tối mờ & Bảng Cài đặt / Tài khoản (Glass Bottom Sheet) */
.settings-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(40, 32, 85, 0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 14px;
    z-index: 1500;
}

.settings-sheet {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1.5px solid #FFFFFF;
    border-radius: 28px;
    padding: 18px 20px 22px 20px;
    box-shadow: 0 20px 48px rgba(40, 32, 85, 0.18);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.settings-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-title);
    margin: 0;
}

.settings-box {
    background: rgba(246, 245, 252, 0.85);
    border: 1px solid rgba(142, 123, 244, 0.16);
    border-radius: 20px;
    padding: 14px;
    margin-bottom: 12px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.btn-soft-outline {
    width: 100%;
    height: 42px;
    border-radius: var(--radius-pill);
    border: 1.5px solid rgba(142, 123, 244, 0.35);
    background: #FFFFFF;
    color: var(--text-title);
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

    .btn-soft-outline:active {
        transform: scale(0.97);
    }

/* Tab 2 Đi chợ: Ô sửa định lượng tự do & Trạng thái chưa tích */
.shopping-row {
    gap: 10px;
    transition: opacity 0.18s ease;
}

    .shopping-row.unchecked {
        opacity: 0.52;
    }

.qty-edit-input {
    width: 104px;
    height: 32px;
    border-radius: 12px;
    border: 1.5px solid rgba(142, 123, 244, 0.22);
    background: rgba(255, 255, 255, 0.92);
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
    color: #137A7F;
    padding: 0 8px;
    flex-shrink: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .qty-edit-input.pantry {
        color: #6B5B95;
    }

    .qty-edit-input:focus {
        outline: none;
        border-color: var(--teal-start);
        box-shadow: 0 0 0 3px rgba(76, 226, 198, 0.22);
    }

/* Cụm 2 nút Chia sẻ Zalo & Copy nằm cạnh nhau */
.share-action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.btn-share-zalo {
    flex: 1.25;
    height: 46px;
    border: none;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #6E8BFF, #8E7BF4);
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 8px 18px rgba(126, 123, 244, 0.3);
    cursor: pointer;
    transition: transform 0.15s;
}

.btn-copy-list {
    flex: 1;
    height: 46px;
    border: 1.5px solid rgba(142, 123, 244, 0.35);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-title);
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.15s;
}

    .btn-share-zalo:active,
    .btn-copy-list:active {
        transform: scale(0.96);
    }

.shopping-helper-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-sub);
    margin: -4px 4px 12px 4px;
}

.link-btn-mini {
    border: none;
    background: transparent;
    color: var(--lavender);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
}
/* ==========================================================================
   HỖ TRỢ TRƯỢT NGANG TRÊN MÁY TÍNH (CHỈ ÁP DỤNG KHI DÙNG CHUỘT PC)
========================================================================== */
@media (hover: hover) and (pointer: fine) {
    .scroll-container {
        cursor: grab; /* Đổi mũi tên thành hình bàn tay nắm để gợi ý kéo */
        user-select: none; /* Không bị bôi đen chữ tên món ăn khi kéo chuột */
        scrollbar-width: thin; /* Hiện thanh cuộn mảnh trên Firefox */
        scrollbar-color: rgba(142, 123, 244, 0.35) transparent;
        padding-bottom: 12px;
    }

        .scroll-container.is-dragging {
            cursor: grabbing; /* Đổi sang bàn tay đang nắm chặt lúc kéo */
        }

        /* Thanh cuộn mảnh tông Oải hương cho Chrome, Edge, Cốc Cốc */
        .scroll-container::-webkit-scrollbar {
            display: block;
            height: 6px;
        }

        .scroll-container::-webkit-scrollbar-track {
            background: rgba(142, 123, 244, 0.08);
            border-radius: 99px;
        }

        .scroll-container::-webkit-scrollbar-thumb {
            background: rgba(142, 123, 244, 0.32);
            border-radius: 99px;
        }

            .scroll-container::-webkit-scrollbar-thumb:hover {
                background: rgba(142, 123, 244, 0.58);
            }
}
/* ==========================================================================
   BỔ SUNG: CỤM 2 NÚT (XÓA MÓN + KHÓA MÓN) TRONG KHAY MÂM CƠM ĐÃ CHỌN
========================================================================== */

/* Giúp tên món dài tự xuống dòng gọn gàng, không đẩy 2 nút ra ngoài mép màn hình */
.meal-info {
    flex: 1;
    min-width: 0;
}

/* Bọc nút Xóa (bên trái) và nút Khóa (bên phải) thẳng hàng nhau */
.meal-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Nút bong bóng Xóa món đồng bộ kích thước 36x36px với nút Chốt khóa */
.btn-bubble-remove {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 107, 0.11);
    color: #E06363;
    cursor: pointer;
    transition: transform 0.16s, background 0.2s, color 0.2s;
}

    .btn-bubble-remove:hover {
        background: rgba(255, 107, 107, 0.22);
        color: var(--peach-end);
    }

    .btn-bubble-remove:active {
        transform: scale(0.9);
    }
/* ==========================================================================
   BỔ SUNG: BIỂU MẪU ĐĂNG NHẬP & ĐỒNG BỘ TRONG BẢNG CÀI ĐẶT BÁNH RĂNG
========================================================================== */
.auth-input {
    width: 100%;
    height: 40px;
    border-radius: 14px;
    border: 1.5px solid rgba(142, 123, 244, 0.24);
    background: #FFFFFF;
    padding: 0 12px;
    font-size: 0.88rem;
    color: var(--text-main);
    margin-bottom: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .auth-input:focus {
        border-color: var(--lavender);
        box-shadow: 0 0 0 3px var(--lavender-soft);
    }

.auth-btn-row {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.auth-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0E6B63;
    background: rgba(76, 226, 198, 0.22);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.auth-error-msg {
    margin-top: 8px;
    padding: 7px 12px;
    border-radius: 12px;
    background: rgba(255, 107, 107, 0.14);
    color: #C93B3B;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
}
/* ==========================================================================
   CẬP NHẬT GIAO DIỆN TAB ĐI CHỢ (SOFT PASTEL) & MÀU NỀN BOTTOM NAV
========================================================================== */

/* Nhóm bên trái mỗi dòng đi chợ: Ô tích + Tên món + Icon giỏ hàng nằm ngay kế tên */
.shopping-left-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.shopping-item-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    min-width: 0;
}

/* Nút giỏ hàng mini xanh mint pastel có ánh sáng nhẹ, đặt sát tên nguyên liệu */
.btn-item-bhx {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(34, 197, 94, 0.22);
    background: linear-gradient(135deg, rgba(209, 250, 229, 0.95), rgba(167, 243, 208, 0.85));
    color: #15803D;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 5px 14px rgba(52, 211, 153, 0.34);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}

    .btn-item-bhx:hover {
        box-shadow: 0 6px 16px rgba(34, 197, 94, 0.42);
    }

    .btn-item-bhx:active {
        transform: scale(0.9);
    }

/* Ô định lượng dạng viên thuốc mềm mịn, thẳng hàng tuyệt đối ở mép phải */
.qty-edit-input {
    width: 96px;
    height: 32px;
    border-radius: 999px;
    border: 1.5px solid rgba(142, 123, 244, 0.18);
    background: rgba(255, 255, 255, 0.95);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #137A7F;
    padding: 0 10px;
    flex-shrink: 0;
}

    .qty-edit-input.pantry {
        color: #6B5B95;
    }

/* Hàng 3 nút phía dưới: Copy (Trái) - Zalo (Giữa) - Đặt BHX (Phải) */
.share-action-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-copy-list,
.btn-share-zalo,
.btn-order-bhx {
    flex: 1;
    height: 44px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s, box-shadow 0.2s;
}

/* 1. Nút Copy: Trắng sữa mờ, viền xám nhẹ */
.btn-copy-list {
    background: rgba(255, 255, 255, 0.86);
    border: 1.5px solid rgba(160, 160, 185, 0.32);
    color: #55536B;
    box-shadow: 0 4px 12px rgba(114, 102, 178, 0.06);
}

/* 2. Nút Zalo: Xanh dương pastel, viền xanh dịu */
.btn-share-zalo {
    background: rgba(224, 238, 255, 0.86);
    border: 1.5px solid rgba(96, 155, 248, 0.58);
    color: #2563EB;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

/* 3. Nút Đặt BHX: Xanh lá pastel, viền xanh lá, chữ xanh đậm */
.btn-order-bhx {
    background: rgba(214, 245, 224, 0.9);
    border: 1.5px solid rgba(68, 168, 96, 0.55);
    color: #14532D;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.14);
}

    .btn-copy-list:active,
    .btn-share-zalo:active,
    .btn-order-bhx:active {
        transform: scale(0.96);
    }

/* ==========================================================================
   THANH MENU 3 TAB DƯỚI CÙNG: BỚT TRONG SUỐT, PHA TÔNG OẢI HƯƠNG NHẸ ĐỂ NỔI KHỐI
========================================================================== */
.bottom-nav {
    background: rgba(235, 232, 250, 0.92); /* Tím oải hương nhạt độ đục 92%, tách rõ khỏi nền trang */
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1.5px solid rgba(142, 123, 244, 0.24);
    box-shadow: 0 12px 32px rgba(90, 78, 160, 0.18);
}

.nav-item {
    color: #5D5A78; /* Chữ tab chưa chọn đậm hơn nhẹ để dễ đọc trên nền mới */
}

    .nav-item.active {
        background: #FFFFFF; /* Tab đang chọn nổi bật màu trắng tinh trên nền tím nhạt */
        color: var(--peach-text);
        box-shadow: 0 4px 14px rgba(90, 78, 160, 0.14);
    }