/* EOCQ库存管理系统样式表 */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #22c55e;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --border-color: #475569;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 220px;
    background: linear-gradient(180deg, var(--bg-card) 0%, #0f172a 100%);
    padding: 1rem 1rem 1rem 1rem;
    position: fixed;
    height: 100vh;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

/* 桌面端隐藏移动端菜单按钮和遮罩 */
.mobile-menu-toggle,
.mobile-menu-overlay {
    display: none;
}

/* 导航链接区域 */
.nav-links {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-links::-webkit-scrollbar {
    width: 4px;
}

.nav-links::-webkit-scrollbar-track {
    background: transparent;
}

.nav-links::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

/* 侧边栏用户区域 */
.sidebar-user-section {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-user-info:hover {
    background: rgba(99, 102, 241, 0.2);
}

.sidebar-user-name {
    color: var(--text-primary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sidebar-admin-badge {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

.sidebar-logout-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.sidebar-logout-btn:hover {
    background: var(--accent-danger);
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

.logo h2 {
    color: var(--accent-primary);
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links li {
    margin-bottom: 0.3rem;
}

.nav-links a {
    display: block;
    padding: 0.65rem 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 1rem;
}

/* 隐藏顶部 header */
.header {
    display: none;
}

/* 统计卡片 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.warning {
    border-color: var(--accent-warning);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    color: var(--accent-primary);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 图表网格 */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.chart-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.chart-card.full-width {
    grid-column: span 2;
}

.chart-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* 表格容器 */
.table-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 表格自适应 */
table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

/* 确保表格在小窗口可以滚动 */
@media (max-width: 1400px) {
    table {
        min-width: 1000px;
    }
}

@media (max-width: 1200px) {
    table {
        min-width: 900px;
    }
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-header h2 {
    color: var(--text-primary);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-input);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* 按钮 */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-warning {
    background: var(--accent-warning);
    color: white;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* 表单 */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

select.form-control {
    cursor: pointer;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* 上传区域 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--accent-primary);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 状态标签 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-warning);
}

.status-good {
    background: rgba(34, 197, 94, 0.2);
    color: var(--accent-success);
}

.status-defective {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    max-width: 300px;
}

/* 筛选器 */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filters select {
    min-width: 150px;
}

/* 提示消息 */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background: var(--accent-success);
}

.toast-error {
    background: var(--accent-danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 用户信息 */
.user-info-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border-radius: 8px;
    cursor: pointer;
}

.user-name {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.admin-badge {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.user-info-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 120px;
    display: none;
    z-index: 100;
    box-shadow: var(--shadow);
}

.user-info-dropdown:hover .dropdown-menu {
    display: block;
}

.user-info-dropdown .dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.user-info-dropdown .dropdown-menu a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

/* 导入导出按钮组 */
.export-import-group {
    display: flex;
    gap: 0.5rem;
}

.export-import-group .btn {
    white-space: nowrap;
}

/* 响应式 */
/* 中等屏幕优化 (769px - 1200px) */
@media (min-width: 769px) and (max-width: 1200px) {
    /* 侧边栏缩小 */
    .sidebar {
        width: 180px;
    }

    .logo h2 {
        font-size: 0.9rem;
    }

    .nav-links a {
        padding: 0.6rem 0.7rem;
        font-size: 0.8rem;
    }

    .sidebar-user-name {
        font-size: 0.75rem;
    }

    .sidebar-logout-btn {
        font-size: 0.75rem;
        padding: 0.45rem;
    }

    /* 主内容区调整 */
    .main-content {
        margin-left: 180px;
        padding: 1.25rem;
    }

    /* 头部优化 */
    .header h1 {
        font-size: 1.5rem;
    }

    /* 统计卡片 */
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-info h3 {
        font-size: 1.5rem;
    }

    /* 表格容器 */
    .table-container {
        padding: 1.25rem;
    }

    .table-header {
        flex-wrap: wrap;
    }

    .table-actions {
        flex-wrap: wrap;
    }

    /* 表格字体 */
    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.8rem 0.6rem;
        font-size: 0.85rem;
    }

    /* 筛选器 */
    .filters {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    /* 图表 */
    .charts-grid {
        gap: 1.25rem;
    }

    /* 模态框 */
    .modal-content {
        max-width: 600px;
    }

    /* 按钮 */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* 小桌面屏幕 (1201px - 1440px) */
@media (min-width: 1201px) and (max-width: 1440px) {
    .main-content {
        padding: 1.5rem;
    }

    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .charts-grid {
        gap: 1.5rem;
    }
}

/* 平板横屏和小屏桌面 */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-card.full-width {
        grid-column: span 1;
    }

    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    /* 重置body布局 */
    body {
        display: block;
        min-height: 100vh;
    }

    /* 汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--accent-primary);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1001;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle:hover {
        background: var(--accent-secondary);
        transform: scale(1.05);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: white;
        position: relative;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle span::before,
    .mobile-menu-toggle span::after {
        content: '';
        display: block;
        width: 20px;
        height: 2px;
        background: white;
        position: absolute;
        left: 0;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle span::before {
        top: -6px;
    }

    .mobile-menu-toggle span::after {
        top: 6px;
    }

    /* 菜单打开时的动画 */
    .mobile-menu-toggle.active span {
        background: transparent;
    }

    .mobile-menu-toggle.active span::before {
        top: 0;
        transform: rotate(45deg);
    }

    .mobile-menu-toggle.active span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* 侧边栏改为左侧滑动菜单 */
    .sidebar {
        width: 260px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: -260px;
        z-index: 1000;
        padding: 1rem;
        border-right: 1px solid var(--border-color);
        background: var(--bg-card);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar::after {
        display: none;
    }

    /* 遮罩层 */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
        padding-top: 0.5rem;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .logo h2 {
        font-size: 1.1rem;
        margin: 0;
    }

    /* 导航链接垂直排列 */
    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(99, 102, 241, 0.2);
        color: var(--accent-primary);
        transform: translateX(5px);
    }

    /* 主内容区 */
    .main-content {
        margin-left: 0;
        margin-top: 0;
        padding: 0.75rem;
        width: 100%;
        min-height: 100vh;
    }

    /* header 保持隐藏 */
    .header {
        display: none;
    }

    /* 统计卡片 */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

    .stat-info h3 {
        font-size: 1.2rem;
    }

    .stat-info p {
        font-size: 0.7rem;
    }

    .stat-info small {
        font-size: 0.65rem !important;
    }

    /* 表格容器 */
    .table-container {
        padding: 0.75rem;
        margin-bottom: 1rem;
        border-radius: 8px;
        overflow: visible;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .table-header h2 {
        font-size: 1.1rem;
    }

    .table-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .table-actions .btn {
        flex: 1;
        min-width: auto;
        justify-content: center;
    }

    /* 表格横向滚动容器 */
    .table-container > div[style*="overflow-x"],
    .table-container table {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* 为表格添加滚动提示 */
    .table-container::after {
        content: '← 左右滑动查看更多 →';
        display: block;
        text-align: center;
        color: var(--text-secondary);
        font-size: 0.7rem;
        margin-top: 0.5rem;
        padding: 0.5rem;
        background: rgba(99, 102, 241, 0.1);
        border-radius: 4px;
    }

    table {
        min-width: 600px;
        font-size: 0.75rem;
        display: table;
        width: 100%;
    }

    th, td {
        padding: 0.5rem 0.3rem;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    th {
        font-size: 0.65rem;
        position: sticky;
        top: 0;
        background: var(--bg-input);
        z-index: 10;
    }

    /* 按钮 */
    .btn {
        padding: 0.45rem 0.7rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .btn-sm {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }

    /* 模态框 */
    .modal-content {
        margin: 0.5rem;
        padding: 1.25rem;
        max-height: 85vh;
        width: calc(100% - 1rem);
        max-width: none;
    }

    .modal-header h2 {
        font-size: 1.1rem;
    }

    .modal-close {
        font-size: 1.3rem;
    }

    /* 表单 */
    .form-group {
        margin-bottom: 0.9rem;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }

    .form-control {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }

    /* 搜索框和筛选器 */
    .search-box {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .search-box input {
        max-width: 100%;
        width: 100%;
    }

    .filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .filters select,
    .filters input {
        width: 100%;
        min-width: auto;
        font-size: 0.8rem;
    }

    .filters .btn {
        grid-column: span 2;
    }

    /* 修复产品页面的复杂筛选器布局 */
    .table-header > div[style*="flex"] {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .table-header .form-group {
        width: 100% !important;
        min-width: auto !important;
    }

    .table-header .form-group input,
    .table-header .form-group select {
        width: 100%;
    }

    .table-header div[style*="flex: 1"] {
        display: none !important;
    }

    .table-header .table-actions {
        order: 10;
    }

    /* 图表 */
    .charts-grid {
        gap: 0.75rem;
    }

    .chart-card {
        padding: 0.75rem;
    }

    .chart-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    /* 用户信息 */
    .user-info-dropdown {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }

    .user-name {
        font-size: 0.7rem;
        display: none;
    }

    .admin-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.35rem;
    }

    /* 隐藏Excel导入导出按钮 */
    .export-import-group {
        display: none !important;
    }

    /* 提示消息 */
    .toast {
        bottom: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        padding: 0.75rem;
        font-size: 0.8rem;
    }

    /* 上传区域 */
    .upload-area {
        padding: 1.5rem 1rem;
    }

    .upload-icon {
        font-size: 2rem;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .main-content {
        margin-top: 0;
        padding: 0.5rem;
    }

    /* header 保持隐藏 */
    .header {
        display: none;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.6rem;
    }

    .stat-icon {
        font-size: 1.3rem;
    }

    .stat-info h3 {
        font-size: 1.1rem;
    }

    .modal-content {
        margin: 0.25rem;
        padding: 1rem;
    }

    .table-container {
        padding: 0.5rem;
    }

    table {
        min-width: 500px;
    }

    th, td {
        padding: 0.4rem 0.25rem;
        font-size: 0.65rem;
    }

    .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .filters .btn {
        grid-column: span 1;
    }
}

/* 分页组件 */
.pagination-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    flex-wrap: nowrap;
    gap: 1rem;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.pagination-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
}

.pagination-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.pagination-btn {
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

.pagination-page-btn {
    min-width: 32px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    text-align: center;
    white-space: nowrap;
}

.pagination-page-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination-page-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination-ellipsis {
    padding: 0.375rem 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        order: -1;
    }

    .pagination-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination-select {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .pagination-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.7rem;
    }

    .pagination-page-btn {
        min-width: 28px;
        font-size: 0.8rem;
        padding: 0.3rem 0.4rem;
    }
}

/* 数据来源上标 */
.source-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    vertical-align: super;
    margin-left: 2px;
    text-transform: uppercase;
}

.source-badge-api {
    background: rgba(99, 102, 241, 0.3);
    color: var(--accent-primary);
}

.source-badge-mcp {
    background: rgba(139, 92, 246, 0.3);
    color: var(--accent-secondary);
}
