/* ============================================
   KITCHENSYNC - STYLES
   Colors: Deep Teal #0D7377, Coral #E07A5F
   Font: Plus Jakarta Sans
   ============================================ */

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

.auth-screen {
    background: white;
    border-radius: 24px;
    padding: 40px 32px;
    width: 100%;
    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;
}

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

.auth-btn {
    width: 100%;
    margin-top: 8px;
}

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

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

.auth-switch a:hover {
    text-decoration: underline;
}

.logout-btn {
    width: 40px;
    height: 40px;
    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;
}

/* Quick Pick Icon (emoji) */
.quick-pick-icon {
    font-size: 28px;
    line-height: 1;
}

:root {
    --teal: #0D7377;
    --teal-light: #E6F4F4;
    --teal-dark: #0A5C5F;
    --teal-deep: #0D4D4D;
    --coral: #E07A5F;
    --coral-light: #FDF2EF;
    --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 10px 15px -3px rgba(13, 77, 77, 0.08);
    --shadow-md: 0 10px 15px -3px rgba(13, 77, 77, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(13, 77, 77, 0.15);
    --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;
}

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

#main-content {
    flex: 1;
    max-width: 430px;
    margin: 0 auto;
    padding-bottom: 80px;
}

@media (min-width: 768px) {
    #main-content {
        margin-left: 240px;
        max-width: none;
        padding-bottom: 0;
    }
}

/* ============================================
   SIDEBAR (Desktop)
   ============================================ */
.sidebar {
    display: none;
    width: 240px;
    background: var(--teal-deep);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 50;
}

@media (min-width: 768px) {
    .sidebar {
        display: flex;
    }
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    margin-bottom: 40px;
    color: white;
}

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

.sidebar-logo span {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

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

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

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

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

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--coral);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

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

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

.user-tier {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
}

/* ============================================
   BOTTOM NAV (Mobile)
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 100;
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-family: inherit;
}

.bottom-nav-item:hover {
    background: var(--teal-light);
}

.bottom-nav-item.active {
    color: var(--teal);
}

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

/* ============================================
   SCREENS
   ============================================ */
.screen {
    padding: 20px;
}

@media (min-width: 768px) {
    .screen {
        padding: 32px 40px;
        max-width: 1200px;
    }
}

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

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

@media (min-width: 768px) {
    .screen-header h1 {
        font-size: 32px;
    }
}

.greeting {
    font-size: 14px;
    color: var(--gray-500);
    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:hover {
    background: var(--gray-200);
}

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

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

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

/* ============================================
   HOME SCREEN
   ============================================ */
.ad-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.ad-banner:hover {
    transform: scale(1.01);
}

.ad-banner img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.ad-text {
    flex: 1;
}

.ad-text strong {
    display: block;
    color: white;
    font-size: 15px;
    margin-bottom: 2px;
}

.ad-text span {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.ad-banner > i {
    color: rgba(255,255,255,0.5);
    width: 20px;
    height: 20px;
}

.alert-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #FEF3C7;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    cursor: pointer;
}

.alert-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FDE68A;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D97706;
}

.alert-text {
    flex: 1;
}

.alert-text strong {
    display: block;
    color: #92400E;
    font-size: 15px;
}

.alert-text span {
    color: #B45309;
    font-size: 13px;
}

.alert-card > i {
    color: #D97706;
    width: 20px;
    height: 20px;
}

/* Quick Picks */
.quick-picks {
    margin-bottom: 28px;
}

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

.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: 8px;
    border: none;
    background: none;
    cursor: pointer;
    min-width: 72px;
    transition: transform 0.2s;
    font-family: inherit;
}

.quick-pick:hover {
    transform: scale(1.05);
}

.quick-pick-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.quick-pick-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

/* Storage Cards */
.storage-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

@media (min-width: 768px) {
    .storage-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

.storage-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

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

/* Recipe Cards */
.recent-recipes {
    margin-bottom: 28px;
}

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

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

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

.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;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.recipe-card.locked .recipe-image img {
    filter: brightness(0.5);
}

.recipe-image {
    position: relative;
    height: 100px;
}

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

.lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.lock-overlay i {
    width: 32px;
    height: 32px;
}

.cookbook-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--gold);
    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;
    line-height: 1.3;
}

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

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

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

/* Meal Planner Preview */
.meal-planner-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    background: var(--teal-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.meal-planner-preview:hover {
    background: #D5EDED;
}

.planner-preview-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.planner-preview-content i {
    width: 24px;
    height: 24px;
    color: var(--teal);
}

.planner-preview-content strong {
    display: block;
    font-size: 15px;
    color: var(--teal-deep);
}

.planner-preview-content span {
    font-size: 13px;
    color: var(--teal);
}

.meal-planner-preview > i {
    width: 20px;
    height: 20px;
    color: var(--teal);
}

/* ============================================
   INVENTORY SCREEN
   ============================================ */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.filter-tab {
    padding: 10px 16px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-tab:hover {
    background: var(--gray-200);
}

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

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

.limit-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #FEF3C7;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 13px;
    color: #92400E;
}

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

.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: 14px;
    padding: 14px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.inventory-item.low-stock {
    border-left: 4px solid var(--warning);
}

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

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

.item-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.item-name-row strong {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.item-location {
    font-size: 13px;
    color: var(--gray-400);
}

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

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

.qty-btn:hover {
    background: var(--gray-100);
}

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

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

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

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

/* ============================================
   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: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

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

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

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

.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;
    margin-bottom: 16px;
}

.ingredients-list {
    list-style: none;
}

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

.ingredients-list li i {
    width: 20px;
    height: 20px;
}

.ingredients-list li.have i {
    color: var(--success);
}

.ingredients-list li.need i {
    color: var(--danger);
}

.add-missing-btn {
    width: 100%;
    margin-top: 16px;
}

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

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

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

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

/* ============================================
   PLANNER SCREEN
   ============================================ */
.screen-subtitle {
    color: var(--gray-500);
    margin-bottom: 24px;
}

.planner-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .planner-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
    }
}

.planner-day {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.day-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: block;
}

.day-meal {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--gray-400);
    font-size: 14px;
}

.day-meal.has-meal {
    background: var(--teal-light);
    color: var(--teal-deep);
}

.day-meal img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

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

/* ============================================
   SHOPPING SCREEN
   ============================================ */
.items-count {
    color: var(--gray-500);
    margin-bottom: 16px;
}

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

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

.shopping-item:hover {
    background: var(--gray-50);
}

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

.checkbox {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    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);
    color: white;
}

.checkbox i {
    width: 16px;
    height: 16px;
}

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

.shopping-item-info strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

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

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

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

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

.clear-checked-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border: none;
    background: none;
    color: var(--gray-400);
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}

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

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

.empty-icon i {
    width: 44px;
    height: 44px;
    color: var(--teal);
}

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

.empty-state p {
    color: var(--gray-400);
    line-height: 1.5;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
    }
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: auto;
    padding: 24px;
    box-shadow: 0 -10px 40px rgba(13, 77, 77, 0.15);
}

@media (min-width: 768px) {
    .modal-content {
        border-radius: var(--radius-xl);
    }
}

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

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

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

.modal-close i {
    width: 18px;
    height: 18px;
}

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

.onboarding-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    max-width: 400px;
    width: 100%;
}

.onboarding-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.onboarding-icon i {
    width: 48px;
    height: 48px;
    color: white;
}

.onboarding-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 16px;
}

.onboarding-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 40px;
}

.onboarding-features {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.onboarding-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
}

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

.feature-icon i {
    width: 24px;
    height: 24px;
    color: rgba(255,255,255,0.9);
}

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

.feature-text p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.onboarding-btn {
    width: 100%;
    padding: 18px;
    font-size: 17px;
    box-shadow: 0 10px 20px rgba(224, 122, 95, 0.3);
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--teal);
}

.form-group textarea {
    resize: none;
}

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

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

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 16px;
}

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

.toggle-label {
    font-weight: 600;
    font-size: 15px;
}

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

.toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    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: 0.3s;
}

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

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

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

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

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    padding: 16px 24px;
    background: var(--teal);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 15px -3px rgba(13, 115, 119, 0.25);
}

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

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

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

.btn-danger {
    padding: 16px 24px;
    background: #FEE2E2;
    color: #EF4444;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    flex: 1;
}

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

.form-actions .btn-primary {
    flex: 1;
}

.form-actions .btn-secondary {
    flex: 1;
}

/* ============================================
   VOICE INPUT
   ============================================ */
.voice-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-500);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

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

.voice-btn.listening {
    background: var(--coral);
    border-color: var(--coral);
    color: white;
    animation: pulse 1.5s infinite;
}

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

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

.voice-transcript {
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
    font-style: italic;
    margin-bottom: 16px;
}

/* ============================================
   SCANNER
   ============================================ */
#scanner-container {
    margin-bottom: 16px;
}

#scanner-video {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}

.scanner-hint {
    text-align: center;
    font-size: 14px;
    color: var(--gray-400);
    margin-top: 12px;
}

.scanner-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    text-align: center;
    color: var(--gray-500);
}

.scanner-error i {
    width: 48px;
    height: 48px;
    color: var(--gray-300);
}

.scanned-product {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--teal-light);
    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;
    margin-bottom: 4px;
}

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

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

/* ============================================
   DRAWER
   ============================================ */
.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
}

.drawer-content {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 100%;
    max-width: 400px;
    background: white;
    box-shadow: -10px 0 40px rgba(13, 77, 77, 0.15);
    padding: 24px;
    overflow-y: auto;
}

@media (max-width: 767px) {
    .drawer-content {
        top: auto;
        bottom: 0;
        height: auto;
        max-height: 90vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
}

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

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

.edit-image-preview {
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-100);
    margin-bottom: 20px;
}

.edit-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.upgrade-icon i {
    width: 40px;
    height: 40px;
    color: white;
}

.upgrade-content h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.upgrade-subtitle {
    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: 15px;
}

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

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

.btn-gold {
    padding: 18px 24px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.3);
}

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

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

.delete-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #FEE2E2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

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

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

.delete-content p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ============================================
   PRO BADGE
   ============================================ */
.pro-badge {
    background: var(--gold);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: auto;
}

.premium-nav .pro-badge {
    margin-left: 8px;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--teal);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 400;
    animation: slideUp 0.3s ease;
    font-size: 15px;
    font-weight: 500;
}

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

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

@keyframes slideUp {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@media (min-width: 768px) {
    .toast {
        bottom: 40px;
    }
}
