/* ============================================================
   MYTHRA SYSTEM
   LOGIN — IDENTIDADE VISUAL
   ============================================================ */

:root {
    --mythra-black: #090B0F;
    --mythra-violet: #885CF6;
    --mythra-violet-light: #B79BFF;
    --mythra-gold: #C1B16A;
    --mythra-olive: #6E7A3A;

    --text-primary: #F7F3EA;
    --text-secondary: rgba(247, 243, 234, .70);
    --text-soft: rgba(247, 243, 234, .48);

    --border: rgba(193, 177, 106, .28);
    --surface: rgba(9, 11, 15, .46);
}


/* ============================================================
   RESET
   ============================================================ */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    overflow-x: hidden;
    background: var(--mythra-black);
    color: var(--text-primary);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


/* ============================================================
   PÁGINA
   ============================================================ */

.login-page {
    position: relative;
    width: 100%;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background: var(--mythra-black);
}


/* ============================================================
   BACKGROUND
   ============================================================ */

.login-background {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center center;

    z-index: -4;

    user-select: none;
    pointer-events: none;

    animation: mythraBackgroundArrival 1.3s ease-out both;
}


/* ============================================================
   OVERLAY
   Escurece somente o necessário para leitura do formulário.
   A direita permanece viva.
   ============================================================ */

.login-overlay {
    position: absolute;
    inset: 0;
    z-index: -3;
    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(5, 6, 10, .76) 0%,
            rgba(5, 6, 10, .58) 25%,
            rgba(5, 6, 10, .20) 45%,
            rgba(5, 6, 10, .02) 66%,
            transparent 100%
        ),
        linear-gradient(
            180deg,
            rgba(9, 11, 15, .18) 0%,
            transparent 32%,
            rgba(9, 11, 15, .14) 100%
        );
}


/* brilho atmosférico discreto */

.login-page::before {
    content: "";
    position: absolute;

    width: 520px;
    height: 520px;

    left: -260px;
    bottom: -280px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(136, 92, 246, .16),
            rgba(110, 122, 58, .07) 38%,
            transparent 70%
        );

    filter: blur(28px);

    z-index: -2;
    pointer-events: none;
}


/* ============================================================
   MARCA SUPERIOR
   ============================================================ */

.login-brand {
    position: absolute;
    top: 34px;
    left: clamp(30px, 6vw, 100px);

    display: flex;
    align-items: center;
    gap: 11px;

    z-index: 5;

    color: var(--mythra-gold);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .19em;
    text-transform: uppercase;

    animation: mythraFadeDown .8s ease-out both;
}

.login-brand-symbol {
    color: var(--mythra-gold);
    font-size: 17px;

    filter:
        drop-shadow(0 0 7px rgba(193, 177, 106, .55));
}


/* ============================================================
   PALCO
   ============================================================ */

.login-stage {
    position: relative;

    width: min(1500px, calc(100% - 80px));
    min-height: 100svh;

    margin: 0 auto;

    display: flex;
    align-items: center;

    z-index: 2;
}


/* ============================================================
   ÁREA DE LOGIN
   ============================================================ */

.login-box {
    position: relative;

    width: min(440px, 42vw);

    margin-left: clamp(0px, 2vw, 28px);

    animation: mythraLoginArrival .9s cubic-bezier(.2,.8,.2,1) both;
}


/*
   Não usamos uma caixa sólida.
   É apenas uma película sutil para dar legibilidade.
*/

.login-box::before {
    content: "";

    position: absolute;
    inset: -32px -38px;

    border: 1px solid rgba(193, 177, 106, .13);
    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(9, 11, 15, .54),
            rgba(9, 11, 15, .28)
        );

    box-shadow:
        0 32px 90px rgba(0, 0, 0, .24),
        inset 0 1px 0 rgba(255, 255, 255, .025);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    z-index: -1;
}


/* ============================================================
   CONTEÚDO
   ============================================================ */

.login-content {
    position: relative;
    width: 100%;
}

.login-eyebrow {
    margin-bottom: 15px;

    color: var(--mythra-gold);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .22em;
    text-transform: uppercase;
}


/* ============================================================
   TÍTULO
   ============================================================ */

.login-content h1 {
    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(48px, 5vw, 72px);
    line-height: .92;

    font-weight: 400;
    letter-spacing: -.045em;

    color: #F7F3EA;
}

.login-content h1 span {
    color: var(--mythra-gold);

    text-shadow:
        0 0 28px rgba(193, 177, 106, .13);
}


/* ============================================================
   TEXTO INTRODUTÓRIO
   ============================================================ */

.login-intro {
    max-width: 360px;

    margin: 22px 0 32px;

    color: var(--text-secondary);

    font-size: 14px;
    line-height: 1.65;
}


/* ============================================================
   ERROS
   ============================================================ */

.login-errors {
    margin-bottom: 20px;
    padding: 13px 15px;

    border: 1px solid rgba(255, 120, 120, .28);
    border-radius: 12px;

    background: rgba(120, 25, 35, .18);

    color: #FFD7D7;

    font-size: 12px;
    line-height: 1.55;
}


/* ============================================================
   FORM
   ============================================================ */

.login-form {
    width: 100%;
}

.field {
    width: 100%;
    margin-bottom: 19px;
}

.field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.field label {
    display: block;

    margin-bottom: 8px;

    color: rgba(247, 243, 234, .82);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: .035em;
}


/* ============================================================
   INPUTS
   ============================================================ */

.field input {
    width: 100%;
    height: 54px;

    padding: 0 17px;

    border: 1px solid rgba(193, 177, 106, .26);
    border-radius: 13px;

    outline: none;

    background:
        linear-gradient(
            135deg,
            rgba(15, 17, 24, .72),
            rgba(20, 18, 31, .60)
        );

    color: #FFFFFF;

    font-family: inherit;
    font-size: 14px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .025),
        0 8px 30px rgba(0, 0, 0, .12);

    transition:
        border-color .22s ease,
        box-shadow .22s ease,
        background .22s ease,
        transform .22s ease;
}

.field input::placeholder {
    color: rgba(247, 243, 234, .35);
}

.field input:hover {
    border-color: rgba(193, 177, 106, .42);
}

.field input:focus {
    border-color: rgba(136, 92, 246, .88);

    background:
        linear-gradient(
            135deg,
            rgba(18, 18, 28, .84),
            rgba(27, 21, 42, .72)
        );

    box-shadow:
        0 0 0 3px rgba(136, 92, 246, .10),
        0 0 26px rgba(136, 92, 246, .12);
}


/* ============================================================
   ESQUECEU A SENHA
   ============================================================ */

.forgot-password {
    margin-bottom: 8px;

    color: var(--mythra-gold);

    font-size: 11px;
    text-decoration: none;

    opacity: .85;

    transition:
        opacity .2s ease,
        color .2s ease;
}

.forgot-password:hover {
    opacity: 1;
    color: #E4D58D;
}


/* ============================================================
   PASSWORD
   ============================================================ */

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 11px;

    width: 36px;
    height: 36px;

    transform: translateY(-50%);

    display: grid;
    place-items: center;

    padding: 0;

    border: 0;
    border-radius: 10px;

    background: transparent;

    color: rgba(247, 243, 234, .54);

    cursor: pointer;

    transition:
        color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.password-toggle:hover {
    color: var(--mythra-gold);
    background: rgba(193, 177, 106, .08);
}

.password-toggle:active {
    transform:
        translateY(-50%)
        scale(.94);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle.is-visible .eye-open {
    display: none;
}

.password-toggle.is-visible .eye-closed {
    display: block;
}


/* ============================================================
   BOTÃO ENTRAR
   ============================================================ */

.login-submit {
    position: relative;

    width: 100%;
    height: 56px;

    margin-top: 8px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;

    background:
        linear-gradient(
            100deg,
            #6D2EF3 0%,
            #885CF6 42%,
            #A884A4 72%,
            #9D9A55 100%
        );

    color: #FFFFFF;

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;

    letter-spacing: .08em;
    text-transform: uppercase;

    cursor: pointer;

    box-shadow:
        0 15px 38px rgba(88, 43, 180, .30),
        0 0 30px rgba(136, 92, 246, .15);

    transition:
        transform .22s ease,
        box-shadow .22s ease,
        filter .22s ease;
}

.login-submit::before {
    content: "";

    position: absolute;

    top: -80%;
    left: -30%;

    width: 28%;
    height: 260%;

    transform: rotate(25deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.34),
            transparent
        );

    transition: left .55s ease;
}

.login-submit:hover {
    transform: translateY(-2px);

    filter: saturate(1.08);

    box-shadow:
        0 18px 48px rgba(88, 43, 180, .38),
        0 0 36px rgba(193, 177, 106, .12);
}

.login-submit:hover::before {
    left: 115%;
}

.login-submit:active {
    transform: translateY(0);
}


/* ============================================================
   VOLTAR
   ============================================================ */

.login-back {
    display: inline-flex;
    align-items: center;

    margin-top: 23px;

    color: rgba(247, 243, 234, .50);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: .03em;

    text-decoration: none;

    transition:
        color .2s ease,
        transform .2s ease;
}

.login-back:hover {
    color: var(--mythra-gold);
    transform: translateX(-3px);
}


/* ============================================================
   ANIMAÇÕES
   ============================================================ */

@keyframes mythraBackgroundArrival {

    from {
        opacity: 0;
        transform: scale(1.025);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }

}

@keyframes mythraLoginArrival {

    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

@keyframes mythraFadeDown {

    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* ============================================================
   RESPONSIVO
   ============================================================ */

@media (max-width: 1100px) {

    .login-stage {
        width: min(100% - 60px, 1200px);
    }

    .login-box {
        width: min(430px, 48vw);
    }

    .login-background {
        object-position: 58% center;
    }

}


@media (max-width: 820px) {

    .login-background {
        object-position: 64% center;
    }

    .login-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(5, 6, 10, .86) 0%,
                rgba(5, 6, 10, .70) 50%,
                rgba(5, 6, 10, .30) 100%
            );
    }

    .login-stage {
        width: min(100% - 44px, 720px);
    }

    .login-box {
        width: min(430px, 72vw);
        margin-left: 0;
    }

}


@media (max-width: 600px) {

    .login-page {
        min-height: 100svh;
    }

    .login-background {
        object-position: 67% center;
    }

    .login-overlay {
        background:
            rgba(5, 6, 10, .68);
    }

    .login-brand {
        top: 22px;
        left: 22px;

        font-size: 9px;
    }

    .login-stage {
        width: calc(100% - 36px);
        padding: 90px 0 45px;
    }

    .login-box {
        width: 100%;
    }

    .login-box::before {
        inset: -25px -18px;

        border-radius: 23px;

        background:
            rgba(9, 11, 15, .58);

        backdrop-filter: blur(9px);
        -webkit-backdrop-filter: blur(9px);
    }

    .login-content h1 {
        font-size: clamp(45px, 14vw, 62px);
    }

    .login-intro {
        margin-bottom: 27px;
    }

}


@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }

}