/* ==========================================================
   style_auth.css
   Foglio di stile unico per le pagine di accesso:
   login.php e registrazione.php
   ========================================================== */

/* --- RESET & CANCELLAZIONE MARGINI --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- SFONDO E CENTRAGGIO DELLA PAGINA --- */
body {
    background-color: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #334155;
    padding: 20px;
}

/* --- BOX CONTENITORE --- */
.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 450px;
    border: 1px solid #e2e8f0;
}

/* --- STRUTTURA DEL LOGO --- */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 120px; /* Regola questo valore per ingrandire o rimpicciolire il logo */
    height: auto;
    display: inline-block;
}

/* --- TITOLI E TESTI --- */
h2 {
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    font-size: 14px;
    color: #64748b;
    text-align: center;
    margin-bottom: 24px;
}

/* --- MESSAGGI PHP (errore / successo) --- */
.alert {
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #dcfce7;
}

/* --- MODULI DI INPUT (FORM) --- */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #475569;
}

/* Testo "(Opzionale)" accanto alle etichette */
label .opzionale {
    color: #94a3b8;
    font-weight: normal;
}

input {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #ffffff;
    color: #0f172a;
}

input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input::placeholder {
    color: #94a3b8;
}

/* --- BOTTONE PRINCIPALE (Accedi / Registrati) --- */
button {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background-color: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

button:hover {
    background-color: #1d4ed8;
}

button:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* --- LINK IN BASSO (Registrati / Accedi) --- */
.footer-text {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin-top: 24px;
}

.footer-text a {
    color: #2563eb;
    text-decoration: none;
}

.footer-text a:hover {
    text-decoration: underline;
}
