/* ===============================================================
   壹圆助农 · PC 工作台样式
   配色沿用商城：主绿 #1A9E5C / 辅橙 #F08A24 / 白底 #FFFFFF
   =============================================================== */

:root {
  --green: #1A9E5C;
  --green-dark: #14804A;
  --green-light: #E8F6EE;
  --orange: #F08A24;
  --orange-light: #FDF1E3;
  --white: #FFFFFF;

  --bg: #F4F7F5;
  --border: #E3E9E5;
  --text: #1F2A24;
  --text-muted: #7A8A80;
  --danger: #E5484D;
  --warning: #F5A524;

  --radius: 8px;
  --shadow: 0 1px 3px rgba(26, 158, 92, .08), 0 4px 16px rgba(26, 158, 92, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 12px; }
.hint { color: var(--text-muted); font-size: 12px; margin: 8px 0 0; }

/* ===== 登录页 ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green) 0%, #16A05E 45%, var(--orange) 160%);
}

.login-box {
  width: 380px;
  background: var(--white);
  border-radius: 14px;
  padding: 34px 32px 30px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
}

.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand h1 { font-size: 19px; margin: 0; color: var(--green-dark); }
.login-tip { margin: 3px 0 0; font-size: 12px; color: var(--text-muted); }

.logo-mark {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  flex: 0 0 auto;
}
.logo-mark.sm { width: 28px; height: 28px; font-size: 15px; border-radius: 7px; }

.login-box label {
  display: block;
  margin: 14px 0 6px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.login-box input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #FBFCFB;
}
.login-box input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 158, 92, .12);
}

.login-box button {
  width: 100%;
  height: 44px;
  margin-top: 22px;
  border: none;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.login-box button:hover { background: var(--green-dark); }
.login-box button:disabled { background: #9CC7B2; cursor: not-allowed; }

.login-error {
  margin: 12px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--danger);
  text-align: center;
}

/* ===== 顶栏 ===== */
.topbar {
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--green-dark); }

.topbar-right { display: flex; align-items: center; gap: 14px; }

.conn-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  padding: 3px 10px; border-radius: 20px; background: #F2F5F3;
}
.conn-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted); display: inline-block;
}
.conn-status.on .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(26,158,92,.18); }
.conn-status.off .dot { background: var(--danger); }
.conn-status.wait .dot { background: var(--warning); }

.user-info { font-size: 13px; color: var(--text-muted); }
.user-info b { color: var(--green-dark); }

/* 顶栏版本号：部署后用来一眼确认线上前端是不是最新的（2026-11-22 新增） */
.build-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: #F1F5F2;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ===== 只读提示条 ===== */
.readonly-banner {
  background: var(--orange-light);
  border-bottom: 1px solid #F3DCC0;
  color: #9A5A12;
  padding: 9px 20px;
  font-size: 13px;
}
.readonly-banner b { color: #8A4E08; }

/* ===== 主体布局 ===== */
/* 【2026-11-22 修复】左侧菜单被挤成"一列竖排单字"：
   原因是窗口变窄或表格超宽时，整页出现横向滚动，做 flex 收缩的 .sidebar 被压扁。
   现在给侧栏写死三件套（width + min/max + flex-basis），并把 nav-item 设为不换行，
   无论内容多宽、窗口多窄，菜单都是正常横排文字，永远不会竖排/错位。 */
.body-wrap { display: flex; align-items: flex-start; }

.sidebar {
  width: 176px;
  min-width: 176px;
  max-width: 176px;
  flex: 0 0 176px;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  position: sticky;
  top: 56px;
  /* 高度上限 + 菜单过多时可滚动，避免顶到屏幕外 */
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  min-height: calc(100vh - 56px);
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 3px;
  border: none;
  background: none;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav-item i { font-style: normal; color: var(--text-muted); font-size: 13px; width: 15px; flex: 0 0 15px; }
.nav-item:hover { background: var(--green-light); }
.nav-item.active { background: var(--green); color: #fff; font-weight: 500; }
.nav-item.active i { color: #fff; }

/* 内容区：超宽表格在自己的区域里横向滚动，不再把整页撑宽（整页一旦横向滚动，左侧菜单会被滚出屏幕） */
.content { flex: 1; min-width: 0; padding: 18px 22px 40px; overflow-x: auto; }

/* ===== 视图 ===== */
.view { display: none; }
.view.active { display: block; }

.view-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  margin-bottom: 14px;
}
.view-head h2 { margin: 0; font-size: 18px; color: var(--green-dark); }
.view-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===== 面板 ===== */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  /* 表格列多（订单 9 列）时在面板内部横向滚动，不撑破整页布局 */
  overflow-x: auto;
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F0F3F1;
}
.panel-head h3 { margin: 0; font-size: 14.5px; color: var(--text); font-weight: 600; }

/* ===== 指标卡 ===== */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.metric-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green);
}
.metric-card.accent::before { background: var(--orange); }
.metric-card.warn::before { background: var(--warning); }
.metric-card.danger::before { background: var(--danger); }
/* 【2026-11-28】充值金额专用配色（深绿），和「总销售额」的橙色区分开 */
.metric-card.info::before { background: var(--green-dark); }

.metric-label { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
.metric-value { font-size: 23px; font-weight: 700; color: var(--green-dark); line-height: 1.2; }
.metric-value.accent { color: var(--orange); }
.metric-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* 【2026-11-28】可点击的指标卡（充值金额 → 充值资金去向）
   只加交互提示，不改卡片尺寸/栅格，避免影响现有布局 */
.metric-card.metric-clickable { cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.metric-card.metric-clickable:hover {
  box-shadow: 0 2px 6px rgba(26, 158, 92, .14), 0 8px 22px rgba(26, 158, 92, .10);
  transform: translateY(-1px);
}
.metric-more { font-size: 11.5px; color: var(--green-dark); margin-top: 6px; font-weight: 500; }
.metric-card.metric-clickable:hover .metric-more { text-decoration: underline; }

/* ===== 充值资金去向弹窗 ===== */
.rf-sum {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 720px) { .rf-sum { grid-template-columns: repeat(2, 1fr); } }
.rf-item {
  background: #F7FAF8;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.rf-k { font-size: 12px; color: var(--text-muted); }
.rf-v { font-size: 19px; font-weight: 700; color: var(--green-dark); line-height: 1.3; }
.rf-s { font-size: 11.5px; color: var(--text-muted); }
.rf-note {
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 9px 12px;
  line-height: 1.65;
}
.rf-note b { color: var(--text); }
.rf-check {
  font-size: 12.5px;
  color: var(--text-muted);
  background: #FFFDF7;
  border: 1px solid #F3E4C4;
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-top: 8px;
}
.rf-check.ok { background: #F2FBF6; border-color: #CFEBDA; color: var(--green-dark); }
.rf-check b { color: var(--text); }
.rf-sec { font-size: 13px; font-weight: 600; margin: 16px 0 8px; color: var(--text); }
.rf-pos { color: var(--green-dark); font-weight: 600; }
.rf-neg { color: var(--orange); font-weight: 600; }
.rf-back { color: #6A7BE8; font-weight: 600; }

/* ===== 图表 ===== */
.chart-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .chart-row { grid-template-columns: 1fr; } }
.chart-box { height: 268px; position: relative; }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  padding: 9px 10px;
  background: #F7FAF8;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 9px 10px;
  border-bottom: 1px solid #F2F5F3;
  vertical-align: middle;
}
.table tbody tr:hover { background: #FAFCFB; }
.table tbody tr:last-child td { border-bottom: none; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.rank-badge {
  display: inline-block;
  width: 20px; height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 5px;
  background: #EFF3F1;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}
.rank-badge.top1 { background: var(--orange); color: #fff; }
.rank-badge.top2 { background: #F5B95C; color: #fff; }
.rank-badge.top3 { background: #F7D08A; color: #7A5200; }

.empty-row { text-align: center; color: var(--text-muted); padding: 30px 0 !important; }

/* ===== 标签 ===== */
.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.tag-green { background: var(--green-light); color: var(--green-dark); }
.tag-orange { background: var(--orange-light); color: #A25C0C; }
/* 运费待收（2026-11-27）：挂在金额下面的一行橙字，比状态标签更醒目一点 */
.freight-due { margin-top: 2px; font-size: 12px; color: #d46b08; white-space: nowrap; }
.tag-gray { background: #EFF2F0; color: #7A8A80; }
.tag-red { background: #FDECEC; color: #B3282C; }
.tag-blue { background: #E8F2FD; color: #1A5FA8; }

/* ===== 按钮 ===== */
.btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn:hover { border-color: var(--green); color: var(--green-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

.btn-export { color: var(--orange); border-color: #F5D9BC; }
.btn-export:hover { background: var(--orange-light); border-color: var(--orange); color: #A25C0C; }

.btn-ghost { border-color: transparent; background: #F5F8F6; }
.btn-ghost:hover { background: var(--green-light); }

.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn-warn { color: var(--orange); border-color: #F5D9BC; }
.btn-warn:hover { background: var(--orange-light); }
.btn-danger { color: var(--danger); border-color: #F5C6C7; }
.btn-danger:hover { background: #FDECEC; }

/* ===== 表单控件 ===== */
.sel, .inp {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.inp { min-width: 130px; }
.sel:focus, .inp:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 158, 92, .1);
}

.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.chk input { accent-color: var(--green); }

.chk-group { display: flex; flex-wrap: wrap; gap: 12px; }

.form-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 14px;
  align-items: center;
}
.form-grid label { font-size: 13px; color: var(--text-muted); }
.form-grid .inp, .form-grid .sel { width: 100%; }
.form-grid > div:empty { display: none; }

/* 盲盒规则文案逐字段行 */
.form-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; align-items: start; margin-bottom: 8px; }
.form-row label { font-size: 13px; color: var(--text-muted); padding-top: 8px; }
.form-row .inp { width: 100%; }

/* 盲盒板块（档位/板块卡片） */
.bb-tier { border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.bb-tier-head { font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--text); }
.bb-board { border: 1px dashed var(--border); border-radius: 6px; padding: 8px; margin: 6px 0; background: #F9FCFA; }
.bb-board-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.bb-board-body { font-size: 12px; }
.bb-pity { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.bb-pity .chk { margin: 0; }
.bb-pity-item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.info-item {
  padding: 10px 12px;
  background: #F7FAF8;
  border-radius: 6px;
  font-size: 12.5px;
}
.info-item .k { color: var(--text-muted); margin-bottom: 3px; }
.info-item .v { color: var(--text); word-break: break-all; font-weight: 500; }

/* ===== 分页 ===== */
.pager {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; margin-top: 13px;
  font-size: 12.5px; color: var(--text-muted);
}
.pager button {
  min-width: 30px; height: 28px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12.5px;
}
.pager button.active { background: var(--green); border-color: var(--green); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 提醒列表 ===== */
.reminder-list { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.reminder-list li {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: #FCFDFC;
}
.reminder-list li.level-info { border-left-color: var(--green); }
.reminder-list li.level-warning { border-left-color: var(--warning); }
.reminder-list li.level-danger { border-left-color: var(--danger); }

.reminder-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.reminder-title { font-weight: 600; font-size: 13.5px; }
.reminder-time { margin-left: auto; font-size: 11.5px; color: var(--text-muted); }
.reminder-msg { font-size: 13px; color: var(--text); margin-bottom: 5px; }
.reminder-detail { font-size: 12px; color: var(--text-muted); line-height: 1.7; }

.event-empty { text-align: center; color: var(--text-muted); padding: 34px 0; font-size: 13px; }

/* ===== 规则配置行 ===== */
.rule-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #F2F5F3;
  flex-wrap: wrap;
}
.rule-row:last-child { border-bottom: none; }
.rule-name { width: 110px; font-weight: 500; font-size: 13px; }
.rule-receivers { display: flex; gap: 14px; flex: 1; }

/* ===== Toast 弹窗 ===== */
.toast-layer {
  position: fixed;
  top: 68px; right: 18px;
  z-index: 900;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 380px;
}

.toast {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .1);
  animation: toastIn .25s ease;
}
.toast.level-warning { border-left-color: var(--warning); }
.toast.level-danger { border-left-color: var(--danger); }
.toast.hide { animation: toastOut .25s ease forwards; }

.toast-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.toast-title { font-weight: 600; font-size: 13.5px; }
.toast-close { margin-left: auto; cursor: pointer; color: var(--text-muted); font-size: 16px; line-height: 1; }
.toast-body { font-size: 12.8px; color: var(--text); line-height: 1.6; }

@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ===== 弹窗 ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(20, 32, 26, .42);
  display: flex; align-items: center; justify-content: center;
  z-index: 950;
}
.modal-box {
  background: var(--white);
  border-radius: 10px;
  width: 460px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 15px; color: var(--green-dark); }
.modal-close {
  border: none; background: none; font-size: 22px;
  color: var(--text-muted); cursor: pointer; line-height: 1;
}
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 9px;
  padding: 13px 18px; border-top: 1px solid var(--border);
}
.modal-body .form-grid { grid-template-columns: 92px 1fr; }

/* ===== 角色可见性 ===== */
/* 普通员工（只读）隐藏所有管理入口：服务端同样会 403，此处只是提前隐藏 */
body.role-staff .admin-only { display: none !important; }

/* ===== 商品图片上传 ===== */
.img-upload-wrap { grid-column: 1 / -1; }
.img-thumbs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 8px;
}
.img-thumb {
  position: relative; width: 64px; height: 64px;
  border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; background: #F4F7F5;
  display: inline-flex; align-items: center; justify-content: center;
}
.img-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.img-thumb-del {
  position: absolute; top: 0; right: 0;
  width: 18px; height: 18px; line-height: 16px;
  border: none; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 13px; cursor: pointer; text-align: center;
  border-radius: 0 0 0 6px;
}
.img-thumb-del:hover { background: var(--danger); }
.img-upload-actions {
  display: flex; align-items: center; gap: 10px;
}
.img-upload-actions .btn { height: 28px; }

/* ===== 批量操作栏 ===== */
#prodBatchBar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#prodBatchBar .muted { font-size: 12px; }
#prodSelCount { margin-left: 4px; }

/* ===== 快递单号批量导入（2026-11-23）===== */
.modal-box.wide { width: 900px; }
.imp-tip {
  font-size: 12px; line-height: 1.7; color: var(--text-muted);
  background: #F6F9F7; border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; margin-bottom: 12px;
}
.imp-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-file a { color: var(--green-dark); font-size: 12px; text-decoration: underline; }
.imp-file-name, .imp-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.imp-result { margin-top: 12px; }
.imp-summary { font-size: 13px; margin-bottom: 8px; }
.imp-summary b { font-weight: 600; }
.imp-summary b.ok { color: var(--green-dark); }
.imp-summary b.bad { color: var(--danger); }
.imp-table-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
.imp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.imp-table th, .imp-table td {
  padding: 6px 8px; border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap; vertical-align: top;
}
.imp-table th { background: #F6F9F7; position: sticky; top: 0; z-index: 1; font-weight: 600; }
.imp-table tr.is-error td { background: #FDF3F2; }
.imp-table tr.is-warn td { background: #FFFAF0; }
.imp-table td.reason { white-space: normal; min-width: 240px; color: #4A5A52; }
.imp-table tr.is-error td.reason { color: #A33; }
.imp-id {
  font-size: 10px; color: var(--green-dark); background: var(--green-light);
  border-radius: 3px; padding: 1px 4px;
}
.imp-loading, .imp-error {
  font-size: 13px; padding: 10px; border-radius: 6px;
}
.imp-loading { color: var(--text-muted); }
.imp-error { color: #A33; background: #FDF3F2; border: 1px solid #F6D7D5; }
.imp-progress { font-size: 13px; color: var(--text-muted); padding: 10px; }
.imp-more { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.imp-fail { margin-top: 12px; }
.imp-fail-head { font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.imp-fail textarea {
  width: 100%; height: 96px; font-size: 11px; font-family: Consolas, monospace;
  border: 1px solid var(--border); border-radius: 6px; padding: 8px; resize: vertical;
  background: #FCFDFC; color: var(--text);
}
.imp-fail .btn { margin-top: 6px; }
