/* Reset & Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

/* Container */
.container {
    background: white;
    width: 960px;
    height: 640px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    display: flex;
    overflow: hidden;
}

/* Brand Section (Left) */
.brand-section {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand-content {
    position: relative;
    z-index: 2;
}

.brand-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.brand-content p {
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 50px;
    font-weight: 300;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

/* Form Section (Right) */
.form-section {
    flex: 1.2;
    padding: 50px;
    background: #fff;
    position: relative;
    overflow-y: auto;
}

/* Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 35px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.tab-item {
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 600;
    color: #999;
    position: relative;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.tab-item:hover {
    color: #667eea;
}

.tab-item.active {
    color: #764ba2;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #764ba2;
    border-radius: 3px 3px 0 0;
}

/* Forms */
.auth-box {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-box.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.method-btn {
    padding: 8px 20px;
    border: 1px solid #eee;
    border-radius: 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.3s;
}

.method-btn:hover {
    background: #eee;
}

.method-btn.active {
    background: #eef1ff;
    color: #764ba2;
    border-color: #764ba2;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(64, 158, 255, 0.1);
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #4a4a4a;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #fcfcfc;
}

.form-group input:focus {
    outline: none;
    border-color: #764ba2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

.tip {
    font-size: 0.85rem;
    color: #999;
    margin-top: 6px;
    display: block;
}

/* Verify Slide Trigger */
.verify-box {
    margin-bottom: 24px;
}

.verify-slide {
    width: 100%;
    height: 48px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding-left: 16px;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.3s;
}

.verify-slide:hover {
    border-color: #b0b0b0;
    background: #fafafa;
}

.verify-slide i {
    margin-right: 10px;
    font-size: 1.1rem;
    color: #ccc;
}

.verify-slide.verified {
    background: #f0f9eb;
    border-color: #67c23a;
    color: #67c23a;
}

.verify-slide.verified i {
    color: #67c23a;
}

/* Code Group */
.code-group {
    display: flex;
    gap: 12px;
}

.code-group input {
    flex: 1;
}

.send-code-btn {
    padding: 0 20px;
    border: none;
    background: #f0f2f5;
    color: #606266;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.send-code-btn:hover:not(:disabled) {
    background: #e6e8eb;
    color: #333;
}

.send-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
}

.form-actions a {
    color: #764ba2;
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.form-actions a:hover {
    opacity: 0.8;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Social Login */
.social-login {
    margin-top: 40px;
    text-align: center;
}

.social-login p {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding: 0 15px;
    background: #fff;
    z-index: 1;
}

.social-login::before {
    content: '';
    position: absolute;
    left: 50px;
    right: 50px;
    margin-top: 10px;
    height: 1px;
    background: #f0f0f0;
    z-index: 0;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    position: relative;
    z-index: 2;
}

.social-btn {
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: white;
    font-size: 0.95rem;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn.wechat { background: #07c160; }
.social-btn.qq { background: #12b7f5; }

/* Forgot Password Header */
.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.box-header h3 {
    font-size: 1.5rem;
    color: #333;
}

.close-sub-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-sub-btn:hover {
    color: #333;
}

/* Slider Captcha Modal */
.captcha-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.captcha-box {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 360px;
    position: relative;
    user-select: none;
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.captcha-header h3 {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.captcha-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.captcha-refresh, .captcha-close {
    cursor: pointer;
    font-size: 1.2rem;
    color: #909399;
    transition: color 0.2s;
}

.captcha-refresh:hover, .captcha-close:hover {
    color: #409eff;
}

.captcha-img-box {
    position: relative;
    width: 100%;
    height: 160px;
    background: #f2f2f2;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.captcha-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.captcha-piece {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    box-shadow: 0 0 10px rgba(0,0,0,0.5); 
    border: 1px solid rgba(255,255,255,0.8);
    z-index: 2;
    border-radius: 4px;
}

.captcha-hole {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.4);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 4px;
}

.captcha-slider-track {
    width: 100%;
    height: 44px;
    background: #f7f9fa;
    border: 1px solid #e4e7eb;
    border-radius: 22px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
    transition: all 0.3s;
}

.captcha-slider-text {
    position: absolute;
    width: 100%;
    height: 100%;
    line-height: 42px;
    text-align: center;
    color: #909399;
    font-size: 0.9rem;
    pointer-events: none;
    transition: opacity 0.3s;
}

.captcha-slider-track:hover .captcha-slider-text {
    opacity: 0.5;
}

.captcha-slider-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    height: 42px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: grab;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #606266;
    transition: background 0.2s, transform 0.1s;
}

.captcha-slider-btn:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.captcha-slider-btn:hover {
    background: #409eff;
    color: white;
    border-color: #409eff;
}

.captcha-slider-track.success {
    background: #f0f9eb;
    border-color: #67c23a;
}
.captcha-slider-track.success .captcha-slider-text {
    color: #67c23a;
    text-indent: 20px;
}
.captcha-slider-track.fail {
    background: #fef0f0;
    border-color: #f56c6c;
}
.captcha-slider-track.fail .captcha-slider-text {
    color: #f56c6c;
}

/* Toast */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: white;
    color: #333;
    padding: 12px 24px;
    border-radius: 50px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success { border-left: 4px solid #67c23a; }
.toast.error { border-left: 4px solid #f56c6c; }
.toast.info { border-left: 4px solid #409eff; }

/* Customer Service Floating Button */
.cs-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #409eff;
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(64, 158, 255, 0.4);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    z-index: 900;
}

.cs-float-btn:hover {
    transform: translateY(-3px);
    background: #66b1ff;
    box-shadow: 0 6px 20px rgba(64, 158, 255, 0.5);
}

.cs-float-btn i {
    font-size: 1.1rem;
}

/* New Contact Method Options */
.contact-method-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-start; /* Ensure buttons don't stretch unevenly */
    flex-wrap: nowrap; /* Prevent wrap to fix layout */
}

.method-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Fix flex overflow */
}

.method-option {
    width: 100%;
    height: 48px; /* Fixed height for consistency */
    padding: 0 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.method-option:hover {
    border-color: #b3d8ff;
    background: #fdfdfd;
}

.method-option.active {
    border-color: #409eff;
    color: #409eff;
    background: #ecf5ff;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(64, 158, 255, 0.1);
}

.method-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
    border-color: #eee;
    pointer-events: none;
}

.method-tip {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Role Flex Container */
.role-flex-container {
    display: flex;
    border: 1px solid #ebeef5;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.role-info-side {
    width: 200px;
    background: #f5f7fa;
    padding: 20px;
    border-right: 1px solid #ebeef5;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.role-info-side h4 {
    margin: 0 0 10px;
    color: #303133;
    font-size: 16px;
}

.role-info-side p {
    margin: 5px 0;
    font-size: 13px;
    color: #909399;
}

.role-members-side {
    flex: 1;
    padding: 20px;
}

/* Input Group Relative Positioning */
.form-group .input-wrapper {
    position: relative;
    width: 100%;
}

/* Validation Feedback */
.input-feedback {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    display: none;
    z-index: 11;
}
.input-feedback.valid { color: #67c23a; display: block; }
.input-feedback.invalid { color: #f56c6c; display: block; }

/* Password Toggle Eye */
.password-toggle {
    position: absolute;
    right: 35px; 
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    z-index: 10;
}
.password-toggle:hover { color: #666; }

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ebeef5;
}

.pagination-btn {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    margin-left: 5px;
    cursor: pointer;
    color: #606266;
    font-size: 13px;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    color: #409eff;
    border-color: #c6e2ff;
    background-color: #ecf5ff;
}

.pagination-btn.active {
    background: #409eff;
    color: #fff;
    border-color: #409eff;
}

.pagination-btn:disabled {
    color: #c0c4cc;
    cursor: not-allowed;
    background: #f4f4f5;
}

.pagination-info {
    font-size: 13px;
    color: #606266;
    margin-right: 15px;
}

/* Date Filter */
.date-filter-group {
    display: flex;
    align-items: center;
    margin-left: 15px;
}
.date-filter-input {
    padding: 6px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 12px;
    width: 130px;
    margin-right: 5px;
}

/* Common Table */
.common-table th, .common-table td {
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid #ebeef5;
    font-size: 14px;
    white-space: nowrap; /* Prevent folding */
}

/* 表格与卡片 */
.data-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 2px -2px rgba(0,0,0,0.16), 0 3px 6px 0 rgba(0,0,0,0.12), 0 5px 12px 4px rgba(0,0,0,0.09);
    margin-bottom: 24px;
    transition: all 0.3s;
    overflow-x: auto; /* Allow horizontal scroll if content overflows */
}
.data-card:hover {
    box-shadow: 0 6px 16px 0 rgba(0,0,0,0.08), 0 3px 6px -4px rgba(0,0,0,0.12), 0 9px 28px 8px rgba(0,0,0,0.05);
}
