/* =========================================
   1. STILI GENERALI & RESET
   ========================================= */
body { 
    background: #f4e04d; /* Giallo El Rey */
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    text-align: center; 
    margin: 0; 
    color: #333;
}

* { box-sizing: border-box; }

/* =========================================
   2. APP CLIENTE (index.html)
   ========================================= */
.container { 
    padding: 20px; 
    max-width: 450px; 
    margin: auto; 
}

.logo { 
    width: 120px; 
    margin-top: 20px; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

h1 { color: #e67e22; margin-bottom: 25px; font-size: 1.8rem; }

/* Form e Input */
input { 
    width: 100%; 
    padding: 14px; 
    margin: 10px 0; 
    border-radius: 10px; 
    border: 1px solid #ccc; 
    font-size: 1rem; 
    outline: none;
}

input:focus { border-color: #e67e22; box-shadow: 0 0 5px rgba(230, 126, 34, 0.3); }

button { 
    width: 100%; 
    padding: 15px; 
    background: #e67e22; 
    color: white; 
    border: none; 
    border-radius: 30px; 
    font-weight: bold; 
    font-size: 1.1rem; 
    cursor: pointer; 
    margin-top: 15px; 
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

button:active { transform: scale(0.96); background: #d35400; }

/* Sezione Card e Punti */
.punti-box { 
    background: white; 
    padding: 25px; 
    border-radius: 20px; 
    margin: 20px 0; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); 
}

#user-punti { 
    font-size: 4rem; 
    color: #27ae60; 
    font-weight: bold; 
    display: block;
    line-height: 1;
}

.card-id { font-weight: bold; color: #e67e22; margin-top: 10px; }

/* QR Code Style */
#qrcode {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#qrcode img {
    border: 10px solid white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.punti-box div {
    display: flex;
    align-items: center;
    justify-content: center;
}

#user-punti {
    font-size: 4rem;
    color: #27ae60;
    font-weight: bold;
    line-height: 1;
}

/* Stile specifico per l'icona peperoncino */
.punti-box img {
    width: 50px; /* Regola la grandezza come preferisci */
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: pulse 2s infinite; /* Opzionale: lo fa "pulsare" leggermente */
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
/* Privacy & Modale */
.privacy-box { 
    text-align: left; 
    font-size: 0.85rem; 
    margin: 20px 0; 
    background: rgba(255,255,255,0.5); 
    padding: 15px; 
    border-radius: 12px; 
}

.privacy-box label { display: block; margin-bottom: 10px; cursor: pointer; }
.privacy-box input { width: auto; margin-right: 10px; vertical-align: middle; }

.modal { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.8); display: flex; align-items: center; 
    justify-content: center; z-index: 2000; 
}

.modal-content { 
    background: white; padding: 25px; border-radius: 20px; 
    width: 90%; max-width: 380px; max-height: 80vh; overflow-y: auto; text-align: left; 
}

/* =========================================
   3. DASHBOARD ADMIN (admin_dashboard.php)
   ========================================= */
.admin-body { 
    background: #f4f7f6; 
    display: flex; 
    height: 100vh; 
    text-align: left; 
    flex-direction: row;
}

.sidebar { 
    width: 260px; background: #2c3e50; color: white; 
    display: flex; flex-direction: column; transition: 0.3s; z-index: 1000; 
}

.sidebar h2 { 
    text-align: center; padding: 25px; background: #1a252f; 
    margin: 0; color: #e67e22; font-size: 1.3rem; 
}

.sidebar a { 
    color: #bdc3c7; text-decoration: none; padding: 15px 25px; 
    border-bottom: 1px solid #34495e; transition: 0.3s; 
}

.sidebar a:hover, .sidebar a.active { 
    background: #34495e; color: white; border-left: 5px solid #e67e22; 
}

.content { flex: 1; padding: 30px; overflow-y: auto; }

.card { 
    background: white; padding: 25px; border-radius: 15px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); margin-bottom: 25px; 
    width: 100%; max-width: 900px;
}

/* Tabelle Admin */
table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { padding: 14px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; color: #666; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; }

/* Bottoni Admin */
.btn-logout { background: #c0392b !important; color: white !important; margin-top: auto; border: none !important; text-align: center; }

/* =========================================
   4. RESPONSIVE (Smartphone)
   ========================================= */
@media (max-width: 768px) {
    /* Admin Mobile */
    .admin-body { flex-direction: column; }
    
    .mobile-nav { 
        display: flex; position: sticky; top: 0; z-index: 1001; 
        background: #1a252f; color: white; padding: 12px 20px; 
        justify-content: space-between; align-items: center; 
    }
    
    .sidebar { 
        position: fixed; left: -260px; top: 55px; bottom: 0; 
        width: 260px; height: calc(100vh - 55px);
    }
    
    .sidebar.open { left: 0; }

    .content { padding: 20px; }
    
    /* Tabelle Mobile */
    th, td { padding: 10px 5px; font-size: 0.85rem; }
    
    /* App Cliente Mobile */
    .container { padding: 15px; }
    h1 { font-size: 1.5rem; }
    #user-punti { font-size: 3rem; }
}

/* Fix per input data su iOS */
input[type="date"] {
    -webkit-appearance: none;
    min-height: 45px;
}