:root {
    --login-primary: #f54319;
    --login-text: #1d2129;
    --login-secondary: #4e5969;
    --login-placeholder: #86909c;
    --login-control-bg: #f2f3f5;
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    background: linear-gradient(-85.3668deg, #e6cdbe 10.52%, #e0e0e6 96.463%);
    color: var(--login-text);
    font-family: "QxzhPingFang", -apple-system, BlinkMacSystemFont, system-ui, "Roboto", "Noto Sans CJK SC", "Noto Sans SC",
                 "PingFang SC", "Microsoft YaHei", sans-serif;
    scrollbar-width: none;
}

body::-webkit-scrollbar { display: none; }
button, input { margin: 0; font: inherit; outline: none; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.login-page { position: relative; width: 100%; height: 100vh; min-height: 775px; overflow: hidden;
    background: white;}
.login-hero { position: absolute; top: 0; left: 0; width: 100%; overflow: hidden; pointer-events: none; }
.login-hero-image { display: block; width: 100%; height: auto; max-width: none; }
.login-card {
    --login-submit-min-top: 358px;
    position: absolute;
    top: 226px;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 10px 28px rgba(122, 139, 180, .14);

    /*background-color: rgba(255,255,255,0.55);*/
    background: rgba(255, 255, 255, .55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.login-tabs { position: absolute; top: 20px; left: 0; z-index: 2; width: 100%; height: 36px; }
.login-tab {
    position: absolute;
    top: 0;
    width: 72px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--login-placeholder);
    font-size: 15px;
    line-height: 22px;
    text-align: center;
    transform: translateX(-50%);
}

#login-tab-sms { left: calc(50% - 74px); }
#login-tab-password { left: calc(50% + 74px); }
.login-tab.active { color: var(--login-primary); font-weight: 700; }
.login-tab.active::after {
    position: absolute;
    top: 28px;
    left: 50%;
    width: 25px;
    height: 6px;
    background: url("/assets/images/login/tab-mark.svg") center / 25px 6px no-repeat;
    content: "";
    transform: translateX(-50%);
}

.login-panel { position: absolute; inset: 0; z-index: 1; }
.login-panel[hidden] { display: none; }
.login-field {
    position: absolute;
    right: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    height: 46px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--login-control-bg);
}

.phone-field { top: 72px; }
.password-field { top: 136px; }
.sms-code-field { top: 136px; }
.country-code {
    display: flex;
    flex: 0 0 80px;
    align-items: center;
    height: 28px;
    padding-left: 16px;
    border-right: 1px solid #e5e6eb;
    font-size: 14px;
    font-weight: 500;
}

.country-chevron { display: block; width: 14px; height: 14px; margin-left: 2px; }
.login-input {
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border: 0;
    background: transparent;
    color: var(--login-text);
    font-size: 14px;
}

.phone-field .login-input { flex: 1 1 auto; padding-left: 18px; }
.password-field .login-input { width: 100%; padding-right: 50px; }
.sms-code-field .login-input { width: 100%; padding-right: 116px; }
.login-input::placeholder { color: var(--login-placeholder); opacity: 1; }
.sms-code-button {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 0 1px rgba(0, 0, 0, .08);
    color: var(--login-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
}

.sms-code-button:disabled { cursor: default; color: var(--login-placeholder); }
.password-visibility {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
}

.password-visibility img { display: block; width: 22px; height: 22px; }
.login-actions {
    position: absolute;
    top: 194px;
    right: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 24px;
}

.login-checkbox-label { display: inline-flex; align-items: center; gap: 8px; height: 24px; color: var(--login-secondary); font-size: 14px; cursor: pointer; }
.login-checkbox-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.login-checkbox-box {
    display: flex;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid #c9cdd4;
    border-radius: 50%;
    background: #fff;
}

.login-checkbox-box img { display: block; width: 14px; height: 14px; opacity: 0; }
.login-checkbox-input:checked + .login-checkbox-box { border-color: var(--login-primary); background: var(--login-primary); }
.login-checkbox-input:checked + .login-checkbox-box img { opacity: 1; }
.forgot-password {
    width: 80px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--login-primary);
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

.login-captcha {
    position: absolute;
    top: 236px;
    right: 24px;
    left: 24px;
    height: 46px;
    padding: 3px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--login-control-bg);
}

#nc-password, #nc-sms, .nc-container, .nc-container [id$="_wrapper"], .nc-container .nc_scale { width: 100% !important; height: 40px !important; }
#nc-password, #nc-sms { position: relative; }
.nc-container { position: static !important; font-family: inherit !important; }
.nc-container .nc_scale { overflow: hidden !important; border-radius: 6px !important; background: transparent !important; }
.nc-container .nc_scale .btn_slide, .nc-container .nc_scale .btn_ok {
    top: 0 !important;
    width: 42px !important;
    height: 40px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #fff url("/assets/images/login/slider-arrow.svg") center / 20px 20px no-repeat !important;
    box-shadow: 0 0 2px rgba(0, 0, 0, .08) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 40px !important;
}

.nc-container .nc_scale .scale_text, .nc-container .nc_scale .scale_text2 {
    height: 40px !important;
    color: var(--login-secondary) !important;
    font-size: 14px !important;
    line-height: 40px !important;
}

.nc-container .nc_scale .nc_bg { height: 40px !important; border-radius: 6px 0 0 6px !important; }
#nc-password.verified .nc_bg, #nc-sms.verified .nc_bg { width: calc(100% - 21px) !important; }
#nc-password.verified .scale_text, #nc-password.verified .scale_text2,
#nc-sms.verified .scale_text, #nc-sms.verified .scale_text2 { visibility: hidden !important; }
#nc-password.verified::after, #nc-sms.verified::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--login-secondary);
    font-size: 14px;
    line-height: 20px;
    content: "验证通过";
    pointer-events: none;
}

#nc-password.verified .btn_ok, #nc-sms.verified .btn_ok { z-index: 3 !important; }
.captcha-loading, .captcha-error { display: flex; align-items: center; justify-content: center; width: 100%; height: 40px; color: var(--login-secondary); font-size: 14px; }
.captcha-error { color: var(--login-primary); font-size: 12px; }
.login-agreement { position: absolute; top: 294px; left: 24px; display: flex; align-items: center; height: 20px; color: var(--login-secondary); white-space: nowrap; }
.sms-captcha { top: 200px; }
.sms-agreement { top: 258px; }
.agreement-label { gap: 10px; height: 20px; font-size: 12px; }
.protocol-link { margin-left: 8px; padding: 0; border: 0; background: transparent; color: var(--login-primary); font-size: 12px; font-weight: 500; }

.login-submit {
    position: absolute;
    top: auto;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    right: 24px;
    left: 24px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: var(--login-primary);
    box-shadow: 0 6px 6px rgba(245, 67, 25, .35);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.login-submit:disabled { cursor: default; opacity: .72; }
.register-entry {
    position: absolute;
    top: auto;
    bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 24px;
    color: var(--login-secondary);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transform: translateX(-50%);
}

.register-entry strong { color: var(--login-primary); font-weight: 700; }
.protocol-mask { position: fixed; inset: 0; z-index: 10000; display: none; background: rgba(0, 0, 0, .45); }
.protocol-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10001;
    display: none;
    width: calc(100% - 48px);
    max-width: 336px;
    max-height: 70vh;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    transform: translate(-50%, -50%);
}

.protocol-modal-header { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 18px; border-bottom: 1px solid #e5e6eb; font-size: 16px; font-weight: 700; }
.protocol-modal-close { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; color: var(--login-placeholder); font-size: 24px; }
.protocol-modal-body { max-height: calc(70vh - 52px); padding: 16px 18px 20px; overflow-y: auto; color: var(--login-secondary); font-size: 13px; line-height: 1.7; }
.protocol-modal-body p { margin: 0 0 10px; }
.protocol-modal-body p:last-child { margin-bottom: 0; }
