
/* ==========================================================
   ALIMENTAÇÃO V1
   LOGIN — IDENTIDADE VISUAL
   ========================================================== */

:root {
    --login-dark: #8F5558;
    --login-dark-soft: #794448;
    --login-red: #A65B5B;
    --login-red-hover: #914A4A;

    --login-bg: #F3F4F5;
    --login-white: #FFFFFF;

    --login-text: #292D32;
    --login-muted: #777D82;
    --login-border: #E1E3E5;
    --login-input-border: #D8DCDF;

    --login-radius: 9px;
}

/* ==========================================================
   RESET
   ========================================================== */

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

html {
    min-width: 320px;
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--login-text);
    background: var(--login-bg);
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

/* ==========================================================
   ESTRUTURA PRINCIPAL
   ========================================================== */

.login-page {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--login-white);
}

/* ==========================================================
   PAINEL INSTITUCIONAL
   ========================================================== */

.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: 55px clamp(35px, 6vw, 95px) 30px;
    overflow: hidden;

    /* NOVO FUNDO VERMELHO INSTITUCIONAL */

    background:
        radial-gradient(
            ellipse at 85% 15%,
            rgba(255,255,255,.08),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            #8F5558 0%,
            #985F62 55%,
            #824B4F 100%
        );

    color: #FFFFFF;
}

/* Elementos decorativos */

.login-brand::before {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    right: -220px;
    bottom: 60px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -165px;
    bottom: 115px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 530px;
    margin: auto;
}

/* ==========================================================
   MARCA
   ========================================================== */

.brand-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(65px, 10vh, 105px);
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 51px;
    height: 51px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 12px;
    background: rgba(255,255,255,.10);
    color: #FFFFFF;
    font-size: 22px;
}

.brand-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-name strong {
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: 2px;
}

.brand-name span {
    color: #F0DCDD;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2.1px;
}

/* ==========================================================
   MENSAGEM INSTITUCIONAL
   ========================================================== */

.brand-message {
    max-width: 500px;
}

.brand-eyebrow {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 23px;
    color: #F0DCDD;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.eyebrow-line {
    width: 27px;
    height: 2px;
    background: #E6B5B5;
}

.brand-message h1 {
    max-width: 480px;
    margin-bottom: 21px;
    color: #FFFFFF;
    font-size: clamp(32px, 3.5vw, 48px);
    font-weight: 650;
    line-height: 1.17;
    letter-spacing: -1.8px;
}

.brand-message h1 span {
    display: block;
    color: #E6C1C1;
}

.brand-message p {
    max-width: 450px;
    color: #F0E2E2;
    font-size: 14px;
    line-height: 1.9;
}

/* ==========================================================
   RECURSOS DO SISTEMA
   ========================================================== */

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 23px;
    margin-top: 49px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 43px;
    height: 43px;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 10px;
    background: rgba(255,255,255,.09);
    color: #F0C3C3;
    font-size: 16px;
}

.feature-item div:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-item strong {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 650;
}

.feature-item span {
    color: #F0DCDD;
    font-size: 11px;
    line-height: 1.5;
}

/* ==========================================================
   IDENTIFICAÇÃO INSTITUCIONAL
   ========================================================== */

.brand-institution {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 58px;
    padding-top: 23px;
    border-top: 1px solid rgba(255,255,255,.18);
}

.institution-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 9px;
    color: #FFFFFF;
    font-size: 17px;
}

.institution-logo {
    width: 43px;
    height: 43px;
    object-fit: contain;
    background: #FFFFFF;
    padding: 4px;
    border-radius: 7px;
}

.brand-institution div:last-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.brand-institution strong {
    color: #FFFFFF;
    font-size: 10px;
    letter-spacing: .7px;
}

.brand-institution span {
    color: #F0DCDD;
    font-size: 10px;
}

/* ==========================================================
   RODAPÉ DO PAINEL
   ========================================================== */

.brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 25px;
    color: #E5CACA;
    font-size: 10px;
}

/* ==========================================================
   ÁREA DO FORMULÁRIO
   ========================================================== */

.login-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 55px 35px;
    background: #FFFFFF;
}

.login-form-wrapper {
    width: 100%;
    max-width: 405px;
}

/* ==========================================================
   MARCA MOBILE
   ========================================================== */

.mobile-brand {
    display: none;
}

/* ==========================================================
   CABEÇALHO DO LOGIN
   ========================================================== */

.login-heading {
    margin-bottom: 36px;
}

.login-overline {
    display: block;
    margin-bottom: 14px;
    color: var(--login-red);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 2px;
}

.login-heading h2 {
    margin-bottom: 10px;
    color: var(--login-text);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1.2px;
}

.login-heading p {
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.7;
}

/* ==========================================================
   FORMULÁRIO
   ========================================================== */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 23px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-group label {
    color: #454B50;
    font-size: 12px;
    font-weight: 650;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 51px;
    border: 1px solid var(--login-input-border);
    border-radius: var(--login-radius);
    background: #FFFFFF;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--login-red);
    box-shadow: 0 0 0 3px rgba(143,85,88,.10);
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #92989D;
    font-size: 15px;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 100%;
    padding: 0 46px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--login-text);
    font-size: 13px;
}

.input-wrapper input::placeholder {
    color: #A6ABB0;
}

.toggle-password {
    position: absolute;
    right: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #858B90;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.toggle-password:hover {
    background: #F1F2F3;
    color: var(--login-dark);
}

.toggle-password:focus-visible {
    outline: 2px solid var(--login-red);
    outline-offset: 2px;
}

/* ==========================================================
   MANTER CONECTADO
   ========================================================== */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #72787D;
    font-size: 12px;
    cursor: pointer;
}

.remember-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border: 1px solid #C9CDD0;
    border-radius: 4px;
    background: #FFFFFF;
    transition: all .2s ease;
}

.remember-option input:checked + .custom-checkbox {
    border-color: var(--login-dark);
    background: var(--login-dark);
}

.remember-option input:checked + .custom-checkbox::after {
    content: "\f00c";
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    color: #FFFFFF;
    font-size: 10px;
}

.remember-option input:focus-visible + .custom-checkbox {
    outline: 3px solid rgba(143,85,88,.18);
    outline-offset: 2px;
}

/* ==========================================================
   BOTÃO DE ACESSO
   ========================================================== */

.btn-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 51px;
    margin-top: 4px;
    padding: 0 19px;
    border: 1px solid var(--login-dark);
    border-radius: var(--login-radius);
    background: var(--login-dark);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.btn-login i {
    color: #F0C3C3;
    font-size: 14px;
    transition: transform .2s ease;
}

.btn-login:hover {
    border-color: var(--login-dark-soft);
    background: var(--login-dark-soft);
}

.btn-login:hover i {
    transform: translateX(4px);
}

.btn-login:active {
    transform: scale(.99);
}

.btn-login:focus-visible {
    outline: 3px solid rgba(143,85,88,.20);
    outline-offset: 3px;
}

/* ==========================================================
   ERROS DE AUTENTICAÇÃO
   ========================================================== */

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid #EBD9D9;
    border-radius: 8px;
    background: #FAF0F0;
    color: #914A4A;
    font-size: 12px;
    line-height: 1.6;
}

.login-error i {
    margin-top: 2px;
}

/* ==========================================================
   RODAPÉ DO FORMULÁRIO
   ========================================================== */

.login-bottom {
    margin-top: 43px;
    text-align: center;
}

.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #83898E;
    font-size: 11px;
}

.security-notice i {
    color: #718474;
    font-size: 13px;
}

.login-version {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 21px;
    color: #A0A5A9;
    font-size: 10px;
}

.login-version span {
    color: var(--login-red);
}

/* ==========================================================
   RESPONSIVIDADE — NOTEBOOKS
   ========================================================== */

@media (max-width: 1100px) {

    .login-page {
        grid-template-columns: 1fr 1fr;
    }

    .login-brand {
        padding: 40px 35px 25px;
    }

    .brand-header {
        margin-bottom: 65px;
    }

    .brand-message h1 {
        font-size: 35px;
    }

    .brand-features {
        gap: 17px;
        margin-top: 35px;
    }

    .brand-institution {
        margin-top: 40px;
    }

    .login-content {
        padding: 40px 28px;
    }
}

/* ==========================================================
   RESPONSIVIDADE — TABLETS
   ========================================================== */

@media (max-width: 850px) {

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-brand {
        min-height: auto;
        padding: 28px 35px;
    }

    .brand-content {
        max-width: 600px;
    }

    .brand-header {
        margin-bottom: 30px;
    }

    .brand-message h1 {
        max-width: 550px;
        font-size: 34px;
    }

    .brand-message p {
        max-width: 550px;
    }

    .brand-features {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        margin-top: 30px;
    }

    .feature-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .brand-institution {
        margin-top: 30px;
    }

    .brand-footer {
        margin-top: 25px;
    }

    .login-content {
        min-height: 600px;
        padding: 65px 30px;
    }
}

/* ==========================================================
   RESPONSIVIDADE — CELULARES
   ========================================================== */

@media (max-width: 575px) {

    .login-page {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-brand {
        min-height: auto;
        padding: 24px 23px 27px;
    }

    .brand-header {
        margin: 0;
        gap: 11px;
    }

    .brand-logo {
        width: 43px;
        height: 43px;
        font-size: 19px;
    }

    .brand-name strong {
        font-size: 14px;
    }

    .brand-name span {
        font-size: 9px;
    }

    .brand-message,
    .brand-features,
    .brand-institution,
    .brand-footer {
        display: none;
    }

    .login-brand::before {
        width: 180px;
        height: 180px;
        right: -100px;
        bottom: -100px;
    }

    .login-brand::after {
        display: none;
    }

    .login-content {
        flex: 1;
        min-height: auto;
        padding: 45px 24px 30px;
    }

    .login-form-wrapper {
        max-width: 430px;
    }

    .mobile-brand {
        display: none;
    }

    .login-heading {
        margin-bottom: 30px;
    }

    .login-heading h2 {
        font-size: 29px;
    }

    .login-form {
        gap: 21px;
    }

    .input-wrapper {
        height: 50px;
    }

    .btn-login {
        min-height: 52px;
    }

    .login-bottom {
        margin-top: 35px;
    }
}

/* ==========================================================
   CELULARES PEQUENOS
   ========================================================== */

@media (max-width: 360px) {

    .login-brand {
        padding: 20px;
    }

    .login-content {
        padding: 35px 19px 25px;
    }

    .login-heading h2 {
        font-size: 26px;
    }

    .login-heading p {
        font-size: 12px;
    }
}

/* ==========================================================
   ACESSIBILIDADE
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Identidade oficial Terracota & Areia — painel de autenticação */
:root{
    --login-bg:#F2E9DC;
    --login-white:#FFFCF8;
    --login-text:#34302E;
    --login-muted:#756960;
    --login-border:#D8C9B9;
    --login-input-border:#DFD2C5;
    --login-dark:#95595A;
    --login-dark-soft:#754747;
    --login-red:#95595A;
    --login-red-hover:#754747;
}
.login-page{background:#F2E9DC}
.login-content{background:#F7F0E7}
.login-heading h2{color:#34302E}
.login-heading p,.security-notice{color:#756960}
.login-overline{color:#95595A}
.form-group label{color:#625650}
.input-wrapper{background:#FFFCF8;border-color:#D8C9B9}
.input-wrapper:focus-within{background:#fff;border-color:#BD9290;box-shadow:0 0 0 3px rgba(149,89,90,.13)}
.input-icon,.toggle-password{color:#89796f}
.input-wrapper input{color:#34302E}
.input-wrapper input::placeholder{color:#9B8D82}
.btn-login{background:#95595A;border-color:#95595A}
.btn-login:hover{background:#754747;border-color:#754747}
.btn-login:focus-visible{outline-color:rgba(149,89,90,.24)}
.remember-option,.remember-option label{color:#625650}
