/*
 * auth.css — Pagine di autenticazione (login / signup / reset / confirm)
 * Stile ispirato alla home www.fondazionesocial.it
 * Layout split-screen: pannello informativo a sinistra, form a destra
 */

:root {
    --auth-brand:        #fab600;
    --auth-brand-dark:   #d99b00;
    --auth-accent:       #ff5a00;   /* arancione del sito istituzionale */
    --auth-text-dark:    #212529;
    --auth-text-muted:   #6c757d;
    --auth-bg:           #f5f6f8;
    --auth-card-shadow:  0 10px 40px -10px rgba(0,0,0,.18);
}

/* ── Reset pagina ────────────────────────────────────────────────────────── */
html, body { height: 100%; }
body.auth-page {
    margin: 0;
    font-family: 'Roboto', 'Source Sans Pro', sans-serif;
    color: var(--auth-text-dark);
    background: var(--auth-bg);
}
body.auth-page h1, body.auth-page h2,
body.auth-page h3, body.auth-page h4,
body.auth-page .auth-claim {
    font-family: 'Montserrat', 'Source Sans Pro', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Layout split-screen ─────────────────────────────────────────────────── */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

.auth-info {
    flex: 1 1 55%;
    background: linear-gradient(135deg, #fffaf0 0%, #fff4dc 100%);
    color: var(--auth-text-dark);
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border-right: 1px solid #f1ead8;
}
.auth-info::before {
    /* cerchio decorativo soft brand */
    content: '';
    position: absolute;
    top: -140px; right: -140px;
    width: 380px; height: 380px;
    background: rgba(250,182,0,.18);
    border-radius: 50%;
    pointer-events: none;
}
.auth-info::after {
    content: '';
    position: absolute;
    bottom: -180px; left: -120px;
    width: 440px; height: 440px;
    background: rgba(255,90,0,.08);
    border-radius: 50%;
    pointer-events: none;
}
.auth-info > * { position: relative; z-index: 1; }

.auth-info-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--auth-brand-dark);
    margin-bottom: 1rem;
}
.auth-info-eyebrow::before {
    content: '';
    width: 28px; height: 2px;
    background: var(--auth-brand);
    display: inline-block;
}

.auth-claim {
    font-size: 2.7rem;
    line-height: 1.12;
    margin: 0 0 1rem;
    color: var(--auth-text-dark);
}
.auth-claim em {
    font-style: italic;
    color: var(--auth-accent);
}
.auth-tagline {
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 500px;
    color: #4a4a4a;
    margin-bottom: 2rem;
}

/* Punti chiave */
.auth-points { list-style: none; padding: 0; margin: 0 0 2rem; }
.auth-points li {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: .55rem 0;
    font-size: .98rem;
    color: #2c2c2c;
}
.auth-points li i {
    flex-shrink: 0;
    width: 32px; height: 32px;
    background: #fff;
    border: 1px solid rgba(250,182,0,.4);
    color: var(--auth-brand-dark);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    box-shadow: 0 2px 6px rgba(250,182,0,.15);
}

/* Layout a due colonne nella parte superiore (testo a sinistra, box a destra) */
.auth-info-top {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}
.auth-info-top.single-col {
    grid-template-columns: 1fr;
}
.auth-info-main { min-width: 0; }
.auth-info-boxes { min-width: 0; }

/* Box informativi laterali */
.auth-side-box {
    background: rgba(255,255,255,.65);
    border: 1px solid rgba(0,0,0,.06);
    border-left: 4px solid #6c757d;
    border-radius: 8px;
    padding: .85rem 1rem;
    display: flex;
    gap: .75rem;
    margin-bottom: .85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: transform .15s ease, box-shadow .15s ease;
}
.auth-side-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.auth-side-box-icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .95rem;
    background: #6c757d;
}
.auth-side-box-body { min-width: 0; }
.auth-side-box-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.25;
    margin-bottom: .15rem;
    color: var(--auth-text-dark);
}
.auth-side-box-content {
    font-size: .85rem;
    line-height: 1.4;
    color: #4a4a4a;
}

/* Varianti colore */
.auth-side-box.box-success   { border-left-color: #28a745; }
.auth-side-box.box-success   .auth-side-box-icon { background: #28a745; }
.auth-side-box.box-warning   { border-left-color: #ffc107; }
.auth-side-box.box-warning   .auth-side-box-icon { background: #ffc107; color: #2c2c2c; }
.auth-side-box.box-danger    { border-left-color: #dc3545; }
.auth-side-box.box-danger    .auth-side-box-icon { background: #dc3545; }
.auth-side-box.box-info      { border-left-color: #17a2b8; }
.auth-side-box.box-info      .auth-side-box-icon { background: #17a2b8; }
.auth-side-box.box-primary   { border-left-color: var(--auth-brand-dark); }
.auth-side-box.box-primary   .auth-side-box-icon { background: var(--auth-brand); color: var(--auth-text-dark); }
.auth-side-box.box-secondary { border-left-color: #6c757d; }
.auth-side-box.box-secondary .auth-side-box-icon { background: #6c757d; }

/* Cifre */
.auth-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    border-top: 1px solid rgba(0,0,0,.08);
    padding-top: 1.5rem;
}
.auth-stats .stat-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--auth-brand-dark);
}
.auth-stats .stat-lbl {
    font-size: .78rem;
    color: var(--auth-text-muted);
    margin-top: .35rem;
}

.auth-info-footer {
    font-size: .82rem;
    color: var(--auth-text-muted);
    margin-top: auto;
}
.auth-info-footer a {
    color: var(--auth-brand-dark);
    text-decoration: none;
    font-weight: 600;
}
.auth-info-footer a:hover { text-decoration: underline; }

/* ── Pannello form (destra) ──────────────────────────────────────────────── */
.auth-form-pane {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: var(--auth-bg);
}
.auth-form-stack {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.auth-form-stack.wide { max-width: 600px; }

.auth-form-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}
.auth-form-logo img {
    max-width: 240px;
    height: auto;
}
.auth-form-logo .auth-app-name {
    font-family: 'Montserrat', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--auth-brand-dark);
    margin-top: .35rem;
}

.auth-form-card {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--auth-card-shadow);
    padding: 2.5rem 2.25rem;
}

.auth-form-title {
    font-size: 1.65rem;
    margin: 0 0 .35rem;
    color: var(--auth-text-dark);
}
.auth-form-subtitle {
    color: var(--auth-text-muted);
    margin-bottom: 1.75rem;
    font-size: .95rem;
}

/* Input pill style */
.auth-form-card .form-control {
    border-radius: 8px;
    padding: .65rem .9rem;
    border: 1px solid #d8dce0;
}
.auth-form-card .form-control:focus {
    border-color: var(--auth-brand-dark);
    box-shadow: 0 0 0 .18rem rgba(250,182,0,.22);
}
.auth-form-card .input-group-text {
    background: #fff;
    border: 1px solid #d8dce0;
    border-left: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    color: var(--auth-text-muted);
}
.auth-form-card .input-group .form-control {
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.auth-form-card .input-group .form-control:focus + .input-group-append .input-group-text {
    border-color: var(--auth-brand-dark);
}
.auth-form-card .invalid-feedback { display: block; }

.auth-form-card .btn-primary {
    padding: .7rem 1.2rem;
    font-weight: 600;
    border-radius: 8px;
}

.auth-row-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.auth-row-extra .form-check { margin: 0; }

.auth-divider {
    text-align: center;
    margin: 1.5rem 0 1rem;
    color: var(--auth-text-muted);
    font-size: .85rem;
    position: relative;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: #e2e5e9;
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-bottom-link { text-align: center; font-size: .92rem; }
.auth-bottom-link a { color: var(--auth-brand-dark); font-weight: 600; }

/* Confirm email page */
.auth-confirm-icon {
    width: 96px; height: 96px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    margin-bottom: 1.25rem;
}
.auth-confirm-icon.ok    { background: #e6f5ec; color: #1e8a4c; }
.auth-confirm-icon.error { background: #fce8e8; color: #c73a3a; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .auth-wrapper { flex-direction: column; }
    .auth-info { padding: 2rem 1.5rem 3rem; }
    .auth-info-top { grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
    .auth-claim { font-size: 1.9rem; margin: 1.25rem 0 .75rem; }
    .auth-tagline { font-size: .95rem; margin-bottom: 1.25rem; }
    .auth-stats { grid-template-columns: repeat(3, 1fr); gap: .5rem; padding-top: 1rem; }
    .auth-stats .stat-num { font-size: 1.15rem; }
    .auth-points { margin-bottom: 1rem; }
    .auth-form-pane { padding: 1.5rem 1rem; }
    .auth-form-card { padding: 1.75rem 1.25rem; }
}
@media (max-width: 575.98px) {
    .auth-info-header img { max-height: 50px; }
    .auth-claim { font-size: 1.55rem; }
    .auth-stats { grid-template-columns: repeat(3, 1fr); }
    .auth-stats .stat-num { font-size: 1rem; }
    .auth-stats .stat-lbl { font-size: .7rem; }
}
