/* --- LA TAVOLOZZA PREMIUM (Allineata alla Home) --- */
:root {
    --blu-cambiocasa: #0f1c2e; 
    --rosso-cambiocasa: #c81d25; 
    --rosso-hover: #a0151c;
    
    --bianco-puro: #ffffff;
    --bianco-traslucido: rgba(255, 255, 255, 0.15);
    --testo-secondario: #a0abc0;
    
    --sfondo-input: rgba(255, 255, 255, 0.05);
    --bordo-vetro: rgba(255, 255, 255, 0.1);
    --rosso-errore: #ff6b6b;
}

/* --- RESET BASE --- */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- SFONDO IMMERSIVO (Come la Home) --- */
body {
    /* Manteniamo la stessa foto di sfondo oscurata per dare continuità */
    background: linear-gradient(to bottom, rgba(15, 28, 46, 0.85), rgba(15, 28, 46, 0.98)), 
                url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80') center/cover no-repeat fixed;
    color: var(--bianco-puro);
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh;
}

/* --- LA CARD EFFETTO VETRO (Glassmorphism) --- */
.auth-wrapper {
    width: 100%; padding: 20px; display: flex; justify-content: center;
}

.auth-card {
    background: rgba(255, 255, 255, 0.03); /* Vetro quasi trasparente */
    backdrop-filter: blur(25px); /* Sfocatura forte */
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--bordo-vetro);
    width: 100%; max-width: 420px; padding: 40px;
    border-radius: 24px; /* Bordi molto arrotondati, eleganti */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    animation: fadeUp 0.8s ease-out;
}

/* --- INTESTAZIONE CARD --- */
.auth-header { text-align: center; margin-bottom: 30px; }
.logo-icona { font-size: 40px; margin-bottom: 10px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.auth-header h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; color: var(--bianco-puro); letter-spacing: -0.5px; }
.auth-header p { font-size: 14px; color: var(--testo-secondario); }

/* --- CAMPI DEL MODULO --- */
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.input-group { display: flex; flex-direction: column; gap: 8px; }
.label-row { display: flex; justify-content: space-between; align-items: center; }

label { font-size: 12px; font-weight: 700; color: var(--testo-secondario); text-transform: uppercase; letter-spacing: 1px; }

/* Input Traslucidi */
input[type="email"], input[type="password"], input[type="text"] {
    width: 100%; padding: 14px 16px;
    background-color: var(--sfondo-input);
    border: 1px solid var(--bordo-vetro);
    border-radius: 12px; font-size: 15px; color: var(--bianco-puro);
    transition: all 0.3s ease; outline: none;
}
input::placeholder { color: rgba(255, 255, 255, 0.3); }

/* Effetto Focus Elegante: diventa Rosso Cremisi quando ci clicchi */
input:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--rosso-cambiocasa);
    box-shadow: 0 0 0 3px rgba(200, 29, 37, 0.2);
}

/* --- CHECKBOX PRIVACY --- */
.checkbox-group { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--testo-secondario); }
.checkbox-group input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--rosso-cambiocasa); cursor: pointer;
}

/* --- PULSANTI E LINK --- */
.btn-primary {
    background-color: var(--rosso-cambiocasa); color: var(--bianco-puro);
    border: none; padding: 16px; border-radius: 12px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: all 0.3s ease; margin-top: 10px; letter-spacing: 0.5px;
}
.btn-primary:hover { background-color: var(--rosso-hover); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(200, 29, 37, 0.3); }

.link-text {
    background: none; border: none; color: var(--bianco-puro); font-size: 12px;
    cursor: pointer; text-decoration: none; padding: 0; opacity: 0.8; transition: all 0.3s;
}
.link-text:hover { opacity: 1; color: var(--rosso-cambiocasa); text-decoration: none; }
.link-text.bold { font-weight: 600; font-size: 14px; }

.auth-footer { text-align: center; margin-top: 25px; }

/* --- MESSAGGIO ERRORE --- */
.alert-error {
    background-color: rgba(255, 77, 77, 0.1); color: var(--rosso-errore);
    padding: 12px 16px; border-radius: 10px; font-size: 13px; font-weight: 500;
    border: 1px solid rgba(255, 77, 77, 0.3); display: none; /* Gestito dal JS */
}

/* --- SEZIONE SOCIAL (DIVISORE E TASTI) --- */
.divider {
    display: flex; align-items: center; text-align: center; margin: 30px 0 20px 0;
    color: var(--testo-secondario); font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
}
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--bordo-vetro); }
.divider span { padding: 0 15px; }

.social-login { display: flex; gap: 12px; }
.btn-social {
    flex: 1; background-color: var(--sfondo-input); border: 1px solid var(--bordo-vetro);
    color: var(--bianco-puro); padding: 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
}
.btn-social:hover { background-color: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

/* --- ANIMAZIONI --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.social-buttons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-social-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05); /* Vetro trasparente */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-social-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px); /* Effetto sollevamento */
}

/* Rimuove lo stile predefinito dei link se usati come pulsanti */
.btn-social-tab svg {
    color: white; /* Icone sempre bianche ed eleganti */
    opacity: 0.9;
}

.social-divider {
    text-align: center;
    margin-top: 30px;
    color: var(--testo-secondario);
    font-size: 13px;
    position: relative;
}

.social-divider span {
    background: var(--blu-cambiocasa); /* Copre la linea centrale */
    padding: 0 10px;
    position: relative;
    z-index: 2;
}

.social-divider::after {
    content: "";
    position: absolute;
    top: 50%; left: 0; width: 100%; height: 1px;
    background: rgba(255,255,255,0.1);
    z-index: 1;
}