﻿/* ==========================================================================
   ConsiGov — Telas de acesso (Login, Esqueci minha senha, Escolher perfil)
   Usa os tokens definidos em consigov.css
   ========================================================================== */

body {
    background: var(--cg-bg, #EEF1F5);
}

.cg-auth {
    min-height: 100vh;
    display: grid !important;
    grid-template-columns: minmax(340px, 44%) 1fr;
    background: var(--cg-bg, #EEF1F5);
}

/* Painel institucional */
.cg-auth__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 3rem clamp(2rem, 4vw, 4rem);
    color: #FFFFFF;
    background: linear-gradient(150deg, var(--cg-navy, #081941) 0%, var(--cg-hero-mid, #0B2A66) 62%, var(--cg-hero-end, #0A3E9E) 100%);
    overflow: hidden;
}

    .cg-auth__brand::after {
        content: "";
        position: absolute;
        right: -120px;
        bottom: -120px;
        width: 460px;
        height: 460px;
        background: url("consigov/simbolo-consigov.png") no-repeat center / contain;
        opacity: .06;
        pointer-events: none;
    }

.cg-auth__logo {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    background: #FFFFFF;
    border-radius: 14px;
    padding: 1rem 1.375rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

    .cg-auth__logo img {
        display: block;
        height: 52px;
        width: auto;
        max-width: 100%;
    }

.cg-auth__pitch {
    position: relative;
    z-index: 1;
    max-width: 30rem;
}

.cg-auth__eyebrow {
    display: inline-block;
    font-family: var(--cg-font-heading);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
    margin-bottom: .875rem;
}

.cg-auth__headline {
    font-family: var(--cg-font-heading);
    font-size: clamp(1.75rem, 2.6vw, 2.375rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.02em;
    margin: 0 0 1rem;
    color: #FFFFFF;
}

.cg-auth__text {
    margin: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, .8);
}

.cg-auth__footer {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: .8125rem;
    color: rgba(255, 255, 255, .6);
}

/* Área do formulário */
.cg-auth__main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

    .cg-auth__main > .content {
        width: 100%;
        max-width: 420px;
        padding: 0 !important;
    }

/* Cartão do formulário (classe .wrapper usada pelas telas de acesso) */
.wrapper {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 2.25rem 2rem 2rem;
    background: #FFFFFF;
    border: 1px solid var(--cg-border, #DFE5ED);
    border-radius: 16px;
    box-shadow: var(--cg-shadow-md);
}

    /* Brasão do município */
    .wrapper .logo {
        width: 96px;
        height: 96px;
        margin: 0 auto;
        position: relative;
    }

        .wrapper .logo img {
            width: 96px;
            height: 96px;
            object-fit: contain;
            border-radius: 50%;
            background: #FFFFFF;
            padding: 6px;
            border: 1px solid var(--cg-border, #DFE5ED);
            box-shadow: var(--cg-shadow-sm);
        }

    .wrapper .name {
        font-family: var(--cg-font-heading);
        font-weight: 800;
        font-size: 1.25rem;
        letter-spacing: -.01em;
        color: var(--cg-navy, #081941);
        margin-bottom: 1.5rem;
    }

    .wrapper .form-label {
        font-size: .875rem;
    }

    /* Campo com ícone (CPF / Senha) */
    .wrapper .form-field {
        position: relative;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        margin-bottom: 1rem;
        padding: 0 .875rem;
        min-height: 48px;
        background: #FFFFFF;
        border: 1px solid var(--cg-border-strong, #C7D1DE);
        border-radius: 10px;
        box-shadow: var(--cg-shadow-xs);
        transition: border-color .15s ease, box-shadow .15s ease;
    }

        .wrapper .form-field:focus-within {
            border-color: var(--cg-blue, #005AED);
            box-shadow: var(--cg-focus-ring);
        }

        .wrapper .form-field > h4,
        .wrapper .form-field > .bi {
            margin: 0 .75rem 0 0 !important;
            font-size: 1.125rem;
            color: var(--cg-silver, #8EA0B8);
            line-height: 1;
        }

        .wrapper .form-field:focus-within > h4,
        .wrapper .form-field:focus-within > .bi {
            color: var(--cg-blue, #005AED);
        }

        .wrapper .form-field input,
        .wrapper .form-field .form-control {
            flex: 1 1 0;
            min-width: 0;
            width: auto;
            min-height: 46px;
            display: block;
            padding: .625rem 0;
            border: 0 !important;
            outline: 0;
            box-shadow: none !important;
            background: transparent;
            font-size: 1rem;
            color: var(--cg-navy, #081941);
        }

        .wrapper .form-field .validation-message {
            flex: 0 0 100%;
            margin: 0 0 .5rem;
        }

    .wrapper .btn-primary {
        font-size: 1rem;
        min-height: 48px;
        border-radius: 10px;
    }

    .wrapper a {
        text-decoration: none;
        font-size: .875rem;
        font-weight: 700;
        color: var(--cg-blue, #005AED);
    }

        .wrapper a:hover {
            color: var(--cg-blue-active, #0042AE);
            text-decoration: underline;
        }

#recaptcha-container {
    display: flex;
    justify-content: center;
}

/* Responsivo: painel institucional vira faixa compacta no topo */
@media (max-width: 991.98px) {
    .cg-auth {
        grid-template-columns: 1fr;
    }

    .cg-auth__brand {
        padding: 1.25rem 1.5rem;
        gap: 1rem;
    }

    .cg-auth__pitch,
    .cg-auth__footer {
        display: none;
    }

    .cg-auth__logo {
        align-self: center;
        padding: .625rem 1rem;
    }

        .cg-auth__logo img {
            height: 40px;
        }

    .cg-auth__main {
        align-items: flex-start;
        padding: 2rem 1rem 3rem;
    }
}

@media (max-width: 380px) {
    .wrapper {
        padding: 1.75rem 1.125rem 1.5rem;
    }
}
