/* 采购入库信息管理 —— 样式 */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-alt: #fafbfd;
  --line: #e6e9f0;
  --line-strong: #d5dae4;
  --text: #18202f;
  --text-2: #4b5668;
  --muted: #7c8798;
  --accent: #2f5fe0;
  --accent-ink: #1f47b8;
  --accent-weak: #edf2fe;
  --ok: #0f8a5e;
  --ok-weak: #e9f7f0;
  --warn: #a06500;
  --warn-weak: #fdf4e3;
  --danger: #c93a30;
  --danger-weak: #fdecea;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .10);
  --radius: 12px;
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system, BlinkMacSystemFont, "Hiragino Sans GB", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }

/* ------------------------------- 顶栏 ------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #4a76ec, #234ecb);
  color: #fff; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(47, 95, 224, .28);
  letter-spacing: 0;
}
.brand-text h1 { font-size: 15.5px; letter-spacing: -.01em; }
.brand-text p { font-size: 11.5px; color: var(--muted); margin-top: 1px; letter-spacing: .02em; }

.tabs {
  display: flex; gap: 2px; padding: 4px;
  background: #eef1f6; border-radius: 10px;
}
.tabs a {
  padding: 7px 14px; border-radius: 7px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  display: inline-flex; align-items: center;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active {
  background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .10);
}
.tab-badge {
  font-style: normal; font-size: 11px; font-weight: 600;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #fbe6c8; color: #8f5a00;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px;
}
.mode-chip {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted);
  background: #f2f5f9; border: 1px solid #e8ecf3;
  padding: 6px 11px; border-radius: 999px;
  white-space: nowrap;
}
.mode-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

/* ------------------------------- 页面 ------------------------------- */
.view {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 24px 90px;
}

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 18px;
}
.page-head h2 { font-size: 22px; letter-spacing: -.015em; }
.page-head p {
  font-size: 13.5px; color: var(--muted); margin-top: 6px;
  max-width: 780px; line-height: 1.65;
}
.head-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ------------------------------- 按钮 ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--text);
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: #b9c6e6; background: #f9fbff; color: var(--accent-ink); }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: 2px solid rgba(47, 95, 224, .35); outline-offset: 1px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(47, 95, 224, .25);
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-soft { background: var(--accent-weak); border-color: transparent; color: var(--accent-ink); }
.btn-soft:hover { background: #e2eafd; border-color: #d3e0fb; color: var(--accent-ink); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn-danger-ghost { color: var(--danger); border-color: transparent; background: transparent; }
.btn-danger-ghost:hover { background: var(--danger-weak); color: var(--danger); border-color: transparent; }

.link-btn {
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--accent); font-size: inherit; cursor: pointer;
  font-weight: 500;
}
.link-btn:hover { text-decoration: underline; }

.icon-btn {
  width: 28px; height: 28px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted);
  cursor: pointer; font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: #eef2f8; color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-weak); color: var(--danger); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn:disabled:hover { background: transparent; }

/* ------------------------------- 卡片 ------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.card-title { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.card-title .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.card-title b { font-weight: 600; }

/* ------------------------------ 上传区域 ------------------------------ */
.drop-card {
  padding: 34px 24px 26px;
  border: 1.5px dashed var(--line-strong);
  background: linear-gradient(180deg, #fdfdff, #fafbfe);
  text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.drop-card:hover { border-color: #a9bcec; background: #fbfcff; }
.drop-card.dragover {
  border-color: var(--accent); background: #f5f8ff;
  box-shadow: inset 0 0 0 3px rgba(47, 95, 224, .07);
}
.drop-icon {
  width: 50px; height: 50px; border-radius: 14px;
  background: var(--accent-weak); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.drop-title { font-size: 15px; font-weight: 600; }
.drop-hint { font-size: 12.8px; color: var(--muted); margin-top: 6px; }
.drop-cols {
  margin-top: 14px; font-size: 12.3px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
.drop-cols code {
  font-family: var(--mono); font-size: 11.5px;
  background: #f0f4fa; border: 1px solid #e4eaf4;
  color: var(--text-2); padding: 2px 7px; border-radius: 5px;
}
.drop-foot { font-size: 11.5px; color: #98a2b3; margin-top: 12px; }
.drop-manual { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

.steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.step {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.step-no {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  background: var(--accent-weak); color: var(--accent);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step-body strong { font-size: 13px; color: var(--text); }
.step-body p { font-size: 12.3px; color: var(--muted); margin-top: 3px; line-height: 1.55; }

.parse-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--muted); font-size: 13px; padding: 24px;
}
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid #dbe2ef; border-top-color: var(--accent);
  display: inline-block; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ 字段映射 ------------------------------ */
.file-badge {
  background: var(--ok-weak); color: var(--ok);
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  padding: 5px 7px; border-radius: 6px;
}
.mapping-list { display: flex; flex-wrap: wrap; gap: 8px; }
.map-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; padding: 6px 10px;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-alt); color: var(--text-2);
  max-width: 100%;
}
.map-chip b { font-weight: 600; color: var(--text); }
.map-chip .arrow { color: #a6b0c0; font-size: 12px; }
.map-chip.ok { background: #f7fbf9; border-color: #dcefe7; }
.map-chip.ok span:last-child { color: #2f7a5f; }
.map-chip.def { background: #fdf9f0; border-color: #f2e6cd; }
.map-chip.def span:last-child { color: #8a6217; }
.map-chip.miss { background: var(--danger-weak); border-color: #f6d5d2; }
.map-chip.miss span:last-child { color: var(--danger); font-weight: 500; }

/* ------------------------------- 提示条 ------------------------------- */
.alert {
  padding: 11px 13px; border-radius: 9px;
  font-size: 13px; line-height: 1.65; margin-top: 12px;
  border: 1px solid transparent;
}
.alert strong { font-weight: 600; }
.alert a { text-decoration: underline; }
.alert-error { background: var(--danger-weak); color: #8d2b23; border-color: #f6d8d5; }
.alert-warn { background: var(--warn-weak); color: #82560a; border-color: #f3e4c9; }
.alert-info { background: var(--accent-weak); color: #24418f; border-color: #dbe5fb; }
.alert-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
.alert-card .alert { margin-top: 0; }
.inline-alert { margin-bottom: 14px; margin-top: 0; }
.err-list { margin: 8px 0 0 18px; padding: 0; }
.err-list li { margin: 3px 0; }
.err-list .link-btn { color: #8d2b23; font-size: 12.5px; text-align: left; text-decoration: underline dotted; }

/* ------------------------------- 表格 ------------------------------- */
.table-card { padding: 0; overflow: hidden; }
.table-card .card-head { padding: 16px 18px 10px; margin-bottom: 0; }
.table-scroll { overflow: auto; max-height: 62vh; }
table.grid {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  font-size: 13px;
}
table.grid th {
  position: sticky; top: 0; z-index: 2;
  background: #fafbfd; color: #67738a;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.grid td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f3f7;
  vertical-align: middle;
  color: var(--text-2);
  white-space: nowrap;
}
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover td { background: #fbfcff; }
table.grid td b, table.grid td strong { color: var(--text); }
.col-idx { width: 46px; text-align: center; color: #9aa4b5; font-size: 12px; }
.col-check { width: 38px; text-align: center; }
.col-act { width: 54px; text-align: center; }
.col-act2 { width: 136px; text-align: center; }
.col-sort { width: 62px; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.row-selected td { background: #f6f9ff !important; }
.row-disabled td { background: #fbfbfc; color: #98a2b3; }
.row-disabled .cell-input { color: #98a2b3; }

.cell-input {
  width: 100%; min-width: 86px;
  border: 1px solid transparent; border-bottom-color: #e2e7f0;
  background: transparent;
  border-radius: 6px; padding: 6px 8px;
  font-family: inherit; font-size: 13px; color: var(--text);
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.cell-input:hover { border-color: var(--line-strong); background: #fff; }
.cell-input:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 95, 224, .11);
}
.cell-input.is-invalid { border-color: #e6a29c; background: #fff8f7; }
.cell-err { display: block; font-size: 11px; color: var(--danger); margin-top: 3px; line-height: 1.4; text-align: left; }
select.cell-input { cursor: pointer; }

input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .4; }

.sort-btns { display: inline-flex; flex-direction: row; gap: 2px; }
.sort-btns .icon-btn {
  height: 22px; width: 20px; font-size: 9px; border-radius: 4px;
  border: 1px solid var(--line); background: #fff; color: #6b7688;
}
.sort-btns .icon-btn:hover { border-color: #b9c6e6; background: #f6f9ff; color: var(--accent); }
.row-actions { display: inline-flex; gap: 4px; justify-content: center; }

.submit-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 18px; border-top: 1px solid var(--line);
  background: #fcfdff;
}
.submit-info { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.submit-info b { font-size: 15px; color: var(--text); margin: 0 2px; }
.submit-info .err-count { color: var(--danger); font-weight: 600; margin-left: 12px; }
.submit-info .ok-count { color: var(--ok); font-weight: 600; margin-left: 12px; }
.submit-actions { display: flex; gap: 8px; }

.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); gap: 12px;
}
.table-foot .page-num { margin: 0 8px; }

.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty p { font-size: 13.5px; margin-bottom: 12px; }
.empty-icon { font-size: 26px; color: #c4cbd8; margin-bottom: 8px; }
.err-text { color: var(--danger); }

/* ------------------------------- 工具条 ------------------------------- */
.toolbar-card { padding: 12px 14px; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search-field {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 95, 224, .10); }
.search-field input {
  border: 0; outline: none; background: transparent;
  font-family: inherit; font-size: 13.5px; color: var(--text);
  width: 230px;
}
.search-field input::placeholder { color: #a4adbc; }
.search-icon { color: #97a2b4; display: inline-flex; }
.select-field { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.select-field select {
  height: 36px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: #fff;
  font-family: inherit; font-size: 13px; color: var(--text); cursor: pointer;
}
.toolbar-right { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.toolbar-right b { color: var(--text); font-weight: 600; }

/* ------------------------------- 统计卡 ------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value {
  font-size: 24px; font-weight: 600; margin-top: 5px;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.stat-unit { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-pending .stat-value { color: var(--warn); }
.stat-ok .stat-value { color: var(--ok); }
.stat-amount .stat-value { font-size: 21px; }

/* ------------------------------- 徽标 ------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; padding: 3px 8px;
  border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.badge-pending { background: var(--warn-weak); color: #8f5c00; border-color: #f2e2c4; }
.badge-ok { background: var(--ok-weak); color: #0c7a52; border-color: #d2ecdf; }
.badge-ok-soft { background: #f0f5ff; color: var(--accent-ink); border-color: #dde7fb; }
.badge-off { background: #f2f4f7; color: #7c8798; border-color: #e6e9f0; }

/* ------------------------------ 浮动批量条 ------------------------------ */
.bulk-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: min(780px, calc(100% - 40px)); z-index: 55;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border-radius: 12px;
  background: #1b2434; color: #eef2f8;
  box-shadow: 0 14px 34px rgba(16, 24, 40, .28);
  animation: floatUp .2s ease-out;
}
@keyframes floatUp { from { opacity: 0; transform: translate(-50%, 8px); } }
.bulk-info { font-size: 13.5px; }
.bulk-info b { font-size: 15px; color: #fff; margin: 0 2px; }
.bulk-info .warn-text { color: #f2c67d; font-size: 12.5px; }
.bulk-actions { display: flex; gap: 8px; }
.bulk-actions .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.bulk-actions .btn:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .32); }
.bulk-actions .btn-primary { background: #fff; color: #1b2434; border-color: #fff; }
.bulk-actions .btn-primary:hover { background: #e9eefb; color: #1b2434; }

/* ------------------------------ 成功页 ------------------------------ */
.success-card { text-align: center; padding: 44px 24px; }
.success-icon {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ok-weak); color: var(--ok);
  font-size: 26px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.success-card h3 { font-size: 18px; }
.success-card p { font-size: 13.5px; color: var(--muted); margin: 8px 0 20px; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------ 字段配置 ------------------------------ */
.fields-grid td { padding: 5px 8px; }
.fields-grid .cell-input { min-width: 96px; padding: 5px 7px; font-size: 12.8px; }
.fields-grid th { padding: 9px 10px; }
.hint-card h4 { font-size: 13.5px; margin-bottom: 8px; }
.dot-list { list-style: none; margin: 0; padding: 0; }
.dot-list li {
  position: relative; padding-left: 14px;
  font-size: 12.8px; color: var(--text-2); line-height: 1.8;
}
.dot-list li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 4px; height: 4px; border-radius: 50%; background: #c3cbd8;
}
.dot-list b { color: var(--text); font-weight: 600; }

/* ------------------------------- 表单 ------------------------------- */
.form-grid { display: block; }
.form-row { display: block; margin-bottom: 14px; }
.form-row > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-row input, .form-row select {
  width: 100%; height: 38px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  font-family: inherit; font-size: 14px; color: var(--text); background: #fff;
}
.form-row input:focus, .form-row select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 95, 224, .12);
}
.form-row input.is-invalid { border-color: #e6a29c; background: #fff8f7; }
.form-row .hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 5px; font-style: normal; }
.form-row .hint[hidden] { display: none; }
.form-row em.hint { color: var(--danger); }
.check-row { display: flex; gap: 20px; margin-bottom: 12px; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.req { color: var(--danger); font-style: normal; margin-left: 2px; }

/* ------------------------------- 弹窗 ------------------------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 24, 40, .42);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .14s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: 460px; max-width: 100%; max-height: 86vh; overflow: auto;
  background: #fff; border-radius: 14px;
  box-shadow: 0 20px 54px rgba(16, 24, 40, .24);
  animation: popIn .16s ease-out;
}
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15.5px; }
.modal-body { padding: 18px; font-size: 13.5px; line-height: 1.65; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 13px 18px; border-top: 1px solid var(--line); background: #fcfdff;
}
.modal-text { margin-bottom: 10px; }
.mini-list { margin: 8px 0 14px 18px; padding: 0; font-size: 12.5px; color: var(--text-2); }
.mini-list li { margin: 3px 0; }

/* ------------------------------- Toast ------------------------------- */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
  display: flex; align-items: stretch; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(16, 24, 40, .15);
  font-size: 13px; max-width: 400px;
  animation: slideIn .18s ease-out;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(10px); } }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.toast-bar { width: 3px; background: var(--ok); flex-shrink: 0; }
.toast-warn .toast-bar { background: #d99a2b; }
.toast-error .toast-bar { background: var(--danger); }
.toast-msg { padding: 10px 14px; line-height: 1.5; color: var(--text); }

/* ------------------------------- 页脚 ------------------------------- */
.foot { border-top: 1px solid var(--line); background: #fff; }
.foot-inner {
  max-width: 1320px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.3px; color: var(--muted); gap: 12px; flex-wrap: wrap;
}
.foot-right { display: inline-flex; align-items: center; gap: 6px; }
.foot .sep { color: #c8cfdb; }
.quiet-link { color: #9aa4b5; font-size: 12.3px; }
.quiet-link:hover { color: var(--accent); text-decoration: underline; }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 960px) {
  .topbar-inner { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 10px 16px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .mode-chip { margin-left: auto; }
  .view { padding: 18px 16px 100px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field input { width: 150px; }
  .toolbar-right { margin-left: 0; width: 100%; }
  .table-scroll { max-height: none; }
  .brand-text p { display: none; }
}
@media (max-width: 700px) {
  .card { padding: 14px; }
  .steps { grid-template-columns: 1fr; }
  .card-head { flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .card-title { flex-wrap: wrap; }
  .card-title .sub { font-size: 12px; }
  .drop-card { padding: 24px 14px 20px; }
  .drop-cols { font-size: 11.5px; }
  .table-card { padding: 0; }
  .table-card .card-head { padding: 14px 14px 8px; }
  .submit-bar { padding: 12px 14px; }
  .cell-input { min-width: 74px; padding: 6px; }
  .page-head h2 { font-size: 19px; }
  .search-field { flex: 1 1 100%; }
  .search-field input { width: 100%; }
  .toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; width: 100%; }
  .bulk-bar { bottom: 12px; width: calc(100% - 24px); padding: 10px 12px; }
  .bulk-actions .btn { padding: 0 10px; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .submit-bar { flex-direction: column; align-items: stretch; }
  .submit-actions { justify-content: flex-end; }
  .modal { width: 100%; }
}
