* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f6f8; color: #1f2937; font-size: 14px;
}
.hidden { display: none !important; }
.muted { color: #6b7280; font-size: 13px; }
.error { color: #dc2626; font-size: 13px; margin-top: 8px; }

/* 登录 */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.08); width: 340px; text-align: center; }
.login-card h1 { font-size: 20px; margin-bottom: 8px; }
.login-card input { width: 100%; padding: 10px 12px; margin: 16px 0 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.login-card button { width: 100%; padding: 10px; border: none; border-radius: 8px; background: #2563eb; color: #fff; font-size: 15px; cursor: pointer; }

/* 顶栏 */
.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; font-size: 17px; }
.ghost-btn { background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 16px; cursor: pointer; }

.container { max-width: 1200px; margin: 24px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 20px; }
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.card h2 { font-size: 16px; margin-bottom: 16px; }

/* 表单 */
.form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.field { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; color: #4b5563; }
.field input[type=file], .field input[type=text] { padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; background: #fafafa; }

.primary-btn { background: #2563eb; color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px; cursor: pointer; }
.primary-btn:hover { background: #1d4ed8; }
.primary-btn:disabled { background: #9ca3af; cursor: not-allowed; }

/* 结果 */
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.result-head h2 { margin: 0; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px; }
.stat-card .num { font-size: 22px; font-weight: 700; }
.stat-card .label { font-size: 12px; color: #6b7280; margin-top: 4px; }

.filter-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.chip { border: 1px solid #d1d5db; background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.chip.active { background: #2563eb; color: #fff; border-color: #2563eb; }
#search-box { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; width: 220px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
thead th { background: #2f5597; color: #fff; font-weight: 600; position: sticky; top: 0; }
th.hl { background: #2563eb; }
tbody tr:hover { background: #f9fafb; }
.level-red { background: #fde8e8 !important; }
.level-yellow { background: #fef9c3 !important; }
.level-green { background: #dcfce7 !important; }

/* 批次列表 */
.batch-list { display: flex; flex-direction: column; gap: 8px; }
.batch-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer; }
.batch-item:hover { background: #f9fafb; }
.batch-item .meta { color: #6b7280; font-size: 12px; }
.batch-item .actions { display: flex; gap: 8px; }
.mini-btn { background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.danger-btn { background: #fff; border: 1px solid #fca5a5; color: #dc2626; border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
