/* ============================================
   BALO KITCHEN - STYLES v35.0
   Rebranded from KitchenSync
   ============================================ */

:root {
    --teal: #0D7377;
    --teal-light: #E6F4F4;
    --teal-dark: #0A5C5F;
    --teal-deep: #0D4D4D;
    --coral: #FF7F50;
    --coral-light: #FFF5F0;
    --gold: #F59E0B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-900: #1A1A1A;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   AUTH SCREEN - Deep Teal, Centered
   ============================================ */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(180deg, #0D4D4D 0%, #0A3D3D 100%);
    padding: 20px;
}

.auth-screen {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 24px;
    padding: 40px 32px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0D7377, #0A5C5F);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.auth-logo i {
    width: 40px;
    height: 40px;
    color: white;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1A1A1A;
}

.auth-header p {
    color: #64748B;
    font-size: 15px;
}

.auth-btn {
    width: 100%;
    padding: 14px 24px;
    background: #FF7F50;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.auth-btn:hover {
    background: #E56A3E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 127, 80, 0.4);
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #64748B;
}

.auth-switch a {
    color: #0D7377;
    font-weight: 600;
    text-decoration: none;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.1);
}

.input-readonly {
    background: var(--gray-50);
    color: var(--gray-500);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ============================================
   APP LAYOUT
   ============================================ */
#app {
    display: none;
    min-height: 100vh;
}

.sidebar {
    display: none;
}

@media (min-width: 1024px) {
    #app {
        display: flex;
    }
    
    .sidebar {
        display: flex;
        flex-direction: column;
        width: 280px;
        background: linear-gradient(180deg, var(--teal-deep) 0%, #0A3D3D 100%);
        color: white;
        padding: 24px;
        position: fixed;
        height: 100vh;
        left: 0;
        top: 0;
        z-index: 100;
    }
    
    #main-content {
        margin-left: 280px;
        flex: 1;
        padding-bottom: 40px;
    }
    
    .bottom-nav {
        display: none !important;
    }
}

#main-content {
    flex: 1;
    padding: 20px;
    padding-bottom: 100px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   BOTTOM NAV
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--teal);
    border-top: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 8px 26px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(13, 115, 119, 0.3);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 10px;
}

.bottom-nav-item i {
    width: 22px;
    height: 22px;
}

.bottom-nav-item span {
    font-size: 10px;
    font-weight: 500;
}

.bottom-nav-item.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   SIDEBAR STYLES (Desktop)
   ============================================ */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 8px;
}

.sidebar-logo i {
    width: 32px;
    height: 32px;
}

.sidebar-logo span {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    text-align: left;
    font-family: inherit;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-tier {
    font-size: 12px;
    opacity: 0.7;
}

.logout-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.logout-btn i {
    width: 18px;
    height: 18px;
}

/* ============================================
   SCREEN HEADER
   ============================================ */
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.screen-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.greeting {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn i {
    width: 20px;
    height: 20px;
}

.icon-btn:hover {
    background: var(--teal-light);
    color: var(--teal);
}

.icon-btn.primary {
    background: var(--teal);
    color: white;
}

.icon-btn.primary:hover {
    background: var(--teal-dark);
}

/* ============================================
   NOTIFICATION BUTTON WITH PULSING DOT
   ============================================ */
.notification-btn {
    position: relative;
    padding: 8px;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background-color: var(--danger);
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ============================================
   KITCHEN PULSE DASHBOARD
   ============================================ */
.kitchen-pulse {
    margin-bottom: 24px;
}

.kitchen-pulse .section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.pulse-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pulse-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.pulse-card:active {
    transform: scale(0.96);
}

.pulse-card.pantry-pulse {
    border-color: var(--gold);
    background: rgba(245, 158, 11, 0.08);
}

.pulse-card.pantry-pulse .pulse-icon {
    background: rgba(245, 158, 11, 0.2);
    color: var(--gold);
}

.pulse-card.low-stock {
    border-color: var(--warning);
}

.pulse-card.low-stock .pulse-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.pulse-card.to-buy {
    border-color: var(--teal);
}

.pulse-card.to-buy .pulse-icon {
    background: var(--teal-light);
    color: var(--teal);
}

.pulse-card.chef-prepped {
    border-color: var(--coral);
}

.pulse-card.chef-prepped .pulse-icon {
    background: var(--coral-light);
    color: var(--coral);
}

.pulse-card.expiring {
    border-color: var(--danger);
}

.pulse-card.expiring .pulse-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.pulse-card.expiring.has-items {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { border-color: var(--danger); }
    50% { border-color: rgba(239, 68, 68, 0.3); }
}

.pulse-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-icon i {
    width: 22px;
    height: 22px;
}

.pulse-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pulse-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.pulse-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   QUICK PICKS
   ============================================ */
.quick-picks {
    margin-bottom: 24px;
}

.quick-picks h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.quick-picks-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.quick-picks-scroll::-webkit-scrollbar {
    display: none;
}

.quick-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    min-width: 80px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.quick-pick:active {
    transform: scale(0.95);
}

.quick-pick-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--teal-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
}

.quick-pick-img i {
    width: 24px;
    height: 24px;
}

.quick-pick span {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-900);
}

/* ============================================
   STORAGE CARDS - Dashboard Quick Access
   FIX #2: Scanner card with Coral icon
   ============================================ */
.storage-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.storage-card {
    background: linear-gradient(135deg, var(--teal-light) 0%, white 100%);
    border: 1px solid rgba(13, 115, 119, 0.2);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.storage-card:hover,
.storage-card:active {
    border-color: var(--teal);
    transform: scale(0.98);
}

.storage-card > i {
    width: 32px;
    height: 32px;
    color: var(--teal);
}

.storage-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.storage-info span {
    font-size: 12px;
    color: var(--gray-500);
}

/* FIX #2: Scanner card styling with Coral */
.storage-card.scanner-card {
    background: linear-gradient(135deg, var(--coral-light) 0%, white 100%);
    border-color: rgba(255, 127, 80, 0.3);
}

.storage-card.scanner-card:hover {
    border-color: var(--coral);
}

.storage-card .coral-icon {
    color: #FF7F50 !important;
}

/* ============================================
   RECIPE CARDS
   ============================================ */
.recent-recipes {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h2,
.section-title {
    font-size: 16px;
    font-weight: 600;
}

.text-btn {
    background: none;
    border: none;
    color: var(--teal);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.recipe-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.recipe-scroll::-webkit-scrollbar {
    display: none;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.recipe-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 160px;
    max-width: 180px;
    flex-shrink: 0;
}

.recipe-card:active {
    transform: scale(0.98);
}

.recipe-card.locked {
    opacity: 0.9;
}

.recipe-image {
    position: relative;
    overflow: hidden;
    height: 120px;
    width: 100%;
}

.recipe-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

/* Dashboard recipe cards - uniform boxes */
#home-screen .recipe-card {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
}

#home-screen .recipe-card .recipe-image,
#home-screen .recipe-card .recipe-image img {
    height: 120px !important;
    width: 100% !important;
    object-fit: cover !important;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 77, 77, 0.7) 0%, rgba(13, 77, 77, 0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    color: white;
    gap: 4px;
}

.lock-overlay i {
    width: 24px;
    height: 24px;
    opacity: 0.9;
}

.lock-tagline {
    font-size: 9px;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.3;
}

.lock-cta {
    font-size: 10px;
    font-weight: 700;
    background: var(--coral);
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 2px;
}

.cookbook-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.recipe-info {
    padding: 12px;
}

.recipe-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipe-meta {
    display: flex;
    gap: 12px;
    color: var(--gray-400);
    font-size: 12px;
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.recipe-meta i {
    width: 14px;
    height: 14px;
}

.pro-badge {
    background: linear-gradient(135deg, var(--gold), #D97706);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}

/* ============================================
   INVENTORY SCREEN
   ============================================ */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-tab.active {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
}

.filter-tab.warning.active {
    background: var(--warning);
    border-color: var(--warning);
}

.filter-tab.seasoned.active {
    background: var(--coral);
    border-color: var(--coral);
}

.limit-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--warning);
}

.limit-warning i {
    width: 18px;
    height: 18px;
}

.limit-warning a {
    color: var(--teal);
    font-weight: 600;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inventory-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.inventory-item:active {
    transform: scale(0.99);
}

.inventory-item.low-stock {
    border-color: var(--warning);
}

.inventory-item.chef-prepped {
    border-color: var(--coral);
}

.inventory-item img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.seasoned-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    background: var(--coral-light);
    color: var(--coral);
    border-radius: 10px;
}

.auto-restock-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    background: var(--teal-light);
    color: var(--teal);
    border-radius: 10px;
    margin-left: 4px;
}

/* Item actions row */
.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-to-list-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.add-to-list-btn:hover {
    background: var(--teal-light);
    color: var(--teal);
    border-color: var(--teal);
}

.add-to-list-btn i {
    width: 16px;
    height: 16px;
}

/* Restock Modal */
.restock-modal-content {
    max-width: 360px;
}

.restock-modal-content .modal-body p {
    color: var(--gray-600);
    margin-bottom: 16px;
}

.restock-options {
    background: var(--gray-50);
    padding: 12px;
    border-radius: var(--radius-md);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--teal);
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-footer .btn-secondary,
.modal-footer .btn-primary {
    flex: 1;
}

/* Expiration badges */
.expiry-row {
    margin: 4px 0;
}

.expiry-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.expiry-badge.critical {
    background: var(--danger);
    color: white;
    animation: pulse-critical 1s infinite;
}

.expiry-badge.high {
    background: #FF6B35;
    color: white;
}

.expiry-badge.medium {
    background: var(--warning);
    color: #7C2D12;
}

.expiry-badge.low {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

@keyframes pulse-critical {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Priority-based inventory item colors - Solid backgrounds */
.inventory-item.priority-critical {
    background: #FEE2E2 !important; /* Light red */
}

.inventory-item.priority-high {
    background: #FFEDD5 !important; /* Light orange */
}

.inventory-item.priority-medium {
    background: #FEF3C7 !important; /* Light yellow */
}

.inventory-item.priority-low {
    background: #FEF9C3 !important; /* Very light yellow */
}

/* Voice button listening state */
.voice-btn.listening {
    background: var(--danger);
    color: white;
    animation: pulse-listening 1.5s infinite;
}

.voice-btn.listening i {
    color: white;
}

@keyframes pulse-listening {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.item-location {
    font-size: 13px;
    color: var(--gray-500);
    display: block;
    margin-bottom: 8px;
}

.item-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-qty-display {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

.quantity-pill {
    display: flex;
    gap: 4px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--teal-light);
    color: var(--teal);
}

.qty-btn:active {
    transform: scale(0.9);
}

.qty-btn i {
    width: 16px;
    height: 16px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-icon i {
    width: 40px;
    height: 40px;
    color: var(--gray-400);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-500);
}

/* ============================================
   RECIPE DETAIL
   ============================================ */
.recipe-detail {
    padding: 0 !important;
}

.recipe-hero {
    position: relative;
    height: 250px;
}

.recipe-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.back-btn:hover {
    background: white;
    transform: scale(1.05);
}

.back-btn i {
    width: 24px;
    height: 24px;
    color: var(--gray-900);
}

.recipe-content {
    padding: 24px 20px;
    margin-top: -24px;
    background: white;
    border-radius: 24px 24px 0 0;
    position: relative;
}

.recipe-content h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.recipe-description {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
    margin-bottom: 20px;
}

.recipe-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-100);
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 14px;
}

.stat i {
    width: 18px;
    height: 18px;
    color: var(--teal);
}

.ingredients-section,
.instructions-section {
    margin-bottom: 24px;
}

.ingredients-section h2,
.instructions-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.ingredient-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.legend-item i {
    width: 16px;
    height: 16px;
}

.legend-item.in-stock {
    color: var(--success);
}

.legend-item.in-list {
    color: #3B82F6; /* Blue - distinct from red/coral */
}

.legend-item.missing {
    color: var(--danger);
}

.ingredients-list {
    list-style: none;
    margin-bottom: 16px;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 15px;
}

.ingredient-item:last-child {
    border-bottom: none;
}

.ingredient-item i {
    width: 20px;
    height: 20px;
}

.ingredient-item.in-stock {
    color: var(--success);
}

.ingredient-item.in-list {
    color: #3B82F6; /* Blue - distinct from red/coral */
}

.ingredient-item.missing {
    color: var(--danger);
}

.add-missing-btn {
    width: 100%;
}

.instructions-list {
    list-style: none;
    counter-reset: step-counter;
}

.instructions-list li {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}

.instructions-list li:last-child {
    border-bottom: none;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--teal-light);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
}

.step-duration {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 8px;
}

.start-cooking-btn {
    width: 100%;
    margin-top: 16px;
}

/* ============================================
   SHOPPING LIST
   ============================================ */
.shopping-screen .items-count {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.shopping-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Aisle Groups */
.aisle-group {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.aisle-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.aisle-header i {
    width: 18px;
    height: 18px;
}

/* Aisle Color Coding */
.aisle-group[data-aisle="produce"] .aisle-header {
    background: #E8F5E9;
    color: #2E7D32;
}
.aisle-group[data-aisle="produce"] .aisle-header i { color: #43A047; }

.aisle-group[data-aisle="dairy"] .aisle-header {
    background: #E3F2FD;
    color: #1565C0;
}
.aisle-group[data-aisle="dairy"] .aisle-header i { color: #1E88E5; }

.aisle-group[data-aisle="proteins"] .aisle-header {
    background: #FFEBEE;
    color: #C62828;
}
.aisle-group[data-aisle="proteins"] .aisle-header i { color: #E53935; }

.aisle-group[data-aisle="frozen"] .aisle-header {
    background: #E0F7FA;
    color: #00838F;
}
.aisle-group[data-aisle="frozen"] .aisle-header i { color: #00ACC1; }

.aisle-group[data-aisle="grains"] .aisle-header {
    background: #FFF8E1;
    color: #F57F17;
}
.aisle-group[data-aisle="grains"] .aisle-header i { color: #FFB300; }

.aisle-group[data-aisle="canned"] .aisle-header {
    background: #FBE9E7;
    color: #BF360C;
}
.aisle-group[data-aisle="canned"] .aisle-header i { color: #E64A19; }

.aisle-group[data-aisle="condiments"] .aisle-header {
    background: #F3E5F5;
    color: #7B1FA2;
}
.aisle-group[data-aisle="condiments"] .aisle-header i { color: #9C27B0; }

.aisle-group[data-aisle="herbs"] .aisle-header {
    background: #E8F5E9;
    color: #388E3C;
}
.aisle-group[data-aisle="herbs"] .aisle-header i { color: #4CAF50; }

.aisle-group[data-aisle="other"] .aisle-header {
    background: var(--gray-100);
    color: var(--gray-600);
}
.aisle-group[data-aisle="other"] .aisle-header i { color: var(--gray-500); }

.aisle-header.checked-header {
    background: var(--gray-100);
    color: var(--gray-500);
}

.aisle-header.checked-header i {
    color: var(--gray-400);
}

.aisle-group .shopping-item {
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--gray-50);
}

.aisle-group .shopping-item:last-child {
    border-bottom: none;
}

.checked-group {
    opacity: 0.7;
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.shopping-item.checked {
    opacity: 0.6;
}

.shopping-item.checked .shopping-item-info strong {
    text-decoration: line-through;
}

.checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox.checked {
    background: var(--teal);
    border-color: var(--teal);
}

.checkbox.checked i {
    width: 14px;
    height: 14px;
    color: white;
}

.shopping-item-info {
    flex: 1;
}

.shopping-item-info strong {
    display: block;
    font-size: 15px;
    font-weight: 500;
}

.shopping-item-info span {
    font-size: 13px;
    color: var(--gray-500);
}

.delete-shopping-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.delete-shopping-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.delete-shopping-btn i {
    width: 18px;
    height: 18px;
}

.checked-divider {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 0;
}

.shopping-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-shopping-btn,
.finish-shopping-btn {
    width: 100%;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--teal);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary i {
    width: 20px;
    height: 20px;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--gray-100);
    color: var(--gray-900);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-secondary i {
    width: 20px;
    height: 20px;
}

.btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-danger i {
    width: 20px;
    height: 20px;
}

.btn-gold {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--gold), #D97706);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-cancel:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-cancel i {
    width: 20px;
    height: 20px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-200);
}

.modal-close i {
    width: 20px;
    height: 20px;
    color: var(--gray-500);
}

.modal-content form {
    padding: 20px 24px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions button {
    flex: 1;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 16px;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
}

.toggle-sublabel {
    font-size: 12px;
    color: var(--gray-500);
}

.toggle {
    position: relative;
    width: 48px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--gray-200);
    border-radius: 14px;
    transition: all 0.3s;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle input:checked + .toggle-slider {
    background: var(--teal);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ============================================
   EDIT DRAWER
   Mobile: slides from bottom
   Desktop (1024px+): slides from right
   ============================================ */
.drawer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}

.drawer.active {
    display: block;
}

.drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.drawer.active .drawer-backdrop {
    opacity: 1;
}

.drawer-panel {
    position: absolute;
    background: white;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Mobile: Bottom sheet */
.drawer-panel {
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
}

.drawer.active .drawer-panel {
    transform: translateY(0);
}

.drawer-indicator {
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    margin: 12px auto;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.drawer-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.drawer-body {
    padding: 20px 24px;
}

.drawer-body form {
    padding: 0;
}

.drawer-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.drawer-actions button {
    flex: 1;
}

/* Desktop: Right side panel (400px width) */
@media (min-width: 1024px) {
    .drawer-panel {
        top: 0;
        bottom: 0;
        left: auto;
        right: 0;
        width: 400px;
        max-height: 100vh;
        border-radius: 24px 0 0 24px;
        transform: translateX(100%);
    }
    
    .drawer.active .drawer-panel {
        transform: translateX(0);
    }
    
    .drawer-indicator {
        display: none;
    }
}

/* Input with voice icon */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    flex: 1;
    padding-right: 48px;
}

.voice-icon-btn {
    position: absolute;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--teal-light);
    border-radius: 50%;
    color: var(--teal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.voice-icon-btn:hover {
    background: var(--teal);
    color: white;
}

.voice-icon-btn i {
    width: 18px;
    height: 18px;
}

#edit-form {
    padding: 0;
}

.edit-image-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.edit-image-preview img {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

/* ============================================
   ONBOARDING
   ============================================ */
.onboarding-overlay {
    background: linear-gradient(180deg, #0D4D4D 0%, #0A3D3D 100%);
}

.onboarding-container {
    width: 100%;
    max-width: 400px;
    padding: 40px 24px;
    text-align: center;
    color: white;
}

.onboarding-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.onboarding-icon i {
    width: 40px;
    height: 40px;
}

.onboarding-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.onboarding-subtitle {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.5;
    margin-bottom: 32px;
}

.onboarding-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
    text-align: left;
}

.onboarding-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    width: 22px;
    height: 22px;
}

.feature-text h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 13px;
    opacity: 0.7;
}

.onboarding-btn {
    width: 100%;
    background: var(--coral);
}

.onboarding-btn:hover {
    background: #E56A3E;
}

/* ============================================
   SCANNER
   ============================================ */
#scanner-container {
    padding: 20px;
    text-align: center;
}

#scanner-video {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.scanner-hint {
    font-size: 14px;
    color: var(--gray-500);
}

.scanner-loading {
    padding: 40px 20px;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.scanner-loading p {
    font-size: 14px;
    color: var(--gray-500);
}

.scanner-error {
    padding: 40px 20px;
    text-align: center;
}

.scanner-error i {
    width: 48px;
    height: 48px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.scanner-error p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.scanner-error-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.scanner-not-found {
    padding: 40px 20px;
    text-align: center;
}

.not-found-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.not-found-icon i {
    width: 32px;
    height: 32px;
    color: var(--danger);
}

.scanner-not-found h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.scanner-not-found p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.barcode-display {
    font-family: monospace;
    font-size: 12px;
    color: var(--gray-400);
    background: var(--gray-100);
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 24px;
}

.not-found-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scanned-product {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.scanned-product img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.scanned-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.scanned-info p {
    font-size: 13px;
    color: var(--gray-500);
}

.scans-remaining {
    text-align: center;
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 16px;
}

/* ============================================
   PLANNER - MONTHLY CALENDAR
   ============================================ */
.planner-screen {
    padding-bottom: 100px;
}

.planner-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 16px;
}

.month-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.month-nav-btn:hover {
    background: var(--teal-light);
    color: var(--teal);
}

.month-nav-btn i {
    width: 20px;
    height: 20px;
}

.month-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.planner-calendar {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 0 20px;
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--teal);
}

.calendar-day-name {
    padding: 10px 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--gray-100);
}

.calendar-cell {
    background: white;
    min-height: 60px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar-cell:hover:not(.empty) {
    background: var(--gray-50);
}

.calendar-cell.empty {
    background: var(--gray-50);
    cursor: default;
}

.calendar-cell.today {
    background: var(--teal-light);
}

.calendar-cell.today .cell-date {
    background: var(--teal);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-cell.past {
    opacity: 0.5;
}

.calendar-cell.has-meals {
    background: rgba(13, 115, 119, 0.05);
}

.cell-date {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.cell-meals {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.meal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.meal-dot.breakfast {
    background: #F59E0B;
}

.meal-dot.lunch {
    background: #10B981;
}

.meal-dot.dinner {
    background: #6366F1;
}

.meal-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 16px 20px;
    font-size: 12px;
    color: var(--gray-600);
}

.meal-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.planner-hint {
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
    padding: 20px;
}

.generate-shopping-btn {
    margin: 0 20px;
    width: calc(100% - 40px);
}

/* Day Detail View */
.planner-day-view .screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.planner-day-view .screen-header .back-btn {
    position: static;
    background: var(--gray-100);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.planner-day-view .screen-header .back-btn i {
    width: 20px;
    height: 20px;
    color: var(--gray-600);
}

.day-meals-list {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day-meal-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.day-meal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.meal-type-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-50);
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
}

.meal-type-header i {
    width: 18px;
    height: 18px;
}

.day-meal-card.filled .meal-type-header {
    background: var(--teal-light);
    color: var(--teal);
}

.meal-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.meal-card-content img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.meal-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.meal-card-info strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.meal-card-info span {
    font-size: 12px;
    color: var(--gray-500);
}

.day-meal-card .add-meal-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    color: var(--gray-400);
    font-size: 14px;
}

.day-meal-card .add-meal-prompt i {
    width: 20px;
    height: 20px;
}

.day-meal-card:hover .add-meal-prompt {
    color: var(--teal);
}

.day-meal-card .remove-meal-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-500);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.day-meal-card .remove-meal-btn:hover {
    background: var(--danger);
    color: white;
}

.day-meal-card .remove-meal-btn i {
    width: 16px;
    height: 16px;
}

/* Recipe Picker Modal */
.planner-modal-content {
    max-width: 500px;
}

.modal-subtitle {
    color: var(--gray-500);
    margin-bottom: 16px;
}

.recipe-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.recipe-picker-item {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.recipe-picker-item:hover {
    background: var(--teal-light);
    transform: scale(1.02);
}

.recipe-picker-item img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.recipe-picker-item span {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-900);
    display: block;
    line-height: 1.2;
}

.screen-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* Mobile calendar adjustments */
@media (max-width: 400px) {
    .calendar-cell {
        min-height: 50px;
        padding: 4px;
    }
    
    .cell-date {
        font-size: 12px;
    }
    
    .meal-dot {
        width: 6px;
        height: 6px;
    }
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--gray-900);
    color: white;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    z-index: 3000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--teal);
}

.toast i {
    width: 18px;
    height: 18px;
}

/* ============================================
   VOICE BUTTON
   ============================================ */
.voice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--gray-50);
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--gray-500);
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 14px;
}

.voice-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.voice-btn i {
    width: 20px;
    height: 20px;
}

.voice-transcript {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 16px;
    padding: 8px 12px;
    background: var(--teal-light);
    border-radius: var(--radius-sm);
}

/* ============================================
   UPGRADE BANNER
   ============================================ */
.upgrade-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal-dark) 100%);
    border-radius: var(--radius-lg);
    color: white;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.2s;
}

.upgrade-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 77, 77, 0.3);
}

.upgrade-banner:active {
    transform: scale(0.98);
}

.upgrade-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upgrade-banner-content > i {
    width: 32px;
    height: 32px;
    color: var(--gold);
}

.upgrade-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.upgrade-banner-text strong {
    font-size: 15px;
    font-weight: 600;
}

.upgrade-banner-text span {
    font-size: 12px;
    opacity: 0.8;
}

.upgrade-banner > i {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* ============================================
   UPGRADE MODAL
   ============================================ */
.upgrade-content {
    text-align: center;
    padding: 32px 24px;
}

.upgrade-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #D97706);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

.upgrade-icon i {
    width: 32px;
    height: 32px;
}

.upgrade-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.upgrade-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.upgrade-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
}

.upgrade-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
}

.upgrade-features li i {
    width: 18px;
    height: 18px;
    color: var(--teal);
}

.upgrade-btn {
    width: 100%;
    margin-bottom: 12px;
}

.upgrade-note {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 16px;
}

/* ============================================
   DELETE MODAL
   ============================================ */
.delete-content {
    text-align: center;
    padding: 24px;
}

.delete-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--danger);
}

.delete-icon i {
    width: 32px;
    height: 32px;
}

.delete-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.delete-content p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 400px) {
    .pulse-cards {
        gap: 8px;
    }
    
    .pulse-card {
        padding: 12px 8px;
    }
    
    .pulse-count {
        font-size: 20px;
    }
    
    .pulse-label {
        font-size: 10px;
    }
    
    .storage-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .qty-btn {
        width: 38px;
        height: 38px;
    }
    
    .qty-btn i {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   AD SPACE STYLES
   ============================================ */
.ad-container {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    margin-bottom: 24px;
    max-height: 90px;
}

.ad-container img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

.ad-container a {
    display: block;
}

.ad-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
/* Hide Sidebar and remove margins on Auth Screens */
#auth-container:not([style*="display: none"]) ~ .sidebar,
#auth-container:not([style*="display: none"]) ~ .bottom-nav {
    display: none !important;
}

#auth-container:not([style*="display: none"]) ~ .main-content {
    margin-left: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
}
/* ============================================
   BALO KITCHEN v35.0 - MASTER LAYOUT ENGINE
   ============================================ */

/* 1. HIDE MENU ON LOGIN PAGE */
#auth-container:not([style*="display: none"]) ~ .sidebar,
#auth-container:not([style*="display: none"]) ~ .bottom-nav {
    display: none !important;
}

#auth-container:not([style*="display: none"]) ~ #main-content {
    margin-left: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* 2. DESKTOP LOGGED-IN LAYOUT */
@media (min-width: 1024px) {
    /* Force main content to respect the sidebar */
    #main-content {
        margin-left: 280px !important;
        width: calc(100% - 280px) !important;
    }
}

/* 3. IMAGE STRETCH FIX */
.recipe-card img, .suggestion-card img, .category-card img {
    height: 120px !important;
    width: 100% !important;
    object-fit: cover !important;
}
/* Dashboard Solid Colors */
.storage-card {
    background: white; /* Default */
    border: 2px solid var(--gray-100);
}

/* Fridge - Solid Teal */
.storage-card:nth-child(1) {
    background: var(--teal) !important;
    color: white !important;
}
.storage-card:nth-child(1) i, .storage-card:nth-child(1) span { color: white !important; }

/* Pantry/Freezer - Solid Gold */
.storage-card:nth-child(2) {
    background: var(--gold) !important;
    color: white !important;
}
.storage-card:nth-child(2) i, .storage-card:nth-child(2) span { color: white !important; }

/* Barcode - Solid Coral */
.storage-card.scanner-card {
    background: var(--coral) !important;
    color: white !important;
}
.storage-card.scanner-card i { color: white !important; }
.storage-card.scanner-card .storage-info strong,
.storage-card.scanner-card .storage-info span { color: white !important; }

/* ============================================
   COOKING MODE STYLES
   ============================================ */

/* Servings Scaler */
.recipe-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0;
}

.servings-scaler {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    flex: 1;
}

.scaler-label {
    font-weight: 600;
    color: var(--gray-600);
}

.scaler-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--gray-200);
}

.scaler-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--teal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.scaler-btn:disabled {
    background: var(--gray-200);
    color: var(--gray-400);
    cursor: not-allowed;
}

.scaler-btn:not(:disabled):hover {
    background: var(--teal-dark);
}

.scaler-btn i {
    width: 16px;
    height: 16px;
}

.scaler-value {
    font-size: 18px;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    color: var(--gray-900);
}

.scale-indicator {
    font-size: 12px;
    font-weight: 600;
    color: var(--teal);
    background: var(--teal-light);
    padding: 4px 8px;
    border-radius: 12px;
}

/* Unit Toggle Button */
.unit-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: white;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.unit-toggle:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.unit-toggle i {
    width: 16px;
    height: 16px;
}

.unit-toggle.metric {
    background: var(--teal-light);
    border-color: var(--teal);
    color: var(--teal);
}

.unit-toggle.imperial {
    background: var(--coral-light);
    border-color: var(--coral);
    color: var(--coral);
}

/* ============================================
   ANALYTICS SCREEN
   ============================================ */

.analytics-screen {
    padding-bottom: 100px;
}

.period-selector {
    display: flex;
    gap: 8px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.period-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: white;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn.active {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.period-btn:not(.active):hover {
    border-color: var(--teal);
    color: var(--teal);
}

.analytics-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.analytics-content {
    padding: 0 20px;
}

/* Summary Cards */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.analytics-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.analytics-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.analytics-icon i {
    width: 22px;
    height: 22px;
}

.analytics-info {
    display: flex;
    flex-direction: column;
}

.analytics-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

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

.analytics-subtext {
    font-size: 11px;
    color: var(--gray-400);
}

.analytics-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.analytics-change i {
    width: 12px;
    height: 12px;
}

.analytics-change.positive {
    color: var(--success);
}

.analytics-change.negative {
    color: var(--danger);
}

/* Card Color Variants */
.waste-card .analytics-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.waste-card .analytics-value {
    color: var(--danger);
}

.saved-card .analytics-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.saved-card .analytics-value {
    color: var(--success);
}

.added-card .analytics-icon {
    background: var(--teal-light);
    color: var(--teal);
}
.added-card .analytics-value {
    color: var(--teal);
}

.restocked-card .analytics-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--gold);
}
.restocked-card .analytics-value {
    color: var(--gold);
}

/* Waste Value Banner */
.waste-value-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.waste-value-banner > i {
    width: 32px;
    height: 32px;
    color: var(--danger);
}

.waste-value-banner div {
    display: flex;
    flex-direction: column;
}

.waste-value-banner strong {
    font-size: 18px;
    color: var(--danger);
}

.waste-value-banner span {
    font-size: 12px;
    color: var(--gray-500);
}

/* Analytics Sections */
.analytics-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.analytics-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gray-700);
}

.analytics-section h2 i {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

.analytics-section .section-subtitle {
    font-size: 12px;
    color: var(--gray-500);
    margin: -8px 0 12px 0;
}

/* Analytics List */
.analytics-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.analytics-list-item .rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-600);
}

.analytics-list-item:first-child .rank {
    background: var(--coral);
    color: white;
}

.analytics-list-item .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.analytics-list-item .item-info strong {
    font-size: 14px;
    font-weight: 600;
}

.analytics-list-item .item-info span {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: capitalize;
}

.analytics-list-item .item-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

/* Analytics Tip */
.analytics-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--gray-700);
}

.analytics-tip i {
    width: 18px;
    height: 18px;
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 1px;
}

/* Category Bars */
.category-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.category-bar-label span:first-child {
    font-weight: 500;
    text-transform: capitalize;
}

.category-bar-label span:last-child {
    color: var(--gray-500);
}

.category-bar {
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    background: var(--coral);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Empty State */
.analytics-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.analytics-empty i {
    width: 64px;
    height: 64px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.analytics-empty h3 {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.analytics-empty p {
    font-size: 14px;
    color: var(--gray-500);
}

/* Cooking Mode Header */
.cooking-mode .cooking-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--teal);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.cooking-mode .cooking-header h1 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cooking-mode .cooking-header .back-btn {
    position: static;
    background: rgba(255,255,255,0.2);
}

.cooking-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--coral);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: pulse-badge 2s infinite;
}

.cooking-badge i {
    width: 14px;
    height: 14px;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Cooking Tabs */
.cooking-tabs {
    display: flex;
    padding: 12px 20px;
    gap: 8px;
    background: white;
    border-bottom: 1px solid var(--gray-100);
}

.cooking-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: white;
    color: var(--gray-500);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cooking-tab.active {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.cooking-tab i {
    width: 18px;
    height: 18px;
}

/* Cooking Ingredients List */
.cooking-ingredients {
    padding: 20px;
}

.cooking-hint {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 16px;
    font-size: 14px;
}

.cooking-ingredients-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.cooking-ingredient {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: var(--radius-md);
    border: 2px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.2s;
}

.cooking-ingredient:hover {
    border-color: var(--teal);
}

.cooking-ingredient.checked {
    background: var(--teal-light);
    border-color: var(--teal);
}

.cooking-ingredient.checked span {
    text-decoration: line-through;
    color: var(--gray-400);
}

.ingredient-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.ingredient-checkbox.checked {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.ingredient-checkbox i {
    width: 14px;
    height: 14px;
}

/* Cooking Steps */
.cooking-steps {
    padding: 20px;
}

.step-progress {
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--teal);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.current-step {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 2px solid var(--teal);
    box-shadow: var(--shadow-md);
}

.current-step .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--teal);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 12px;
}

.current-step .step-instruction {
    font-size: 18px;
    line-height: 1.6;
    color: var(--gray-900);
}

/* Timer Detection */
.detected-timers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.timer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--coral);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.timer-btn:hover {
    background: #e66a3d;
    transform: scale(1.05);
}

.timer-btn i {
    width: 16px;
    height: 16px;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.step-navigation button {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.step-navigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Steps Overview */
.all-steps {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 16px;
}

.all-steps h3 {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.steps-overview {
    list-style: none;
    counter-reset: step-counter;
}

.steps-overview li {
    counter-increment: step-counter;
    padding: 10px 12px 10px 36px;
    position: relative;
    font-size: 13px;
    color: var(--gray-500);
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.steps-overview li::before {
    content: counter(step-counter);
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.steps-overview li.current {
    background: var(--teal-light);
    color: var(--teal);
    font-weight: 600;
}

.steps-overview li.current::before {
    background: var(--teal);
    color: white;
}

.steps-overview li.completed {
    color: var(--gray-400);
}

.steps-overview li.completed::before {
    background: var(--success);
    color: white;
}

.steps-overview li:hover {
    background: var(--gray-100);
}

/* Timer Modal */
.timer-modal-content {
    text-align: center;
    padding: 32px !important;
}

.timer-display h2 {
    font-size: 16px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.timer-time {
    font-size: 64px;
    font-weight: 700;
    color: var(--teal);
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    margin-bottom: 16px;
}

.timer-status {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.timer-status.timer-done {
    font-size: 24px;
    color: var(--coral);
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Timer Alarm State */
.timer-modal-content.timer-alarm {
    animation: alarm-border 0.5s ease-in-out infinite;
}

@keyframes alarm-border {
    0%, 100% { box-shadow: 0 0 0 4px var(--coral); }
    50% { box-shadow: 0 0 0 8px var(--coral); }
}

.timer-time.timer-done-pulse {
    animation: pulse-time 0.5s ease-in-out infinite;
    color: var(--coral) !important;
}

@keyframes pulse-time {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Flash overlay when timer ends */
.timer-flash::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--coral);
    animation: flash-screen 0.5s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes flash-screen {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.1; }
}

.btn-large {
    padding: 16px 32px !important;
    font-size: 18px !important;
}

.btn-large i {
    width: 24px;
    height: 24px;
}

/* Start Cooking Button */
.start-cooking-btn {
    width: 100%;
    margin-top: 20px;
    padding: 16px !important;
    font-size: 16px !important;
}

.start-cooking-btn i {
    width: 20px;
    height: 20px;
}

/* Manual Timer Button */
.btn-timer-manual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    background: var(--coral);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-timer-manual:hover {
    background: #e66a3d;
}

.btn-timer-manual i {
    width: 18px;
    height: 18px;
}

/* Timer Setup Modal */
.timer-setup-content {
    max-width: 340px;
}

.timer-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.timer-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-input-group input {
    width: 80px;
    height: 60px;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--teal);
}

.timer-input-group input:focus {
    outline: none;
    border-color: var(--teal);
}

.timer-input-group label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.timer-separator {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.quick-timers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.quick-timers button {
    padding: 8px 16px;
    background: var(--gray-100);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-timers button:hover {
    background: var(--teal-light);
    color: var(--teal);
}