/* 响应式样式 */

/* 移动端菜单 */
@media (max-width: 768px) {
    /* 侧边栏变为顶部固定导航 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        z-index: 1000;
        padding-top: 10px;
        padding-bottom: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    /* 侧边栏标题 */
    .sidebar h4 {
        margin-bottom: 10px;
        font-size: 16px;
    }
    
    /* 侧边栏导航链接 */
    .sidebar .nav-links {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    
    .sidebar .nav-links a {
        display: inline-block;
        padding: 8px 12px;
        margin-right: 10px;
        border-radius: 4px;
        font-size: 14px;
    }
    
    /* 内容区域 */
    .content {
        margin-left: 0;
        margin-top: 80px; /* 为顶部导航留出空间 */
        padding: 15px;
    }
    
    /* 统计卡片 */
    .stats-card {
        padding: 15px;
    }
    
    .stats-number {
        font-size: 24px;
    }
    
    .stats-label {
        font-size: 12px;
    }
    
    /* 表格响应式处理 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 按钮调整 */
    .btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* 表单元素调整 */
    .form-control {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    /* 标题调整 */
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* 卡片调整 */
    .card {
        margin-bottom: 15px;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* 快捷操作按钮 */
    .quick-actions .btn {
        margin-bottom: 10px;
    }
}

/* 平板设备 */
@media (min-width: 769px) and (max-width: 992px) {
    /* 侧边栏宽度调整 */
    .sidebar {
        width: 200px;
    }
    
    .content {
        margin-left: 200px;
    }
    
    /* 统计卡片调整 */
    .stats-number {
        font-size: 28px;
    }
}

/* 桌面设备 */
@media (min-width: 993px) {
    /* 保持原有样式 */
}

/* 通用样式优化 */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* 导航链接悬停效果 */
.sidebar a:hover {
    transition: all 0.3s ease;
}

/* 卡片阴影效果 */
.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 表格行悬停效果 */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式表格优化 */
.table-responsive {
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

/* 按钮样式优化 */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 徽章样式优化 */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* 统计卡片样式优化 */
.stats-card {
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 表单验证样式 */
.is-invalid {
    border-color: #dc3545 !important;
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
}

/* 成功提示样式 */
.alert-success {
    border-left: 4px solid #28a745;
}

/* 错误提示样式 */
.alert-danger {
    border-left: 4px solid #dc3545;
}

/* 警告提示样式 */
.alert-warning {
    border-left: 4px solid #ffc107;
}

/* 信息提示样式 */
.alert-info {
    border-left: 4px solid #17a2b8;
}