@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --bg: #edf1f6;
  --bg-accent: #dfe8f2;
  --card: #ffffff;
  --line: #d5dee8;
  --line-soft: #e8eef5;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #0b6bcb;
  --primary-hover: #0958a8;
  --primary-soft: #e8f2fc;
  --matched: #eef9f2;
  --matched-hover: #e0f3e8;
  --unmatched: #ffffff;
  --confirmed: #e8f1fb;
  --confirmed-hover: #d9e8f8;
  --surface-2: #f4f7fb;
  --input-bg: #ffffff;
  --warn: #b45309;
  --warn-soft: #fff7ed;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --danger-soft: #fef2f2;
  --editor-debora: #e6f7f4;
  --editor-debora-hover: #d5f0eb;
  --editor-corrado: #fff4e5;
  --editor-corrado-hover: #ffe8cc;
  --topbar-bg: rgba(255, 255, 255, .92);
  --pager-bg: rgba(255, 255, 255, .96);
  --hero-bg: rgba(255, 255, 255, .88);
  --body-grad-1: #dbe7f5;
  --body-grad-2: #e4ebf3;
  --body-grad-3: #f3f6fa;
  --topbar-h: 112px;
  --pager-h: 56px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --font: "IBM Plex Sans", "Noto Sans SC", "Segoe UI", "Microsoft YaHei", sans-serif;
}

html[data-theme="dark"] {
  --bg: #0f141c;
  --bg-accent: #151c27;
  --card: #1a2332;
  --line: #2d3a4d;
  --line-soft: #243042;
  --text: #e8eef7;
  --text-2: #c5d0de;
  --muted: #8b9bb0;
  --primary: #5ba3e8;
  --primary-hover: #7bb6ef;
  --primary-soft: #1c2f45;
  --matched: #163028;
  --matched-hover: #1c3b31;
  --unmatched: #1a2332;
  --confirmed: #1a2d45;
  --confirmed-hover: #223a55;
  --surface-2: #121a26;
  --input-bg: #121a26;
  --warn: #f0b05a;
  --warn-soft: #3a2a14;
  --ok: #4ade80;
  --ok-soft: #163028;
  --danger-soft: #3a1c1c;
  --editor-debora: #1a3532;
  --editor-debora-hover: #21433f;
  --editor-corrado: #3a2c16;
  --editor-corrado-hover: #4a381c;
  --topbar-bg: rgba(18, 26, 38, .94);
  --pager-bg: rgba(18, 26, 38, .96);
  --hero-bg: rgba(22, 30, 42, .92);
  --body-grad-1: #1a2433;
  --body-grad-2: #141c28;
  --body-grad-3: #0f141c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 0% -5%, var(--body-grad-1) 0%, transparent 55%),
    radial-gradient(700px 360px at 100% 0%, var(--body-grad-2) 0%, transparent 50%),
    linear-gradient(180deg, var(--body-grad-3) 0%, var(--bg) 40%, var(--bg-accent) 100%);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}
html[data-theme="dark"], html[data-theme="dark"] body {
  color-scheme: dark;
}

/* ── Top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(15, 23, 42, .04);
}
.topbar-row {
  padding: 12px 18px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.topbar-row + .topbar-row {
  padding-top: 0; padding-bottom: 14px;
  border-top: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.back {
  color: var(--primary); text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 6px 10px; border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.back:hover { background: var(--primary-soft); }
.topbar h1 {
  font-size: 17px; margin: 0; font-weight: 700; letter-spacing: -.01em; color: var(--text);
}
.stats { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.pill {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; white-space: nowrap;
  font-weight: 500; color: var(--text-2);
}
.pill b { color: var(--text); font-weight: 700; }
.pill.ok { background: var(--ok-soft); border-color: #bbf7d0; color: var(--ok); }
.pill.ok b { color: var(--ok); }
.pill.warn { background: var(--warn-soft); border-color: #fed7aa; color: var(--warn); }
.pill.warn b { color: var(--warn); }
.spacer { flex: 1; }

.seg {
  display: inline-flex; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 3px; gap: 2px;
}
.seg label {
  font-size: 12px; padding: 6px 11px; border-radius: 8px; cursor: pointer;
  color: var(--muted); user-select: none; font-weight: 500;
  transition: background .12s ease, color .12s ease;
}
.seg input { display: none; }
.seg label:has(input:checked) {
  background: var(--card); color: var(--text); box-shadow: var(--shadow); font-weight: 650;
}
.lang-seg label { min-width: 34px; text-align: center; padding: 6px 8px; }
#langWrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme-btn {
  background: var(--card) !important; color: var(--text-2) !important;
  border: 1px solid var(--line) !important;
  min-width: 42px; padding: 8px 10px !important;
}
.theme-btn:hover { background: var(--surface-2) !important; }

.search {
  min-width: 220px; flex: 1; max-width: 380px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: var(--input-bg); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 107, 203, .16);
}

/* ── Buttons ── */
button, .topbar button, .pager button {
  background: var(--primary); color: #fff; border: 0; border-radius: 10px;
  padding: 8px 14px; font-size: 13px; cursor: pointer; font-weight: 600;
  font-family: inherit;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
button:hover { background: var(--primary-hover); }
button:active { transform: translateY(1px); }
button.secondary { background: #5b6b7c; }
button.secondary:hover { background: #4a5968; }
button.ghost {
  background: var(--card); color: var(--text-2); border: 1px solid var(--line);
}
button.ghost:hover { background: var(--surface-2); border-color: var(--line); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.save-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; display: inline-block;
}
.save-dot.dirty { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.save-dot.saved { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.hint { color: var(--muted); font-size: 12px; line-height: 1.45; }

/* ── Sheet table ── */
.wrap {
  padding: 14px 14px calc(var(--pager-h) + 28px);
  overflow: auto; max-height: calc(100vh - var(--topbar-h));
}
table#grid {
  width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card); font-size: 13px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  border-radius: 14px;
}
table {
  width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card); font-size: 13px;
}
th, td {
  border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft);
  padding: 10px 11px; vertical-align: top;
}
th {
  position: sticky; top: 0; background: var(--surface-2); z-index: 12;
  font-weight: 700; white-space: nowrap; color: var(--text-2);
  font-size: 12px; letter-spacing: .02em; text-transform: none;
  box-shadow: 0 1px 0 var(--line);
}
tr.matched { background: var(--matched); }
tr.unmatched { background: var(--unmatched); }
tr.confirmed { background: var(--confirmed); }
tr.confirmed td { background: var(--confirmed); }
/* 最后编辑人为 Debora / Corrado 时覆盖匹配色 */
tr.editor-debora, tr.editor-debora td { background: var(--editor-debora); }
tr.editor-corrado, tr.editor-corrado td { background: var(--editor-corrado); }
tr.cat-dead, tr.cat-dead td { background: var(--danger-soft) !important; }
tr:hover td { background: color-mix(in srgb, var(--primary) 6%, transparent); }
tr.matched:hover td { background: var(--matched-hover); }
tr.confirmed:hover td { background: var(--confirmed-hover); }
tr.editor-debora:hover td { background: var(--editor-debora-hover); }
tr.editor-corrado:hover td { background: var(--editor-corrado-hover); }
tr.cat-dead:hover td { background: color-mix(in srgb, #ef4444 18%, var(--danger-soft)) !important; }

.col-hidden { display: none; }
.sticky-col {
  position: sticky; left: 0; z-index: 11; background: inherit;
  box-shadow: 2px 0 10px rgba(15, 23, 42, .05);
}
th.sticky-col { z-index: 13; background: var(--surface-2); }

.col-img { width: 132px; min-width: 132px; }
.img-wrap { display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.thumb {
  border: 0; padding: 0; background: transparent; cursor: zoom-in;
  border-radius: var(--radius-sm); display: block;
}
.thumb img {
  display: block; width: 112px; height: 112px; object-fit: contain;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: box-shadow .15s ease;
}
.thumb:hover img { box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent); }
.meta-line { font-size: 11px; color: var(--text-2); line-height: 1.35; word-break: break-all; }
.meta-line.muted { color: var(--muted); }
.no-img {
  display: flex; align-items: center; justify-content: center;
  width: 112px; height: 72px; color: var(--muted); font-size: 12px;
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius-sm);
}

.col-supplier { min-width: 200px; width: 220px; }
.col-article { min-width: 120px; width: 130px; }
.col-name { min-width: 180px; width: 220px; }
.col-size { min-width: 100px; width: 110px; }
.col-price { min-width: 96px; width: 104px; }
.col-cat { min-width: 220px; width: 260px; }
.col-confirm { min-width: 168px; width: 180px; }
.col-actions { width: 140px; min-width: 132px; white-space: nowrap; }

.offer-stack, .offer-price-stack {
  display: flex; flex-direction: column; gap: 8px; align-items: stretch;
}
.offer-block {
  display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
.offer-block:last-of-type { border-bottom: 0; padding-bottom: 0; }
.offer-supplier-line {
  display: flex; align-items: center; gap: 4px;
}
.offer-supplier-line .combo { flex: 1; min-width: 0; }
.offer-remove {
  flex: 0 0 auto;
  width: 28px; height: 28px; padding: 0 !important;
  border-radius: 8px !important;
  background: var(--surface-2) !important;
  color: var(--muted) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  font-size: 16px !important; line-height: 1;
}
.offer-remove:hover {
  background: var(--danger-soft) !important;
  color: #b91c1c !important;
}
.btn-add-offer {
  align-self: flex-start;
  padding: 4px 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--primary) !important;
  border: 1px dashed #c5ddf5 !important;
  box-shadow: none !important;
  font-weight: 650 !important;
}
.btn-add-offer:hover {
  background: var(--primary-soft) !important;
}
.offer-price-row { min-height: 34px; display: flex; align-items: center; }

.confirm-seg {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
}
.confirm-seg label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; cursor: pointer; user-select: none; white-space: nowrap;
  padding: 5px 8px; border-radius: 7px; color: var(--text-2); font-weight: 500;
}
.confirm-seg label:has(input:checked) {
  background: var(--card); color: var(--text); box-shadow: var(--shadow); font-weight: 650;
}
.confirm-seg input { width: auto; margin: 0; accent-color: var(--primary); }

.combo { position: relative; }
.combo-input { width: 100%; }
.combo-menu {
  position: fixed; z-index: 80;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .14);
  overflow: auto; padding: 6px; max-height: 280px;
}
.combo-item {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; padding: 8px 10px;
  border-radius: 8px; font: inherit; cursor: pointer; color: var(--text);
}
.combo-item:hover, .combo-item.active { background: var(--primary-soft); color: var(--primary-hover); }
.combo-item.custom { color: var(--muted); font-style: italic; }
.combo-item.custom:hover, .combo-item.custom.active { color: var(--primary-hover); }
.combo-empty { padding: 10px; color: var(--muted); font-size: 12px; }

input[type=text], textarea, select, .combo-input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font: inherit; background: var(--input-bg); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus, .combo-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 107, 203, .14);
}
textarea {
  resize: none; overflow: hidden; line-height: 1.45;
  min-height: 36px; box-sizing: border-box;
}

.cell-stack {
  display: flex; flex-direction: column; gap: 5px; align-items: stretch;
}
.quick-search {
  align-self: flex-start;
  padding: 3px 9px !important;
  font-size: 11px !important;
  line-height: 1.3;
  border-radius: 999px !important;
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
  border: 1px solid #c5ddf5 !important;
  box-shadow: none !important;
  font-weight: 650 !important;
}
.quick-search:hover {
  background: #d7e9fa !important;
  color: var(--primary-hover) !important;
}

.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.row-actions button {
  padding: 5px 9px; font-size: 12px; border-radius: 8px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line);
  box-shadow: none;
}
.row-actions button:hover {
  background: var(--primary-soft); border-color: var(--line); color: var(--text);
}
.row-actions button:disabled { opacity: .45; cursor: not-allowed; }

tr.drop-target td {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--primary) 10%, white) !important;
}

/* ── Pager ── */
.pager {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  min-height: var(--pager-h);
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  padding: 10px 18px;
  background: var(--pager-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, .06);
  font-size: 13px; color: var(--text-2);
}
.pager select { width: auto; min-width: 72px; padding: 7px 10px; }
.pager .page-info { color: var(--muted); font-weight: 500; }
.pager-spacer { flex: 1; min-width: 12px; }
#btnCatalogQuery {
  box-shadow: 0 4px 12px rgba(11, 107, 203, .22);
}

/* ── Catalog float panel ── */
.float-panel {
  position: fixed; z-index: 60;
  width: min(960px, calc(100vw - 24px));
  max-height: min(74vh, 760px);
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 22px 56px rgba(15, 23, 42, .2);
  overflow: hidden;
  left: 40px; top: 90px;
}
.float-panel[hidden] { display: none !important; }
.float-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--card));
  border-bottom: 1px solid var(--line);
  cursor: move; user-select: none;
  font-size: 13px;
}
.float-panel-head strong {
  font-size: 14px; letter-spacing: -.01em;
}
.float-panel-head .muted { color: var(--muted); font-size: 12px; font-weight: 500; }
.float-panel-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}
.float-panel-toolbar .search { flex: 1; min-width: 180px; max-width: none; }
.catalog-supplier-wrap {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted); white-space: nowrap; font-weight: 500;
}
.catalog-supplier-wrap select {
  width: auto; min-width: 168px; max-width: 240px;
  padding: 7px 10px; font-size: 12px; background: #fff;
}
.float-panel-body {
  overflow: auto; flex: 1; min-height: 0;
  padding: 0; background: var(--card);
}
.catalog-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
}
.catalog-table th, .catalog-table td {
  border-bottom: 1px solid var(--line-soft); padding: 9px 11px; text-align: left;
  vertical-align: top;
}
.catalog-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2); font-weight: 700; color: var(--text-2);
  font-size: 12px;
}
.catalog-table tbody tr:hover td { background: var(--primary-soft); }
tr.catalog-row { cursor: grab; }
tr.catalog-row:active { cursor: grabbing; }
tr.catalog-row td { vertical-align: top; }
.catalog-table .col-img img, .catalog-table .thumb img {
  width: 56px; height: 56px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.catalog-table .name-cell { max-width: 240px; line-height: 1.4; word-break: break-word; color: var(--text); }
.catalog-table .meta-sup { color: var(--muted); font-size: 11px; margin-top: 3px; }

/* ── Toast / lightbox / empty ── */
#toast {
  position: fixed; right: 18px; bottom: calc(var(--pager-h) + 18px);
  background: #0f172a; color: #fff;
  padding: 12px 16px; border-radius: 12px; display: none; z-index: 65;
  max-width: 460px; box-shadow: 0 12px 32px rgba(0, 0, 0, .22); font-size: 13px;
  font-weight: 500;
}
#toast.show { display: block; animation: toast-in .18s ease; }
#toast.ok { background: #166534; }
#toast.err { background: #991b1b; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.lightbox {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .76);
  display: none; align-items: center; justify-content: center;
  z-index: 70; padding: 24px; cursor: zoom-out;
  backdrop-filter: blur(2px);
}
.lightbox.show { display: flex; }
.lightbox img {
  max-width: min(960px, 92vw); max-height: 88vh; object-fit: contain;
  background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.empty-hint {
  display: none; margin: 48px auto; text-align: center; color: var(--muted);
  font-size: 14px; font-weight: 500;
}
.empty-hint.show { display: block; }
.loading {
  padding: 56px 24px; text-align: center; color: var(--muted);
  font-size: 14px; font-weight: 500;
}

/* ── Index ── */
.hero {
  background: var(--hero-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 32px 28px 26px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .03);
}
.hero h1 {
  margin: 0 0 8px; font-size: 24px; letter-spacing: -.02em; font-weight: 700;
}
.hero p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 720px; }
.summary { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.grid-cards {
  max-width: 1140px; margin: 24px auto 48px; padding: 0 18px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px;
}
.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover {
  transform: translateY(-3px); border-color: #9ec4ea;
  box-shadow: var(--shadow-md);
}
.card-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; letter-spacing: -.01em; }
.card-meta { color: var(--muted); font-size: 12px; margin-bottom: 14px; line-height: 1.4; }
.bar {
  height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden;
}
.bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #22c55e, #0b6bcb);
  transition: width .25s ease;
}
.card-foot { margin-top: 10px; font-size: 12px; color: var(--text-2); font-weight: 650; }

/* ── Presence ── */
.presence-tips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 0;
}
.presence-tip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  color: #fff; background: var(--tip-color, #64748b);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}
.presence-tip .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: .9;
}
tr.focus-remote td {
  box-shadow: inset 3px 0 0 var(--focus-color, var(--primary));
  background: color-mix(in srgb, var(--focus-color, #0b6bcb) 12%, white) !important;
}
tr.focus-self td {
  box-shadow: inset 3px 0 0 var(--focus-color, var(--primary));
  background: color-mix(in srgb, var(--focus-color, #0b6bcb) 18%, white) !important;
}
tr.focus-remote.matched td,
tr.focus-self.matched td {
  background: color-mix(in srgb, var(--focus-color, #0b6bcb) 14%, var(--matched)) !important;
}
tr.focus-remote.confirmed td,
tr.focus-self.confirmed td {
  background: color-mix(in srgb, var(--focus-color, #0b6bcb) 14%, var(--confirmed)) !important;
}
tr.focus-remote.editor-debora td,
tr.focus-self.editor-debora td {
  background: color-mix(in srgb, var(--focus-color, #0b6bcb) 14%, var(--editor-debora)) !important;
}
tr.focus-remote.editor-corrado td,
tr.focus-self.editor-corrado td {
  background: color-mix(in srgb, var(--focus-color, #0b6bcb) 14%, var(--editor-corrado)) !important;
}
.row-wrap { display: contents; }
.row-tip-cell {
  padding: 0 11px 8px !important; border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line-soft);
  background: transparent !important;
}
.row-tip-cell .presence-tips { margin-top: 0; margin-bottom: 2px; }
.card .presence-tips { margin-top: 10px; }

/* 桌面端不显示收起按钮；移动端见下方 media */
.topbar-toggle { display: none; }

@media (max-width: 720px) {
  .topbar-row { padding: 10px 12px; }
  .wrap { padding: 10px 10px calc(var(--pager-h) + 24px); }
  .hero { padding: 22px 16px 18px; }
  .hero h1 { font-size: 20px; }

  /* 移动端默认隐藏统计与重拉/导出/退出 */
  .mobile-hide { display: none !important; }

  .topbar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 7px 12px !important;
    font-size: 13px !important;
    font-weight: 650 !important;
  }
  .topbar-row-main {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .topbar-row-main .brand {
    flex: 1 1 auto;
    min-width: 0;
  }
  .topbar-row-main .brand h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 46vw;
  }
  .topbar-row-main .spacer { flex: 1 1 auto; min-width: 8px; }

  /* 进一步收起：只留货架号行 + 收起按钮 */
  .topbar.topbar-collapsed .topbar-collapse-hide { display: none !important; }
  .topbar.topbar-collapsed .topbar-row-main {
    padding-bottom: 10px;
  }
}
