﻿/* 对齐前端 template-main /login：只改表单位置，logo/背景按前端固定全屏 */

/* ---------- LeptonX Account 外壳 ---------- */
.lpx-login-area {
    background: linear-gradient(to right, #00002d 50%, #00cccc 50%) !important;
    overflow: hidden;
    position: relative;
    min-height: 100vh;
}

.lpx-login-bg,
.lpx-theme-dim .lpx-login-bg,
.lpx-theme-light .lpx-login-bg,
.lpx-theme-dark .lpx-login-bg {
    background-image: none !important;
    background-color: transparent !important;
}

.login-section-wrapper {
    background: transparent !important;
}

.lpx-login-area > .container,
.lpx-login-area > .container-fluid {
    max-width: none !important;
    width: 100% !important;
    height: 100vh !important;
    padding: 0 !important;
}

.lpx-login-area > .container > .row,
.lpx-login-area > .container-fluid > .row {
    min-height: 100vh !important;
    margin: 0 !important;
}

/* 隐藏 LeptonX 自带品牌/页脚/默认标题（避免出现多余的「登录」） */
.lpx-login-area .lpx-brand-logo,
.lpx-login-area .lpx-logo-container,
.lpx-login-area .lpx-brand-name,
.lpx-login-area .lpx-login-title,
.lpx-login-area .lpx-main-title,
.lpx-login-area .lpx-footbar-container,
.lpx-login-area footer {
    display: none !important;
}

/* 语言选择行靠右，排在欢迎登录之后 */
.lpx-login-area .card-body > .d-flex.justify-content-between {
    justify-content: flex-end !important;
    margin-bottom: 12px !important;
    order: -90;
}

/*
 * 登录表单卡片：右半屏垂直居中 + 透明
 * 注意：不能使用 transform，否则会把内部 position:fixed 的装饰层困在卡片内导致 logo/背景错位
 */
.lpx-login-area .card,
.lpx-login-area .lpx-layout-login {
    position: fixed !important;
    left: calc(75% - 190px) !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 380px !important;
    max-width: 90vw !important;
    height: fit-content !important;
    margin-top: auto !important;
    margin-bottom: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    background: transparent !important;
    background-color: transparent !important;
    --bs-card-bg: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    z-index: 5;
}

.lpx-login-area .card-body {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 欢迎登录置顶（即使脚本未执行也能靠 order 靠前） */
.lpx-login-area .card-body > .login-title {
    order: -100;
    margin-top: 0;
    margin-bottom: 16px;
}

/* 租户选择：确保显示，排在语言选择之后 */
.lpx-login-area .card-body > .wasu-tenant-switch,
.lpx-login-area #wasu-tenant-switch,
.lpx-login-area #AbpTenantSwitchLink,
.lpx-login-area .wasu-tenant-hr {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.lpx-login-area #AbpTenantSwitchLink {
    display: inline-block !important;
}

.lpx-login-area .card-body > .wasu-tenant-switch {
    order: -80;
    width: 100%;
    margin-bottom: 12px;
}

.wasu-tenant-switch .wasu-tenant-hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    margin: 12px 0;
    opacity: 1;
}

.wasu-tenant-switch .wasu-tenant-label {
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.55);
}

.wasu-tenant-switch .wasu-tenant-name {
    font-size: 16px;
    color: #000;
}

/* ---------- 左侧 Logo + 中间装饰图（必须相对视口，不要进卡片 stacking） ---------- */
.wasu-login-chrome {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    transform: none !important;
}

.wasu-login-chrome .bg {
    position: absolute;
    max-height: 100vh;
    width: auto;
    object-fit: contain;
}

.wasu-login-chrome .bg-left-img {
    right: 50%;
    top: 50%;
    transform: translateY(-50%);
    object-position: left center;
}

.wasu-login-chrome .bg-right-img {
    left: 50%;
    top: 50%;
    transform: translateY(-50%);
    object-position: right center;
}

.wasu-login-chrome .login-left {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.wasu-login-chrome .logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wasu-login-chrome .logo-wrapper .logo-text {
    font-size: 32px;
    color: #00cccc;
    margin-top: 20px;
}

.wasu-login-chrome .logo {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ---------- 右侧表单内容 ---------- */
.login-form-wrapper {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.login-title {
    font-size: 36px;
    font-weight: 400;
    color: #000;
    margin-bottom: 20px;
    text-align: left;
}

.login-register {
    font-size: 14px;
    color: #fff;
    margin-bottom: 20px;
    text-align: left;
}

.login-register a {
    color: #000;
    text-decoration: none;
}

.login-register a:hover {
    text-decoration: underline;
}

.login-form {
    width: 100%;
}

.login-form .form-floating > .form-control {
    height: 40px;
    min-height: 40px;
    padding: 0.65rem 15px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
}

.login-form .form-floating > label {
    padding: 0.55rem 15px;
    color: #909399;
}

.login-form .form-floating > .form-control:focus {
    border-color: #00cccc;
    box-shadow: 0 0 0 0.15rem rgba(0, 204, 204, 0.2);
}

.login-form .show-pass-icon {
    top: 11px;
    right: 14px;
}

.login-form .caps-lock-icon {
    top: 11px;
    right: 40px;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.login-options .form-check,
.login-options .mb-3 {
    margin-bottom: 0 !important;
}

.login-options .forgot-password {
    color: #000;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.login-options .forgot-password:hover {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    height: 44px;
    font-size: 16px;
    background-color: #000;
    color: #fff;
    border: 0;
    border-radius: 15px;
    cursor: pointer;
}

.login-button:hover,
.login-button:focus {
    background-color: #222;
    color: #fff;
}

.login-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: #fff;
    font-size: 14px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.55);
}

.login-divider span {
    padding: 0 12px;
    background-color: #00cccc;
    color: #fff;
    border-radius: 2px;
    line-height: 1.6;
}

.other-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    font-size: 16px;
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 15px;
    cursor: pointer;
}

.other-button:hover,
.other-button:focus {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.other-button .icon,
.other-button .icon-img {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 18px;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.lpx-login-area .card .dropdown .btn,
.lpx-login-area .card .btn-light {
    background: rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

@media (max-width: 991.98px) {
    .lpx-login-area {
        background: #00cccc !important;
    }

    .wasu-login-chrome .login-left,
    .wasu-login-chrome .bg-left-img {
        display: none;
    }

    .wasu-login-chrome .bg-right-img {
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 0.35;
    }

    .lpx-login-area .card,
    .lpx-login-area .lpx-layout-login {
        left: 50% !important;
        margin-left: -190px !important;
        width: min(380px, 92vw) !important;
    }

    .login-title {
        font-size: 28px;
    }
}
