/* ==========================================================================
   Cold Car — Pagine di autenticazione (login, recupero password, 2FA)
   --------------------------------------------------------------------------
   Caricato solo dalle view che estendono AuthModule::admin.auth-shell, quindi
   tutto e' volutamente scoped sotto .cc-auth: nessuna regola tocca il resto
   del backoffice Metronic.

   Palette derivata dal sito istituzionale coldcar.com (grigio-azzurro #a4abb5,
   testo #606060, filetti #e7e7e7, titoli in Teko maiuscolo) e scurita dove
   serviva per il contrasto: #a4abb5 su bianco sta a 2,3:1, sotto qualunque
   soglia AA, quindi il colore originale resta solo come accento decorativo.
   ========================================================================== */

.cc-auth {
    --cc-ink: #2f3b47;        /* fondi scuri, hover dei bottoni            */
    --cc-slate: #3c4a59;      /* bottone primario — 9,1:1 su bianco        */
    --cc-brand: #6b7d92;      /* accento leggibile: titoli, link — 4,2:1   */
    --cc-brand-soft: #a4abb5; /* accento decorativo istituzionale, mai testo */
    --cc-body: #4a4f57;
    --cc-muted: #6c757d;
    --cc-line: #e3e7ec;
    --cc-tint: #edf7f9;
    --cc-red: #ed1c24;
    --cc-green: #00a650;
    --cc-white-soft: #f7f9fb;

    display: flex;
    min-height: 100vh;
    width: 100%;
    background: #fff;
    color: var(--cc-body);
}


/* Pannello sinistro: la fotografia dello stabilimento
   ------------------------------------------------------------ */

.cc-auth__hero {
    position: relative;
    flex: 1 1 56%;
    min-height: 100vh;
    background: #dfe4ea url('/assets/common/coldcar/login-schema.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

/* L'illustrazione e' chiara: la velatura deve restare invisibile in alto, dove
   c'e' lo schema, e diventare uno schermo pieno in basso, dove va il testo
   bianco. Il passaggio comincia al 52%, subito sotto l'ultimo elemento
   disegnato, cosi' non taglia niente di leggibile. */
.cc-auth__hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(30, 40, 50, 0.00) 0%,
        rgba(30, 40, 50, 0.03) 44%,
        rgba(28, 37, 46, 0.28) 62%,
        rgba(24, 32, 40, 0.78) 80%,
        rgba(18, 25, 31, 0.95) 100%
    );
}

/* Filetto tricolore, citazione diretta del marchio Cold Car. */
.cc-auth__hero::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        to right,
        var(--cc-green) 0 33.333%,
        #fff 33.333% 66.666%,
        var(--cc-red) 66.666% 100%
    );
}

.cc-auth__hero-inner {
    position: relative;
    z-index: 2;
    padding: 60px 64px 72px;
    max-width: 640px;
}

/* Marchio + nome prodotto: un solo blocco, separato da un filetto sottile. */
.cc-auth__hero-lockup {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 20px;
}

.cc-auth__hero-logo {
    flex: 0 0 auto;
    display: block;
    width: 76px;
    height: auto;
    padding-right: 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.cc-auth__hero-eyebrow {
    display: inline-block;
    padding: 5px 14px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 2px;
    font-family: 'Teko', 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
}

.cc-auth__hero-title {
    margin: 0;
    font-family: 'Teko', 'Poppins', sans-serif;
    font-size: 58px;
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.cc-auth__hero-text {
    margin: 0;
    max-width: 46ch;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.86);
}

.cc-auth__hero-meta {
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
}

.cc-auth__hero-meta li {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.cc-auth__hero-meta li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 9px;
    vertical-align: 2px;
    background: var(--cc-brand-soft);
}


/* Pannello destro: il form
   ------------------------------------------------------------ */

.cc-auth__panel {
    flex: 1 1 44%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 40px 44px;
    background: #fff;
}

.cc-auth__panel-inner {
    width: 100%;
    max-width: 400px;
    margin: auto;
    padding: 32px 0;
}

.cc-auth__title {
    margin: 0;
    font-family: 'Teko', 'Poppins', sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--cc-brand);
}

/* Filetto sotto al titolo, stesso stilema dei box del sito Cold Car. */
.cc-auth__title::after {
    content: '';
    display: block;
    width: 44px;
    height: 3px;
    margin: 14px 0 20px;
    background: var(--cc-brand-soft);
}

.cc-auth__subtitle {
    margin: -6px 0 28px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cc-muted);
}


/* Selettore di lingua (partial AuthModule::admin.topbar)
   ------------------------------------------------------------ */

.cc-auth__panel .login-language-chooser {
    align-self: stretch;
    width: 100%;
    margin: 0;
    background: transparent;
}

.cc-auth__panel .login-language-chooser .container {
    max-width: none;
    padding: 0;
}

.cc-auth__panel .login-language-chooser ul {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cc-auth__panel .login-language-chooser li a {
    display: block;
    padding: 4px;
    border-radius: 2px;
    opacity: 0.55;
    transition: opacity 0.15s linear, background-color 0.15s linear;
}

.cc-auth__panel .login-language-chooser li a:hover {
    opacity: 1;
    background: var(--cc-white-soft);
}

.cc-auth__panel .login-language-chooser .symbol {
    margin-right: 0 !important;
}


/* Campi
   ------------------------------------------------------------ */

.cc-auth .form-group {
    margin-bottom: 20px;
}

/* Solo le etichette di campo: .checkbox e .radio di Metronic sono anch'esse
   <label>, ma hanno un loro display inline-flex che qui non va toccato. */
.cc-auth .form-group > label,
.cc-auth .cc-auth__label {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--cc-brand);
}

.cc-auth .form-control {
    height: auto;
    padding: 13px 16px;
    border: 1px solid var(--cc-line);
    border-radius: 3px;
    background: var(--cc-white-soft);
    font-size: 15px;
    color: var(--cc-ink);
    transition: border-color 0.15s linear, background-color 0.15s linear, box-shadow 0.15s linear;
}

.cc-auth .form-control::placeholder {
    color: #9aa3ad;
}

.cc-auth .form-control:focus {
    border-color: var(--cc-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(107, 125, 146, 0.16);
}

.cc-auth .form-control.is-invalid {
    border-color: var(--cc-red);
    background: #fff;
}

.cc-auth .invalid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--cc-red);
}

.cc-auth .invalid-feedback strong {
    font-weight: 600;
}

/* Campo password con il pulsante "mostra/nascondi" */
.cc-auth .cc-auth__password {
    position: relative;
}

.cc-auth .cc-auth__password .form-control {
    padding-right: 48px;
}

.cc-auth .cc-auth__password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cc-muted);
    cursor: pointer;
    line-height: 1;
}

.cc-auth .cc-auth__password-toggle:hover,
.cc-auth .cc-auth__password-toggle:focus {
    color: var(--cc-brand);
    outline: none;
}

.cc-auth .cc-auth__password-toggle .cc-icon-hide { display: none; }
.cc-auth .cc-auth__password.is-revealed .cc-icon-hide { display: inline; }
.cc-auth .cc-auth__password.is-revealed .cc-icon-show { display: none; }

/* Codice OTP: cifre larghe e spaziate, si legge a colpo d'occhio */
.cc-auth .cc-auth__otp {
    text-align: center;
    font-family: 'Teko', 'Poppins', sans-serif;
    font-size: 34px;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-indent: 0.42em;   /* compensa lo spazio a destra dell'ultima cifra */
    padding: 8px 16px;
}


/* Checkbox e riga di servizio
   ------------------------------------------------------------ */

.cc-auth .cc-auth__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 26px;
}

.cc-auth .checkbox {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 13.5px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--cc-body);
}

.cc-auth .checkbox > span {
    border-color: #c8d0d9;
}

.cc-auth .checkbox > input:checked ~ span {
    background-color: var(--cc-slate);
    border-color: var(--cc-slate);
}

.cc-auth .radio.cc-auth__radio {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--cc-line);
    border-radius: 3px;
    background: var(--cc-white-soft);
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--cc-body);
    cursor: pointer;
    transition: border-color 0.15s linear;
}

.cc-auth .radio.cc-auth__radio:hover {
    border-color: var(--cc-brand);
}

.cc-auth .radio.cc-auth__radio > span {
    border-color: #c8d0d9;
}

/* Metronic colora di blu il fondo dello <span> quando il radio e' selezionato:
   qui l'anello resta bianco e il pallino prende il grigio del marchio. */
.cc-auth .radio.cc-auth__radio > input:checked ~ span {
    border-color: var(--cc-slate);
    background-color: #fff;
}

.cc-auth .radio.cc-auth__radio > input:checked ~ span::after {
    background-color: var(--cc-slate);
}

.cc-auth .cc-auth__hint {
    margin: 8px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--cc-muted);
}


/* Bottoni
   ------------------------------------------------------------ */

.cc-auth .btn.cc-auth__btn,
.cc-auth .btn.cc-auth__btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-family: 'Teko', 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background-color 0.15s linear, border-color 0.15s linear, color 0.15s linear;
}

.cc-auth .btn.cc-auth__btn {
    background: var(--cc-slate);
    color: #fff;
}

.cc-auth .btn.cc-auth__btn:hover,
.cc-auth .btn.cc-auth__btn:focus {
    background: var(--cc-ink);
    color: #fff;
}

.cc-auth .btn.cc-auth__btn-ghost {
    margin-top: 10px;
    border-color: var(--cc-line);
    background: #fff;
    color: var(--cc-brand);
}

.cc-auth .btn.cc-auth__btn-ghost:hover,
.cc-auth .btn.cc-auth__btn-ghost:focus {
    border-color: var(--cc-brand);
    background: var(--cc-white-soft);
    color: var(--cc-slate);
}


/* Link e messaggi
   ------------------------------------------------------------ */

.cc-auth__links {
    margin-top: 24px;
    text-align: center;
    font-size: 13.5px;
}

.cc-auth__links a,
.cc-auth a.cc-auth__link {
    color: var(--cc-brand);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s linear, border-color 0.15s linear;
}

.cc-auth__links a:hover,
.cc-auth a.cc-auth__link:hover {
    color: var(--cc-slate);
    border-bottom-color: var(--cc-brand-soft);
}

.cc-auth__links a + a {
    margin-left: 18px;
}

.cc-auth .alert {
    padding: 13px 16px;
    margin-bottom: 22px;
    border: 0;
    border-left: 3px solid var(--cc-brand-soft);
    border-radius: 0 3px 3px 0;
    background: var(--cc-tint);
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--cc-body);
}

.cc-auth .alert-success { border-left-color: var(--cc-green); }
.cc-auth .alert-warning { border-left-color: #f0a202; background: #fff8e8; }
.cc-auth .alert-danger  { border-left-color: var(--cc-red); background: #fdeef0; }

.cc-auth__notice {
    padding: 16px 18px;
    margin-bottom: 26px;
    border: 1px solid var(--cc-line);
    border-left: 3px solid var(--cc-brand-soft);
    border-radius: 0 3px 3px 0;
    background: var(--cc-tint);
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--cc-body);
}

.cc-auth__notice-title {
    margin: 0 0 8px;
    font-family: 'Teko', 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cc-brand);
}

.cc-auth__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cc-auth__list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 9px;
    font-size: 13.5px;
    line-height: 1.55;
}

.cc-auth__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 7px;
    height: 7px;
    background: var(--cc-brand-soft);
}

.cc-auth__foot {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding-top: 22px;
    border-top: 1px solid var(--cc-line);
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
    color: #9aa3ad;
}

.cc-auth__foot-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 14px;
    margin: 8px 0 0;
}

/* Puntino separatore fra i link, cosi' su una riga sola non si incollano. */
.cc-auth__foot-links a + a::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    margin-right: 14px;
    vertical-align: 3px;
    background: #c8d0d9;
}

.cc-auth__foot a {
    color: var(--cc-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s linear, border-color 0.15s linear;
}

.cc-auth__foot a:hover {
    color: var(--cc-brand);
    border-bottom-color: var(--cc-brand-soft);
}


/* Modale (rinvio 2FA): allineata al resto della pagina
   ------------------------------------------------------------ */

.cc-auth-modal .modal-content {
    border: 0;
    border-radius: 4px;
}

.cc-auth-modal .modal-title {
    font-family: 'Teko', 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7d92;
}

.cc-auth-modal .modal-header,
.cc-auth-modal .modal-footer {
    border-color: #e3e7ec;
}


/* Adattamenti
   ------------------------------------------------------------ */

@media (max-width: 1399.98px) {
    .cc-auth__hero-inner { padding: 48px 48px 60px; }
    .cc-auth__hero-title { font-size: 50px; }
}

@media (max-width: 1199.98px) {
    .cc-auth__hero { flex-basis: 46%; }
    .cc-auth__panel { flex-basis: 54%; }
    .cc-auth__hero-title { font-size: 42px; }
    .cc-auth__hero-text { font-size: 14px; }
}

/* Sotto i 992px la foto diventa una fascia in testata e il form prende tutto. */
@media (max-width: 991.98px) {
    .cc-auth {
        flex-direction: column;
        min-height: 100vh;
    }

    /* In una fascia cosi' bassa un'illustrazione verticale entrerebbe solo a
       fette: si vedrebbe mezzo furgone con il marchio sopra. Meglio inquadrare
       la parte alta, che e' fondale pulito, e lasciare che la fascia faccia da
       intestazione al marchio. */
    .cc-auth__hero {
        flex: 0 0 auto;
        min-height: 0;
        height: 170px;
        justify-content: center;
        align-items: center;
        background-position: center 6%;
    }

    /* Niente illustrazione qui: in 170px di altezza entrerebbe solo una fetta
       dell'immagine verticale, e i pannelli tagliati a meta' sembrano un errore
       di caricamento. Resta una fascia piena col lockup, che invece si legge. */
    .cc-auth__hero {
        background-image: none;
        background-color: var(--cc-ink);
    }

    .cc-auth__hero::before {
        background: linear-gradient(
            180deg,
            rgba(60, 74, 89, 0.55) 0%,
            rgba(24, 32, 40, 0.20) 100%
        );
    }

    .cc-auth__hero-inner {
        padding: 0;
        text-align: center;
    }

    .cc-auth__hero-lockup {
        justify-content: center;
        margin: 0;
        gap: 18px;
    }

    .cc-auth__hero-logo {
        width: 58px;
        padding-right: 18px;
    }

    .cc-auth__hero-title {
        font-size: 40px;
    }

    .cc-auth__hero-eyebrow,
    .cc-auth__hero-text,
    .cc-auth__hero-meta {
        display: none;
    }

    .cc-auth__panel {
        flex: 1 1 auto;
        padding: 24px 24px 32px;
    }

    .cc-auth__panel-inner {
        padding: 16px 0;
    }
}

@media (max-width: 575.98px) {
    .cc-auth__hero { height: 150px; }
    .cc-auth__hero-logo { width: 78px; }
    .cc-auth__title { font-size: 34px; }
    .cc-auth__panel { padding: 20px 18px 28px; }
}

/* Schermi molto bassi: la foto ruberebbe tutto lo spazio utile. */
@media (max-height: 620px) and (max-width: 991.98px) {
    .cc-auth__hero { height: 116px; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-auth *,
    .cc-auth *::before,
    .cc-auth *::after {
        transition: none !important;
    }
}
