/* ===== CSS VARIABLES & RESET ===== */ :root { --primary: #2d5016; --primary-light: #4a7c28; --primary-dark: #1a3009; --success: #16a34a; --success-light: #22c55e; --danger: #dc2626; --danger-light: #ef4444; --warning: #f59e0b; --warning-light: #fbbf24; --accent: #7c3aed; --accent-light: #8b5cf6; --bg: #f0f4e8; --bg-card: #ffffff; --bg-dark: #1a1a2e; --text: #1a1a1a; --text-light: #6b7280; --text-muted: #9ca3af; --border: #e5e7eb; --shadow: 0 2px 8px rgba(0,0,0,0.1); --shadow-lg: 0 4px 16px rgba(0,0,0,0.15); --radius: 16px; --radius-sm: 10px; --nav-height: 70px; --header-height: 56px; } * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; padding-top: var(--header-height); padding-bottom: var(--nav-height); -webkit-font-smoothing: antialiased; } /* ===== HEADER ===== */ .app-header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; z-index: 100; display: flex; align-items: center; padding: 0 16px; box-shadow: var(--shadow); } .header-content { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 600px; margin: 0 auto; } .header-title { font-size: 1.3rem; font-weight: 700; cursor: pointer; } .header-btn { background: rgba(255,255,255,0.2); border: none; color: white; font-size: 1.3rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; } .header-btn:active { background: rgba(255,255,255,0.4); } .header-scan-btn { background: rgba(255,255,255,0.25); border: 2px solid rgba(255,255,255,0.5); color: white; font-size: 2.1rem; width: 58px; height: 58px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.2); animation: pulse-scan 2s ease-in-out infinite; line-height: 1; padding-bottom: 2px; } .header-actions { display: flex; gap: 10px; align-items: center; } .header-gemini-btn { width: 44px; height: 44px; font-size: 1.4rem; animation: none; border-width: 2px; background: rgba(99, 102, 241, 0.35); border-color: rgba(199, 210, 254, 0.6); } .header-gemini-btn:active { background: rgba(99, 102, 241, 0.55); } .gemini-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)); } .header-scan-btn:active { transform: scale(0.9); background: rgba(255,255,255,0.4); } /* Spesa mode banner */ .spesa-mode-banner { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 10px; font-weight: 600; font-size: 0.95rem; box-shadow: var(--shadow); } .spesa-mode-banner .btn { background: rgba(255,255,255,0.25); color: #fff; border: 1px solid rgba(255,255,255,0.5); font-weight: 600; padding: 6px 14px; } @keyframes pulse-scan { 0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.2); } 50% { box-shadow: 0 2px 16px rgba(255,255,255,0.4); } } /* ===== MAIN CONTENT ===== */ .app-content { max-width: 600px; margin: 0 auto; padding: 12px; min-height: calc(100vh - var(--header-height) - var(--nav-height)); } /* ===== PAGE MANAGEMENT ===== */ .page { display: none; animation: fadeIn 0.2s ease; } .page.active { display: block; } @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } /* ===== PAGE HEADER ===== */ .page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--border); } .page-header h2 { font-size: 1.2rem; font-weight: 700; } .back-btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 0.95rem; color: var(--primary); font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.2s; } .back-btn:active { background: var(--border); } /* ===== DASHBOARD ===== */ .dashboard-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; } .stat-card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; gap: 4px; position: relative; } .stat-card:active { transform: scale(0.97); box-shadow: var(--shadow-lg); } .stat-icon { font-size: 2rem; } .stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); } .stat-label { font-size: 0.85rem; color: var(--text-light); font-weight: 600; } /* ===== ALERTS ===== */ .alert-section { background: #fef3c7; border: 2px solid var(--warning); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; } /* Quick recipe bar */ .quick-recipe-bar { margin-bottom: 12px; } .btn-quick-recipe { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; border: none; border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; cursor: pointer; text-align: left; box-shadow: 0 2px 8px rgba(249,115,22,0.3); } .btn-quick-recipe span:first-child { font-size: 1.3rem; } .btn-quick-recipe .quick-recipe-text { flex: 1; } .btn-quick-recipe span:last-child { font-size: 1.1rem; opacity: 0.8; } .btn-quick-recipe:active { transform: scale(0.98); } /* Waste chart section */ .waste-chart-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; } .waste-chart-section h3 { font-size: 0.95rem; margin-bottom: 10px; } .waste-chart-bar { display: flex; height: 24px; border-radius: 12px; overflow: hidden; background: var(--bg-main); margin-bottom: 8px; } .waste-bar-used { background: var(--success); transition: width 0.5s ease; min-width: 0; } .waste-bar-wasted { background: var(--danger); transition: width 0.5s ease; min-width: 0; } .waste-chart-legend { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-light); } .waste-legend-item { display: flex; align-items: center; gap: 4px; } .waste-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; } .waste-legend-dot.used { background: var(--success); } .waste-legend-dot.wasted { background: var(--danger); } .alert-section h3 { font-size: 1.05rem; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; } .alert-danger { background: #fee2e2; border-color: var(--danger); } .alert-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; margin-bottom: 6px; background: rgba(255,255,255,0.7); border-radius: var(--radius-sm); font-size: 0.9rem; gap: 8px; } .alert-item:last-child { margin-bottom: 0; } .alert-item-clickable { cursor: pointer; transition: background 0.15s, transform 0.1s; } .alert-item-clickable:active { background: rgba(255,255,255,0.95); transform: scale(0.98); } .alert-item-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; } .alert-item-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .alert-item-brand { font-size: 0.8rem; color: var(--text-light); } .alert-item-badge { font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; } .alert-item-badge.expiring { background: var(--warning); color: #fff; } .alert-item-badge.expiring-soon { background: #ffc107; color: #333; } .alert-item-badge.expiring-later { background: #e0e0e0; color: #555; } .alert-item-badge.expired { background: var(--danger); color: #fff; } .alert-item-badge.today { background: var(--danger-light); color: #fff; } /* Safety badges for expired items */ .alert-item-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; } .safety-badge { font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 12px; white-space: nowrap; cursor: help; } .safety-badge.safety-danger { background: #dc3545; color: #fff; } .safety-badge.safety-warning { background: #ffc107; color: #333; } .safety-badge.safety-ok { background: #28a745; color: #fff; } /* ===== SECTION CARD ===== */ .section-card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; } .section-card h3 { font-size: 1rem; margin-bottom: 12px; color: var(--primary); } /* ===== LOCATION TABS ===== */ .location-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .location-tabs::-webkit-scrollbar { display: none; } .tab { background: var(--bg-card); border: 2px solid var(--border); border-radius: 25px; padding: 8px 16px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all 0.2s; } .tab.active { background: var(--primary); color: white; border-color: var(--primary); } .tab:active { transform: scale(0.95); } /* ===== SEARCH BAR ===== */ .search-bar { margin-bottom: 12px; } .search-bar input { width: 100%; padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--border); background: var(--bg-card); font-size: 1rem; outline: none; transition: border-color 0.2s; } .search-bar input:focus { border-color: var(--primary); } /* ===== INVENTORY LIST ===== */ .inventory-list { display: flex; flex-direction: column; gap: 8px; } .inventory-item { background: var(--bg-card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; cursor: pointer; transition: transform 0.15s; } .inventory-item:active { transform: scale(0.98); } .inv-image { width: 50px; height: 50px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; } .inv-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); } .inv-info { flex: 1; min-width: 0; } .inv-name { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .inv-brand { font-size: 0.8rem; color: var(--text-light); } .inv-meta { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; } .inv-badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 12px; font-weight: 600; } .badge-location { background: #dbeafe; color: #1d4ed8; } .badge-qty { background: #d1fae5; color: #047857; } .badge-expiry { background: #fef3c7; color: #92400e; } .badge-expired { background: #fee2e2; color: #dc2626; } .inv-actions { display: flex; flex-direction: column; gap: 6px; } .inv-action-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 4px; border-radius: 8px; transition: background 0.2s; } .inv-action-btn:active { background: var(--border); } /* ===== BUTTONS ===== */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-decoration: none; -webkit-user-select: none; user-select: none; } .btn:active { transform: scale(0.97); } .btn-large { padding: 16px 24px; font-size: 1.1rem; border-radius: var(--radius); } .btn-huge { padding: 28px 20px; font-size: 1.2rem; border-radius: 20px; flex: 1; flex-direction: column; min-height: 120px; } .btn-icon { font-size: 2.5rem; } .btn-text { text-align: center; line-height: 1.3; } .btn-text small { font-weight: 400; font-size: 0.8rem; opacity: 0.85; } .btn-primary { background: var(--primary); color: white; } .btn-primary:active { background: var(--primary-dark); } .btn-success { background: var(--success); color: white; } .btn-success:active { background: #15803d; } .btn-danger { background: var(--danger); color: white; } .btn-danger:active { background: #b91c1c; } .btn-warning { background: var(--warning); color: white; } .btn-secondary { background: var(--bg-card); color: var(--text); border: 2px solid var(--border); } .move-countdown-btn { position: relative; overflow: hidden; transition: none; } .btn-accent { background: var(--accent); color: white; } .btn-accent:active { background: #6d28d9; } .full-width { width: 100%; } .mt-2 { margin-top: 12px; } /* ===== ACTION BUTTONS (Scan page) ===== */ .action-buttons { display: flex; gap: 12px; margin-top: 16px; } /* ===== FORMS ===== */ .form { display: flex; flex-direction: column; gap: 16px; } .form-group { display: flex; flex-direction: column; gap: 6px; } .form-group label { font-weight: 600; font-size: 0.9rem; color: var(--text); } .form-input { width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 1rem; background: var(--bg-card); outline: none; transition: border-color 0.2s; -webkit-appearance: none; appearance: none; } .form-input:focus { border-color: var(--primary); } .form-row { display: flex; gap: 12px; } .flex-1 { flex: 1; } /* ===== LOCATION SELECTOR ===== */ .location-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .loc-btn { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; } .loc-btn.active { background: var(--primary); color: white; border-color: var(--primary); } .loc-btn:active { transform: scale(0.97); } /* ===== QUANTITY CONTROL ===== */ .qty-control { display: flex; align-items: center; gap: 4px; } .qty-btn { width: 50px; height: 50px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); font-size: 1.5rem; font-weight: 700; color: var(--primary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; } .qty-btn:active { background: var(--primary); color: white; border-color: var(--primary); } .qty-input { width: 80px; height: 50px; text-align: center; font-size: 1.3rem; font-weight: 700; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; -webkit-appearance: none; -moz-appearance: textfield; } .qty-input:focus { border-color: var(--primary); } /* ===== USE OPTIONS ===== */ .use-options { display: flex; flex-direction: column; gap: 16px; } .use-unit-switch { display: flex; gap: 0; margin-bottom: 12px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--primary); } .use-unit-btn { flex: 1; padding: 10px 12px; border: none; background: var(--bg); color: var(--text); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; } .use-unit-btn.active { background: var(--primary); color: #fff; } .use-all-btn { min-height: 70px; font-size: 1.15rem; } .use-partial { background: var(--bg); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; } .use-partial p { font-size: 0.9rem; color: var(--text-light); } /* ===== SCANNER ===== */ .scan-container { display: flex; flex-direction: column; gap: 16px; } .scanner-viewport { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; border-radius: var(--radius); overflow: hidden; } .scanner-viewport video { width: 100%; height: 100%; object-fit: cover; } .scanner-overlay { position: absolute; top: 50%; left: 10%; right: 10%; height: 3px; transform: translateY(-50%); z-index: 10; pointer-events: none; } .scanner-line { width: 100%; height: 3px; background: var(--danger); box-shadow: 0 0 10px var(--danger); animation: scanLine 2s ease-in-out infinite; transition: background 0.2s, box-shadow 0.2s, height 0.2s; } /* While Quagga is actively scanning frames */ .scanner-line.scanning { background: #00c853; box-shadow: 0 0 12px #00c853; animation: scanLineActive 0.8s ease-in-out infinite; } /* Barcode partially detected — strong pulse */ .scanner-line.detecting { background: #ffd600; box-shadow: 0 0 20px #ffd600, 0 0 40px rgba(255,214,0,0.4); height: 5px; animation: scanLineDetect 0.3s ease-in-out infinite; } @keyframes scanLine { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } } @keyframes scanLineActive { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @keyframes scanLineDetect { 0%, 100% { opacity: 1; transform: scaleY(1); } 50% { opacity: 0.7; transform: scaleY(2); } } .scan-result { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); } .scan-actions { display: flex; flex-direction: column; gap: 10px; } .barcode-manual-entry { margin-bottom: 12px; } .barcode-input-row { display: flex; gap: 8px; align-items: center; } .barcode-input-row .form-input { flex: 1; margin: 0; font-size: 1.1rem; letter-spacing: 1px; } .barcode-input-row .btn { white-space: nowrap; flex-shrink: 0; } .quick-name-entry { margin-bottom: 12px; } .quick-name-divider { text-align: center; margin: 10px 0 8px; position: relative; } .quick-name-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); } .quick-name-divider span { background: var(--bg-main); padding: 0 12px; position: relative; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; } .quick-name-results { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; } .quick-name-result-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; transition: transform 0.1s; } .quick-name-result-item:active { transform: scale(0.98); } .quick-name-result-item .qnr-icon { font-size: 1.5rem; flex-shrink: 0; } .quick-name-result-item .qnr-info { flex: 1; min-width: 0; } .quick-name-result-item .qnr-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .quick-name-result-item .qnr-detail { font-size: 0.8rem; color: var(--text-muted); } .quick-name-result-item.qnr-new { border: 1px dashed var(--accent); background: rgba(124, 58, 237, 0.06); } .scan-hint { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; } /* ===== SHOPPING LIST (BRING!) ===== */ .shopping-container { display: flex; flex-direction: column; gap: 16px; } /* ===== SHOPPING TABS ===== */ .shopping-tabs { display: flex; gap: 6px; background: var(--bg-card); border-radius: var(--radius); padding: 4px; box-shadow: var(--shadow); } .shopping-tab { flex: 1; padding: 9px 8px; border-radius: calc(var(--radius) - 2px); border: none; background: transparent; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; } .shopping-tab.active { background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(45, 80, 22, 0.25); } .shopping-tab-count { background: rgba(255,255,255,0.25); border-radius: 10px; padding: 1px 6px; font-size: 0.75rem; font-weight: 700; } .shopping-tab:not(.active) .shopping-tab-count { background: var(--bg); color: var(--accent); } .tab-panel-shopping { display: none; } .tab-panel-shopping.active { display: flex; flex-direction: column; gap: 16px; } /* ===== SHOPPING ITEM ENHANCEMENTS ===== */ .shopping-item { cursor: pointer; transition: background 0.15s, transform 0.1s; } .shopping-item:active { transform: scale(0.99); background: #f0fdf4; } .shopping-item-name-row { display: flex; align-items: center; gap: 6px; } .shopping-item-scan-hint { font-size: 0.75rem; opacity: 0.4; flex-shrink: 0; } .shopping-item-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; } /* Generic small item badge (sinv = shopping inventory) */ .sinv-badge { display: inline-block; font-size: 0.62rem; font-weight: 600; padding: 1px 6px; border-radius: 8px; white-space: nowrap; line-height: 1.6; } .badge-critical { background: #fee2e2; color: #dc2626; } .badge-high { background: #ffedd5; color: #c2410c; } .badge-medium { background: #fef9c3; color: #a16207; } .badge-low { background: #dcfce7; color: #15803d; } .badge-freq-high { background: #fce7f3; color: #be185d; } .badge-freq-med { background: #ede9fe; color: #6d28d9; } .badge-freq-low { background: #f1f5f9; color: #64748b; } .badge-local-tag { background: #e0f2fe; color: #0369a1; cursor: pointer; } .badge-local-tag:hover { background: #bae6fd; } /* Tag add button */ .shopping-item-tag-btn { background: none; border: none; font-size: 0.75rem; cursor: pointer; padding: 2px 4px; border-radius: 4px; opacity: 0.5; transition: opacity 0.2s; } .shopping-item-tag-btn:hover { opacity: 1; } /* Tag menu dropdown */ .shopping-tag-menu-container { margin-top: 6px; padding: 6px 8px; background: #f8fafc; border-radius: var(--radius); border: 1px solid var(--border); } .shopping-tag-menu { display: flex; flex-wrap: wrap; gap: 5px; } .badge-tag-add { background: #f1f5f9; color: var(--text-secondary); border: 1px solid var(--border); cursor: pointer; transition: all 0.15s; padding: 2px 8px; } .badge-tag-add:hover, .badge-tag-add.active { background: #e0f2fe; color: #0369a1; border-color: #7dd3fc; } /* ===== SHOPPING SCAN TARGET BANNER ===== */ .shopping-scan-target-banner { background: linear-gradient(135deg, #FFF9C4, #FFF3CD); border: 1.5px solid #F59E0B; border-radius: var(--radius); padding: 12px 14px; margin: 0 0 4px; display: flex; flex-direction: column; gap: 8px; } .shopping-scan-target-info { display: flex; align-items: center; gap: 8px; } .stb-label { font-size: 0.8rem; color: #92400e; font-weight: 600; white-space: nowrap; } .stb-name { font-size: 0.95rem; font-weight: 700; color: #78350f; } .shopping-scan-target-actions { display: flex; gap: 8px; flex-wrap: wrap; } .stb-btn { flex: 1; padding: 8px 10px; font-size: 0.82rem; min-width: 120px; } .bring-loading { text-align: center; padding: 30px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 10px; } .bring-error { text-align: center; padding: 20px; background: #fef2f2; color: #dc2626; border-radius: var(--radius); font-size: 0.9rem; } .shopping-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; } .shopping-section-header h3 { font-size: 1rem; margin: 0; } .shopping-count { background: var(--accent); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600; } .shopping-items { display: flex; flex-direction: column; gap: 4px; } .shopping-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); /* tap-to-scan handled by JS; cursor/active defined in ENHANCEMENTS block above */ } .shopping-item-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; } .shopping-item-body { flex: 1; min-width: 0; } .shopping-item-top { display: flex; align-items: stretch; gap: 8px; } .shopping-item-info { flex: 1; min-width: 0; } .shopping-item-name { font-weight: 600; font-size: 0.95rem; } .shopping-item-spec { font-size: 0.8rem; color: var(--text-muted); } .shopping-item-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; flex-shrink: 0; min-width: 70px; } .shopping-item-price { font-weight: 800; font-size: 1.25rem; color: var(--accent); line-height: 1.1; white-space: nowrap; margin-top: auto; } .shopping-item-remove { background: none; border: none; color: var(--text-muted); font-size: 0.85rem; padding: 2px 4px; cursor: pointer; border-radius: 50%; transition: background 0.2s; flex-shrink: 0; line-height: 1; } .shopping-item-remove:hover, .shopping-item-remove:active { background: #fee2e2; color: #dc2626; } /* Spesa bar: action buttons below item */ .spesa-bar { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; } .spesa-bar-btn { font-size: 0.7rem; padding: 3px 8px; border: 1px solid #e0e0e0; border-radius: 12px; background: #f8f9fa; color: var(--text-secondary); cursor: pointer; text-decoration: none; transition: background 0.2s; white-space: nowrap; } .spesa-bar-btn:hover, .spesa-bar-btn:active { background: #e0f2fe; border-color: var(--accent); } /* Loading animation */ .spesa-loading { font-size: 0.8rem; color: var(--accent); margin-top: 3px; animation: spesaPulse 1.2s ease-in-out infinite; } @keyframes spesaPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } } /* Found product name */ .spesa-found-name { font-size: 0.72rem; color: var(--text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } .shopping-item-remove:hover, .shopping-item-remove:active { background: #fee2e2; color: #ef4444; } .shopping-actions { margin-top: 8px; display: flex; flex-direction: row; gap: 8px; } .shopping-actions .btn { flex: 1; font-size: 0.8rem; padding: 10px 8px; } .seasonal-tip { background: linear-gradient(135deg, #ecfdf5, #f0fdf4); padding: 12px 14px; border-radius: var(--radius); font-size: 0.85rem; color: #065f46; margin-bottom: 8px; border-left: 3px solid #10b981; } .suggestion-items { display: flex; flex-direction: column; gap: 4px; } .suggestion-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; transition: transform 0.1s, background 0.2s; border: 2px solid transparent; } .suggestion-item.selected { border-color: var(--accent); background: #faf5ff; } .suggestion-item:active { transform: scale(0.98); } .suggestion-check { font-size: 1.1rem; flex-shrink: 0; } .suggestion-info { flex: 1; min-width: 0; } .suggestion-name { font-weight: 600; font-size: 0.9rem; } .suggestion-name small { font-weight: 400; color: var(--text-muted); } .suggestion-reason { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; } .priority-badge { display: inline-block; font-size: 0.65rem; font-weight: 600; padding: 1px 6px; border-radius: 8px; vertical-align: middle; margin-left: 4px; text-transform: uppercase; } .priority-high { background: #fee2e2; color: #dc2626; } .priority-med { background: #fef9c3; color: #ca8a04; } .priority-low { background: #ecfdf5; color: #059669; } .suggestion-actions { margin-top: 12px; text-align: center; } .suggestion-actions .btn-success { width: 100%; } /* ===== SMART SHOPPING ===== */ .smart-shopping { margin-top: 16px; } .smart-shopping h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; } .smart-shopping h3 .shopping-count { font-size: 0.75rem; background: var(--accent); color: #fff; border-radius: 10px; padding: 1px 7px; font-weight: 600; } .smart-filter-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .smart-filter-row::-webkit-scrollbar { display: none; } .smart-filter { flex-shrink: 0; padding: 5px 12px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--bg-card); font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap; } .smart-filter.active { background: var(--accent); color: #fff; border-color: var(--accent); } .smart-items { display: flex; flex-direction: column; gap: 6px; } .smart-item { padding: 10px 12px; border-radius: var(--radius); box-shadow: var(--shadow); transition: transform 0.1s; } .smart-item:active { transform: scale(0.99); } .smart-item-top { display: flex; align-items: flex-start; gap: 8px; } .smart-check { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; } .smart-item-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; margin-top: 1px; } .smart-item-info { flex: 1; min-width: 0; } .smart-item-name { font-weight: 600; font-size: 0.9rem; line-height: 1.3; } .smart-brand { font-weight: 400; color: var(--text-muted); font-size: 0.78rem; } .smart-item-reasons { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; } .smart-item-reasons span + span::before { content: ''; } .smart-item-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; } .smart-urgency-badge, .smart-freq-badge, .smart-pred-badge, .smart-bring-badge { display: inline-block; font-size: 0.65rem; font-weight: 600; padding: 1px 7px; border-radius: 8px; white-space: nowrap; } .smart-urgency-badge { background: #f3f4f6; } .smart-freq-badge { background: #ede9fe; color: #6d28d9; } .smart-freq-badge.freq-high { background: #fce7f3; color: #be185d; } .smart-freq-badge.freq-med { background: #ede9fe; color: #6d28d9; } .smart-freq-badge.freq-low { background: #f0fdf4; color: #15803d; } .smart-pred-badge { background: #fefce8; color: #a16207; } .smart-pred-badge.pred-urgent { background: #fee2e2; color: #dc2626; } .smart-pred-badge.pred-soon { background: #fff7ed; color: #c2410c; } .smart-bring-badge { background: #dbeafe; color: #1d4ed8; } .smart-item-stock { text-align: right; flex-shrink: 0; min-width: 50px; } .smart-qty { font-size: 0.8rem; font-weight: 700; display: block; } .smart-stock-bar { width: 44px; height: 5px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin-top: 4px; margin-left: auto; } .smart-stock-fill { height: 100%; border-radius: 3px; transition: width 0.3s; } .smart-actions { margin-top: 12px; text-align: center; } .smart-actions .btn { width: 100%; font-size: 0.85rem; padding: 10px; } .stat-urgent { position: absolute; top: 4px; right: 4px; background: #ef4444; color: #fff; font-size: 0.6rem; font-weight: 700; padding: 1px 5px; border-radius: 8px; line-height: 1.3; } /* ===== PRODUCT PREVIEW ===== */ .product-preview, .product-preview-small { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; display: flex; align-items: center; gap: 14px; } .product-preview-small { padding: 12px; } .product-preview img, .product-preview-small img { width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg); } .product-preview-small img { width: 45px; height: 45px; } .product-preview-emoji { font-size: 2.5rem; width: 60px; text-align: center; } .product-preview-info h3 { font-size: 1.1rem; font-weight: 700; } .product-preview-info p { font-size: 0.85rem; color: var(--text-light); } .product-image-preview { text-align: center; margin: 8px 0; } .product-image-preview img { max-width: 120px; border-radius: var(--radius-sm); } /* ===== AI PAGE ===== */ .ai-container { display: flex; flex-direction: column; gap: 16px; } .ai-capture { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; border-radius: var(--radius); overflow: hidden; } .ai-capture video { width: 100%; height: 100%; object-fit: cover; } .ai-preview { text-align: center; } .ai-preview img { max-width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); } .ai-actions { display: flex; flex-direction: column; gap: 10px; } .ai-result { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); } /* ===== BOTTOM NAV ===== */ .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-height); background: var(--bg-card); display: flex; justify-content: space-around; align-items: center; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0); } .nav-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: none; color: var(--text-muted); font-size: 0.7rem; font-weight: 600; cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm); transition: all 0.2s; min-width: 56px; } .nav-btn.active { color: var(--primary); } .nav-icon { font-size: 1.4rem; } .nav-label { font-size: 0.65rem; } /* ===== TOAST ===== */ .toast { position: fixed; bottom: calc(var(--nav-height) + 16px); left: 50%; transform: translateX(-50%) translateY(100px); background: var(--bg-dark); color: white; padding: 14px 24px; border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; z-index: 1000; opacity: 0; pointer-events: none; transition: all 0.3s; max-width: 90vw; text-align: center; box-shadow: var(--shadow-lg); } .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; } .toast.success { background: var(--success); } .toast.error { background: var(--danger); } /* ===== LOADING ===== */ .loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1000; color: white; gap: 12px; } .loading-spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* ===== MODAL ===== */ .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: flex-end; justify-content: center; z-index: 200; padding: 0; } #modal-overlay { z-index: 250; } /* Raise modal above cooking overlay when in cooking mode */ .cooking-mode-active #modal-overlay { z-index: 600; } .modal-content { background: var(--bg-card); border-radius: var(--radius) var(--radius) 0 0; width: 100%; max-width: 600px; max-height: 80vh; overflow-y: auto; padding: 20px; animation: slideUp 0.3s ease; } @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } } .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; } .modal-header h3 { font-size: 1.15rem; } .modal-close { background: var(--bg); border: none; font-size: 1.3rem; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; } .modal-detail { display: flex; flex-direction: column; gap: 10px; } .modal-detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; } .modal-detail-label { color: var(--text-light); font-weight: 500; } .modal-detail-value { font-weight: 600; } .modal-actions { display: flex; gap: 10px; margin-top: 16px; } /* ===== TRANSACTIONS LIST ===== */ .transaction-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; } .transaction-item:last-child { border-bottom: none; } .tx-icon { font-size: 1.3rem; width: 32px; text-align: center; } .tx-info { flex: 1; } .tx-name { font-weight: 600; } .tx-detail { font-size: 0.8rem; color: var(--text-light); } .tx-qty { font-weight: 700; font-size: 0.9rem; } .tx-qty.in { color: var(--success); } .tx-qty.out { color: var(--danger); } /* ===== PRODUCTS LIST ===== */ .products-list { display: flex; flex-direction: column; gap: 8px; } .product-item { background: var(--bg-card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; cursor: pointer; } .product-item:active { transform: scale(0.98); } /* ===== USE INVENTORY INFO ===== */ .use-inventory-info { background: #dbeafe; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; font-size: 0.9rem; color: #1d4ed8; font-weight: 500; } /* ===== EMPTY STATE ===== */ .empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); } .empty-state-icon { font-size: 3rem; margin-bottom: 12px; } .empty-state p { font-size: 0.95rem; } /* ===== CATEGORY GROUP HEADERS ===== */ .cat-group-header { display: flex; align-items: center; gap: 6px; padding: 8px 4px 4px; font-size: 0.85rem; font-weight: 700; color: var(--primary); border-bottom: 1px solid var(--border); margin-top: 8px; } .cat-group-header:first-child { margin-top: 0; } .cat-group-count { background: var(--primary); color: white; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; margin-left: auto; } /* ===== EDIT UNKNOWN PRODUCT ===== */ .edit-unknown-card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: var(--shadow); border: 2px solid var(--border); } .edit-unknown-card.highlight { border-color: var(--warning); background: #fffbeb; } .edit-unknown-card h4 { font-size: 1rem; margin-bottom: 4px; } .edit-unknown-hint { font-size: 0.85rem; color: var(--text-light); margin-bottom: 12px; } .edit-unknown-form .form-group { margin-bottom: 10px; } .edit-unknown-form .form-group label { font-size: 0.85rem; font-weight: 600; display: block; margin-bottom: 4px; } /* ===== COMPACT INVENTORY ON DASHBOARD ===== */ .inventory-list.compact { gap: 4px; } .compact-item { padding: 10px 12px; border-radius: 12px; box-shadow: none; border-bottom: 1px solid var(--border); background: transparent; } .compact-item:last-child { border-bottom: none; } .compact-item .inv-image { width: 36px; height: 36px; font-size: 1.2rem; } .compact-item .inv-image img { width: 36px; height: 36px; } .compact-item .inv-info { flex: 1; min-width: 0; } .compact-item .inv-name { font-size: 0.92rem; } .compact-item .inv-brand { font-size: 0.75rem; } .inv-qty-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex-shrink: 0; } .inv-qty-value { font-weight: 800; font-size: 1rem; color: var(--primary); white-space: nowrap; } .inv-qty-value small { font-size: 0.7rem; font-weight: 600; color: #4b5563; } .inv-qty-pkg-detail { font-size: 0.65rem; color: #6b7280; font-weight: 500; white-space: nowrap; } .inv-expiry-small { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; } .inv-expiry-small.expiring { color: var(--warning); font-weight: 600; } .inv-expiry-small.expired { color: var(--danger); font-weight: 600; } .section-card h3 { display: flex; align-items: center; gap: 6px; } /* ===== RESPONSIVE ===== */ @media (min-width: 768px) { .dashboard-stats { grid-template-columns: repeat(4, 1fr); } .location-selector { grid-template-columns: repeat(4, 1fr); } } /* Safe area for notched phones */ @supports (padding: env(safe-area-inset-bottom)) { .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-height) + env(safe-area-inset-bottom)); } body { padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); } } /* ===== PURCHASE TYPE SELECTOR ===== */ .purchase-type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; } .purchase-type-btn { padding: 12px 8px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center; } .purchase-type-btn.active { border-color: var(--primary); background: rgba(45, 80, 22, 0.08); color: var(--primary); } /* ===== EXPIRY DETAIL ===== */ .expiry-detail { margin-top: 8px; padding: 12px; background: #f8faf5; border-radius: var(--radius-sm); border: 1px solid rgba(45, 80, 22, 0.1); } .expiry-estimate { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; margin-bottom: 8px; } .expiry-estimate-label { font-size: 0.9rem; color: var(--text-light); } .expiry-estimate-date { font-size: 0.85rem; color: var(--primary); font-weight: 600; } .form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; } /* ===== TOGGLE SWITCH ===== */ .toggle-row { display: flex; justify-content: space-between; align-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; } .toggle-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; } .toggle-switch input { opacity: 0; width: 0; height: 0; } .toggle-slider { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #ccc; border-radius: 28px; transition: background 0.2s; } .toggle-slider::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s; } .toggle-switch input:checked + .toggle-slider { background: var(--primary, #3b82f6); } .toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); } .vacuum-badge { font-size: 0.7rem; background: rgba(59, 130, 246, 0.12); color: #2563eb; padding: 1px 6px; border-radius: 8px; font-weight: 600; white-space: nowrap; } .opened-badge { font-size: 0.7rem; background: rgba(245, 158, 11, 0.12); color: #d97706; padding: 1px 6px; border-radius: 8px; font-weight: 600; white-space: nowrap; } /* ===== REMAINING QUANTITY OPTIONS ===== */ .remaining-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; } .remaining-btn { padding: 10px 4px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); font-size: 0.9rem; cursor: pointer; text-align: center; transition: all 0.2s; } .remaining-btn.active { border-color: var(--primary); background: rgba(45, 80, 22, 0.08); font-weight: 600; } /* ===== PRODUCT DETAILS CARD (Action Page) ===== */ .product-details-card { background: var(--bg-card); border-radius: var(--radius); padding: 14px; margin: 0 16px 16px; box-shadow: var(--shadow); } .product-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; } .product-detail-tag { display: inline-block; padding: 4px 10px; border-radius: 20px; background: #f3f4f6; font-size: 0.8rem; color: #374151; white-space: nowrap; } .product-allergens { padding: 8px 10px; background: #fef3cd; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 8px; color: #856404; } .product-ingredients { margin-top: 6px; } .product-ingredients summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text-light); padding: 6px 0; } .product-ingredients p { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; padding: 6px 0; } .product-conservation { font-size: 0.8rem; color: var(--text-light); padding: 6px 0; border-top: 1px solid var(--border); margin-top: 6px; } /* ===== QUANTITY + UNIT ROW ===== */ .qty-unit-row { display: flex; gap: 8px; align-items: center; } .unit-select { width: 70px; min-width: 70px; padding: 10px 4px; text-align: center; font-weight: 600; font-size: 0.95rem; border-radius: var(--radius-sm); } /* ===== CONF PACKAGE SIZE ROW ===== */ .conf-size-row { margin-top: 8px; padding: 10px 12px; background: #f0f9ff; border: 1.5px solid #bae6fd; border-radius: var(--radius-sm); } .conf-size-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: #0369a1; } .conf-size-inputs { display: flex; gap: 8px; align-items: center; } .conf-size-input { flex: 1; max-width: 120px; } .conf-size-unit { width: 65px; min-width: 65px; } .conf-size-info { font-size: 0.75em; color: var(--text-light); font-weight: 500; } /* ===== EXPIRY INPUT + CAMERA ROW ===== */ .expiry-input-row { display: flex; gap: 8px; align-items: center; } .expiry-input-row .form-input { flex: 1; } .btn-scan-expiry { padding: 10px 14px !important; font-size: 1.2rem; min-width: 48px; border-radius: var(--radius-sm); } /* ===== EXPIRY SCANNER MODAL ===== */ .expiry-scanner { padding: 4px 0; } .expiry-scanner-actions { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; } /* ===== RECIPE DIALOG ===== */ .recipe-dialog { max-height: 85vh; overflow-y: auto; width: 94%; max-width: 500px; } .recipe-ask { text-align: center; } .recipe-ask h3 { font-size: 1.4rem; margin-bottom: 8px; } .recipe-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; line-height: 1.5; } .recipe-ask .form-group { margin-bottom: 20px; } .recipe-ask .qty-control { justify-content: center; } .recipe-loading { text-align: center; padding: 40px 16px; } .recipe-loading p { margin-top: 16px; color: var(--text-muted); font-weight: 600; } .recipe-result { text-align: left; } .recipe-result h2 { font-size: 1.3rem; color: var(--primary); margin-bottom: 4px; } .recipe-result h3 { font-size: 1.1rem; margin-top: 16px; margin-bottom: 8px; color: var(--text); } .recipe-result ul { padding-left: 20px; margin-bottom: 8px; } .recipe-result li { margin-bottom: 4px; line-height: 1.5; } .recipe-result ol { padding-left: 20px; margin-bottom: 8px; } .recipe-result ol li { margin-bottom: 8px; line-height: 1.5; } .recipe-result .recipe-tag { display: inline-block; background: var(--bg-light); color: var(--primary); font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 12px; margin: 2px 4px 2px 0; } .recipe-result .recipe-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; } .recipe-result .recipe-expiry-note { background: #fff3cd; color: #856404; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 12px; line-height: 1.5; } /* Recipe ingredient use buttons */ .recipe-ingredients { list-style: none; padding: 0; } .recipe-ingredient { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--bg-light); } .recipe-ingredient:last-child { border-bottom: none; } .recipe-ing-text { flex: 1; min-width: 0; line-height: 1.4; } .btn-use-ingredient { flex-shrink: 0; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); padding: 4px 10px; font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.2s, opacity 0.2s; } .btn-use-ingredient:active { opacity: 0.7; } .btn-use-ingredient:disabled { cursor: default; opacity: 0.6; } .btn-use-ingredient.btn-used { background: var(--success); } .recipe-ing-used .recipe-ing-text { text-decoration: line-through; opacity: 0.5; } .recipe-ing-detail { color: var(--text-muted); font-size: 0.78rem; line-height: 1.3; } /* ===== SHOPPING SECTION (REPARTO) HEADERS ===== */ .shopping-section-divider { display: flex; align-items: center; gap: 8px; padding: 10px 2px 4px; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); margin-top: 4px; } .shopping-section-divider:first-child { margin-top: 0; padding-top: 2px; border-bottom: none; } .shopping-section-divider span.sec-icon { font-size: 1rem; } /* ===== COOKING MODE ===== */ .cooking-overlay { position: fixed; inset: 0; background: #0a0a0a; z-index: 500; display: flex; flex-direction: column; color: #fff; overflow: hidden; touch-action: pan-y; } .cooking-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.10); flex-shrink: 0; min-height: 54px; } .cooking-title { flex: 1; text-align: center; font-size: 0.95rem; font-weight: 600; color: rgba(255,255,255,0.8); margin: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cooking-close-btn, .cooking-tts-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #fff; border-radius: 50%; width: 38px; height: 38px; font-size: 1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; flex-shrink: 0; } .cooking-close-btn:active, .cooking-tts-btn:active { background: rgba(255,255,255,0.2); } .cooking-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px; gap: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; } .cooking-step-num { font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.4); letter-spacing: 0.1em; text-align: center; flex-shrink: 0; } .cooking-step-text { font-size: clamp(1.4rem, 5vw, 2.2rem); line-height: 1.5; font-weight: 500; color: #fff; text-align: center; max-width: 560px; width: 100%; } .cooking-step-ings { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 8px; } .cooking-ing-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 10px 14px; } .cooking-ing-name { font-size: 0.95rem; color: rgba(255,255,255,0.9); flex: 1; min-width: 0; } .cooking-use-btn { flex-shrink: 0; background: #16a34a; border: none; color: #fff; border-radius: 8px; padding: 6px 14px; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: background 0.2s; white-space: nowrap; } .cooking-use-btn:active { background: #15803d; } .cooking-use-btn.btn-used { background: #374151; cursor: default; } .cooking-nav { display: flex; gap: 12px; padding: 14px 16px; background: rgba(255,255,255,0.04); border-top: 1px solid rgba(255,255,255,0.08); flex-shrink: 0; } .cooking-nav-btn { flex: 1; padding: 14px 10px; border-radius: 10px; font-size: 1rem; font-weight: 700; border: 1.5px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; transition: background 0.2s; text-align: center; } .cooking-nav-btn:disabled { opacity: 0.3; cursor: default; } .cooking-next-btn { background: rgba(22, 163, 74, 0.35); border-color: rgba(22, 163, 74, 0.6); } .cooking-next-btn.is-finish { background: rgba(22, 163, 74, 0.6); } .cooking-nav-btn:not(:disabled):active { background: rgba(255,255,255,0.2); } /* Cooking button in recipe dialog */ .btn-cooking { background: linear-gradient(135deg, #1e3a5f, #2d5016); color: #fff; } .btn-cooking:hover, .btn-cooking:active { opacity: 0.9; } /* ===== LOG PAGE ===== */ .log-list { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--space-sm); } .log-date-header { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: capitalize; padding: 12px 0 4px; border-bottom: 1px solid var(--bg-light); margin-bottom: 2px; } .log-entry { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-card); } .log-entry.log-in { border-left: 3px solid var(--success); background: rgba(40, 167, 69, 0.06); } .log-entry.log-out { border-left: 3px solid var(--danger); background: rgba(220, 53, 69, 0.06); } .log-entry.log-bring { border-left: 3px solid var(--primary); background: rgba(52, 120, 246, 0.06); } .log-icon { font-size: 1.2rem; flex-shrink: 0; } .log-info { flex: 1; min-width: 0; } .log-product { font-size: 0.9rem; line-height: 1.3; } .log-product em { font-weight: 400; color: var(--text-muted); font-size: 0.82rem; } .log-detail { font-size: 0.75rem; color: var(--text-muted); line-height: 1.3; margin-top: 1px; } /* ===== AI IDENTIFICATION RESULTS ===== */ .ai-identified-card { background: var(--bg-light); border-radius: var(--radius-sm); padding: 12px; margin-top: 8px; } .ai-matches-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; } .ai-match-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg-card); border: 2px solid var(--bg-light); border-radius: var(--radius-sm); cursor: pointer; transition: border-color 0.2s, background 0.2s; } .ai-match-item:active { border-color: var(--primary); background: var(--bg-light); } .ai-match-img { width: 48px; height: 48px; object-fit: contain; border-radius: var(--radius-sm); flex-shrink: 0; background: #fff; } .ai-match-info { flex: 1; min-width: 0; font-size: 0.9rem; line-height: 1.4; } .ai-match-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ai-match-barcode { font-size: 0.7rem; color: var(--text-muted); font-family: monospace; flex-shrink: 0; } /* ===== SETTINGS PAGE ===== */ .settings-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .settings-tabs::-webkit-scrollbar { display: none; } .settings-tab { background: var(--bg-card); border: 2px solid var(--border); border-radius: 25px; padding: 7px 12px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all 0.2s; flex-shrink: 0; } .settings-tab.active { background: var(--primary); color: white; border-color: var(--primary); } .settings-panel { display: none; } .settings-panel.active { display: block; } .settings-card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; } .settings-card h4 { font-size: 1.05rem; margin-bottom: 4px; color: var(--primary); } .settings-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.4; } .settings-status { margin-top: 12px; padding: 12px; border-radius: var(--radius-sm); text-align: center; font-weight: 600; font-size: 0.9rem; } .settings-status.success { background: #d1fae5; color: #047857; } .settings-status.error { background: #fee2e2; color: #dc2626; } .btn-small { padding: 6px 12px; font-size: 0.82rem; border-radius: var(--radius-sm); } .checkbox-label { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg); border-radius: var(--radius-sm); font-size: 0.9rem; cursor: pointer; transition: background 0.2s; } .checkbox-label:active { background: var(--border); } .checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); } .recipe-pref-checks { display: flex; flex-direction: column; gap: 6px; } /* Appliances */ .appliances-list { display: flex; flex-direction: column; gap: 6px; } .appliance-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg); border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 500; } .appliance-item .appliance-remove { background: none; border: none; color: var(--danger); font-size: 1.1rem; cursor: pointer; padding: 2px 6px; border-radius: 50%; transition: background 0.2s; } .appliance-item .appliance-remove:active { background: #fee2e2; } .appliance-quick-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .common-appliances .btn-small { font-size: 0.78rem; padding: 5px 10px; } /* ===== RECIPE OPTIONS GRID ===== */ .recipe-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; } .recipe-option-chip { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: background 0.2s; border: 2px solid transparent; } .recipe-option-chip:has(input:checked) { background: rgba(45, 80, 22, 0.08); border-color: var(--primary); } .recipe-option-chip input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); } /* Meal type selector */ .recipe-meal-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 4px; } .recipe-meal-chip { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; background: var(--bg); border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: background 0.2s, border-color 0.2s; border: 2px solid transparent; text-align: center; white-space: nowrap; } .recipe-meal-chip:has(input:checked) { background: rgba(45, 80, 22, 0.1); border-color: var(--primary); font-weight: 600; } .recipe-meal-chip input[type="radio"] { display: none; } /* ===== LARGER PRODUCT PREVIEW (Action page) ===== */ .product-preview-large { flex-direction: column; text-align: center; padding: 20px; } .product-preview-large img { width: 120px; height: 120px; border-radius: var(--radius); object-fit: cover; margin-bottom: 8px; } .product-preview-large .product-preview-emoji { font-size: 4rem; width: auto; margin-bottom: 8px; } .product-preview-large .product-preview-info { text-align: center; } .product-preview-large .product-preview-info h3 { font-size: 1.4rem; margin-bottom: 4px; } .product-preview-large .product-preview-info p { font-size: 0.95rem; } .btn-edit-inline { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.9); border: 1px solid #ddd; border-radius: 50%; width: 36px; height: 36px; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.12); } .product-preview-large { position: relative; } /* ===== INVENTORY STATUS BAR ===== */ .inventory-status-bar { background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%); border: 2px solid #93b4f8; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; } .inventory-status-bar .inv-status-header { display: flex; justify-content: space-between; align-items: center; } .inventory-status-bar .inv-status-title { font-size: 1rem; font-weight: 700; color: #1e40af; } .inventory-status-bar .inv-status-total { font-size: 2.2rem; font-weight: 900; color: #1e3a8a; background: rgba(255,255,255,0.8); padding: 8px 22px; border-radius: 24px; letter-spacing: 0.5px; line-height: 1.1; } .inventory-status-bar .inv-status-items { display: flex; flex-direction: column; gap: 4px; } .inventory-status-bar .inv-status-item { display: flex; justify-content: space-between; font-size: 0.85rem; color: #1d4ed8; padding: 5px 10px; background: rgba(255,255,255,0.55); border-radius: var(--radius-sm); } .inventory-status-bar .inv-status-item .inv-status-qty { font-weight: 700; } .inventory-status-bar .inv-status-item-clickable { cursor: pointer; transition: background 0.15s; } .inventory-status-bar .inv-status-item-clickable:active { background: rgba(59, 130, 246, 0.15); } /* ===== ACTION BUTTONS GRID ===== */ .action-buttons-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; } .action-buttons-4col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; } .action-buttons-3col .btn-huge, .action-buttons-4col .btn-huge { min-height: 100px; padding: 18px 8px; font-size: 1rem; } .action-buttons-3col .btn-icon, .action-buttons-4col .btn-icon { font-size: 2rem; } .btn-throw { background: #f97316; color: white; } .btn-throw:active { background: #ea580c; } .btn-edit { background: #6366f1; color: white; } .btn-edit:active { background: #4f46e5; } /* ===== STRUCTURED QUANTITY IN INVENTORY ===== */ .inv-qty-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; min-width: 56px; background: #ecfdf5; border-radius: 14px; padding: 6px 12px; } .inv-qty-number { font-size: 1.55rem; font-weight: 900; color: var(--primary); line-height: 1.1; letter-spacing: -0.5px; } .inv-qty-unit { font-size: 0.7rem; font-weight: 600; color: #4b5563; white-space: nowrap; line-height: 1.2; text-align: center; } .inv-qty-pkg { font-weight: 500; color: #6b7280; } .inv-qty-frac { font-size: 0.75rem; font-weight: 700; color: #9ca3af; line-height: 1; margin-top: 1px; } /* Package fraction indicators (used elsewhere) */ .pkg-fraction { font-size: 1rem; font-weight: 700; color: #6b7280; white-space: nowrap; } .inv-pkg-frac { display: block; text-align: center; } .inv-status-total-col { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; } .inv-status-total-frac { font-size: 0.8rem; } /* ===== REVIEW SECTION ===== */ .alert-review { background: #fffbeb; border-color: #f59e0b; } .alert-review h3 { color: #92400e; } /* ===== OPENED PRODUCTS SECTION ===== */ .alert-opened { background: #eff6ff; border-color: #3b82f6; } .alert-opened h3 { color: #1e40af; } .alert-item-badge.opened { background: #3b82f6; color: #fff; font-size: 0.7rem; } .review-hint { font-size: 0.8rem; color: #92400e; margin: -4px 0 10px; opacity: 0.8; } .review-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,0.7); border-radius: var(--radius-sm); margin-bottom: 6px; } .review-item-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; } .review-item-icon { font-size: 1.5rem; flex-shrink: 0; width: 36px; text-align: center; } .review-item-icon img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; } .review-item-text { min-width: 0; } .review-item-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .review-item-meta { font-size: 0.75rem; color: #78716c; } .review-warn { color: #dc2626; font-weight: 600; } .review-item-qty { flex-shrink: 0; } .review-qty-value { font-size: 1.1rem; font-weight: 800; color: #dc2626; background: #fee2e2; padding: 3px 10px; border-radius: 16px; white-space: nowrap; } .review-item-actions { display: flex; gap: 6px; flex-shrink: 0; } .btn-review { width: 36px; height: 36px; border-radius: 50%; border: none; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; } .btn-review-ok { background: #d1fae5; color: #059669; } .btn-review-ok:active { background: #a7f3d0; } .btn-review-edit { background: #e0e7ff; color: #4338ca; } .btn-review-edit:active { background: #c7d2fe; } /* ===== ALERT QUANTITY BADGES ===== */ .alert-item-qty { font-size: 0.78rem; font-weight: 600; color: var(--text-light); padding: 2px 8px; background: rgba(255,255,255,0.6); border-radius: 12px; white-space: nowrap; } /* ===== GEMINI CHAT ===== */ .chat-container { display: flex; flex-direction: column; height: calc(100vh - var(--header-height) - var(--nav-height) - 24px); background: var(--bg); border-radius: var(--radius); overflow: hidden; } .chat-header-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: white; border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; } .chat-header-info { display: flex; align-items: center; gap: 8px; } .chat-title { font-weight: 700; font-size: 1rem; color: #4338ca; } .btn-chat-clear { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; opacity: 0.6; } .btn-chat-clear:active { background: var(--bg); opacity: 1; } .chat-messages { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; } .chat-welcome { text-align: center; padding: 30px 16px; color: var(--text-light); } .chat-welcome h3 { margin: 12px 0 6px; color: var(--text); font-size: 1.1rem; } .chat-welcome p { font-size: 0.85rem; line-height: 1.5; max-width: 300px; margin: 0 auto 20px; } .gemini-icon-lg { opacity: 0.3; } .chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; } .chat-suggestion { background: white; border: 1.5px solid #e0e7ff; border-radius: 20px; padding: 8px 14px; font-size: 0.82rem; cursor: pointer; color: #4338ca; font-weight: 500; transition: all 0.15s; } .chat-suggestion:active { background: #e0e7ff; transform: scale(0.97); } .chat-bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 0.9rem; line-height: 1.5; word-break: break-word; animation: chatFadeIn 0.2s ease; } @keyframes chatFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } .chat-user { align-self: flex-end; background: #4338ca; color: white; border-bottom-right-radius: 6px; } .chat-gemini { align-self: flex-start; background: white; color: var(--text); border-bottom-left-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); } .chat-gemini strong { color: #4338ca; } .chat-gemini ul, .chat-gemini ol { margin: 4px 0; padding-left: 20px; } .chat-gemini li { margin-bottom: 2px; } .chat-input-bar { display: flex; gap: 8px; padding: 10px 12px; background: white; border-top: 1px solid var(--border); } .chat-input { flex: 1; border: 1.5px solid var(--border); border-radius: 24px; padding: 10px 16px; font-size: 0.9rem; outline: none; transition: border-color 0.2s; } .chat-input:focus { border-color: #6366f1; } .btn-chat-send { width: 42px; height: 42px; border-radius: 50%; border: none; background: #4338ca; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; } .btn-chat-send:active { transform: scale(0.92); background: #3730a3; } .btn-chat-send:disabled { background: #a5b4fc; cursor: default; } /* Typing indicator */ .chat-typing { display: flex; gap: 4px; padding: 4px 0; } .chat-typing span { width: 8px; height: 8px; background: #a5b4fc; border-radius: 50%; animation: chatTyping 1.4s infinite; } .chat-typing span:nth-child(2) { animation-delay: 0.2s; } .chat-typing span:nth-child(3) { animation-delay: 0.4s; } @keyframes chatTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } } /* ===== SPESA ONLINE / DUPLICLICK ===== */ .provider-selector { display: flex; gap: 10px; flex-wrap: wrap; } .provider-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 20px; border: 2px solid var(--border); border-radius: 12px; background: var(--card-bg); cursor: pointer; transition: all 0.2s; min-width: 120px; } .provider-btn:hover { border-color: var(--accent); background: rgba(45, 80, 22, 0.05); } .provider-btn.active { border-color: var(--accent); background: rgba(45, 80, 22, 0.1); box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.15); } .provider-icon { font-size: 1.8rem; } .provider-name { font-weight: 700; font-size: 0.95rem; color: var(--text); } .provider-desc { font-size: 0.75rem; color: var(--text-muted); } .dupliclick-status { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 0.9rem; } .dupliclick-status.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; } .dupliclick-status.error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; } .dupliclick-data { margin-top: 16px; } .dupliclick-data h4 { margin-bottom: 12px; font-size: 1rem; color: var(--text); } .dupliclick-data-grid { display: flex; flex-direction: column; gap: 6px; } .data-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; font-size: 0.85rem; } .data-label { font-weight: 600; color: var(--text-muted); min-width: 120px; } .data-value { text-align: right; color: var(--text); word-break: break-all; max-width: 60%; } .data-value.token-value { font-family: monospace; font-size: 0.8rem; color: var(--accent); } .raw-data-details { margin-top: 12px; } .raw-data-details summary { cursor: pointer; font-weight: 600; padding: 8px 0; color: var(--accent); font-size: 0.85rem; } .raw-json { margin-top: 8px; padding: 12px; background: #1e293b; color: #e2e8f0; border-radius: 10px; font-size: 0.75rem; line-height: 1.5; overflow-x: auto; max-height: 300px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; } /* ===== SPESA ONLINE - PRICE IN SHOPPING LIST ===== */ .spesa-total-banner { background: linear-gradient(135deg, #065f46, #047857); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; color: white; } .spesa-total-row { display: flex; justify-content: space-between; align-items: center; } .spesa-total-label { font-size: 0.95rem; font-weight: 600; } .spesa-total-value { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; } .spesa-total-detail { font-size: 0.75rem; opacity: 0.85; margin-top: 4px; } .spesa-detail-left { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; } .spesa-pkg { font-size: 0.68rem; color: var(--text-muted); } .spesa-promo-badge { font-size: 0.65rem; font-weight: 700; background: #dc2626; color: white; padding: 1px 5px; border-radius: 4px; white-space: nowrap; } .spesa-promo-expire { font-size: 0.6rem; color: var(--text-muted); font-style: italic; } .spesa-not-found { font-size: 0.7rem; color: var(--text-muted); font-style: italic; } .shopping-item.has-promo { border-left: 3px solid #dc2626; } /* ====== Recipe Archive ====== */ .recipe-archive { display: flex; flex-direction: column; gap: 16px; padding-bottom: 16px; } .recipe-archive-day { display: flex; flex-direction: column; gap: 8px; } .recipe-archive-date { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); padding: 2px 0; border-bottom: 2px solid var(--accent); margin-bottom: 2px; } .recipe-archive-card { background: var(--bg-card); border-radius: 10px; padding: 10px 14px; cursor: pointer; transition: box-shadow 0.2s, transform 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,0.06); } .recipe-archive-card:hover, .recipe-archive-card:active { box-shadow: 0 2px 8px rgba(0,0,0,0.12); transform: translateY(-1px); } .recipe-archive-card-header { display: flex; align-items: center; gap: 8px; } .recipe-archive-meal { font-size: 1.3rem; flex-shrink: 0; } .recipe-archive-title { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .recipe-archive-card-meta { display: flex; gap: 10px; margin-top: 4px; font-size: 0.72rem; color: var(--text-muted); flex-wrap: wrap; } /* ===== SCREENSAVER ===== */ .screensaver-overlay { position: fixed; inset: 0; background: #000; z-index: 10000; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity 0.8s ease; } .screensaver-overlay.visible { opacity: 1; } .screensaver-content { display: flex; flex-direction: column; align-items: center; gap: 32px; padding: 20px; max-width: 90vw; } .screensaver-clock { color: rgba(255,255,255,0.85); font-size: 7rem; font-weight: 200; font-variant-numeric: tabular-nums; letter-spacing: 4px; text-align: center; line-height: 1.2; user-select: none; } .screensaver-clock .screensaver-date { font-size: 1.4rem; font-weight: 300; opacity: 0.45; letter-spacing: 1px; margin-top: 4px; } .screensaver-fact { color: rgba(255,255,255,0.55); font-size: 1.6rem; font-weight: 300; text-align: center; line-height: 1.5; max-width: 500px; min-height: 2.5em; opacity: 0; transition: opacity 1.5s ease; user-select: none; } .screensaver-fact.visible { opacity: 1; } .screensaver-shortcuts { position: absolute; bottom: max(32px, env(safe-area-inset-bottom, 32px)); right: 32px; display: flex; flex-direction: column; gap: 16px; z-index: 10001; } .screensaver-shortcut-btn { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); color: white; font-size: 1.8rem; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.2s, transform 0.15s; user-select: none; -webkit-user-select: none; } .screensaver-shortcut-btn:active { background: rgba(255,255,255,0.25); transform: scale(0.92); }