/* 用户后台基础样式 */

/* 侧边栏样式 */
.user-sidebar {
    transition: all 0.3s ease;
}

.user-sidebar .nav-item.active {
    background-color: #3b82f6;
    color: white;
}

.user-sidebar .nav-item:hover:not(.active) {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* 内容区域样式 */
.user-content {
    min-height: calc(100vh - 80px);
}

/* 统计卡片样式 */
.stats-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 表格样式 */
.user-table {
    border-collapse: separate;
    border-spacing: 0;
}

.user-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.user-table tr:hover {
    background-color: #f9fafb;
}

/* 状态标签样式 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

/* 表单样式 */
.user-form input,
.user-form select,
.user-form textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-form input:focus,
.user-form select:focus,
.user-form textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 按钮样式 */
.btn-primary {
    background-color: #3b82f6;
    color: white;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 50;
        transition: left 0.3s ease;
    }
    
    .user-sidebar.active {
        left: 0;
    }
    
    .user-content {
        margin-left: 0;
    }
}

/* 加载动画 */
.loading-spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 通知样式 */
.user-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.user-notification.success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.user-notification.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 头像上传样式 */
.avatar-upload {
    position: relative;
    display: inline-block;
}

.avatar-upload .avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

.avatar-upload:hover .avatar-overlay {
    display: flex;
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background-color: #ef4444;
    width: 33%;
}

.password-strength.medium {
    background-color: #f59e0b;
    width: 66%;
}

.password-strength.strong {
    background-color: #10b981;
    width: 100%;
}