/* 归码 — 海关编码智能查询 MVP */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #1e86fc;
  --brand-dark: #1565c0;
  --brand-soft: #e8f3ff;
  --accent: #1e86fc;
  --accent-soft: #e8f3ff;
  --warn: #d97706;
  --danger: #dc2626;
  --ok: #059669;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --font: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #3e95f9, #1e86fc);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  flex-wrap: wrap;
}
.nav button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}
.nav button:hover { background: var(--bg); color: var(--ink); }
.nav button.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.header-meta {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.view { display: none; }
.view.active { display: block; animation: fade .25s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.hero {
  background: linear-gradient(135deg, #1565c0 0%, #1565c0 55%, #0369a1 100%);
  color: #fff;
  border-radius: 18px;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
}
.hero p {
  margin: 0 0 1.25rem;
  opacity: 0.9;
  max-width: 36rem;
}
.search-box {
  display: flex;
  gap: 0.6rem;
  background: #fff;
  border-radius: 12px;
  padding: 0.4rem;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  color: var(--ink);
  min-width: 0;
}
.search-box button.primary {
  flex-shrink: 0;
}
.hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: center;
}
.hints span { opacity: 0.75; font-size: 0.85rem; }
.chip {
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.chip:hover { background: rgba(255,255,255,.22); }

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  background: var(--brand);
  color: #fff;
}
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn.ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-dark); }
.btn.sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; border-radius: 8px; }
.btn.danger-ghost {
  background: #fff;
  border-color: #fecaca;
  color: var(--danger);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.card + .card { margin-top: 1rem; }
.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}
.card .sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -0.4rem 0 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.stat .n {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.stat .l { font-size: 0.8rem; color: var(--muted); }

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.5rem 0 0.75rem;
  gap: 1rem;
}
.results-head h2 { margin: 0; font-size: 1.05rem; }
.results-head .muted { color: var(--muted); font-size: 0.85rem; }

.result-list { display: flex; flex-direction: column; gap: 0.65rem; }
.result-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.result-item:hover {
  border-color: #99f6e4;
  box-shadow: var(--shadow);
}
.result-item .code {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--brand-dark);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.result-item .name { font-weight: 600; margin-top: 0.15rem; }
.result-item .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.tag {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
}
.tag.teal { background: var(--brand-soft); border-color: #99f6e4; color: var(--brand-dark); }
.tag.blue { background: var(--accent-soft); border-color: #bae6fd; color: var(--accent); }
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
  justify-content: center;
}
.fav-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}
.fav-btn.on { color: #eab308; border-color: #fde68a; background: #fffbeb; }

/* Classify */
.form-grid { display: grid; gap: 0.85rem; }
label.field { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
label.field span.hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
textarea, input[type="text"], input:not([type]) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  outline: none;
}
textarea:focus, input:focus { border-color: #5eead4; box-shadow: 0 0 0 3px rgba(13,148,136,.15); }
textarea { min-height: 120px; resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.25rem; }

.suggest-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.suggest-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: #fff;
  display: grid;
  gap: 0.55rem;
}
.suggest-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.confidence {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brand-dark);
}
.confidence.low { color: var(--warn); }
.reason {
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--bg);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}
.bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3e95f9, #0ea5e9);
  border-radius: inherit;
}

/* Batch table */
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th, table.data td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
table.data th {
  background: var(--bg);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}
table.data tr:hover td { background: #f8fafc; }
table.data .code { font-family: var(--mono); font-weight: 600; color: var(--brand-dark); }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.ok { background: #d1fae5; color: #047857; }
.badge.no { background: #fee2e2; color: #b91c1c; }

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}
.empty .icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100%);
  height: 100%;
  background: #fff;
  z-index: 60;
  transform: translateX(105%);
  transition: transform .25s ease;
  box-shadow: -8px 0 32px rgba(15,23,42,.12);
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.drawer-head h3 { margin: 0; font-size: 1.05rem; }
.drawer-body {
  padding: 1.1rem 1.25rem 2rem;
  overflow-y: auto;
  flex: 1;
}
.close-btn {
  border: none;
  background: var(--bg);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--muted);
}
.detail-code {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: 0.03em;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}
.kv {
  background: var(--bg);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}
.kv .k { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.kv .v { font-weight: 600; font-size: 0.95rem; }
.kv.full { grid-column: 1 / -1; }
.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1.1rem 0 0.5rem;
}
.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.examples span {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 100;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer strong { color: var(--ink); }

.stub-note {
  background: #fffbeb;
  border: 1px dashed #fbbf24;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #92400e;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 0.6rem; align-items: center; }
  .nav { order: 3; flex: 1 1 100%; width: 100%; max-width: 100%; }
  .header-meta { display: none; }
  .search-box { flex-direction: column; }
  .result-item { grid-template-columns: 1fr; }
  .result-actions { flex-direction: row; justify-content: flex-start; }
  .detail-grid { grid-template-columns: 1fr; }
  .hero { padding: 1.4rem 1.1rem; }
}

/* —— Aligned IA: panels, tables, modal —— */
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.panel-head h2 { margin: 0; font-size: 1.1rem; }
.panel .sub { margin: 0.35rem 0 0; }
.card.panel { padding: 1.15rem 1.2rem 1.35rem; }

.placeholder-row td {
  text-align: center;
  color: var(--muted);
  padding: 1.75rem 0.7rem !important;
}

td.code, .mono { font-family: var(--mono); font-weight: 600; color: var(--brand-dark); }
td.clamp {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
td.ops {
  white-space: nowrap;
  display: flex;
  gap: 0.55rem;
  align-items: center;
}
tr td.ops { display: table-cell; }
tr td.ops .linkish { margin-right: 0.45rem; }

.linkish {
  border: none;
  background: none;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0;
}
.linkish:hover { text-decoration: underline; }

.rec {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 2.6rem;
}
.rec-high { color: var(--ok); }
.rec-mid { color: var(--accent); }
.rec-low { color: var(--warn); }

.badge.mid { background: #e0f2fe; color: #0369a1; }

.disclaimer {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Modal (replaces drawer) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%) scale(0.98);
  width: min(720px, calc(100vw - 1.5rem));
  max-height: min(88vh, 900px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.modal.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
/* Closed modals must not intercept clicks: UA [hidden]{display:none} is overridden by .modal{display:flex} */
.modal[hidden],
.modal:not(.open) {
  display: none !important;
  pointer-events: none !important;
  opacity: 0;
}
.modal-backdrop[hidden],
.modal-backdrop:not(.open) {
  display: none !important;
  pointer-events: none !important;
  opacity: 0;
}
.modal-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-body {
  padding: 1.1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}
.modal-foot {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.detail-code {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: 0.03em;
}
.detail-name { font-weight: 600; margin-top: 0.3rem; }
.detail-en { color: var(--muted); font-size: 0.85rem; margin-top: 0.15rem; }

/* Hide legacy drawer if present */
.drawer, .drawer-backdrop { display: none !important; }

@media (max-width: 720px) {
  td.clamp { max-width: 120px; }
  .modal { width: calc(100vw - 0.75rem); max-height: 92vh; }
}


a.header-meta {
  text-decoration: none;
  transition: color .15s ease;
}
a.header-meta:hover {
  color: var(--brand);
  text-decoration: none;
}


/* p0 stars */
.rec small { font-weight: 600; margin-left: 4px; opacity: 0.85; }
.rec { letter-spacing: 0.5px; white-space: nowrap; }

/* —— P1/P2 —— */
.header-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.auth-phone {
  font-size: 0.82rem;
  color: var(--brand-dark);
  font-weight: 600;
  background: var(--brand-soft);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
.btn.sm { padding: 0.35rem 0.65rem; font-size: 0.82rem; }
.empty-en { color: var(--muted) !important; font-style: italic; font-weight: 500 !important; }
.login-err {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0.6rem 0 0;
}
.modal-sm { width: min(420px, calc(100vw - 1.5rem)); }
.modal-wide { width: min(920px, calc(100vw - 1.5rem)); }
.tag-deep {
  display: inline-block;
  font-size: 0.72rem;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.25rem;
  font-weight: 600;
  vertical-align: middle;
}
.src-tag {
  font-size: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  color: var(--muted);
}
.field input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.rec[title] { cursor: help; }

/* —— P3 体验优化 —— */
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ink);
}
.panel-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.inline-filter select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
  background: #fff;
  color: var(--ink);
  max-width: 11rem;
}
.search-history {
  margin-top: 0.85rem;
  text-align: left;
}
.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.4rem;
}
.history-head .linkish {
  color: rgba(255, 255, 255, 0.92);
}
.history-head .linkish:hover {
  color: #fff;
}
.history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.history-chips .chip {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}
.history-chips .chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.pager-btns {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.pager-btns button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  font-size: 0.82rem;
}
.pager-btns button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pager-btns button.active-page {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-dark);
  font-weight: 600;
}
.batch-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0.25rem;
}
.progress-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.15s ease;
}
.progress-text {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  min-width: 4.5rem;
}
.classify-empty-hint {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.classify-empty-hint[hidden] { display: none !important; }
.table-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
table.data thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}
#data-loading .load-steps {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.35rem;
  text-align: center;
  max-width: 22rem;
  line-height: 1.45;
}
#data-loading .load-bar {
  width: 220px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.65rem;
}
#data-loading .load-bar > i {
  display: block;
  height: 100%;
  width: 35%;
  background: var(--brand, #1e86fc);
  border-radius: 999px;
  animation: loadslide 1.1s ease-in-out infinite;
}
@keyframes loadslide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; order: 2; margin-left: auto; }
  .header-auth { order: 2; }
  .nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0.25rem;
    padding: 0.35rem 0 0.15rem;
    border-top: 1px solid var(--line);
    margin-top: 0.15rem;
  }
  .nav button {
    flex: 1 1 auto;
    white-space: nowrap;
    min-width: calc(33% - 0.25rem);
    text-align: center;
    padding: 0.55rem 0.6rem;
  }
  body.nav-collapsed .nav { display: none; }
  .panel-tools { width: 100%; }
  .inline-filter select { max-width: 8.5rem; }
  td.clamp { max-width: 140px; }
}
