/* ============================================================================
   全局弹窗登录框样式（ulp- 前缀，避免与站点其它样式冲突）
   商业化 / 科技简约风：品牌渐变 #165DFF → #4f46e5 → #36CFC9
   所有样式均限定在弹窗根节点 .ulp-overlay 内
   ============================================================================ */

/* ===== 遮罩层（深色半透明 + 模糊） ===== */
.ulp-overlay {
    position: fixed;
    inset: 0;
    z-index: 52000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: radial-gradient(120% 120% at 50% 0%, rgba(14, 35, 80, 0.55) 0%, rgba(3, 10, 35, 0.74) 100%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    /* 入场动效：遮罩淡入 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ulp-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===== 卡片 ===== */
.ulp-overlay .ulp-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(3, 10, 35, 0.45);
    padding: 36px 34px 30px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    /* 入场动效：卡片淡入上移 */
    opacity: 0;
    transform: translateY(26px) scale(0.98);
    transition: opacity 0.34s ease, transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ulp-overlay.is-visible .ulp-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ===== 关闭按钮 ===== */
.ulp-overlay .ulp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.ulp-overlay .ulp-close:hover {
    background: #f1f5f9;
    color: #334155;
}

/* ===== 头部：品牌图标 / 标题 / 副标题 ===== */
.ulp-overlay .ulp-head {
    text-align: center;
    margin-bottom: 20px;
}

.ulp-overlay .ulp-brand {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #165DFF 0%, #4f46e5 55%, #36CFC9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    box-shadow: 0 10px 26px rgba(22, 93, 255, 0.35);
}

.ulp-overlay .ulp-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.ulp-overlay .ulp-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

/* ===== Tab 切换（下划线平滑过渡） ===== */
.ulp-overlay .ulp-tabs {
    position: relative;
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.ulp-overlay .ulp-tab {
    position: relative;
    flex: 1;
    text-align: center;
    padding: 10px 0 12px;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    margin-bottom: -1px;
    transition: color 0.25s ease;
}

.ulp-overlay .ulp-tab::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 56%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #165DFF 0%, #36CFC9 100%);
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ulp-overlay .ulp-tab:hover {
    color: #165DFF;
}

.ulp-overlay .ulp-tab.is-active {
    color: #165DFF;
}

.ulp-overlay .ulp-tab.is-active::after {
    transform: translateX(-50%) scaleX(1);
}

.ulp-overlay .ulp-tab.is-error {
    color: #ef4444;
}

/* ===== 说明提示条 ===== */
.ulp-overlay .ulp-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: linear-gradient(135deg, rgba(22, 93, 255, 0.09) 0%, rgba(54, 207, 201, 0.09) 100%);
    border: 1px solid rgba(22, 93, 255, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 20px;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.6;
}

.ulp-overlay .ulp-notice i {
    margin-top: 2px;
    color: #165DFF;
    font-size: 14px;
}

/* ===== 表单字段 ===== */
.ulp-overlay .ulp-field {
    margin-bottom: 16px;
}

.ulp-overlay .ulp-field .el-input__wrapper {
    border-radius: 10px;
}

.ulp-overlay .ulp-phone-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ulp-overlay .ulp-phone-row .el-input {
    flex: 1;
}

/* ===== 错误提示 ===== */
.ulp-overlay .ulp-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.ulp-overlay .ulp-error i {
    margin-top: 2px;
    color: #ef4444;
    font-size: 14px;
}

/* ===== 主按钮 ===== */
.ulp-overlay .ulp-btn {
    width: 100%;
    height: 46px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #165DFF 0%, #4f46e5 100%);
    box-shadow: 0 8px 20px rgba(22, 93, 255, 0.28);
    margin-top: 4px;
}

.ulp-overlay .ulp-btn:hover {
    background: linear-gradient(135deg, #0e52e6 0%, #4338ca 100%);
    box-shadow: 0 10px 26px rgba(22, 93, 255, 0.38);
}

.ulp-overlay .ulp-btn.is-disabled,
.ulp-overlay .ulp-btn.is-disabled:hover {
    background: linear-gradient(135deg, #a5b4fc 0%, #a5b4fc 100%);
    box-shadow: none;
}

/* ===== 验证码 / 刷新按钮（原生 button） ===== */
.ulp-overlay .ulp-code-btn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #165DFF 0%, #4f46e5 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.ulp-overlay .ulp-code-btn:hover {
    background: linear-gradient(135deg, #0e52e6 0%, #4338ca 100%);
}

.ulp-overlay .ulp-code-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== 分栏 / OAuth 授权登录 ===== */
.ulp-overlay .ulp-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0 16px;
    color: #94a3b8;
    font-size: 12px;
    white-space: nowrap;
}

.ulp-overlay .ulp-divider::before,
.ulp-overlay .ulp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.ulp-overlay .ulp-oauth-tip {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 14px;
}

.ulp-overlay .ulp-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 46px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #d6dbe4;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.ulp-overlay .ulp-oauth-btn:hover {
    border-color: #165DFF;
    color: #165DFF;
    box-shadow: 0 6px 18px rgba(22, 93, 255, 0.14);
    transform: translateY(-1px);
}

.ulp-overlay .ulp-oauth-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: linear-gradient(135deg, #165DFF 0%, #36CFC9 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* ===== 微信扫码 ===== */
.ulp-overlay .ulp-wechat-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px 0 4px;
}

.ulp-overlay .ulp-wechat-qr {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.ulp-overlay .ulp-wechat-qr img,
.ulp-overlay .ulp-wechat-qr canvas {
    display: block;
}

.ulp-overlay .ulp-wechat-qr-tip {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.ulp-overlay .ulp-wechat-refresh {
    width: 100%;
    height: 44px;
    margin-top: 12px;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .ulp-overlay {
        padding: 24px 16px;
    }

    .ulp-overlay .ulp-card {
        max-width: 440px;
        padding: 30px 24px 26px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .ulp-overlay {
        padding: 16px 12px;
    }

    .ulp-overlay .ulp-card {
        padding: 26px 18px 22px;
        border-radius: 14px;
    }

    .ulp-overlay .ulp-title {
        font-size: 19px;
    }

    .ulp-overlay .ulp-tab {
        font-size: 14px;
    }

    .ulp-overlay .ulp-btn,
    .ulp-overlay .ulp-oauth-btn {
        height: 48px;
    }
}
