/* ============================================================
   ESTILOS DE LOGIN (LOGIN.CSS)
   Polo Glauber Rocha - PMVC
   Caminho: static/css/pages/auth/login.css
============================================================ */

.auth-hero {
    background-color: var(--azul-escuro);
    color: #FFFFFF;
    padding: 3rem 1.5rem;
    text-align: center;
}

.auth-hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.auth-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0;
    color: #FFFFFF;
    letter-spacing: -0.02em;
}

.auth-wrapper {
    max-width: 480px;
    margin: 2.5rem auto 4rem;
    padding: 0 1.25rem;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    border: 1px solid var(--borda-cinza, #E2E8F0);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--azul-vibrante) 8.0%, transparent);
    color: var(--azul-vibrante);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-icon-circle i {
    width: 28px;
    height: 28px;
}

.auth-card-header h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--azul-escuro);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.auth-card-header p {
    font-size: 0.88rem;
    color: #64748B;
    margin: 0;
    line-height: 1.45;
}

/* Alertas de Notificação */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.auth-alert i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.alert-success {
    background-color: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #15803D;
}

.alert-error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}

/* Grupos de Campos */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1E293B;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-forgot-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--azul-vibrante);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-forgot-link:hover {
    color: var(--cor-destaque, var(--cor-destaque));
    text-decoration: underline;
}

.required {
    color: #E11D48;
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 0.75rem 0.95rem;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    background: #FFFFFF;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--cor-destaque, var(--cor-destaque));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cor-destaque) 10.0%, transparent);
}

.field-error {
    font-size: 0.78rem;
    color: #DC2626;
    margin-top: 0.15rem;
}

/* Campo de Senha com Botão de Revelar */
.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-password-wrapper .form-input {
    padding-right: 2.75rem;
}

.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    transition: color 0.2s ease;
}

.btn-toggle-password:hover {
    color: var(--azul-vibrante);
}

.btn-toggle-password i {
    width: 20px;
    height: 20px;
}

/* Ações */
.form-actions {
    margin-top: 1.5rem;
}

.btn-login-submit {
    width: 100%;
    background: var(--cor-destaque, var(--cor-destaque));
    color: #FFFFFF;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--cor-destaque) 30.0%, transparent);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-login-submit:hover {
    background-color: var(--cor-destaque-escuro, var(--cor-destaque-escuro));
    transform: translateY(-1px);
}

/* Rodapé do Card */
.auth-card-footer {
    margin-top: 2rem;
    text-align: center;
}

.auth-footer-divider {
    position: relative;
    margin-bottom: 1.5rem;
}

.auth-footer-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #E2E8F0;
}

.auth-footer-divider span {
    position: relative;
    background: #FFFFFF;
    padding: 0 0.75rem;
    font-size: 0.8rem;
    color: #94A3B8;
    text-transform: uppercase;
    font-weight: 600;
}

.auth-signup-box p {
    font-size: 0.88rem;
    color: #475569;
    margin: 0 0 0.75rem 0;
}

.btn-login-register {
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: color-mix(in srgb, var(--azul-vibrante) 6.0%, transparent);
    color: var(--azul-vibrante) !important;
    border: 1.5px solid color-mix(in srgb, var(--azul-vibrante) 25.0%, transparent);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-login-register:hover {
    background-color: var(--azul-vibrante);
    border-color: var(--azul-vibrante);
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--azul-vibrante) 25.0%, transparent);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.25rem;
    }
}

/* Layout atualizado e alinhado ao design system do portal */
.auth-main {
    background: #F8FAFC;
    padding: 0;
}

.auth-hero {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 1.5rem 5rem;
    background:
        radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--cor-destaque) 20.0%, transparent), transparent 28rem),
        linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul-vibrante) 100%);
}

.auth-hero::after {
    content: "";
    position: absolute;
    right: -5rem;
    bottom: -9rem;
    width: 24rem;
    height: 24rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.auth-hero-container {
    position: relative;
    z-index: 1;
}

.auth-hero-eyebrow,
.auth-welcome-kicker {
    display: inline-block;
    margin-bottom: 0.65rem;
    color: #FF76BA;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.auth-hero-container > p {
    max-width: 590px;
    margin: 0.65rem auto 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.6;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
    align-items: stretch;
    max-width: 980px;
    margin: -2.75rem auto 4.5rem;
    padding: 0 1.5rem;
}

.auth-welcome-panel {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    padding: 0;
    border-radius: 18px 0 0 18px;
    background: linear-gradient(155deg, var(--azul-vibrante) 0%, var(--azul-escuro) 100%);
    color: #FFFFFF;
    box-shadow: 0 24px 50px color-mix(in srgb, var(--azul-escuro) 14.0%, transparent);
}

.auth-welcome-panel > :not(.auth-welcome-photo) {
    position: relative;
    z-index: 2;
}

.auth-welcome-panel::after {
    content: "";
    position: absolute;
    right: -4rem;
    bottom: -4rem;
    width: 13rem;
    height: 13rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--cor-destaque) 12.0%, transparent);
}

.auth-welcome-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.auth-welcome-icon svg {
    width: 1.45rem;
    height: 1.45rem;
}

.auth-welcome-panel h2 {
    max-width: 330px;
    margin: 0 0 1rem;
    color: #FFFFFF;
    font-size: 1.8rem;
    line-height: 1.2;
}

.auth-welcome-panel > p {
    max-width: 370px;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.92rem;
    line-height: 1.65;
}

.auth-benefits-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.9rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.auth-benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.86rem;
    font-weight: 600;
}

.auth-benefits-list svg {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    color: #FF76BA;
}

.auth-welcome-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #E8C996;
}

.auth-welcome-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--azul-escuro) 10.0%, transparent) 0%,
        color-mix(in srgb, var(--azul-vibrante) 5.0%, transparent) 48%,
        color-mix(in srgb, var(--azul-escuro) 62.0%, transparent) 100%
    );
    pointer-events: none;
}

.auth-welcome-photo picture,
.auth-welcome-photo img {
    display: block;
    width: 100%;
    height: 100%;
}

.auth-welcome-photo picture {
    position: absolute;
    inset: 0;
}

.auth-welcome-photo img {
    object-fit: cover;
    object-position: 36% center;
    filter: saturate(0.88) contrast(1.04);
}

.auth-photo-accent {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 13%;
    z-index: 2;
    width: 72px;
    background: color-mix(in srgb, var(--cor-destaque) 20.0%, transparent);
    mix-blend-mode: multiply;
    pointer-events: none;
}

.auth-card {
    padding: 2.75rem;
    border-color: transparent;
    border-radius: 0 18px 18px 0;
    box-shadow: 0 24px 50px color-mix(in srgb, var(--azul-escuro) 14.0%, transparent);
}

.auth-card-header {
    margin-bottom: 1.75rem;
    text-align: left;
}

.auth-icon-circle {
    width: 48px;
    height: 48px;
    margin-bottom: 1.1rem;
    border-radius: 12px;
}

.auth-icon-circle svg {
    width: 23px;
    height: 23px;
}

.auth-card-header h2 {
    font-size: 1.55rem;
}

.auth-card-header p {
    max-width: 480px;
    line-height: 1.6;
}

.form-group {
    gap: 0.5rem;
    margin-bottom: 1.15rem;
}

.input-control,
.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-leading-icon {
    position: absolute;
    left: 0.95rem;
    z-index: 1;
    width: 1.05rem;
    height: 1.05rem;
    color: #64748B;
    pointer-events: none;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 0.8rem 3rem 0.8rem 2.75rem;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    outline: none;
    background: #FFFFFF;
    color: #0F172A;
    font: inherit;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card input:focus {
    border-color: var(--azul-vibrante);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--azul-vibrante) 11.0%, transparent);
}

.auth-card input.error {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.btn-toggle-password {
    right: 0.65rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 7px;
}

.btn-toggle-password:focus-visible,
.auth-forgot-link:focus-visible,
.btn-login-register:focus-visible,
.btn-login-painel:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--cor-destaque) 22.0%, transparent);
    outline-offset: 2px;
}

.btn-login-submit {
    min-height: 48px;
    border-radius: 10px;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--cor-destaque) 22.0%, transparent);
}

.btn-login-submit:active,
.btn-login-register:active,
.btn-login-painel:active {
    transform: translateY(0);
}

.auth-card-footer {
    margin-top: 1.75rem;
}

.auth-signup-box {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.auth-signup-box p {
    margin: 0;
    color: #334155;
    font-weight: 600;
}

.btn-login-register {
    min-height: 44px;
    margin-top: 0.85rem;
    border-color: var(--azul-vibrante);
    background: var(--azul-vibrante);
    color: #FFFFFF !important;
}

.btn-login-register:hover {
    background: var(--azul-escuro);
    border-color: var(--azul-escuro);
}

.auth-panel-access {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
}

.auth-panel-access > span {
    color: #64748B;
    font-size: 0.8rem;
    text-align: left;
}

.btn-login-painel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.65rem 0.9rem;
    border: 1px solid #CBD5E1;
    border-radius: 9px;
    background: #FFFFFF;
    color: var(--azul-vibrante);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-login-painel:hover {
    border-color: var(--azul-vibrante);
    background: #EFF6FF;
    transform: translateY(-1px);
}

.btn-login-painel svg,
.btn-login-register svg,
.btn-login-submit svg {
    width: 1rem;
    height: 1rem;
}

.auth-aviso-institucional {
    padding: 1rem;
    border: 1px solid #DBEAFE;
    border-radius: 12px;
    background: #EFF6FF;
    color: #1E3A8A;
}

.auth-aviso-institucional > svg {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-aviso-institucional p {
    margin: 0.5rem 0;
    font-size: 0.82rem;
    line-height: 1.5;
}

.auth-link-troca {
    color: var(--azul-vibrante);
    font-size: 0.82rem;
    font-weight: 700;
}

@media (max-width: 820px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .auth-welcome-panel {
        min-height: 330px;
        padding: 0;
        border-radius: 18px 18px 0 0;
    }

    .auth-welcome-photo {
        height: 100%;
    }

    .auth-welcome-panel h2 {
        max-width: none;
        font-size: 1.45rem;
    }

    .auth-welcome-icon,
    .auth-benefits-list {
        display: none;
    }

    .auth-card {
        border-radius: 0 0 18px 18px;
    }
}

@media (max-width: 480px) {
    .auth-hero {
        padding: 2rem 1rem 4rem;
    }

    .auth-wrapper {
        margin-top: -2rem;
        padding: 0 0.85rem;
    }

    .auth-welcome-panel {
        min-height: 300px;
        padding: 0;
    }

    .auth-welcome-panel > p {
        display: none;
    }

    .auth-card {
        padding: 1.5rem 1.15rem;
    }

    .label-row {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .auth-panel-access {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-panel-access > span {
        text-align: center;
    }
}

/* Composição compacta para acesso institucional. */
.auth-main .auth-hero {
    display: none;
}

.auth-main .auth-wrapper {
    max-width: 900px;
    margin: 2.5rem auto 3rem;
    padding: 0 1rem;
}

.auth-main .auth-welcome-panel {
    min-height: 460px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    box-shadow: none;
}

.auth-main .auth-card {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: var(--shadow-sm);
}

.auth-main .auth-card-header h2 {
    font-weight: 600;
}

.auth-main .auth-welcome-panel::after,
.auth-main .auth-photo-accent {
    opacity: 0.35;
}

@media (max-width: 820px) {
    .auth-main .auth-wrapper {
        margin-top: 1.5rem;
    }

    .auth-main .auth-welcome-panel {
        min-height: 260px;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .auth-main .auth-card {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }
}
