/* 公共认证页面样式 */
body {
    background: linear-gradient(135deg, #419ff7 0%, #64bd4f  100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Microsoft YaHei', sans-serif;
    padding: 20px 0;
}

/* 卡片容器统一样式 */
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    margin: 20px;
}
.auth-card-submit {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 1400px;
    margin: 20px;
}

/* 系统标题统一样式 */
.system-title {
    color: #667eea;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
}

/* 管理员登录页面特殊样式 */
.auth-card .system-title:contains("U幣管理系統") {
    color: #ff6b6b;
}

/* 管理员登录页面标题样式 */
.auth-card:has(.system-title:contains("U幣管理系統")) .system-title {
    color: #ff6b6b;
}

.system-subtitle {
    color: #6c757d;
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
}

/* 表单控件统一样式 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 验证状态样式 - 增强优先级 */
.input-group.is-valid .form-control {
    border-color: #28a745 !important;
}

.input-group.is-valid .input-group-text {
    border-color: #28a745 !important;
    background-color: #d4edda !important;
}

.input-group.is-invalid .form-control {
    border-color: #dc3545 !important;
}

.input-group.is-invalid .input-group-text {
    border-color: #dc3545 !important;
    background-color: #f8d7da !important;
}

/* 验证反馈信息 */
.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 14px;
    color: #28a745;
    text-align: left;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 14px;
    color: #dc3545;
    text-align: left;
}

/* 输入组统一样式 */
.input-group {
    margin-bottom: 20px;
}

.input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 10px 0 0 10px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
    margin-bottom: 0;
}

/* 密码显示按钮样式 */
#togglePassword {
    border-left: none;
    border-color: #ced4da;
    background-color: #f8f9fa;
    color: #6c757d;
    transition: all 0.2s ease;
    border-radius: 0 10px 10px 0;
}

#togglePassword:hover {
    background-color: #e9ecef;
    color: #495057;
}

#togglePassword:focus {
    box-shadow: none;
    border-color: #80bdff;
    background-color: #fff;
}

/* 密码输入框右边框样式调整 */
.input-group .form-control:not(:last-child) {
    border-right: none;
    border-radius: 0;
}

/* 验证码组统一样式 */
.verification-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: stretch;
}

.verification-group .input-group {
    flex: 1;
    margin-bottom: 0;
}

.verification-group .form-control {
    margin-bottom: 0;
}

/* 验证码区域统一样式 */
.captcha-area {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.captcha-area:hover {
    border-color: #667eea;
    transform: scale(1.02);
}

.captcha-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
    cursor: pointer;
    color: #495057;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.captcha-area:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: scale(1.02);
}

/* 按钮统一样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #64bd4f  100%);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    border: none;
    border-radius: 10px;
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-skip {
    background: transparent;
    border: 2px solid #6c757d;
    border-radius: 10px;
    color: #6c757d;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-skip:hover {
    background: #6c757d;
    color: white;
}

/* 发送验证码按钮统一样式 */
.btn-send-code {
    background: linear-gradient(135deg, #667eea 0%);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    height: 48px;
    min-width: 130px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send-code:hover {
    background: linear-gradient(135deg, #5a6fd8 0%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-send-code:disabled {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 6px rgba(149, 165, 166, 0.2);
}

.btn-send-code:disabled:hover {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    transform: none;
    box-shadow: 0 2px 6px rgba(149, 165, 166, 0.2);
}

/* 倒计时状态样式 */
.btn-send-code.countdown-active {
    background: #6c757d !important;
    color: #ffffff !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.8;
}

.btn-send-code.countdown-active:hover {
    background: #6c757d !important;
    transform: none !important;
}

/* 登录按钮统一样式 */
.btn-login {
    background: linear-gradient(135deg, #667eea 80%);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* 注册按钮统一样式 */
.btn-register {
    background: linear-gradient(135deg, #667eea 0%);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* 重置密码按钮统一样式 */
.btn-reset {
    background: linear-gradient(135deg, #667eea 0%);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* 注册按钮（链接样式）统一样式 */
.btn-register-link {
    background: transparent;
    border: 2px solid #667eea;
    border-radius: 10px;
    color: #667eea;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-register-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 条款复选框统一样式 */
.terms-checkbox {
    margin: 20px 0;
}

.terms-text {
    color: #6c757d;
    font-size: 14px;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

/* 链接区域统一样式 */
.login-link, .forgot-password, .register-section {
    text-align: center;
    margin-top: 20px;
    color: #6c757d;
}

.login-link a, .forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.login-link a:hover, .forgot-password a:hover {
    text-decoration: underline;
}

/* 安全提示样式 */
.security-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    color: #856404;
    font-size: 14px;
}

.security-notice i {
    margin-right: 8px;
    color: #f39c12;
}

/* 图标统一样式 */
.icon-input {
    color: #6c757d;
    font-size: 18px;
}

/* 按钮组统一样式 */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* 步骤指示器统一样式 */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin: 0 40px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.step.active {
    background: #667eea;
    color: white;
}

.step.completed {
    background: #28a745;
    color: white;
}

.step-label {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #6c757d;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* 表单行统一样式 */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* 文件上传统一样式 */
.file-upload {
    border: 2px dashed #e9ecef;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.file-upload:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.file-upload i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
}

.file-upload-text {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 10px;
}

.file-upload-hint {
    color: #adb5bd;
    font-size: 14px;
}

/* 进度信息统一样式 */
.progress-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.progress-info i {
    color: #667eea;
    font-size: 24px;
    margin-bottom: 10px;
}

.progress-text {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 5px;
}

.progress-hint {
    color: #adb5bd;
    font-size: 14px;
}

/* 登录错误提示样式 */
.login-error-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.error-count {
    color: #856404;
    font-size: 14px;
    margin-bottom: 10px;
}

.error-count i {
    margin-right: 8px;
    color: #f39c12;
}

.lock-info {
    color: #721c24;
    font-size: 14px;
    font-weight: bold;
}

.lock-info i {
    margin-right: 8px;
    color: #e74c3c;
}

/* 禁用状态的登录按钮 */
.btn-login:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.8;
}

.btn-login:disabled:hover {
    background: #6c757d !important;
    transform: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-card {
        margin: 10px;
        padding: 30px 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .verification-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-send-code {
        width: 100%;
        height: auto;
        padding: 12px;
    }
}

/* 文件上传相关样式 */
.file-input-hidden {
    display: none;
}

.file-preview-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    width: 180px;
}

.file-preview-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.file-preview-pdf {
    width: 100%;
    height: 120px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.file-preview-icon {
    font-size: 2.5rem;
    color: #dc3545;
}

.file-preview-icon-generic {
    font-size: 2.5rem;
    color: #6c757d;
}

.btn-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.file-info {
    text-align: center;
}

.file-name {
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 10px;
    color: #6c757d;
}

.file-size-small {
    font-size: 11px;
    color: #6c757d;
}

.file-preview-placeholder {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    height: 120px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-preview-placeholder-icon {
    margin-top: 10px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

/* 按钮状态样式 */
.btn-hidden {
    display: none;
}

/* 登录错误信息样式优化 */
.login-error-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.error-count {
    color: #856404;
    font-size: 14px;
    margin-bottom: 10px;
}

.error-count i {
    margin-right: 8px;
    color: #f39c12;
}

.lock-info {
    color: #721c24;
    font-size: 14px;
    font-weight: bold;
}

.lock-info i {
    margin-right: 8px;
    color: #e74c3c;
}

/* 表单验证状态样式优化 - 增强优先级 */
.input-group.is-valid .form-control {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.input-group.is-invalid .form-control {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* 输入组图标样式优化 */
.input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #6c757d;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
    margin-bottom: 0;
}

/* 密码切换按钮样式优化 */
#togglePassword {
    border-left: none;
    border-color: #ced4da;
    background-color: #f8f9fa;
    color: #6c757d;
    transition: all 0.2s ease;
    border-radius: 0 10px 10px 0;
    padding: 12px 15px;
}

#togglePassword:hover {
    background-color: #e9ecef;
    color: #495057;
}

#togglePassword:focus {
    box-shadow: none;
    border-color: #80bdff;
    background-color: #fff;
}

/* 验证码区域样式优化 */
.captcha-area {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.captcha-area:hover {
    border-color: #667eea;
    transform: scale(1.02);
    background: #e9ecef;
}

.captcha-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
    cursor: pointer;
    color: #495057;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

/* 条款复选框样式优化 */
.terms-checkbox {
    margin: 20px 0;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.terms-text {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: underline;
    color: #5a6fd8;
}

/* 链接区域样式优化 */
.login-link, .forgot-password, .register-section {
    text-align: center;
    margin-top: 20px;
    color: #6c757d;
}

.login-link a, .forgot-password a, .register-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.login-link a:hover, .forgot-password a:hover, .register-section a:hover {
    text-decoration: underline;
    color: #5a6fd8;
}

/* 系统标题样式优化 */
.system-title {
    color: #667eea;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.system-subtitle {
    color: #6c757d;
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 500;
}

/* 卡片阴影和动画优化 */
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    margin: 20px;
    transition: all 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* 按钮悬停效果优化 */
.btn-login:hover, .btn-register:hover, .btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-send-code:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* 输入框焦点效果优化 */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

/* 响应式优化 */
@media (max-width: 576px) {
    .auth-card {
        margin: 10px;
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .system-title {
        font-size: 24px;
    }
    
    .system-subtitle {
        font-size: 14px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-login, .btn-register, .btn-reset {
        padding: 12px;
        font-size: 16px;
    }
}
