﻿html, body {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

    body.auth-bg {
        position: relative;
        font-feature-settings: "liga" 1, "calt" 1;
        background: radial-gradient(1200px 600px at 50% 20%, rgba(240, 244, 250, 0.7) 0%, transparent 60%), linear-gradient(180deg, rgba(247, 249, 252, 0.8) 0%, rgba(238, 242, 247, 0.9) 100%);
    }

        body.auth-bg::before {
            content: "";
            position: fixed;
            inset: 0;
            background: url('/images/background.png') center / cover no-repeat fixed;
            filter: blur(2px);
            transform: scale(1.03);
            z-index: 0;
            pointer-events: none;
        }

.site-shell, .auth-brand-heading, .footer-fixed {
    position: relative;
    z-index: 1;
}

.site-shell {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    margin: 0 !important;
}

    .site-shell > .container {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

.logo-fixed {
    position: fixed;
    left: 0;
    top: 10px;
    line-height: 0;
    z-index: 1030;
    padding: .75rem;
}

.auth-brand-heading {
    width: min(92vw, 1000px);
    text-align: center;
    font-weight: 600;
    letter-spacing: .5px;
    line-height: 1.1;
    font-size: clamp(22px, 3.5vw, 36px);
    color: #0f1720;
    text-shadow: 0 1px 0 rgba(255,255,255,.6);
    margin-bottom: .25rem;
}

#login-form #login-submit {
    margin-top: auto;
}

main[role="main"] {
    padding-bottom: 88px;
}

.footer-fixed {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1020;
    background: linear-gradient(to top,rgba(255,255,255,.96),rgba(255,255,255,.92));
    border-top: 1px solid rgba(0,0,0,.08);
    color: #2e3338;
    padding: .5rem .75rem;
}

    .footer-fixed .text-muted {
        color: #2e3338 !important;
    }

.social a {
    color: #2e3338;
    text-decoration: none;
}

    .social a:hover {
        color: #2e3338;
    }

.auth-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(2,8,20,.06), 0 6px 16px rgba(2,8,20,.04);
    background: #fff;
    flex-shrink: 1;
    max-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

.auth-card-container {
    margin-top: 1vh;
    margin-bottom: 1.5vh;
}

.auth-header {
    background: #fff;
    border: 0;
    border-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0.25rem !important;
}

    .auth-header img {
        height: 28px;
        margin-bottom: 0.75rem;
    }

    .auth-header .h3 {
        font-size: 1.35rem;
    }

.auth-body {
    min-height: 300px;
    padding-top: 0.75rem;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-card-short .auth-body {
    min-height: unset;
    padding-top: 1rem;
}

.auth-body > form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.form-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
    margin-bottom: .5rem;
}

#registerForm .form-floating {
    margin-bottom: 0.65rem !important;
}

#registerForm .validation-summary-fixed {
    margin-bottom: 0.65rem !important;
}

.password-wrap {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    padding: .25rem;
    cursor: pointer;
    line-height: 1;
    color: #6c757d;
}

    .password-toggle:focus {
        outline: 2px solid transparent;
    }

.form-control {
    height: 44px;
    font-size: 0.95rem;
}

.btn {
    height: 44px;
    font-size: 0.95rem;
}

    .form-control:focus, .btn:focus {
        box-shadow: 0 0 0 .2rem rgba(13,110,253,.16);
        outline: none;
    }

.field-validation {
    min-height: 16px;
    display: block;
    margin-top: .2rem;
    font-size: .825rem;
}

.link-row a {
    color: #2e3338;
    text-decoration: none;
    font-size: 0.9rem;
}

    .link-row a:hover, .link-row a:focus-visible {
        text-decoration: underline;
        text-underline-offset: 2px;
        text-decoration-thickness: 2px;
        color: #2e3338;
    }

@media (max-height:760px) {
    .form-control {
        height: 42px;
        font-size: 0.9rem;
    }

    .btn {
        height: 42px;
        font-size: 0.9rem;
    }

    .auth-body {
        min-height: 240px;
    }

    .auth-card-short .auth-body {
        min-height: unset;
    }

    main[role="main"] {
        padding-bottom: 68px;
        padding-top: 50px !important;
    }

    .auth-header img {
        height: 26px;
        margin-bottom: 0.5rem;
    }

    .auth-header .h3 {
        font-size: 1.25rem;
    }

    #registerForm .form-floating {
        margin-bottom: .45rem !important;
    }

    .auth-brand-heading {
        font-size: clamp(20px, 3vw, 32px);
        margin-bottom: .15rem;
    }

    .auth-card {
        max-width: 400px;
        max-height: calc(100vh - 160px);
    }
}

:root {
    --footer-h: 52px;
    --auth-top: 76px;
    --title-top: 72px;
}

main[role="main"] {
    --logo-top-safe-height: 90px;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    padding-top: clamp(0.75rem, 2.5vh, var(--logo-top-safe-height)) !important;
    padding-bottom: var(--footer-h) !important;
    height: 100vh !important;
    flex-grow: 1;
    overflow-y: hidden;
    overflow-x: hidden;
}

@media (max-height:760px) {
    :root {
        --footer-h: 48px;
        --auth-top: 88px;
        --title-top: 56px;
    }
}

.auth-status-message {
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.65rem 0.875rem;
    margin-bottom: 0.875rem;
    border: 1px solid transparent;
}

    .auth-status-message.danger {
        color: #842029;
        background-color: #f8d7da;
        border-color: #f5c2c7;
    }

    .auth-status-message.success {
        color: #0f5132;
        background-color: #d1e7dd;
        border-color: #badbcc;
    }

.notice-slot {
    margin-bottom: 6px;
}

.hint-slot {
    min-height: 40px;
    margin-bottom: 6px;
}

.captcha-slot {
    min-height: 85px;
    margin: 6px 0 10px;
}

.validation-summary-fixed {
    margin: 0 0 6px 0;
    padding: 0;
}

    .validation-summary-fixed.validation-summary-errors {
        background-color: #f8d7da;
        border: 1px solid #f5c2c7;
        color: #842029;
        padding: .65rem .75rem;
        border-radius: 10px;
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .validation-summary-fixed.validation-summary-valid {
        display: none;
    }

    .validation-summary-fixed ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .validation-summary-fixed li {
        margin: 0;
        padding: 0;
        line-height: 1.4;
    }

.alert {
    padding: .575rem .7rem;
    border-radius: 10px;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.password-wrap {
    margin-bottom: 0 !important;
}

.auth-body > form > button[type=submit],
.auth-body > form > a.btn {
    margin-top: auto;
}

.auth-card .card-body.auth-body {
    padding: 0.75rem 1.25rem 1rem;
}

.auth-card .card-header.auth-header {
    padding: 1rem 1.25rem 0.25rem !important;
}