/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin: 2px 0;
    white-space: nowrap;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar .nav-section {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 0.75rem 0.5rem;
}

.sidebar .nav-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0.75rem 0;
}

/* 主内容区域包装器 */
.main-content-wrapper {
    margin-left: 200px;
    min-height: 100vh;
}

/* 主内容区域样式 */
.main-content {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.main-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

/* 统计卡片样式 */
.stats-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 表格样式 */
.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

/* 分页样式 */
.pagination .page-link {
    color: #667eea;
}

.pagination .page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

/* 模态框样式 */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* 最近活动样式 */
.timeline {
    max-height: 400px;
    overflow-y: auto;
}

.recent-activity-item {
    border-left: 3px solid #667eea;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.recent-activity-item:last-child {
    margin-bottom: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        left: -200px;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content-wrapper {
        margin-left: 0;
    }
}

/* 页面内容过渡效果 */
.page-content {
    animation: fadeIn 0.3s ease;
}

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

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 表单增强样式 */
.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #5a6fd6;
    border-color: #5a6fd6;
}

/* 图片预览 */
.image-preview-container img {
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
