/* /public/css/login.css */

:root{
    --primary: #007bff;
    --primary-dark: #0056b3;
    --success: #28a745;
    --success-dark: #218838;
    --danger: #d9534f;

    --bg: #f4f7fb;
    --card: #ffffff;
    --muted: #6c757d;
    --border: #e0e6ed;

    --shadow: 0 10px 30px rgba(0,0,0,0.06);
    --shadow-soft: 0 4px 15px rgba(0,0,0,0.04);

    --radius: 14px;
    --radius-sm: 12px;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    font-family: 'Inter', 'Arial', sans-serif;
    background-color: var(--bg);
    color: #333;
    line-height: 1.6;
}

a{ color: var(--primary); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* Layout auth */
.auth-page{
    min-height: calc(100vh - 167px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 12px 30px;
}

.auth-shell{ width: 100%; max-width: 520px; }

.auth-card{
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

/* Header */
.auth-header{ text-align: left; margin-bottom: 18px; }

.auth-title{
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #1f2937;
    margin-bottom: 6px;
}

.auth-subtitle{ font-size: 0.98rem; color: #667085; }

/* Alerts */
.auth-alert{
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    margin: 12px 0 16px;
    border: 1px solid transparent;
}

.auth-alert--error{
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.auth-alert--success{
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.auth-alert--neutral{
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

/* Form */
.auth-form{ margin-top: 10px; }

.auth-field{ margin-bottom: 14px; text-align: left; }

.auth-label{
    display: block;
    font-weight: 800;
    color: #344054;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.auth-input{
    width: 100%;
    padding: 14px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid #ccd6e0;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus{
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
}

/* Wrapper input password + bottone occhio */
.auth-input-wrap{
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input--with-icon{
    padding-right: 48px;
}

.auth-icon-btn{
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid #d0d5dd;
    background: #ffffff;
    border-radius: 10px;
    height: 34px;
    width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.05s ease;
}

.auth-icon-btn:hover{
    background: #f8fafc;
    border-color: #cbd5e1;
}

.auth-icon-btn:active{
    transform: translateY(-50%) scale(0.98);
}

/* Icona Font Awesome */
.auth-icon-btn i{
    font-size: 16px;
    color: #667085;
}

/* Hint */
.auth-hint{
    margin-top: 8px;
    color: #667085;
    font-size: 0.86rem;
}

/* Grid nome/cognome */
.auth-grid-2{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Checkbox */
.auth-checklist{
    margin: 12px 0 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9fbfd;
}

.auth-check{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: #344054;
    margin-bottom: 10px;
}

.auth-check:last-child{ margin-bottom: 0; }

.auth-check input[type="checkbox"]{
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.auth-check--remember{
    margin: 0 0 14px;
    padding: 0;
    border: none;
    background: transparent;
}

.auth-check--remember label{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #344054;
}

/* Buttons */
.auth-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1.02rem;
    font-weight: 900;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

.auth-btn:active{ transform: translateY(1px); }

.auth-btn--primary{
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,123,255,0.18);
}

.auth-btn--primary:hover{ background: var(--primary-dark); }

.auth-btn--secondary{
    background: #ffffff;
    border-color: #d0d5dd;
    color: #111827;
}

.auth-btn--secondary:hover{ background: #f8fafc; }

.auth-btn--google{
    background: #ffffff;
    border-color: #dadce0;
    color: #3c4043;
    gap: 10px;
    text-decoration: none;
    margin-top: 4px;
}
.auth-btn--google:hover{
    background: #f8f9fa;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(60,64,67,.2);
}
.auth-btn--google.is-disabled{
    opacity: .72;
}
.auth-btn--google.is-disabled:hover{
    background: #ffffff;
    box-shadow: none;
}
.auth-google-block{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-checklist.is-attention,
.auth-check.is-attention{
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(0,102,204,.45);
    border-radius: 10px;
}
.auth-check.is-attention{
    padding: 8px 10px;
}
.auth-checklist--google-mirror{
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.auth-google-icon{
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

/* Divider */
.auth-divider{
    position: relative;
    display: flex;
    justify-content: center;
    margin: 18px 0 14px;
}

.auth-divider::before{
    content: "";
    position: absolute;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e5e7eb;
    transform: translateY(-50%);
}

.auth-divider span{
    position: relative;
    background: var(--card);
    padding: 0 10px;
    color: #667085;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Footer */
.auth-footer{
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.auth-muted{ color: #667085; font-size: 0.95rem; }

/* Compat classi vecchie */
.login{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 167px);
    flex-direction: column;
    margin-bottom: 20px;
    padding: 10px;
}

.form-container{
    background: var(--card);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.error-message{
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    margin: 12px 0 16px;
}

.success-message{
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    margin: 12px 0 16px;
}

.linea{
    align-items: center;
    border-bottom: 1px solid #DADDE1;
    display: flex;
    margin: 18px 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 640px){
    .auth-card{ padding: 20px; }
    .auth-grid-2{ grid-template-columns: 1fr; }
    .auth-title{ font-size: 1.65rem; }
}