Files
EverShelf/assets/css/style.css
T

3518 lines
62 KiB
CSS

/* ===== 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: 1.8rem;
width: 52px;
height: 52px;
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);
}
@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;
}
.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;
}
.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);
}
.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-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;
}
.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);
}
.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%;
}
/* ===== 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-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;
}
/* ===== 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;
}
/* ===== 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;
}
/* ===== 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;
}
/* ===== THROW AWAY BUTTONS ===== */
.action-buttons-3col {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 10px;
margin-top: 16px;
}
.action-buttons-3col .btn-huge {
min-height: 100px;
padding: 18px 8px;
font-size: 1rem;
}
.action-buttons-3col .btn-icon {
font-size: 2rem;
}
.btn-throw {
background: #f97316;
color: white;
}
.btn-throw:active {
background: #ea580c;
}
/* ===== 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;
}
.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;
}