
/* ==========================================================
   WRSAAS V2.2 — LOGIN
   Identidade visual: Minimalismo editorial / Preto e Branco
   ========================================================== */

/* 01. BASE E VARIÁVEIS */

:root {
    --login-black: #111111;
    --login-dark: #171717;
    --login-white: #ffffff;
    --login-background: #f3f3f1;
    --login-gray: #777777;
    --login-light: #f1f1f1;
    --login-border: #e6e6e6;
    --login-radius: 44px;

    --login-font: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--login-font);
    background: var(--login-background);
    color: var(--login-black);
    -webkit-font-smoothing: antialiased;
}

button,
input,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* 02. ESTRUTURA PRINCIPAL */

.login-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 1280px;
    min-height: 660px;

    display: grid;
    grid-template-columns: 1fr 0.88fr;

    background: var(--login-black);
    border-radius: var(--login-radius);
    overflow: hidden;

    box-shadow:
        0 24px 75px rgba(0, 0, 0, 0.08),
        0 3px 12px rgba(0, 0, 0, 0.03);
}

/* 03. PAINEL ESQUERDO */

.login-brand-panel {
    background: var(--login-black);
    color: var(--login-white);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-width: 0;
    padding: 38px 42px;
    position: relative;
    isolation: isolate;
}

.brand-top,
.brand-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand-wordmark {
    color: #fff;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -1.8px;
    line-height: 1;
}

.brand-symbol {
    font-size: 10px;
    vertical-align: top;
    margin-left: 3px;
    letter-spacing: 0;
}

.back-home {
    color: #aaa;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.back-home span {
    font-size: 15px;
    margin-left: 5px;
}

.back-home:hover {
    color: #fff;
}

.brand-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 38px;
    padding: 40px 0;
}

.brand-monogram {
    color: #fff;
    font-size: clamp(110px, 13vw, 205px);
    font-weight: 950;
    letter-spacing: -0.13em;
    line-height: 0.9;
    padding-right: 0.13em;
    user-select: none;
}

.brand-monogram span {
    color: #fff;
}

.brand-message {
    text-align: center;
    max-width: 430px;
}

.brand-eyebrow {
    display: block;
    margin-bottom: 17px;

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: #858585;
}

.brand-message h1 {
    margin: 0;

    font-size: clamp(21px, 2.5vw, 34px);
    font-weight: 850;
    letter-spacing: -0.055em;
    line-height: 1.12;
}

.brand-message h1 span {
    display: block;
    color: #999;
}

.brand-bottom {
    color: #666;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.09em;
}

/* 04. PAINEL DIREITO */

.login-form-panel {
    min-width: 0;
    background: var(--login-white);
    border-radius: var(--login-radius);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 54px clamp(30px, 5vw, 78px) 26px;
}

.login-form-content {
    width: 100%;
    max-width: 390px;
    margin: auto;
    padding: 20px 0;
}

.login-heading {
    margin-bottom: 34px;
}

.login-eyebrow {
    display: block;
    margin-bottom: 19px;

    color: #888;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.login-heading h2 {
    margin: 0;

    color: var(--login-black);
    font-size: clamp(38px, 4vw, 57px);
    font-weight: 850;
    line-height: 1.02;
    letter-spacing: -0.075em;
}

.heading-dot {
    color: #888;
}

.login-heading p {
    margin: 19px 0 0;

    color: #777;
    font-size: 13px;
    line-height: 1.75;
    max-width: 320px;
}

/* 05. FORMULÁRIO */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-group label {
    color: #555;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--login-light);
    border: 1px solid transparent;
    border-radius: 12px;
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.input-wrapper:focus-within {
    background: #fff;
    border-color: #222;
}

.input-wrapper input {
    width: 100%;
    min-width: 0;
    min-height: 51px;
    padding: 14px 17px;

    background: transparent;
    border: 0;
    outline: 0;

    color: #111;
    font-size: 13px;
    font-weight: 500;
}

.input-wrapper input::placeholder {
    color: #aaa;
}

.input-wrapper input:focus-visible {
    outline: none;
}

.password-wrapper input {
    padding-right: 90px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);

    background: transparent;
    border: 0;
    padding: 7px;

    color: #777;
    font-size: 11px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #111;
}

.login-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 8px;
    padding: 14px 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    background: #111;
    color: #fff;
    border: 1px solid #111;
    border-radius: 12px;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.login-submit span:last-child {
    font-size: 20px;
    font-weight: 400;
}

.login-submit:hover {
    background: #333;
}

.login-submit:active {
    transform: scale(0.99);
}

/* 06. DIVISOR E GOOGLE */

.login-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 28px 0 20px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    background: #e7e7e7;
    flex: 1;
}

.login-divider span {
    color: #999;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
    white-space: nowrap;
}

.google-login {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 44px;
}

.google-login .g_id_signin {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    min-height: 40px;
}

/* 07. CADASTRO */

.login-register {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #ececec;
    text-align: center;
}

.login-register p {
    margin: 0 0 12px;
    color: #888;
    font-size: 12px;
}

.register-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: #111;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;

    transition: opacity 0.2s ease;
}

.register-link span {
    font-size: 16px;
}

.register-link:hover {
    opacity: 0.6;
}

.login-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    color: #aaa;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.09em;
}

/* 08. ALERTAS DE SESSÃO */

.login-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 25px;
    padding: 14px 16px;

    border: 1px solid;
    border-radius: 10px;

    font-size: 12px;
    line-height: 1.5;
}

.login-alert-success {
    background: #f0f9f2;
    border-color: #b8dfc1;
    color: #246d37;
}

.login-alert-error {
    background: #fff2f2;
    border-color: #f0c0c0;
    color: #a52d2d;
}

.alert-message {
    overflow-wrap: anywhere;
}

.alert-close {
    flex-shrink: 0;
    background: none;
    border: 0;
    color: inherit;
    font-size: 21px;
    line-height: 1;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* 09. TELAS INTERMEDIÁRIAS */

@media (max-width: 1050px) {

    .login-layout {
        padding: 22px;
    }

    .login-container {
        grid-template-columns: 0.9fr 1fr;
        min-height: 620px;
    }

    .login-brand-panel {
        padding: 30px;
    }

    .login-form-panel {
        padding: 40px 34px 24px;
    }

    .brand-monogram {
        font-size: clamp(100px, 15vw, 150px);
    }

    .brand-message h1 {
        font-size: 25px;
    }

    .brand-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 10. MOBILE */

@media (max-width: 720px) {

    :root {
        --login-radius: 26px;
    }

    .login-layout {
        padding: 12px;
        align-items: flex-start;
    }

    .login-container {
        display: flex;
        flex-direction: column;
        min-height: auto;
        border-radius: 26px;
    }

    .login-brand-panel {
        padding: 24px 25px 28px;
        min-height: 230px;
    }

    .brand-wordmark {
        font-size: 22px;
    }

    .back-home {
        font-size: 9px;
    }

    .brand-center {
        gap: 14px;
        padding: 24px 0 4px;
    }

    .brand-monogram {
        font-size: 80px;
        line-height: 0.85;
    }

    .brand-eyebrow {
        margin-bottom: 9px;
        font-size: 8px;
    }

    .brand-message h1 {
        font-size: 19px;
        line-height: 1.2;
    }

    .brand-bottom {
        display: none;
    }

    .login-form-panel {
        border-radius: 26px;
        padding: 34px 25px 23px;
    }

    .login-form-content {
        max-width: 430px;
        padding: 0;
    }

    .login-heading {
        margin-bottom: 27px;
    }

    .login-heading h2 {
        font-size: 40px;
    }

    .login-heading p {
        margin-top: 13px;
    }

    .login-panel-footer {
        margin-top: 38px;
    }
}

/* 11. CELULARES PEQUENOS */

@media (max-width: 380px) {

    .login-layout {
        padding: 8px;
    }

    .login-brand-panel {
        padding: 22px 18px;
    }

    .login-form-panel {
        padding: 30px 18px 20px;
    }

    .brand-message h1 {
        font-size: 17px;
    }

    .login-heading h2 {
        font-size: 35px;
    }

    .login-submit {
        font-size: 10px;
    }
}

/* 12. TELAS BAIXAS */

@media (min-width: 721px) and (max-height: 740px) {

    .login-layout {
        align-items: flex-start;
    }

    .login-container {
        min-height: 600px;
    }

    .login-form-panel {
        padding-top: 25px;
        padding-bottom: 20px;
    }

    .login-heading {
        margin-bottom: 24px;
    }

    .login-heading h2 {
        font-size: 42px;
    }

    .login-register {
        margin-top: 20px;
    }
}

/* 13. ACESSIBILIDADE */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
/* ==========================================
   WRSAAS V2.2 — CORREÇÃO DO LOGO
   ========================================== */

.login-brand-panel .brand-center {
    min-width: 0;
    max-width: 100%;
}

.login-brand-panel .brand-logo-wrapper {
    width: min(100%, 300px);
    max-width: 300px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;
}

.login-brand-panel .brand-logo-image {
    display: block;

    width: 100%;
    max-width: 300px;
    height: auto;
    max-height: 300px;

    object-fit: contain;
}

/* TABLETS */

@media (max-width: 1050px) {
    .login-brand-panel .brand-logo-wrapper {
        max-width: 240px;
    }

    .login-brand-panel .brand-logo-image {
        max-width: 240px;
        max-height: 240px;
    }
}

/* CELULARES */

@media (max-width: 720px) {
    .login-brand-panel .brand-logo-wrapper {
        max-width: 135px;
    }

    .login-brand-panel .brand-logo-image {
        max-width: 135px;
        max-height: 135px;
    }
}


/* ==========================================
   WRSAAS V2.2 — LOGIN COMPACTO
   ========================================== */

@media (min-width: 721px) {

    .login-layout {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 18px 28px;
    }

    .login-container {
        min-height: 0;
        height: auto;
        max-height: none;
    }

    .login-brand-panel {
        padding: 26px 34px;
    }

    .brand-center {
        padding: 18px 0;
        gap: 0;
    }

    .login-form-panel {
        padding: 24px 40px 18px;
    }

    .login-form-content {
        padding: 8px 0;
    }

    .login-heading {
        margin-bottom: 20px;
    }

    .login-eyebrow {
        margin-bottom: 10px;
    }

    .login-heading h2 {
        font-size: clamp(32px, 3vw, 44px);
    }

    .login-heading p {
        margin-top: 10px;
        line-height: 1.5;
    }

    .login-form {
        gap: 12px;
    }

    .form-group {
        gap: 6px;
    }

    .input-wrapper input {
        min-height: 44px;
        padding: 10px 14px;
    }

    .login-submit {
        min-height: 46px;
        margin-top: 3px;
    }

    .login-divider {
        margin: 17px 0 12px;
    }

    .login-register {
        margin-top: 18px;
        padding-top: 15px;
    }

    .login-register p {
        margin-bottom: 8px;
    }

    .login-panel-footer {
        margin-top: 12px;
    }
}

/* ==========================================
   WRSAAS V2.2 — ANIMAÇÃO DO LOGO
   ========================================== */

@keyframes wrsaasLogoFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@media (prefers-reduced-motion: no-preference) {

    .login-brand-panel .brand-logo-image {
        animation: wrsaasLogoFloat 5s ease-in-out infinite;
    }

}

@media (prefers-reduced-motion: reduce) {

    .login-brand-panel .brand-logo-image {
        animation: none;
        transform: none;
    }

}
