/* =========================================================
   HDÁGIL — LOGIN
========================================================= */

:root {
    --hd-navy-950: #061525;
    --hd-navy-900: #071b2f;
    --hd-navy-850: #09243c;
    --hd-navy-800: #0a304c;

    --hd-blue-700: #0076b9;
    --hd-blue-600: #008fcf;
    --hd-blue-500: #0aaee8;
    --hd-blue-400: #2ec7f4;
    --hd-blue-300: #6bd8f7;

    --hd-white: #ffffff;

    --hd-slate-950: #071525;
    --hd-slate-800: #1d2c3e;
    --hd-slate-700: #35465a;
    --hd-slate-600: #53657a;
    --hd-slate-500: #738398;
    --hd-slate-400: #96a4b5;
    --hd-slate-300: #c3ced9;
    --hd-slate-200: #dce5ec;
    --hd-slate-100: #edf3f7;
    --hd-slate-50: #f7fafc;

    --hd-danger-700: #b42318;
    --hd-danger-200: #fecdca;
    --hd-danger-50: #fef3f2;

    --hd-card-radius: 30px;
    --hd-field-radius: 15px;

    --hd-shadow-card:
        0 40px 110px rgba(7, 28, 48, 0.17);

    --hd-shadow-button:
        0 18px 35px rgba(0, 151, 210, 0.24);
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;

    color: var(--hd-slate-950);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(circle at 7% 8%,
            rgba(46, 199, 244, 0.13),
            transparent 29%),
        radial-gradient(circle at 94% 88%,
            rgba(10, 174, 232, 0.1),
            transparent 31%),
        linear-gradient(135deg,
            #f2f8fb 0%,
            #f8fbfd 48%,
            #edf6fa 100%);
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

a {
    color: inherit;
}


/* =========================================================
   ESTRUTURA
========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px 24px;
}

.login-card {
    width: min(1280px, 100%);
    min-height: 0;
    height: min(720px, calc(100vh - 32px));

    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(480px, 0.92fr);

    overflow: hidden;

    background: var(--hd-white);

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--hd-card-radius);

    box-shadow: var(--hd-shadow-card);

    animation: loginCardEntrance 650ms ease both;
}


/* =========================================================
   PAINEL DA MARCA
========================================================= */

.login-brand {
    position: relative;
    isolation: isolate;

    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 40px 56px 36px;

    overflow: hidden;

    color: var(--hd-white);

    background:
        linear-gradient(145deg,
            var(--hd-navy-950) 0%,
            var(--hd-navy-900) 42%,
            #073a59 100%);
}

.login-brand::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -3;

    opacity: 0.19;

    background-image:
        linear-gradient(rgba(255, 255, 255, 0.065) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(255, 255, 255, 0.065) 1px,
            transparent 1px);

    background-size: 52px 52px;

    mask-image:
        linear-gradient(145deg,
            rgba(0, 0, 0, 0.9),
            rgba(0, 0, 0, 0.1));
}

.login-brand::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;

    height: 40%;

    background:
        linear-gradient(to top,
            rgba(0, 156, 211, 0.18),
            transparent);

    pointer-events: none;
}

.login-brand__background {
    position: absolute;
    inset: 0;
    z-index: -1;

    overflow: hidden;

    pointer-events: none;
}

.login-brand__glow {
    position: absolute;

    display: block;

    width: 360px;
    height: 360px;

    border-radius: 50%;

    filter: blur(85px);
}

.login-brand__glow--top {
    top: -160px;
    left: -110px;

    background: rgba(46, 199, 244, 0.19);
}

.login-brand__glow--bottom {
    right: -170px;
    bottom: -170px;

    background: rgba(0, 174, 232, 0.24);
}

.login-brand__circle {
    position: absolute;

    display: block;

    border: 1px solid rgba(94, 214, 249, 0.11);
    border-radius: 50%;
}

.login-brand__circle--one {
    top: 16%;
    right: -190px;

    width: 430px;
    height: 430px;
}

.login-brand__circle--two {
    right: -80px;
    bottom: -140px;

    width: 320px;
    height: 320px;
}

.login-brand__header {
    position: relative;
    z-index: 2;
}

.login-brand__logo {
    display: block;

    width: auto;
    height: 64px;
    max-width: 330px;

    object-fit: contain;
    object-position: left center;

    filter:
        drop-shadow(0 12px 25px rgba(0, 0, 0, 0.2));

    animation: loginLogoEntrance 700ms 100ms ease both;
}

.login-brand__content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 620px;

    margin: auto 0;
    padding: 30px 0 24px;
}

.login-brand__eyebrow {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 28px;
    padding: 10px 16px;

    color: rgba(255, 255, 255, 0.76);

    font-size: 14px;
    font-weight: 500;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.055);

    backdrop-filter: blur(8px);
}

.login-brand__eyebrow-dot {
    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    border-radius: 50%;

    background: var(--hd-blue-400);

    box-shadow:
        0 0 16px rgba(46, 199, 244, 0.95);
}

.login-brand__title {
    max-width: 620px;

    margin: 0;

    color: var(--hd-white);

    font-size: clamp(34px, 2.8vw, 46px);
    font-weight: 620;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.login-brand__description {
    max-width: 580px;

    margin: 18px 0 0;

    color: rgba(228, 239, 247, 0.78);

    font-size: 15px;
    line-height: 1.6;
}

.login-modules {
    max-width: 610px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;

    margin-top: 24px;
}

.login-module {
    min-width: 0;
    min-height: 46px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 8px 12px;

    color: rgba(255, 255, 255, 0.82);

    font-size: 14px;
    font-weight: 500;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.045);

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

.login-module:hover {
    transform: translateY(-2px);

    border-color: rgba(46, 199, 244, 0.25);

    background: rgba(255, 255, 255, 0.07);
}

.login-module__icon {
    width: 31px;
    height: 31px;

    flex: 0 0 31px;

    display: grid;
    place-items: center;

    color: var(--hd-blue-300);

    border-radius: 9px;

    background: rgba(46, 199, 244, 0.1);
}

.login-module__icon svg {
    width: 17px;
    height: 17px;
}

.login-brand__footer {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    gap: 13px;

    color: rgba(255, 255, 255, 0.5);

    font-size: 13px;
    letter-spacing: 0.025em;
}

.login-brand__footer-line {
    width: 42px;
    height: 1px;

    background:
        linear-gradient(to right,
            var(--hd-blue-400),
            rgba(46, 199, 244, 0.3));
}


/* =========================================================
   PAINEL DO FORMULÁRIO
========================================================= */

.login-form-panel {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 42px 64px;

    background:
        radial-gradient(circle at 100% 0%,
            rgba(10, 174, 232, 0.035),
            transparent 26%),
        var(--hd-white);
}

.login-form-container {
    width: 100%;
    max-width: 470px;

    animation: loginFormEntrance 600ms 160ms ease both;
}

.login-mobile-brand {
    display: none;

    margin-bottom: 38px;
}

.login-mobile-brand__logo {
    display: block;

    width: auto;
    height: 58px;
    max-width: 260px;

    object-fit: contain;
    object-position: left center;
}

.login-form-header {
    margin-bottom: 28px;
}

.login-form-header__eyebrow {
    display: block;

    margin-bottom: 12px;

    color: var(--hd-blue-600);

    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

.login-form-header__title {
    margin: 0;

    color: var(--hd-slate-950);

    font-size: clamp(34px, 3vw, 44px);
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.login-form-header__description {
    margin: 13px 0 0;

    color: var(--hd-slate-500);

    font-size: 16px;
    line-height: 1.6;
}


/* =========================================================
   CAMPOS
========================================================= */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-field__label {
    display: block;

    margin-bottom: 9px;

    color: var(--hd-slate-800);

    font-size: 14px;
    font-weight: 650;
}

.login-field__control {
    position: relative;
}

.login-field__icon {
    position: absolute;
    top: 50%;
    left: 18px;

    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    color: var(--hd-slate-400);

    transform: translateY(-50%);

    pointer-events: none;

    transition:
        color 180ms ease;
}

.login-field__icon svg {
    width: 19px;
    height: 19px;
}

.login-field__control:focus-within .login-field__icon {
    color: var(--hd-blue-500);
}

.login-field__input {
    width: 100%;
    height: 54px;

    padding: 0 18px 0 52px;

    color: var(--hd-slate-950);
    background: var(--hd-white);

    font-size: 15px;

    border: 1px solid var(--hd-slate-200);
    border-radius: var(--hd-field-radius);

    outline: none;

    box-shadow:
        0 4px 14px rgba(27, 55, 77, 0.025);

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.login-field__input::placeholder {
    color: var(--hd-slate-400);
}

.login-field__input:hover {
    border-color: #bdccd7;
}

.login-field__input:focus {
    border-color: var(--hd-blue-500);

    box-shadow:
        0 0 0 4px rgba(10, 174, 232, 0.105),
        0 8px 22px rgba(25, 83, 114, 0.06);
}

.login-field__errors {
    margin-top: 8px;

    color: var(--hd-danger-700);

    font-size: 13px;
    line-height: 1.45;
}

.login-field__errors p {
    margin: 0;
}


/* =========================================================
   LEMBRAR-ME
========================================================= */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: -2px;
}

.login-remember {
    position: relative;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: var(--hd-slate-600);

    font-size: 14px;

    cursor: pointer;
    user-select: none;
}

.login-remember__checkbox {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}

.login-remember__custom {
    width: 19px;
    height: 19px;

    flex: 0 0 19px;

    display: grid;
    place-items: center;

    color: transparent;

    border: 1px solid #b9c7d2;
    border-radius: 5px;

    background: var(--hd-white);

    transition:
        border-color 170ms ease,
        background-color 170ms ease,
        box-shadow 170ms ease,
        color 170ms ease;
}

.login-remember__custom svg {
    width: 13px;
    height: 13px;
}

.login-remember__checkbox:checked+.login-remember__custom {
    color: var(--hd-white);

    border-color: var(--hd-blue-500);

    background: var(--hd-blue-500);

    box-shadow:
        0 5px 13px rgba(10, 174, 232, 0.23);
}

.login-remember__checkbox:focus-visible+.login-remember__custom {
    box-shadow:
        0 0 0 4px rgba(10, 174, 232, 0.13);
}


/* =========================================================
   ALERTA
========================================================= */

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 13px 14px;

    color: var(--hd-danger-700);
    background: var(--hd-danger-50);

    font-size: 13px;
    line-height: 1.5;

    border: 1px solid var(--hd-danger-200);
    border-radius: 12px;
}

.login-alert__icon {
    width: 18px;
    height: 18px;

    flex: 0 0 18px;

    margin-top: 1px;
}

.login-alert__icon svg {
    width: 18px;
    height: 18px;
}


/* =========================================================
   BOTÃO
========================================================= */

.login-submit {
    width: 100%;
    min-height: 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    margin-top: 2px;
    padding: 15px 24px;

    color: var(--hd-white);

    font-size: 15px;
    font-weight: 700;

    border-radius: 15px;

    background:
        linear-gradient(135deg,
            var(--hd-blue-400) 0%,
            var(--hd-blue-500) 45%,
            var(--hd-blue-700) 100%);

    box-shadow: var(--hd-shadow-button);

    cursor: pointer;

    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        filter 180ms ease;
}

.login-submit:hover {
    transform: translateY(-2px);

    filter: brightness(1.035);

    box-shadow:
        0 23px 42px rgba(0, 145, 207, 0.3);
}

.login-submit:active {
    transform: translateY(0);

    box-shadow:
        0 12px 25px rgba(0, 145, 207, 0.23);
}

.login-submit:focus-visible {
    outline: 4px solid rgba(10, 174, 232, 0.18);
    outline-offset: 3px;
}

.login-submit__icon {
    width: 20px;
    height: 20px;

    transition:
        transform 180ms ease;
}

.login-submit:hover .login-submit__icon {
    transform: translateX(4px);
}


/* =========================================================
   RECUPERAÇÃO E RODAPÉ
========================================================= */

.login-recovery {
    margin-top: 26px;
    padding-top: 22px;

    text-align: center;

    border-top: 1px solid var(--hd-slate-100);
}

.login-recovery p {
    margin: 0;

    color: var(--hd-slate-500);

    font-size: 14px;
}

.login-recovery a {
    margin-left: 4px;

    color: var(--hd-blue-600);

    font-weight: 700;
    text-decoration: none;

    transition:
        color 160ms ease;
}

.login-recovery a:hover {
    color: var(--hd-blue-700);

    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    margin-top: 24px;

    color: var(--hd-slate-400);

    font-size: 12px;
}

.login-form-footer__dot {
    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: var(--hd-slate-300);
}


/* =========================================================
   ANIMAÇÕES
========================================================= */

@keyframes loginCardEntrance {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.992);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes loginLogoEntrance {
    from {
        opacity: 0;
        transform: translateX(-14px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes loginFormEntrance {
    from {
        opacity: 0;
        transform: translateY(13px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   RESPONSIVIDADE
========================================================= */

@media (max-width: 1120px) {
    .login-card {
        grid-template-columns: minmax(0, 1fr) minmax(430px, 0.9fr);
    }

    .login-brand {
        padding:
            54px 50px 48px;
    }

    .login-form-panel {
        padding:
            58px 48px;
    }

    .login-brand__title {
        font-size: 43px;
    }

    .login-modules {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .login-page {
        padding: 18px;
    }

    .login-card {
        width: min(620px, 100%);
        min-height: auto;

        display: block;
    }

    .login-brand {
        display: none;
    }

    .login-form-panel {
        min-height: calc(100vh - 36px);

        padding:
            54px 48px;
    }

    .login-mobile-brand {
        display: block;
    }
}

@media (max-width: 560px) {
    .login-page {
        display: block;

        padding: 0;
    }

    .login-card {
        width: 100%;
        min-height: 100vh;

        border: 0;
        border-radius: 0;

        box-shadow: none;
    }

    .login-form-panel {
        min-height: 100vh;

        align-items: flex-start;

        padding:
            38px 24px 32px;
    }

    .login-mobile-brand {
        margin-bottom: 44px;
    }

    .login-mobile-brand__logo {
        height: 50px;
        max-width: 230px;
    }

    .login-form-header {
        margin-bottom: 32px;
    }

    .login-form-header__title {
        font-size: 34px;
    }

    .login-form-header__description {
        font-size: 15px;
    }

    .login-field__input {
        height: 56px;
    }

    .login-submit {
        min-height: 56px;
    }

    .login-form-footer {
        margin-top: 34px;
    }
}

@media (max-width: 370px) {
    .login-form-panel {
        padding-right: 18px;
        padding-left: 18px;
    }

    .login-form-header__title {
        font-size: 31px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}


@media (min-width: 901px) and (max-height: 820px) {
    .login-card {
        height: calc(100vh - 24px);
        max-height: 700px;
    }

    .login-brand {
        padding: 30px 50px 28px;
    }

    .login-brand__logo {
        height: 56px;
    }

    .login-brand__content {
        padding: 20px 0 16px;
    }

    .login-brand__eyebrow {
        margin-bottom: 18px;
        padding: 8px 14px;
    }

    .login-brand__title {
        font-size: 38px;
    }

    .login-brand__description {
        margin-top: 14px;
        font-size: 14px;
    }

    .login-modules {
        margin-top: 18px;
        gap: 7px;
    }

    .login-module {
        min-height: 42px;
        padding: 7px 11px;
        font-size: 13px;
    }

    .login-module__icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .login-form-panel {
        padding: 30px 58px;
    }

    .login-form-header {
        margin-bottom: 23px;
    }

    .login-form-header__title {
        font-size: 37px;
    }

    .login-form-header__description {
        margin-top: 8px;
    }

    .login-form {
        gap: 14px;
    }

    .login-field__input {
        height: 52px;
    }

    .login-submit {
        min-height: 52px;
    }

    .login-recovery {
        margin-top: 22px;
        padding-top: 19px;
    }

    .login-form-footer {
        margin-top: 18px;
    }
}