/* Chan auth pages: login, register, gate, auth_phrase */

.site-auth-page .page {
    min-height: 100vh;
}

.site-auth-page .container-login100 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 2rem);
    padding: 1.5rem 1rem 2rem;
}

.site-auth-shell {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding-top: 4.75rem;
}

.site-auth-shell--wide {
    max-width: 560px;
}

.site-auth-brand--perched {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 5;
    transform: translateX(-50%);
    display: block;
    line-height: 0;
    text-decoration: none;
}

.site-auth-logo {
    height: 5.75rem;
    width: auto;
    max-width: none;
    display: block;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.14));
    pointer-events: auto;
}

.site-auth-wrap.wrap-login100 {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    padding: 2.25rem 2.25rem 2rem;
    margin: 0;
    margin-top: -0.35rem;
}

.site-auth-wrap--wide.wrap-login100 {
    max-width: none;
}

.site-auth-card-body {
    padding: 0.75rem 0 0 !important;
}

.site-auth-page .login100-form-title {
    font-size: 1.35rem;
    font-weight: 700;
    padding-top: 0.35rem;
    padding-bottom: 1.25rem;
    color: #212529;
}

body.dark-mode.site-auth-page .login100-form-title {
    color: var(--chan-champagne, #e6dcc6);
}

body.dark-mode.site-auth-page .site-auth-captcha-img {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(212, 175, 55, 0.15);
}

.site-auth-form .form-label {
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.site-auth-captcha-img {
    width: 100%;
    max-height: 52px;
    object-fit: contain;
    border: 1px solid var(--default-border, #e9edf4);
    border-radius: 0.375rem;
    cursor: pointer;
    background: #fff;
}

.site-gate-note {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.site-gate-note ul {
    margin: 0.5rem 0 0 1.1rem;
    padding: 0;
}

.site-auth-challenge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.site-auth-challenge-input {
    width: 4.25rem;
    text-align: center;
}

/* Register password strength */
.password-rules {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--default-background, #f7f8f9);
    border: 1px solid var(--default-border, #e9edf4);
    border-radius: 0.375rem;
}

.password-rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.password-strength-weak { color: #dc3545; font-weight: 700; }
.password-strength-medium { color: #ffc107; font-weight: 700; }
.password-strength-strong { color: var(--primary-bg-color, #b8860b); font-weight: 700; }

.password-rule-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.8125rem;
}

.rule-valid { color: var(--primary-bg-color, #b8860b); }
.rule-invalid { color: #dc3545; }

.site-auth-page .error-message {
    display: block;
    color: #dc3545;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.site-auth-password-wrap {
    position: relative;
}

.site-auth-password-wrap .site-auth-pw-toggle {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    padding: 0.375rem 0.55rem;
    line-height: 1;
    border-radius: 0.35rem;
}

.site-auth-page .input-group > .site-auth-pw-toggle {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.site-auth-page .input-group > .site-auth-pw-toggle i {
    font-size: 1.05rem;
    line-height: 1;
}

.site-auth-password-wrap .form-control {
    padding-right: 2.75rem;
}

@media (max-width: 575.98px) {
    .site-auth-shell {
        padding-top: 4rem;
    }

    .site-auth-logo {
        height: 4.75rem;
    }

    .site-auth-wrap.wrap-login100 {
        padding: 1.75rem 1.25rem 1.5rem;
    }
}
