/**
 * 送货报价系统 - 全局样式
 * 基于设计规范文档的设计系统
 */

/* ===================================
   1. 设计系统变量 (CSS Variables)
   =================================== */

   :root {
    /* 主色系 - 蓝色调 */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-dark: #1e40af;
    
    /* 功能色 */
    --success-color: #10b981;
    --success-light: #d1fae5;
    --success-dark: #059669;
    
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #d97706;
    
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #dc2626;
    
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    
    /* 中性色阶 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 文本色阶 */
    --text-primary: #111827;      /* 最重要标题 */
    --text-secondary: #4b5563;    /* 次要标签 */
    --text-tertiary: #6b7280;     /* 内容文字 */
    --text-muted: #9ca3af;        /* 辅助说明 */
    
    /* 阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* 圆角系统 */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* 间距系统 */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* 字体系统 */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* ===================================
   1.5. 全局 Z-Index 层级修复
   =================================== */

/* 强制确保下拉菜单始终在最顶层 - 必须在所有其他样式之前 */
.dropdown-menu,
.navbar .dropdown-menu,
.navbar-nav .dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
}

/* ===================================
   2. 基础布局
   =================================== */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    position: relative;
    z-index: 1; /* 主内容区域在下层 */
}

/* ===================================
   3. 导航栏
   =================================== */

.navbar-brand {
    font-weight: var(--font-weight-bold);
}

/* ===================================
   4. 通用卡片样式
   =================================== */

.card {
    background: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: none;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}

.card-body {
    padding: var(--spacing-xl);
}

/* 信息模块卡片 */
.order-info-group {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.3s ease;
}

.order-info-group:hover {
    box-shadow: var(--shadow-md);
}

.order-info-group:last-child {
    margin-bottom: 0;
}

.order-info-group > h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.order-info-group > h5 i {
    color: var(--primary-color);
    font-size: var(--font-size-xl);
}

.order-info-group > h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    margin: var(--spacing-md) 0 var(--spacing-sm) 0;
}

/* 信息行样式 */
.order-info-row {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--gray-100);
    transition: background-color 0.2s ease;
}

.order-info-row:last-child {
    border-bottom: none;
}

.order-info-row:hover {
    background-color: var(--gray-50);
    padding-left: var(--spacing-xs);
    padding-right: var(--spacing-xs);
    margin-left: calc(-1 * var(--spacing-xs));
    margin-right: calc(-1 * var(--spacing-xs));
    border-radius: var(--radius-sm);
}

.order-info-label {
    flex: 0 0 120px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    padding-right: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.order-info-label i {
    color: var(--primary-color);
    font-size: var(--font-size-base);
}

.order-info-value {
    flex: 1;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-weight: var(--font-weight-normal);
    word-break: break-word;
}

.order-info-value strong {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
}

/* ===================================
   5. 通用按钮样式
   =================================== */

/* 主按钮 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    font-weight: var(--font-weight-semibold);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-primary:active {
    box-shadow: var(--shadow-sm);
}

/* 成功按钮 */
.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    border: none;
    color: white;
    font-weight: var(--font-weight-semibold);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-dark) 0%, #047857 100%);
    box-shadow: var(--shadow-md);
    color: white;
}

/* 危险按钮 */
.btn-danger {
    background: transparent;
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
    font-weight: var(--font-weight-semibold);
    padding: 10px 22px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.btn-danger:hover {
    background: var(--danger-color);
    color: white;
    box-shadow: var(--shadow-md);
}

/* 次要按钮 */
.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* 修复：在白色背景区域（如卡片、表单区域）中的 outline-secondary 按钮样式 */
.card-body .btn-outline-secondary,
.order-info-group .btn-outline-secondary,
.card .btn-outline-secondary {
    background: white;
    border: 2px solid var(--gray-400);
    color: var(--gray-700);
    font-weight: var(--font-weight-medium);
}

.card-body .btn-outline-secondary:hover,
.order-info-group .btn-outline-secondary:hover,
.card .btn-outline-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-600);
    color: var(--gray-900);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* 确保按钮图标正常显示 */
.btn-outline-secondary i {
    font-size: 1em;
    vertical-align: middle;
}

/* 全宽按钮 */
.w-100 {
    width: 100%;
    justify-content: center;
}

.d-grid.gap-2 {
    gap: var(--spacing-sm) !important;
}

/* ===================================
   6. 表单样式
   =================================== */

.form-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.required::after {
    content: " *";
    color: var(--danger-color);
}

.form-control,
.form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
    outline: none;
}

/* 文件上传区域 */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-area:hover {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.file-upload-area i {
    font-size: 3rem;
    color: #6c757d;
}

/* 文件预览 */
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.file-preview-item {
    position: relative;
    width: 150px;
    height: 150px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-item .remove-file:hover {
    background: #dc3545;
}

/* ===================================
   7. 状态标签系统
   =================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.status-badge i {
    font-size: 14px;
}

/* 待报价 */
.status-badge.status-pending_quote {
    background-color: var(--warning-light);
    color: var(--warning-dark);
    border: 1px solid var(--warning-color);
}

/* 已报价、已确认报价 */
.status-badge.status-quoted,
.status-badge.status-quote_confirmed {
    background-color: var(--info-light);
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

/* 进行中状态 */
.status-badge.status-ordered_unpaid,
.status-badge.status-paid_unpicked,
.status-badge.status-picked,
.status-badge.status-scheduled {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-color);
}

/* 已配送 */
.status-badge.status-delivered {
    background-color: var(--success-light);
    color: var(--success-dark);
    border: 1px solid var(--success-color);
}

/* 已取消 */
.status-badge.status-cancelled {
    background-color: var(--danger-light);
    color: var(--danger-dark);
    border: 1px solid var(--danger-color);
}

/* 特殊标签 - 加急、危险品 */
.info-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-tag.tag-urgent {
    background-color: var(--warning-light);
    color: var(--warning-dark);
    border: 1px solid var(--warning-color);
}

.info-tag.tag-danger {
    background-color: var(--danger-light);
    color: var(--danger-dark);
    border: 1px solid var(--danger-color);
}

.info-tag i {
    font-size: 12px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===================================
   8. 时间线组件
   =================================== */

.timeline {
    position: relative;
    padding-left: var(--spacing-lg);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color) 0%, var(--gray-300) 100%);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--spacing-lg);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 0 4px white, var(--shadow-sm);
    z-index: 1;
}

.timeline-item:first-child::before {
    background: var(--primary-color);
}

.timeline-content {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.timeline-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.timeline-time i {
    font-size: 12px;
}

/* 数据表格 */
.table-responsive {
    margin-top: 1rem;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* 分页 */
.pagination {
    margin-top: 2rem;
}

/* 按钮组 */
.btn-group-actions {
    display: flex;
    gap: 0.5rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .order-info-row {
        flex-direction: column;
    }
    
    .order-info-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .btn-group-actions {
        flex-direction: column;
    }
    
    .btn-group-actions .btn {
        width: 100%;
    }
}

/* 加载动画 */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* 图片画廊 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.image-gallery-item:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.image-gallery-item:hover .image-download-btn {
    opacity: 1;
}

.image-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-download-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* 统计卡片 */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
}

.stat-card .stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* 用户角色标签 */
.role-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.role-admin {
    background-color: #dc3545;
    color: white;
}

.role-customer_service {
    background-color: #0d6efd;
    color: white;
}

.role-customer {
    background-color: #28a745;
    color: white;
}

/* 上传进度条 */
.upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.upload-progress-overlay.show {
    display: flex;
}

.upload-progress-container {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    min-width: 400px;
    max-width: 90%;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.3);
}

.upload-progress-container h5 {
    margin-bottom: 1rem;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-progress-container .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

.progress {
    height: 30px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    transition: width 0.3s ease;
}

.upload-progress-info {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.upload-progress-warning {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.upload-progress-warning i {
    margin-right: 0.5rem;
}

/* ===================================
   8. 导航栏增强样式 - 浅色简约风
   =================================== */

/* 导航栏整体样式 */
.navbar-custom {
    background-color: #ffffff !important;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 1030;
    padding-top: 1rem;
    padding-bottom: 1rem;
    min-height: 90px;
}

/* Logo品牌样式 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.375rem;
    color: #333333 !important;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all 0.25s ease;
}

.navbar-brand:hover {
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.navbar-brand i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* 导航链接基础样式 */
.nav-link {
    font-weight: 600;
    font-size: 1rem;
    color: #333333 !important;
    padding: 0.625rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    margin: 0 0.25rem;
}

.nav-link i {
    font-size: 1.1rem;
    color: #666666;
    transition: color 0.25s ease;
}

/* 导航链接悬停状态 */
.nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(13, 110, 253, 0.06);
}

.nav-link:hover i {
    color: var(--primary-color);
}

/* 当前激活页面的导航链接 */
.nav-link.active {
    color: var(--primary-color) !important;
    position: relative;
}

.nav-link.active i {
    color: var(--primary-color);
}

/* 当前页面下划线指示器 */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: var(--spacing-md);
    right: var(--spacing-md);
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

/* 用户下拉菜单样式 */
.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem !important;
    border-radius: var(--radius-lg);
    background-color: #f8f9fa;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

/* 隐藏Bootstrap默认添加的chevron图标 */
.user-dropdown-toggle::after {
    display: none !important;
}

.user-dropdown-toggle:hover {
    background-color: rgba(13, 110, 253, 0.08);
    border-color: rgba(13, 110, 253, 0.15);
    color: var(--primary-color) !important;
}

.user-dropdown-toggle.show {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: var(--primary-color);
}

/* 用户头像样式 */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.user-avatar i {
    color: white !important;
}

/* 下拉箭头 */
.dropdown-arrow {
    font-size: 0.75rem;
    color: #666666;
    transition: transform 0.25s ease;
}

.user-dropdown-toggle.show .dropdown-arrow {
    transform: rotate(180deg);
}

/* 下拉菜单样式 */
.dropdown-menu {
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 200px;
    z-index: 1055 !important;
    position: absolute !important;
}

.dropdown-item {
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    font-weight: var(--font-weight-medium);
    color: #333333;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.08);
    color: var(--primary-color);
    transform: translateX(4px);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: #666666;
    transition: color 0.2s ease;
}

.dropdown-item:hover i {
    color: var(--primary-color);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid #e9ecef;
    opacity: 1;
}

/* 确保导航栏下拉菜单始终在最顶层 */
.navbar .dropdown-menu.show {
    z-index: 1055 !important;
}

.navbar .nav-item.dropdown {
    position: relative;
    z-index: 1040;
}

/* 导航栏响应式 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #f8f9fa;
        border-radius: var(--radius-md);
        padding: var(--spacing-md);
        margin-top: var(--spacing-sm);
        border: 1px solid #e9ecef;
    }
    
    .nav-link {
        margin: 0.25rem 0;
        justify-content: flex-start;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .nav-link.active {
        background-color: rgba(13, 110, 253, 0.1);
    }
    
    .user-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
}

/* ===================================
   9. 表格现代化样式
   =================================== */

.table-modern {
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border: none;
    color: var(--text-secondary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--spacing-md) var(--spacing-md);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-modern thead th:first-child {
    border-top-left-radius: var(--radius-md);
}

.table-modern thead th:last-child {
    border-top-right-radius: var(--radius-md);
}

.table-modern tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
}

.table-modern tbody tr:hover {
    background-color: var(--gray-50);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.table-modern tbody td {
    padding: var(--spacing-md);
    vertical-align: middle;
    border: none;
}

.table-modern tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-md);
}

.table-modern tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-md);
}

/* 按钮组操作 */
.btn-group-actions {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.btn-group-actions .btn {
    flex-shrink: 0;
}

/* ===================================
   10. 统计卡片样式改进
   =================================== */

.stat-card-modern {
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.7) 100%);
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card-modern .stat-icon {
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    right: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.stat-card-modern:hover .stat-icon {
    opacity: 0.4;
    transform: translateY(-50%) scale(1.1);
}

.stat-card-modern .stat-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
    opacity: 0.9;
}

.stat-card-modern .stat-value {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    margin: 0;
}

/* 统计卡片颜色变体 */
.stat-card-modern.stat-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #f59e0b 100%);
    color: white;
}

.stat-card-modern.stat-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.stat-card-modern.stat-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    color: white;
}

.stat-card-modern.stat-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
    color: white;
}

/* ===================================
   11. 改进的分页样式
   =================================== */

.pagination-modern {
    margin-top: var(--spacing-lg);
    gap: var(--spacing-xs);
}

.pagination-modern .page-link {
    border: 2px solid var(--gray-200);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    margin: 0 2px;
}

.pagination-modern .page-link:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-modern .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.pagination-modern .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

