/* ===== 登录注册页 - 京东风格 ===== */

.passport-page {
    --primary-color: #1890ff;
    --primary-hover: #096dd9;
    --primary-light: #40a9ff;
    --success-color: #52c41a;
    --danger-color: #f5222d;
    --text-primary: #333;
    --text-regular: #666;
    --text-secondary: #999;
    --border-color: #e8e8e8;
    --bg-light: #f8f9fa;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ed 100%);
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1;
}

/* 登录卡片 */
.passport-box {
    display: flex;
    width: 900px;
    max-width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    box-sizing: border-box;
}

/* 左侧扫码区域 */
.passport-left {
    flex: 1;
    padding: 40px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-login-box {
    text-align: center;
}

.qr-header h4 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 500;
}

.qr-header .text-muted {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.qr-code {
    width: 210px;
    height: 210px;
    margin: 0 auto 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 微信二维码内部iframe居中 */
.qr-code iframe,
.qr-code > div[id^="wx-login-qrcode"] {
    position: absolute;
    top: calc(50% + 60px);/* 往下移动60px */
    left: 50%;
    transform: translate(-50%, -50%);
}

.qr-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.qr-placeholder i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 10px;
    display: block;
}

.qr-placeholder p {
    font-size: 14px;
    margin: 0;
}

.qr-tips {
    color: var(--text-regular);
    font-size: 13px;
    margin-top: 15px;
}

.qr-tips i {
    color: #07c160;
    margin-right: 4px;
}

.qr-tips-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

/* 右侧账号登录区域 */
.passport-right {
    flex: 1;
    padding: 40px 35px;
}

.passport-body {
    max-width: 360px;
    margin: 0 auto;
}

/* 登录方式切换标签 */
.passport-type-switch {
    display: flex;
    margin: 0 0 25px 0;
    border-bottom: 1px solid var(--border-color);
}

.switch-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    color: var(--text-regular);
    position: relative;
    transition: color 0.3s;
    font-size: 15px;
}

.switch-item:hover {
    color: var(--primary-color);
}

.switch-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.switch-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* 登录表单 */
.passport-form {
    display: none;
    padding-top: 15px;
    animation: fadeIn 0.3s ease;
}

.passport-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 18px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #909399;
    font-size: 16px;
    z-index: 1;
}

.input-wrapper .form-control {
    padding-left: 45px;
    height: 44px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    width: 100%;
    outline: none;
    box-sizing: border-box;
}

.input-wrapper .form-control::placeholder {
    color: #c0c4cc;
}

.input-wrapper .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.input-wrapper-code {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-wrapper-code .form-control {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
}

.btn-get-code {
    flex-shrink: 0;
    height: 44px;
    padding: 0 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.btn-get-code:hover {
    background: var(--primary-hover);
}

.btn-get-code:disabled {
    background: #a0cfff;
    cursor: not-allowed;
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    height: 44px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    color: #fff;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
    cursor: pointer;
    outline: none;
}

.btn-submit:hover {
    background: linear-gradient(to right, var(--primary-hover), var(--primary-color));
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: #a0cfff;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 分割线 */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0 18px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e4e7ed;
}

.divider span {
    padding: 0 15px;
    color: #909399;
    font-size: 13px;
}

/* 第三方登录 */
.social-login {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e4e7ed;
    color: #07c160;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.social-btn img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn.wechat {
    color: #07c160;
    border-color: #07c160;
}

.social-btn.qq {
    color: #12b7f5;
    border-color: #12b7f5;
}

.social-btn.qq:hover {
    background: #12b7f5;
}

/* 用户协议 */
.agreement-text {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    color: #909399;
    line-height: 1.5;
}

.agreement-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.agreement-text a:hover {
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 768px) {
    .passport-page {
        padding: 0;
        background: #fff;
        position: relative;
        height: auto;
        min-height: 100vh;
    }

    .passport-box {
        flex-direction: column;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }

    .passport-left {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 30px 20px;
    }

    .passport-right {
        padding: 30px 20px;
    }

    .qr-code {
        width: 180px;
        height: 180px;
    }

    .passport-body {
        max-width: 100%;
    }
}
