@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("fonts/poppins-300-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/poppins-400-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/poppins-600-latin.woff2") format("woff2");
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    color: #525c65;
    font-family: "Poppins", sans-serif;
    font-weight: 300;
}

.login-page {
    min-height: 100vh;
    background-color: #263238;
    background-image: url("../images/login.jpg");
    background-image: image-set(url("../images/login.webp") type("image/webp"), url("../images/login.jpg") type("image/jpeg"));
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    display: flex;
    justify-content: flex-end;
}

.login-card {
    width: 400px;
    min-height: 100vh;
    padding: 54px 42px 38px;
    background: #fff;
    box-shadow: 0 0 36px rgba(0, 0, 0, .16);
    display: flex;
    align-items: center;
}

.login-form {
    width: 100%;
}

.login-brand {
    margin: 0 0 48px;
    text-align: center;
}

.login-brand-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 7px;
    fill: none;
    stroke: #525c65;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.login-brand h1 {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 0;
    font-size: 19px;
    font-weight: 300;
    line-height: 1.4;
}

.login-brand-name {
    color: #525c65;
    font-weight: 600;
}

.login-brand-system {
    color: #afb3b8;
    font-weight: 200;
}

.login-field {
    margin: 0 0 22px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.login-input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 10px 2px;
    color: #525c65;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #d5d8da;
    border-radius: 0;
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .15s ease;
}

.login-input::placeholder {
    color: #92999f;
    opacity: 1;
}

.login-input:focus {
    border-bottom: 2px solid #26c6da;
}

.login-input:focus-visible {
    outline: 2px solid rgba(38, 198, 218, .25);
    outline-offset: 3px;
}

.field-error {
    display: block;
    min-height: 0;
    margin-top: 5px;
    color: #b42318;
    font-size: 13px;
}

.field-error:empty {
    display: none;
}

.login-errors {
    margin: 0 0 15px;
    padding: 0;
    color: #b42318;
    font-size: 13px;
    line-height: 1.45;
    list-style: none;
    text-align: center;
}

.login-errors:empty {
    display: none;
}

.login-errors li + li {
    margin-top: 4px;
}

.login-button {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    color: #fff;
    background: #26c6da;
    border: 1px solid #26c6da;
    border-radius: 3px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: background-color .15s ease, border-color .15s ease;
}

.login-button:hover,
.login-button:focus-visible {
    background: #1eafc1;
    border-color: #1eafc1;
}

.login-button:focus-visible {
    outline: 3px solid rgba(38, 198, 218, .35);
    outline-offset: 3px;
}

.login-button:disabled {
    cursor: wait;
    opacity: .8;
}

.login-spinner {
    display: none;
    width: 17px;
    height: 17px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin .7s linear infinite;
}

.login-button[aria-busy="true"] .login-spinner {
    display: inline-block;
}

@keyframes login-spin {
    to { transform: rotate(360deg); }
}

.login-page--branded {
    --login-ink: #202b4a;
    --login-ink-hover: #33436b;
    --login-accent: #d7aa42;
    --login-surface: #fbf9f5;
    --login-focus: rgba(215, 170, 66, .26);
    min-height: 100vh;
    background: var(--login-ink);
    background-image: none;
}

.login-page--dental {
    --login-ink: #343752;
    --login-ink-hover: #4b4f72;
    --login-accent: #d8b544;
    --login-surface: #fbfaf6;
}

.login-page--nair {
    --login-ink: #242127;
    --login-ink-hover: #3b333d;
    --login-accent: #c88ca7;
    --login-surface: #fbf8f9;
    --login-focus: rgba(200, 140, 167, .28);
}

.login-visual {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 2%, rgba(245, 225, 180, .2), transparent 26%),
        radial-gradient(circle at 96% 100%, rgba(239, 208, 145, .28), transparent 23%),
        linear-gradient(135deg, #293452 0%, #1c2849 56%, #202a49 100%);
}

.login-page--dental .login-visual {
    background:
        radial-gradient(circle at 4% 2%, rgba(247, 227, 184, .19), transparent 27%),
        radial-gradient(circle at 90% 96%, rgba(221, 181, 95, .22), transparent 30%),
        linear-gradient(135deg, #383b5b 0%, #282d4d 58%, #323650 100%);
}

.login-page--nair .login-visual {
    background:
        radial-gradient(circle at 0 0, rgba(221, 170, 192, .17), transparent 31%),
        radial-gradient(circle at 96% 98%, rgba(185, 119, 149, .21), transparent 28%),
        linear-gradient(135deg, #302b33 0%, #1c1b20 57%, #29232c 100%);
}

.login-visual-ribbon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.login-visual-brand {
    position: absolute;
    left: clamp(36px, 6vw, 105px);
    bottom: clamp(36px, 9vh, 100px);
    color: #fff;
    line-height: 1;
}

.login-visual-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(44px, 5.5vw, 88px);
    font-weight: 400;
    letter-spacing: .12em;
}

.login-visual-name span {
    color: var(--login-accent);
}

.login-page--dental .login-visual-name,
.login-page--nair .login-visual-name {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 500;
    letter-spacing: .09em;
}

.login-page--nair .login-visual-name {
    font-size: clamp(34px, 4.2vw, 70px);
}

.login-visual-subtitle {
    margin: 8px 0 0 18%;
    font-size: clamp(10px, 1.1vw, 17px);
    font-weight: 400;
    letter-spacing: .34em;
}

.login-page--branded .login-card {
    z-index: 1;
    flex: 0 0 clamp(420px, 30%, 540px);
    width: clamp(420px, 30%, 540px);
    padding: 64px clamp(38px, 3.2vw, 66px);
    background: var(--login-surface);
    box-shadow: -14px 0 36px rgba(15, 24, 42, .08);
}

.login-page--branded .login-brand {
    margin-bottom: clamp(62px, 10vh, 120px);
}

.login-page--branded .login-brand img {
    display: block;
    width: min(100%, 290px);
    height: auto;
    margin: auto;
}

.login-heading {
    margin: 0 0 44px;
    color: var(--login-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 2.4vw, 40px);
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
}

.login-page--branded .login-field {
    margin-bottom: 26px;
}

.login-label {
    display: block;
    margin-bottom: 7px;
    color: #697286;
    font-size: 14px;
    font-weight: 400;
}

.login-page--branded .login-input {
    height: 54px;
    padding: 12px 16px;
    color: var(--login-ink);
    background: transparent;
    border: 1px solid #d1d5dd;
    border-radius: 5px;
}

.login-page--branded .login-input:focus {
    border: 2px solid var(--login-accent);
}

.login-page--branded .login-input:focus-visible {
    outline: 3px solid var(--login-focus);
}

.login-page--branded .login-button {
    min-height: 56px;
    margin-top: 28px;
    background: var(--login-ink);
    border-color: var(--login-ink);
    border-radius: 5px;
    letter-spacing: .18em;
}

.login-page--branded .login-button:hover,
.login-page--branded .login-button:focus-visible {
    background: var(--login-ink-hover);
    border-color: var(--login-ink-hover);
}

.login-page--branded .login-button:focus-visible {
    outline: 3px solid var(--login-focus);
}

.login-environment {
    width: fit-content;
    margin: 38px auto 0;
    padding: 7px 18px;
    color: #9a712b;
    border: 1px solid #c99e50;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .14em;
    text-align: center;
}

@media (max-width: 900px) {
    .login-page--branded .login-card {
        flex-basis: 400px;
        width: 400px;
        padding: 48px 34px;
    }

    .login-page--branded .login-visual-name {
        font-size: 42px;
    }
}

@media (max-width: 767px) {
    .login-page {
        justify-content: center;
        padding: 0 16px;
        background-position: center;
    }

    .login-card {
        width: min(100%, 400px);
        min-height: auto;
        align-self: center;
        padding: 42px 30px;
        border-radius: 3px;
    }

    .login-page--branded {
        align-items: stretch;
        padding: 0;
        background: var(--login-surface);
    }

    .login-page--branded .login-visual {
        display: none;
    }

    .login-page--branded .login-card {
        flex: 1 1 auto;
        width: 100%;
        max-width: 480px;
        min-height: 100vh;
        margin: auto;
        padding: 48px 30px;
        border-radius: 0;
        box-shadow: none;
    }

    .login-page--branded .login-brand {
        margin-bottom: 70px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
