:root,
:root.light,
:root[data-theme] {
    --primary: #6028c7;
    --primary-foreground: #ffffff;
    --ring: #7040cd;
    --input: #afa7bc;
}

#root div[class~="min-h-[90vh]"] {
    --background: #ffffff;
    --foreground: #211b29;
    --muted-foreground: #61596c;
    --primary: #6028c7;
    --primary-foreground: #ffffff;
    --input: #afa7bc;
    --ring: #7040cd;
    min-height: calc(100svh - 4.5rem);
    padding-block: 1.5rem 3.5rem;
    background: var(--background);
    color: var(--foreground);
    font-family: Arial, Helvetica, sans-serif;
}

#root div[class~="min-h-[90vh]"] > .mx-auto {
    padding-inline: clamp(1.25rem, 5vw, 2rem);
}

#root div[class~="min-h-[90vh]"] img[src$="/static/media/logo.png"] {
    width: clamp(10rem, 44vw, 13rem);
    height: auto;
    margin: 0.25rem auto 1.75rem;
}

#root div[class~="min-h-[90vh]"] h5 {
    margin-bottom: 0.85rem;
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: normal;
}

#reset-password-step2-stage h5 { font-size: clamp(1.6rem, 3vw, 2rem); }
#form-reset-password label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1rem;
    line-height: 1.45;
    text-align: start;
}
#form-reset-password input { min-height: 3rem; font-size: 1rem; }
#form-reset-password button[id$="-button"] { min-height: 2.75rem; }
#form-reset-password #cancel-button { color: #5222ab; background: #f0eafa; }

#second-factor-stage .state-not-registered {
    height: auto;
    margin: 0.9rem 0 1.15rem;
}
#second-factor-stage .state-not-registered > div {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.55rem;
}
#second-factor-stage .state-not-registered p {
    color: #4a4155;
    font-size: 1rem;
    line-height: 1.45;
}
#second-factor-stage .state-not-registered .mb-4 { margin: 0 0 0.2rem; }
#second-factor-stage .state-not-registered .information-icon {
    width: 2rem;
    height: 2rem;
    color: #6028c7;
}
#second-factor-stage .state-not-registered ~ #register-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3rem;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.625rem;
    background: #6028c7;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}
#second-factor-stage .state-not-registered ~ #register-link:hover { background: #4b1f9f; }
#second-factor-stage .w-full:has(> #methods-button) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0;
}
#second-factor-stage :is(#logout-button, #methods-button, #selection-link),
#second-factor-stage .state-method ~ #register-link,
#second-factor-stage .state-already-authenticated ~ #register-link {
    min-height: 2.75rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid #b6adbf;
    border-radius: 0.5rem;
    background: white;
    color: #493f55;
    font-size: 0.94rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
}
#second-factor-stage :is(#logout-button, #methods-button, #selection-link):hover,
#second-factor-stage .state-method ~ #register-link:hover { background: #f5f1fb; }
#second-factor-stage :is(#logout-button, #methods-button, #register-link, #selection-link):focus-visible {
    outline: 3px solid #4d219b;
    outline-offset: 3px;
}
#second-factor-stage .my-4:has(.state-not-registered) {
    width: 100%;
    min-width: 0;
    padding: clamp(1.1rem, 3vw, 2rem);
}

#form-login input[data-slot="floating-input"] { border-radius: 0.625rem; }
#form-login button[type="submit"],
#form-login button[id*="passkey"] { min-height: 3rem; border-radius: 0.625rem; }
#form-login button[type="submit"] { background: var(--primary); color: white; font-weight: 700; }
#form-login button[type="submit"]:hover { background: #4b1f9f; }

#root a[href="https://www.authelia.com"],
#root a[href="https://www.authelia.com/"],
#root [data-kinorion-credit] { display: none !important; }

@media (min-width: 860px) {
    #root div[class~="min-h-[90vh]"] {
        margin-inline-start: 48%;
    }

    #root div[class~="min-h-[90vh]"]::before {
        content: "";
        position: fixed;
        inset: 0 52% 0 0;
        background:
            url("/kinorion/lockup-white.png") center / min(74%, 35rem) auto no-repeat,
            linear-gradient(52deg, #5d10d7 0%, #6829d6 51%, #8547c7 100%);
        pointer-events: none;
    }

    #root div[class~="min-h-[90vh]"] .p-2:has(> img[src$="/static/media/logo.png"]) {
        display: none;
    }
}

@media (forced-colors: active) {
    #root div[class~="min-h-[90vh]"] { margin-inline-start: 0; }
    #root div[class~="min-h-[90vh]"]::before { display: none; }
    #root div[class~="min-h-[90vh]"] .p-2:has(> img[src$="/static/media/logo.png"]) { display: block; }
}
