:root {
  --ink: #14241f;
  --muted: #5d6d67;
  --paper: #f3efe6;
  --card: #fffdf8;
  --line: #d9d0c3;
  --forest: #16332a;
  --forest-2: #1f4639;
  --accent: #2f6f5e;
  --accent-2: #c4a35a;
  --danger: #b42318;
  --ok: #1b7f4e;
  --shadow: 0 10px 30px rgba(22, 51, 42, 0.08);
  --radius: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --bottom-nav: calc(64px + var(--safe-bottom));
  --log-h: 168px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding-bottom: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(16px + var(--safe-top)) 20px 14px;
  background: var(--forest);
  color: #f6f1e6;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-2);
  color: var(--forest);
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand h1 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.brand p { margin: 2px 0 0; color: #d7c8a4; font-size: 0.78rem; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user-label {
  font-size: 0.85rem;
  color: #d7c8a4;
  max-width: 10em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-body {
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(47, 111, 94, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(196, 163, 90, 0.16), transparent 50%),
    var(--paper);
}
.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px calc(24px + var(--safe-bottom));
}
.login-card {
  width: min(100%, 400px);
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.login-brand h1 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--forest);
}
.login-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.login-form {
  display: grid;
  gap: 14px;
}
.login-form .btn-primary {
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
}
.login-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
  background: var(--paper);
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
}
.tab.is-active {
  background: var(--forest);
  color: #fff;
}

.tabs-bottom { display: none; }

.content {
  padding: 16px 16px 24px;
  overflow: auto;
}

.panel { display: none; max-width: 1100px; margin: 0 auto; }
#tab-results.panel {
  max-width: none;
  width: 100%;
}
.panel.is-active { display: block; }

.lead, .muted, .summary {
  color: var(--muted);
  margin: 0 0 14px;
}
.lead { font-size: 0.95rem; }

.banner {
  padding: 12px 14px;
  border-radius: 12px;
  background: #e8f2ec;
  color: var(--forest);
  margin-bottom: 14px;
  border: 1px solid #cfe0d6;
}
.banner.warn {
  background: #f8eadc;
  border-color: #ebd3b3;
  color: #7a4b12;
}

.card-list { display: grid; gap: 12px; margin-bottom: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card h2 { margin: 0 0 12px; font-size: 0.95rem; }

.supplier-card {
  display: grid;
  gap: 12px;
}
.supplier-name { display: grid; gap: 6px; }
.supplier-grade {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.supplier-grade-label {
  flex-shrink: 0;
}
.supplier-grade-options {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.supplier-grade-options .check {
  gap: 4px;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.supplier-grade-options .check input {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.supplier-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.file-name { color: var(--muted); font-size: 0.88rem; word-break: break-all; flex: 1; min-width: 120px; }
.compare-dock {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.price-source {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}
.price-source .muted { margin: 0; }
.price-source-row {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  align-items: center;
  column-gap: 4px;
}
.price-source-label {
  text-align: left;
  white-space: nowrap;
}
.price-source-value {
  min-width: 0;
}
.price-source-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

label { display: grid; gap: 6px; font-size: 0.88rem; color: var(--muted); }
input[type="text"], input[type="number"], input[type="password"], select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, select:focus {
  outline: 2px solid rgba(47, 111, 94, 0.28);
  border-color: var(--accent);
}
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
input[type="text"]:-webkit-autofill,
input[type="password"]:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
}
input[type="file"] { display: none; }

.check-list { display: grid; gap: 8px; }
label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.95rem;
}
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
label.check.is-disabled { opacity: 0.45; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--forest); color: #fff; }
.btn-ghost {
  background: transparent;
  border-color: #d7c8a4;
  color: #f6f1e6;
}
.btn-danger {
  background: transparent;
  border-color: #efc4c0;
  color: var(--danger);
}
.toolbar .btn-ghost, .supplier-actions .btn-ghost {
  color: var(--forest);
  border-color: var(--line);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-file { background: #efe6d4; color: var(--forest); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(20, 36, 31, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(920px, 100%);
  max-height: min(82vh, 720px);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 10px;
}
.modal-head > div {
  min-width: 0;
  flex: 1;
}
.modal-head h2 { margin: 0; font-size: 1.05rem; }
.modal-head .btn-ghost {
  color: var(--forest);
  border-color: var(--line);
  flex-shrink: 0;
}
#preview-meta {
  word-break: break-word;
}
.preview-table-wrap {
  overflow: auto;
  padding: 0 16px 16px;
}
#preview-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.88rem;
}
#preview-table th,
#preview-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}
#preview-table th:first-child,
#preview-table td:first-child {
  width: 3em;
  text-align: right;
  white-space: nowrap;
  color: var(--muted);
}
#preview-table th:nth-child(2),
#preview-table td:nth-child(2) {
  white-space: normal;
}
#preview-table th:nth-child(3),
#preview-table td:nth-child(3),
#preview-table th:nth-child(4),
#preview-table td:nth-child(4) {
  text-align: right;
  white-space: nowrap;
  width: 88px;
}

.toolbar, .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.summary { margin: 0; flex: 1; min-width: 160px; }

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.table-wrap {
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
  max-height: min(70vh, 820px);
  width: 100%;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  width: 100%;
  table-layout: auto;
  font-size: 0.86rem;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid transparent;
  text-align: left;
  white-space: nowrap;
  background: #fffdf8;
}
th {
  position: sticky;
  top: 0;
  background: var(--forest);
  color: #f6f1e6;
  font-weight: 650;
  z-index: 2;
}
td.sticky, th.sticky {
  position: sticky;
  background: #fffdf8;
}
th.sticky { background: var(--forest); color: #f6f1e6; }
tr:nth-child(even) td { background: #faf6ee; }
tr:nth-child(even) td.sticky { background: #faf6ee; }

/* 左侧浮动：序号 / 平台型号 / 采购型号（固定宽，保证 left 对齐） */
th.sticky-0, td.sticky-0 { left: 0; width: 52px; min-width: 52px; max-width: 52px; z-index: 3; }
th.sticky-1, td.sticky-1 {
  left: 52px;
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  z-index: 3;
}
th.sticky-2, td.sticky-2 {
  left: 352px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  z-index: 3;
  box-shadow: 6px 0 10px -6px rgba(15, 23, 42, 0.28);
}
th.sticky-0, th.sticky-1, th.sticky-2 { z-index: 5; top: 0; }
td.sticky-1, td.sticky-2, th.sticky-1, th.sticky-2 {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sort-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #efe6d4;
}
.sort-btn {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--forest);
  cursor: pointer;
}
.sort-btn.is-active {
  background: var(--forest);
  color: #f6f1e6;
}
.sort-btn + .sort-btn { border-left: 1px solid var(--line); }
.num-pos { color: var(--ok); font-variant-numeric: tabular-nums; }
.num-neg { color: var(--danger); font-variant-numeric: tabular-nums; }

.result-cards { display: none; gap: 10px; }
.result-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.result-card h3 { margin: 0 0 8px; font-size: 1rem; }
.result-card .card-index {
  display: inline-block;
  min-width: 1.4em;
  margin-right: 4px;
  color: var(--muted);
  font-weight: 600;
}
.meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 0.86rem; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { margin-top: 10px; }

.unmatched-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.unmatched-section h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.unmatched-section .muted { margin: 0 0 12px; }
.unmatched-cards { margin-bottom: 12px; }
.unmatched-card {
  border-color: #e8d2a8;
  background: #fffaf0;
}

.log-dock {
  border-top: 1px solid var(--line);
  background: #121c19;
  color: #d8e4de;
}
.log-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: #e8d7a8;
  border: 0;
  padding: 6px 14px;
  font-weight: 650;
  min-height: 36px;
}
.log-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.log-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #e8d7a8;
  transition: transform 0.15s ease;
  transform: rotate(-90deg); /* 收起：箭头向右 */
}
.log-dock:not(.is-collapsed) .log-chevron {
  transform: rotate(0deg); /* 展开：箭头向下 */
}
.log-dock.is-collapsed .log-toggle-label {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.85;
}
.log-view {
  margin: 0;
  max-height: var(--log-h);
  overflow: auto;
  padding: 0 16px 14px;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.log-dock.is-collapsed .log-view { display: none; }
.log-dock.is-collapsed {
  min-height: 0;
}
.badge {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--forest);
  font-size: 0.75rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--bottom-nav));
  transform: translateX(-50%);
  background: var(--forest);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  max-width: min(90vw, 420px);
  z-index: 40;
  box-shadow: var(--shadow);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(20, 36, 31, 0.45);
  backdrop-filter: blur(2px);
}
.loading-overlay[hidden] { display: none !important; }
.loading-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: min(78vw, 240px);
  padding: 22px 28px;
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.loading-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #d7e4de;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 820px) {
  .app {
    grid-template-rows: auto 1fr auto auto;
    padding-bottom: var(--bottom-nav);
  }
  .tabs-top { display: none; }
  .tabs-bottom {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    padding: 8px 10px calc(8px + var(--safe-bottom));
    background: #fffdf8;
    border-top: 1px solid var(--line);
    justify-content: space-around;
  }
  .tabs-bottom .tab { flex: 1; }
  .field-grid { grid-template-columns: 1fr; }
  .brand p { display: none; }
  .log-dock.is-collapsed .log-view { display: none; }
  .log-dock:not(.is-collapsed) .log-view { max-height: 36vh; }
  .result-cards { display: grid; }
  .table-wrap { display: none !important; }
  .toast { bottom: calc(84px + var(--safe-bottom)); }
  .modal {
    padding: 8px;
    padding-bottom: calc(12px + var(--bottom-nav) + var(--safe-bottom));
    align-items: end;
  }
  .modal-card { width: 100%; max-height: min(78vh, 640px); }
}

@media (min-width: 821px) {
  .content { padding: 20px 20px 12px; }
  .topbar { padding: 18px 28px 16px; }
  .tabs-top { padding: 12px 28px 0; }
  .result-cards { display: none !important; }
  .log-dock { min-height: 36px; }
  #tab-results #result-wrap.table-wrap {
    max-height: calc(100dvh - 360px);
  }
  #tab-results #unmatched-wrap.table-wrap {
    max-height: min(32vh, 260px);
  }
  .app:has(#log-dock:not(.is-collapsed)) #tab-results #result-wrap.table-wrap {
    max-height: calc(100dvh - 360px - var(--log-h));
  }
  th.sticky-1, td.sticky-1 {
    width: 380px;
    min-width: 380px;
    max-width: 380px;
  }
  th.sticky-2, td.sticky-2 {
    left: 432px;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
  }
}

@media (min-width: 1400px) {
  th.sticky-1, td.sticky-1 {
    width: 460px;
    min-width: 460px;
    max-width: 460px;
  }
  th.sticky-2, td.sticky-2 {
    left: 512px;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
  }
}

/* 历史数据 / 匹配规则 */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.filter-field input,
.filter-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}
.inv-toolbar {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(22, 51, 42, 0.04);
}
.pager-pages {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--forest);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.pager-btn:hover:not(:disabled):not(.is-active) {
  background: #eef5f1;
}
.pager-btn.is-active {
  background: var(--forest);
  color: #f6f1e6;
  cursor: default;
}
.pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pager-nav {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent);
}
.pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 34px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  user-select: none;
}
.pager-meta {
  margin: 0 8px 0 4px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
#inv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  table-layout: fixed;
}
#inv-table th,
#inv-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fffdf8;
  color: var(--ink);
}
#inv-table th {
  position: sticky;
  top: 0;
  background: var(--forest) !important;
  color: #f6f1e6 !important;
  font-weight: 650;
  z-index: 2;
}
#inv-table .cell-title {
  width: 28%;
  max-width: 28%;
  white-space: normal;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.35;
}
#tab-inventory.panel {
  max-width: none;
  width: 100%;
}
#tab-inventory .table-wrap {
  max-height: calc(100dvh - 320px);
  overflow: auto;
}

.rules-panel { max-width: 820px; }
.rules-card {
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.rules-card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--forest);
}
.rules-card ol,
.rules-card ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink);
}
.rules-card li { margin: 0.35em 0; }
.rules-card code {
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 6px;
  background: #eef3ef;
}
.rules-table-wrap { overflow: auto; margin-top: 12px; }
.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.rules-table th,
.rules-table td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
}
.rules-table th { background: #eef5f1; }

@media (max-width: 820px) {
  .tabs-bottom .tab {
    flex: 1;
    padding: 10px 6px;
    font-size: 0.82rem;
  }
  #tab-inventory .table-wrap {
    display: block !important;
    max-height: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #inv-table { min-width: 1100px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-actions { grid-column: 1 / -1; }
  .inv-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .pager {
    justify-content: center;
    width: 100%;
    border-radius: 14px;
    flex-wrap: wrap;
  }
  .pager-meta {
    width: 100%;
    margin: 2px 0 0;
    padding: 6px 0 2px;
    border-left: 0;
    border-top: 1px solid var(--line);
    text-align: center;
  }
}
