* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; background:#f5f5f5; color:#333; line-height:1.6; }
header { background:#2c3e50; color:#fff; padding:1rem; display:flex; justify-content:space-between; align-items:center; }
header h1 { margin:0; font-size:1.5rem; }
nav a { color:#ecf0f1; margin:0 0.5rem; text-decoration:none; font-weight:500; }
nav a:hover, nav a.active { text-decoration:underline; }
.container { max-width:720px; margin:2rem auto; padding:0 1rem; }
h2 { color:#2c3e50; margin-bottom:1rem; }
.card { background:#fff; border-radius:8px; box-shadow:0 2px 4px rgba(0,0,0,0.1); padding:1.5rem; margin-bottom:1.5rem; }
.auth-container { min-height:100vh; display:flex; align-items:center; justify-content:center; background:#ecf0f1; }
.auth-card { background:#fff; padding:2rem; border-radius:8px; box-shadow:0 4px 6px rgba(0,0,0,0.1); width:100%; max-width:400px; }
.auth-form { display:grid; gap:1rem; margin-top:1.5rem; }
.form-group { margin-bottom:0; }
.form-group label { display:block; margin-bottom:0.3rem; font-weight:500; }
.form-group input { width:100%; padding:0.75rem; border:1px solid #ddd; border-radius:4px; font-size:1rem; }
.btn { width:100%; padding:0.75rem; background:#3498db; color:#fff; border:none; border-radius:4px; font-size:1rem; cursor:pointer; }
.btn:hover { background:#2980b9; }
.btn-secondary { background:#95a5a6; }
.btn-secondary:hover { background:#7f8c8d; }
.btn-block { width:100%; }
.btn-primary { background:#27ae60; }
.btn-primary:hover { background:#219a52; }
.btn-scan { background:#e74c3c; }
.btn-scan:hover { background:#c0392b; }
.alert { padding:1rem; border-radius:4px; margin-bottom:1rem; }
.alert-success { background:#d4edda; color:#155724; border:1px solid #c3e6cb; }
.alert-info { background:#d1ecf1; color:#0c5460; border:1px solid #bee5eb; }
.alert-error { background:#f8d7da; color:#721c24; border:1px solid #f5c6cb; }
.empty-state { text-align:center; color:#7f8c8d; padding:2rem; }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:1rem; margin-bottom:1.5rem; }
.stat-card { background:#f8f9fa; padding:1rem; text-align:center; border-radius:6px; }
.stat-card h3 { margin:0 0 0.5rem 0; font-size:0.9rem; color:#7f8c8d; }
.stat-value { font-size:1.8rem; font-weight:bold; color:#2c3e50; }
.supermercato-card { border:1px solid #eee; }
.modal { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); display:flex; align-items:center; justify-content:center; z-index:1000; }
.modal-content { background:#fff; padding:2rem; border-radius:8px; width:90%; max-width:500px; max-height:80vh; overflow-y:auto; }
.hidden { display:none; }
.semaforo-container { text-align:center; padding:2rem; }
.semaforo { display:inline-flex; align-items:center; gap:0.5rem; padding:1.5rem 2rem; border-radius:50px; font-weight:bold; font-size:1.1rem; }
.semaforo-verde { background:#d4edda; color:#155724; }
.semaforo-giallo { background:#fff3cd; color:#856404; }
.semaforo-rosso { background:#f8d7da; color:#721c24; }
.semaforo-icon { font-size:1.5rem; }
.semaforo-label { font-size:1rem; }
.price-details { margin-top:1rem; text-align:center; color:#555; }
.price-details p { margin:0.3rem 0; }
@media (max-width:480px) {
    .container { margin:1rem auto; padding:0 0.5rem; }
    .card { padding:1rem; }
    header { flex-direction:column; gap:1rem; text-align:center; }
    nav { margin-top:0.5rem; }
}

.scan-status {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #eef6ff;
    color: #1f4e79;
    border: 1px solid #b8d8f8;
}
.scan-status.error { background: #fdecec; color: #842029; border-color: #f1b7b7; }
.scan-status.success { background: #eaf8ee; color: #1b5e20; border-color: #b7e4c7; }
.scan-status.warning { background: #fff6d8; color: #7a5b00; border-color: #f1d88a; }

/* Password recovery link styling */
.auth-footer-forgot {
    text-align: center;
    margin: 1rem 0;
}
.auth-footer-forgot a {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}
.auth-footer-forgot a:hover {
    text-decoration: underline;
    color: #2980b9;
}
