/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f0f4f8;
    padding: 24px 16px;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.app {
    max-width: 1400px;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    padding: 24px 28px 36px;
    transition: box-shadow 0.2s;
}

/* ===== 头部 ===== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.app-header h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: #0b2b44;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-header h1 small {
    font-size: 15px;
    font-weight: 400;
    color: #64748b;
    letter-spacing: 0;
}

.stats-badge {
    background: #e9eff6;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 14px;
    color: #1e3a5f;
    font-weight: 500;
}

/* ===== 分页导航（箱号按钮） ===== */
.pagination-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 20px;
    padding: 8px 0;
    border-bottom: 1px solid #e4eaf2;
}

.pagination-nav .page-btn {
    padding: 8px 22px;
    border-radius: 30px;
    border: 1px solid #d1dce8;
    background: #f9fcff;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.pagination-nav .page-btn:hover {
    background: #e3edf7;
    border-color: #9bb4cc;
}

.pagination-nav .page-btn.active {
    background: #2c3e50;
    border-color: #2c3e50;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(44, 62, 80, 0.25);
}

/* ===== 筛选栏 ===== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    background: #f8faff;
    padding: 12px 18px;
    border-radius: 14px;
    margin-bottom: 22px;
    border: 1px solid #e3eaf3;
}

.filter-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
}

.filter-group select {
    padding: 6px 32px 6px 14px;
    border-radius: 10px;
    border: 1px solid #d4dfea;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364758b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 12px;
    appearance: none;
    font-size: 14px;
    color: #1e293b;
    cursor: pointer;
    min-width: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: #7a9bcb;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.12);
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 200px;
    min-width: 150px;
}

.filter-right .search-icon {
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
}

.filter-right input {
    flex: 1;
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid #d4dfea;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 100px;
}

.filter-right input::placeholder {
    color: #a3b6cd;
}

.filter-right input:focus {
    outline: none;
    border-color: #7a9bcb;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.10);
}

.clear-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
    display: none;
}
.clear-btn.visible {
    display: block;
}
.clear-btn:hover {
    color: #475569;
}

/* ===== 表格 ===== */
.table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid #e3eaf3;
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 680px;
}

/* 表头 —— 深色背景，白色文字 */
thead th {
    background: #2c3e50;
    color: #ffffff;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.3px;
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid #1f3140;
    position: sticky;
    top: 0;
    z-index: 5;
}

thead th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.20);
}

/* 表体 */
tbody tr:nth-child(even) {
    background: #fafdff;
}
tbody tr:nth-child(odd) {
    background: #ffffff;
}
tbody tr:hover {
    background: #ecf3fa;
}

tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid #edf2f9;
    color: #1e293b;
    vertical-align: middle;
    word-break: break-word;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* 列宽 */
.col-seq { width: 60px; text-align: center; font-weight: 500; color: #475569; }
.col-box { width: 80px; font-weight: 500; color: #1f3a5f; }
.col-location { width: 160px; color: #334155; }
.col-item { font-weight: 500; }
.col-item2 { color: #475569; }
.col-count { text-align: center; font-weight: 600; }
.col-unit { text-align: center; color: #64748b; }

.empty-item2 {
    color: #cbd5e1;
    font-size: 13px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 15px;
}
.empty-state span {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

/* ===== 导出按钮 ===== */
.export-btn {
    background: #2c7a5f;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(44, 122, 95, 0.25);
}

.export-btn:hover {
    background: #1e6a4f;
    transform: scale(1.02);
}

.export-btn:active {
    transform: scale(0.96);
}
/* ===== 响应式 ===== */
@media (max-width: 768px) {
    body { padding: 12px 8px; }
    .app { padding: 16px 12px 28px; }
    .app-header h1 { font-size: 20px; }
    .pagination-nav .page-btn { padding: 6px 16px; font-size: 13px; }
    .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
    .filter-left { flex-wrap: wrap; gap: 8px; }
    .filter-group { flex: 1 1 40%; }
    .filter-group select { min-width: 80px; width: 100%; }
    .filter-right { flex: 1 1 100%; }
    thead th, tbody td { padding: 8px 10px; font-size: 12px; }
    .col-seq { width: 44px; }
    .col-box { width: 64px; }
    .col-location { width: 100px; }
    .export-btn {
        font-size: 13px;
        padding: 5px 12px;
    }
}
@media (max-width: 480px) {
    thead th, tbody td { padding: 6px 6px; font-size: 11px; }
    .filter-group label { font-size: 12px; }
    .filter-group select { font-size: 12px; padding: 4px 24px 4px 8px; }
    .filter-right input { font-size: 12px; padding: 4px 8px; }
    .export-btn {
        font-size: 12px;
        padding: 4px 10px;
    }
}