/* 余料库列表：三列行布局 */
#raw-data-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 一行三列 */
    gap: 8px;
    counter-reset: row; /* 初始化行号计数器 */
}

/* 普通行样式 */
#raw-data-list li {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative; /* 让伪元素能定位 */
}

/* 悬停效果 */
#raw-data-list li:hover {
    background-color: #f9fafb;
    border-color: #cbd5e1;
}

/* 选中状态 */
#raw-data-list li.selected {
    background-color: #e0edff; /* 淡蓝背景 */
    border-color: #2563eb; /* 蓝边框 */
}

/* 行号：每行第一个 li */
#raw-data-list li:nth-child(3n+1) {
    counter-increment: row; /* 行号+1 */
    padding-left: 50px; /* 给行号留空间 */
}

#raw-data-list li:nth-child(3n+1)::before {
    content: "行 " counter(row);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: bold;
    color: #2563eb;
}

/* 各字段样式 */
#raw-data-list li span {
    display: inline;
    margin-right: 8px;
    font-size: 13px;
    color: #333;
}

#raw-data-list li span.country {
    font-weight: 600;
    color: #1f2937;
}

#raw-data-list li span.phone {
    color: #2563eb;
}

#raw-data-list li span.password {
    color: #dc2626;
}

#raw-data-list li span.date {
    color: #16a34a;
}

#raw-data-list li span.creator_name {
    color: #7c3aed;
}


/* 容器：筛选 + 上传并排 */
#tab-raw-data {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: sans-serif;
}

/* 顶部区域，左右布局 */
.raw-data-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

/* 筛选区 */
.raw-data-filters {
    flex: 3;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    display: flex;
    gap: 20px;
    height: 50px;
    align-items: center;
}

.raw-data-filters #clear-raw-data-list {
    width: 100%;
    height: 38px;
}

.raw-data-filters select {
    margin: 6px 0;
    display: block;
    width: 100%;
    height: 40px;
    max-width: 240px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.raw-data-filters input {
    margin: 6px 0;
    display: block;
    width: 100%;
    height: 27px;
    max-width: 240px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#delete-raw-date,
#download-raw-data,
#reset-raw-data-status,
#filter-raw-data {
    height: 38px;
    width: 100%;
    margin-top: 8px;
    padding: 6px 16px;
    background-color: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

#delete-raw-date:hover,
#download-raw-data:hover,
#reset-raw-data-status:hover,
#filter-raw-data:hover {
    background-color: #357abd;
}

/* 上传区，复用之前写过的样式 */
.uploader {
    flex: 1;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    display: flex;
    gap: 20px;
    height: 50px;
    align-items: center;
}

.uploader h3 {
    width: 100%;
}

.uploader input[type="file"] {
    display: block;
    margin-bottom: 12px;
    width: 100%;
    vertical-align: bottom;
}

#upload-btn {
    width: 100%;
    display: inline-block;
    padding: 6px 16px;
    background-color: #4a90e2;
    color: #fff;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

#upload-btn:hover {
    background-color: #357abd;
}

#upload-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

#upload-progress-wrap {
    margin-top: 12px;
    height: 10px;
    background: #eee;
    border-radius: 999px;
    overflow: hidden;
}

#upload-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #4a90e2, #6fb3f2);
    transition: width 0.2s ease;
}
