/* ================================================================
   style.css - 统一身份认证登录样式 v6.6
   · Tab 不被遮挡
   · 右侧品牌区文字整体靠左居中
   · 无右侧遮罩，接缝落在左侧 cf-gradient 渐隐区里
   ================================================================ */

/* ============ 1. 触发按钮 ============ */
.login-trigger-btn {
    padding: 10px 28px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    font-family: inherit;
    letter-spacing: 0.3px;
}
.login-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}

/* ============ 2. 已登录用户欢迎条 ============ */
.user-welcome {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 6px 6px;
    background: #f8fafc;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
}
.user-welcome .user-avatar img {
    border-radius: 50%;
    vertical-align: middle;
    display: block;
}
.user-welcome .user-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 14px;
}
.user-welcome .logout-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}
.user-welcome .logout-link:hover {
    background: #f1f5f9;
    color: #ef4444;
}

/* ============ 3. 弹窗遮罩 ============ */
.login-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: none !important;
}
.login-modal-overlay.active {
    display: flex;
    animation: umFadeIn 0.25s ease;
}
@keyframes umFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes umSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ============ 4. 弹窗主体 ============ */
.login-modal {
    position: relative;
    width: 100%;
    max-width: 880px;
    max-height: 92vh;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    animation: umSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: none !important;
    outline: none !important;
}
.login-modal .modal-container {
    display: flex;
    flex-direction: row;
    min-height: 620px;
    max-height: 92vh;
    overflow: hidden;
    border: none !important;
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    line-height: 1;
    padding: 0;
}
.modal-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #0f172a;
    transform: rotate(90deg);
}

/* ============ 5. 左侧表单面板 ============ */
.login-modal .form-panel {
    flex: 1;
    order: 1;
    background: #fff;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 40px 50px;
    min-width: 0;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
}
.login-modal .form-panel::-webkit-scrollbar { width: 6px; }
.login-modal .form-panel::-webkit-scrollbar-track { background: transparent; }
.login-modal .form-panel::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 3px;
}
.login-modal .form-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

.form-wrapper {
    width: 100%;
    max-width: 360px;
    padding-top: 8px;
}

/* ============ 6. 模式切换 Tab ============ */
.mode-tabs {
    display: flex;
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 3px;
    gap: 3px;
}
.tab-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    border-radius: 9px;
}
.tab-btn:hover {
    background: rgba(79, 70, 229, 0.06);
    color: #4f46e5;
}
.tab-btn.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
}

.form-content { display: none; }
.form-content.active {
    display: block;
    animation: umSlideUp 0.3s ease;
}

/* ============ 7. 表单元素 ============ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fafbfc;
    color: #0f172a;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}
.form-group input::placeholder { color: #94a3b8; }
.form-group input:focus {
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.options {
    margin: 14px 0 18px 0;
    font-size: 13px;
}
.options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}
.options label input[type="checkbox"] {
    accent-color: #4f46e5;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.message-holder { margin-bottom: 14px; }
.message-holder:empty { display: none; }
.message {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}
.message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}
.message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* ============ 8. 密码显示/隐藏眼睛 ============ */
.password-input-wrap {
    position: relative;
    width: 100%;
}
.password-input-wrap input {
    padding-right: 46px !important;
}
.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    color: #94a3b8;
    padding: 0;
    transition: color 0.15s ease, background 0.15s ease;
    z-index: 2;
}
.password-toggle-btn:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}
.password-toggle-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}
.password-toggle-btn .eye-open { display: block; }
.password-toggle-btn .eye-closed { display: none; }
.password-toggle-btn.is-visible .eye-open { display: none; }
.password-toggle-btn.is-visible .eye-closed { display: block; }

/* ============ 9. 密码强度条 ============ */
.password-strength {
    margin-top: 8px;
    padding: 0;
}
.strength-bar {
    display: block;
    height: 4px;
    width: 0%;
    border-radius: 4px;
    background: #e2e8f0;
    transition: all 0.3s ease;
}
.strength-text {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}
.strength-text #strength-label { font-weight: 500; }
.strength-0 .strength-bar { width: 0%;   background: #e2e8f0; }
.strength-0 #strength-label { color: #64748b; }
.strength-1 .strength-bar { width: 25%;  background: #ef4444; }
.strength-1 #strength-label { color: #ef4444; }
.strength-2 .strength-bar { width: 50%;  background: #f59e0b; }
.strength-2 #strength-label { color: #f59e0b; }
.strength-3 .strength-bar { width: 75%;  background: #3b82f6; }
.strength-3 #strength-label { color: #3b82f6; }
.strength-4 .strength-bar { width: 100%; background: #22c55e; }
.strength-4 #strength-label { color: #22c55e; }

/* ============ 10. 旋转验证码 ============ */
.rotate-captcha-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}
.rotate-captcha-circle {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.rotate-captcha-circle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #4f46e5;
    z-index: 3;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}
.rotate-captcha-img {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.05s linear;
    will-change: transform;
}
.rotate-captcha-img svg {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}
.rotate-captcha-slider-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rotate-captcha-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
    outline: none;
    cursor: pointer;
}
.rotate-captcha-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.45);
    cursor: grab;
}
.rotate-captcha-slider::-webkit-slider-thumb:active { cursor: grabbing; }
.rotate-captcha-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.45);
    cursor: grab;
}
.rotate-captcha-hint {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
}
.rotate-captcha-hint .rotate-deg {
    color: #6366f1;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.rotate-captcha-status { font-size: 11px; color: #94a3b8; }
.rotate-captcha-status.ok { color: #10b981; font-weight: 600; }

/* ============ 11. 右侧品牌面板 ============ */
.login-modal .brand-panel {
    flex: 1;
    order: 2;
    position: relative;
    overflow: hidden;
    background: #ff5e1f;
    min-width: 0;
    border: none !important;
    margin-right: -1px;
    outline: 1px solid #ff5e1f;
    outline-offset: 0;
}

/* ============================================================
   图片滚动容器：由 JS 控制 transform
   接缝落在左侧 cf-gradient 渐隐区里，无右侧遮罩
   ============================================================ */
/* ============================================================
   地图横向滚动：background 方案
   · background-size: auto 100% → 高度铺满，宽度按原比例
   · repeat-x → 水平无限重复，永远不露背景
   · background-position 由 JS 控制，实现无缝滚动
   ============================================================ */
.cf-scroll-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--dq-url);
    background-repeat: repeat-x;
    background-size: auto 100%;       /* 高度铺满，宽度按原比例 */
    background-position: 0 center;
    will-change: background-position;
}

/* 金属网格覆盖 */
.cf-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 94, 31, 0.84);
    background-image:
        linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px),
        linear-gradient(135deg,
            rgba(255,210,170,0.22) 0%,
            rgba(255,140,60,0.06) 35%,
            rgba(180,50,10,0.00) 55%,
            rgba(160,40,0,0.18) 100%);
    background-size: 9px 9px, 9px 9px, 100% 100%;
    z-index: 1;
    pointer-events: none;
}

/* 左侧渐变遮罩（用它来遮接缝） */
.cf-gradient {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 72%;
    background: linear-gradient(to right,
        rgba(200, 55, 10, 0.98) 0%,
        rgba(220, 70, 15, 0.95) 35%,
        rgba(245, 88, 28, 0.88) 65%,
        rgba(255, 94, 31, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

/* ============ 12. 品牌区文字 ============ */
.brand-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    padding: 3rem 2.5rem 3rem 4.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    gap: 1rem;
    color: #fff;
    font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
}
.brand-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}
.brand-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 0;
    object-fit: contain;
    display: block;
    background: transparent;
    padding: 0;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}
.brand-logo-text {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}
.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: #ffffff;
    white-space: nowrap;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.brand-slogan {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0;
    color: #ffffff;
    text-align: left;
}
.brand-features {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.feature {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    font-size: 0.95rem;
    opacity: 0.95;
    color: #fff;
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    font-size: 0.72rem;
    color: #fff;
    flex-shrink: 0;
}

/* ============ 13. 响应式 ============ */
@media (max-width: 1024px) {
    .login-modal .modal-container {
        flex-direction: column;
        min-height: auto;
    }
    .login-modal .form-panel {
        order: 2;
        padding: 30px 24px;
        max-height: none;
    }
    .login-modal .brand-panel {
        order: 1;
        min-height: 280px;
        margin-right: 0;
        outline: none;
    }
    .brand-content {
        padding: 2rem 1.5rem;
        min-height: auto;
    }
    .brand-title {
        white-space: normal;
        font-size: 1.35rem;
    }
    .cf-gradient {
        width: 100%;
        background: linear-gradient(to bottom,
            rgba(200, 55, 10, 0.98) 0%,
            rgba(220, 70, 15, 0.95) 35%,
            rgba(245, 88, 28, 0.88) 65%,
            rgba(255, 94, 31, 0) 100%);
    }
}

@media (max-width: 480px) {
    .login-modal-overlay { padding: 0; }
    .login-modal {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }
    .login-modal .modal-container { max-height: 100vh; }
    .login-modal .brand-panel { min-height: 220px; }
    .brand-content {
        padding: 1.5rem 1rem;
        gap: 0.6rem;
    }
    .brand-logo-img,
    .brand-logo-text {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    .brand-title { font-size: 1.15rem; }
    .brand-slogan { font-size: 0.9rem; }
    .brand-features {
        margin-top: 0.8rem;
        gap: 0.35rem;
    }
    .feature { font-size: 0.85rem; }
    .feature-icon {
        width: 1.1rem;
        height: 1.1rem;
        font-size: 0.65rem;
    }
    .login-modal .form-panel { padding: 20px 16px; }
    .form-wrapper { max-width: 100%; }
    .mode-tabs .tab-btn {
        font-size: 13px;
        padding: 8px 0;
    }
    .rotate-captcha-circle { width: 90px; height: 90px; }
    .rotate-captcha-wrap { gap: 12px; }
}