/* ============================================================
   标策 · USPTO 管理平台 — 现代化设计系统
   ============================================================ */
:root {
  /* 主色：靛蓝 → 紫罗兰渐变体系 */
  --brand: #6366f1;
  --brand-strong: #4f46e5;
  --brand-soft: #eef0ff;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  /* 中性色 */
  --ink: #1e2233;
  --ink-soft: #4a5168;
  --muted: #8a92a6;
  --line: #eceef4;
  --line-soft: #f2f3f8;
  --bg: #f6f7fb;
  --card: #ffffff;

  /* 功能色 */
  --coral: #f97362;
  --teal: #14b8a6;
  --gold: #f5a623;
  --blue: #3b82f6;
  --green: #16b364;
  --danger: #ef4444;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(20, 24, 51, .05), 0 1px 3px rgba(20, 24, 51, .04);
  --shadow-md: 0 4px 14px rgba(30, 33, 51, .06), 0 2px 6px rgba(30, 33, 51, .04);
  --shadow-lg: 0 18px 48px rgba(40, 44, 89, .14);
  --shadow-brand: 0 10px 24px rgba(99, 102, 241, .32);

  --radius: 16px;
  --radius-sm: 11px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.6 "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(99, 102, 241, .18); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d6d9e6; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #c2c6d8; background-clip: padding-box; }

/* ============================ 布局骨架 ============================ */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }

/* ============================ 侧边栏 ============================ */
.sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 30;
  padding: 26px 16px;
  display: flex; flex-direction: column;
  color: #c7cbe6;
  background: linear-gradient(180deg, #221f4d 0%, #1a1840 55%, #14132f 100%);
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 24px; }
.brand-mark {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  border-radius: 13px; background: var(--brand-grad); color: #fff;
  font: 700 21px/1 "PingFang SC", serif; box-shadow: var(--shadow-brand);
}
.brand-text strong { display: block; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .14em; }
.brand-text span { display: block; margin-top: 2px; font-size: 11px; color: #8b8fc0; letter-spacing: .04em; }

.nav-list { display: grid; gap: 4px; margin-top: 14px; }
.nav-item {
  width: 100%; border: 0; border-radius: 11px; padding: 11px 13px;
  color: #a7abd1; background: transparent;
  display: flex; align-items: center; gap: 12px; text-align: left;
  font-size: 14px; font-weight: 500; position: relative;
  transition: background .18s, color .18s;
}
.nav-item svg { width: 19px; height: 19px; fill: currentColor; opacity: .85; flex: 0 0 19px; }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item.active {
  color: #fff; background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--brand-grad);
}
.nav-item.active svg { opacity: 1; }

.sidebar-foot {
  margin-top: auto; padding: 12px 13px; font-size: 12px; color: #8b8fc0;
  display: flex; align-items: center; gap: 9px; border-top: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-foot i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22, 179, 100, .18); }
.sidebar-foot.offline i { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .18); }

/* ============================ 主区域 ============================ */
.main { min-width: 0; padding: 0 40px 52px; }
.topbar {
  position: sticky; top: 0; z-index: 15;
  height: 80px; display: flex; align-items: center; gap: 16px;
  margin: 0 -40px 28px; padding: 0 40px;
  background: rgba(246, 247, 251, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; }
.eyebrow, .section-kicker { margin: 0 0 4px; color: var(--brand-strong); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.today {
  color: var(--ink-soft); font-size: 13px; font-weight: 500;
  padding: 8px 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow-sm);
}

.page { display: none; animation: rise .28s cubic-bezier(.16, 1, .3, 1); }
.page.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ============================ 统计卡片 ============================ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 22px 0; }
.stat-card {
  padding: 22px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 16px;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon { width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; border-radius: 14px; color: #fff; }
.stat-icon svg { width: 24px; height: 24px; fill: currentColor; }
.stat-icon.coral { background: linear-gradient(135deg, #fb7185, #f43f5e); box-shadow: 0 8px 18px rgba(244, 63, 94, .26); }
.stat-icon.teal { background: linear-gradient(135deg, #2dd4bf, #14b8a6); box-shadow: 0 8px 18px rgba(20, 184, 166, .26); }
.stat-icon.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 8px 18px rgba(245, 158, 11, .26); }
.stat-icon.blue { background: linear-gradient(135deg, #60a5fa, #3b82f6); box-shadow: 0 8px 18px rgba(59, 130, 246, .26); }
.stat-meta span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-meta strong { display: block; margin-top: 3px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }

/* ============================ 面板 ============================ */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head, .section-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-head { padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.panel-head h3, .section-intro h2 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.panel-head h3 { font-size: 18px; }
.section-intro { margin-bottom: 24px; }
.section-intro h2 { font-size: 26px; }
.section-intro p:not(.section-kicker) { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* ============================ 按钮 ============================ */
.btn {
  border: 0; border-radius: var(--radius-sm); padding: 11px 18px;
  font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
  transition: transform .15s, box-shadow .2s, background .18s, filter .18s;
}
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { color: #fff; background: var(--brand-grad); box-shadow: var(--shadow-brand); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 28px rgba(99, 102, 241, .4); }
.btn-secondary { color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--line-soft); border-color: #dfe2ee; }
.btn-soft-brand { color: var(--brand-strong); background: var(--brand-soft); border: 1px solid #bfc2ef; box-shadow: var(--shadow-sm); }
.btn-soft-brand:hover { background: #e3e6ff; border-color: var(--brand); }
.btn-soft-teal { color: #0f766e; background: #d3f4ee; border: 1px solid #8bddce; box-shadow: var(--shadow-sm); }
.btn-soft-teal:hover { background: #c2efe6; border-color: var(--teal); }
.btn-soft-green { color: #0f7a43; background: #d8f6e6; border: 1px solid #99e4bd; box-shadow: var(--shadow-sm); }
.btn-soft-green:hover { background: #c6f0d8; border-color: var(--green); }
.btn-soft-gold { color: #9a6700; background: #fdf3d6; border: 1px solid #f0d493; box-shadow: var(--shadow-sm); }
.btn-soft-gold:hover { background: #fbe9b8; border-color: var(--gold); }
.btn .plus { font-size: 16px; line-height: 1; }
.text-btn { color: var(--brand-strong); border: 0; background: transparent; font-weight: 600; padding: 6px 8px; border-radius: 8px; transition: background .15s; }
.text-btn:hover { background: var(--brand-soft); }

/* ============================ 工具栏 / 搜索 ============================ */
.toolbar { padding: 16px 22px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-action { margin-left: auto; white-space: nowrap; }
.search-box {
  width: min(440px, 55%); height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
  display: flex; align-items: center; gap: 9px; transition: border-color .18s, box-shadow .18s, background .18s;
}
.search-box.wide { width: min(560px, 100%); }
.search-box svg { width: 18px; height: 18px; fill: var(--muted); flex: 0 0 18px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }
.search-box:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(99, 102, 241, .12); }
.search-box:focus-within svg { fill: var(--brand); }

select, .compact-input, textarea, .field input, .field select {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
select, .compact-input { height: 44px; padding: 0 13px; }
.compact-input { width: 160px; }
select:focus, input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(99, 102, 241, .12); }

/* ============================ 表格 ============================ */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 13px 18px; color: var(--muted); background: var(--line-soft);
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  text-align: left; white-space: nowrap;
}
td { padding: 14px 18px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--brand-soft); }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { max-width: 330px; margin-top: 2px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.class-pill, .status-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.class-pill { min-width: 34px; padding: 4px 10px; color: var(--brand-strong); background: var(--brand-soft); }
.status-pill { padding: 5px 11px; color: #0e9c83; background: rgba(20, 184, 166, .12); }

.status-badge { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; padding: 5px 9px 5px 12px; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: filter .15s, box-shadow .15s; }
.status-badge svg { width: 14px; height: 14px; fill: currentColor; opacity: .7; }
.status-badge:hover { filter: brightness(.97); box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.status-badge.step-0, .status-pill.step-0 { color: #dc2626; background: rgba(239, 68, 68, .12); }
.status-badge.step-1, .status-pill.step-1 { color: #ea580c; background: rgba(249, 115, 22, .14); }
.status-badge.step-2, .status-pill.step-2 { color: #a16207; background: rgba(234, 179, 8, .18); }
.status-badge.step-3, .status-pill.step-3 { color: #15803d; background: rgba(34, 197, 94, .16); }

.status-menu { position: absolute; z-index: 200; width: 240px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 2px; }
.status-menu-item { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 11px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink); }
button.status-menu-item { cursor: pointer; }
button.status-menu-item:hover { background: var(--brand-soft); color: var(--brand-strong); }
.status-menu-item em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); }
.status-menu-item.current { color: var(--brand-strong); background: var(--brand-soft); font-weight: 700; }
.status-menu-item.disabled { color: var(--muted); opacity: .55; }

.status-flow { padding: 22px 28px 6px; }
.status-flow-head { display: flex; align-items: center; gap: 12px; }
.status-flow-arrow { color: var(--muted); font-size: 18px; font-weight: 700; }
.status-hint { margin: 16px 0 14px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }
.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-row { display: flex; align-items: flex-start; gap: 14px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); background: var(--bg); }
.check-row .check-label { flex: 0 0 88px; font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.check-row .check-value { flex: 1; font-size: 13px; color: var(--ink); word-break: break-word; }
.check-row.ok .check-label::before { content: "✓ "; color: #0e9c83; }
.check-row.missing { border-color: rgba(239, 68, 68, .4); background: rgba(239, 68, 68, .06); }
.check-row.missing .check-label, .check-row.missing .check-value { color: var(--danger); }
.check-row.missing .check-label::before { content: "✕ "; }

/* 批量改状态：表头触发按钮（样式与商标状态按钮一致）+ 校验结果列表 */
#tm-progress-head { white-space: nowrap; }
.batch-status-trigger { margin-left: 10px; vertical-align: middle; color: #fff; background: var(--brand-grad); box-shadow: var(--shadow-sm); }
.batch-status-trigger:hover { filter: brightness(1.05); box-shadow: 0 6px 16px rgba(99, 102, 241, .3); }
.status-flow-label { font-weight: 700; color: var(--ink-soft); font-size: 14px; }
.batch-status-body { padding: 22px 28px 6px; }
#batch-status-flow { margin-bottom: 2px; }
.batch-status-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; background: #fff; border: 1px solid var(--line-soft); }
.batch-status-row.missing { border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .05); }
.batch-status-row .bs-flow { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.batch-status-row .bs-flow .status-flow-arrow { font-size: 14px; }
.batch-status-row .bs-result { flex: 0 0 auto; min-width: 96px; text-align: right; font-size: 13px; }
.batch-status-row .bs-review-name { flex: 0 0 130px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-status-row .bs-review-detail { flex: 1; min-width: 0; text-align: right; font-size: 13px; color: var(--ink-soft); }
.batch-status-row .bs-review-detail strong { color: var(--brand-strong); }

.actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; white-space: nowrap; }
.action-btn { border: 1px solid transparent; padding: 6px 10px; border-radius: 8px; color: var(--ink-soft); background: transparent; font-weight: 600; transition: background .15s, color .15s, border-color .15s; }
.action-btn:hover { background: var(--brand-soft); color: var(--brand-strong); }
.action-btn.primary { color: var(--brand-strong); background: var(--brand-soft); border-color: #bfc2ef; }
.action-btn.primary:hover { background: var(--brand-grad); color: #fff; border-color: transparent; }
.action-btn.accent { color: #0f766e; background: #d3f4ee; border-color: #8bddce; }
.action-btn.accent:hover { background: var(--teal); color: #fff; border-color: transparent; }
.action-btn.danger:hover { background: rgba(239, 68, 68, .1); color: var(--danger); }

/* ============================ 分页 ============================ */
.pagination { padding: 14px 22px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: var(--muted); font-size: 13px; }
.pagination span { margin-right: auto; }
.pagination button { min-width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-soft); font-weight: 600; transition: all .15s; }
.pagination button:hover:not(:disabled):not(.active) { border-color: var(--brand); color: var(--brand-strong); }
.pagination button.active { color: #fff; border-color: transparent; background: var(--brand-grad); box-shadow: var(--shadow-brand); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ============================ 大类筛选条 ============================ */
.category-strip { display: flex; gap: 9px; padding: 2px 2px 20px; overflow-x: auto; }
.category-chip { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-soft); background: var(--card); font-weight: 500; box-shadow: var(--shadow-sm); transition: all .15s; }
.category-chip:hover { border-color: var(--brand); color: var(--brand-strong); }
.category-chip.active { color: #fff; border-color: transparent; background: var(--brand-grad); box-shadow: var(--shadow-brand); }
.category-chip b { margin-right: 6px; color: inherit; font-weight: 700; }

/* ============================ 查询页 ============================ */
.query-layout { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(460px, 1.28fr); gap: 20px; }
.query-form { padding: 26px; }
.query-form label { display: block; margin-bottom: 10px; font-weight: 600; }
.query-form textarea { width: 100%; padding: 14px; resize: vertical; line-height: 1.7; }
.field-hint { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.button-row { display: flex; gap: 10px; margin-top: 22px; }
.query-result { min-height: 460px; }
.empty-state { min-height: 330px; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.empty-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: var(--brand-soft); margin-bottom: 12px; }
.empty-icon svg { width: 28px; height: 28px; fill: var(--brand); opacity: .7; }
.empty-state strong { color: var(--ink); font-size: 15px; }
.empty-state span { font-size: 13px; }
.muted { color: var(--muted); font-size: 12px; }
.success-text { color: var(--green); font-weight: 600; }
.error-text { color: var(--danger); font-weight: 600; }

/* ============================ 弹窗 ============================ */
.modal-backdrop { position: fixed; inset: 0; padding: 28px; background: rgba(20, 19, 47, .5); backdrop-filter: blur(5px); display: grid; place-items: center; z-index: 100; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(840px, 100%); max-height: calc(100vh - 56px); overflow-y: auto; border-radius: 20px; background: #fff; box-shadow: var(--shadow-lg); animation: pop .26s cubic-bezier(.16, 1, .3, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-head { position: sticky; top: 0; z-index: 2; padding: 22px 28px; border-bottom: 1px solid var(--line-soft); background: #fff; display: flex; justify-content: space-between; align-items: flex-start; }
.modal-head h3 { margin: 0; font-size: 21px; font-weight: 700; }
.icon-btn { border: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); background: transparent; font-size: 24px; line-height: 1; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }

.form-grid { padding: 26px 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select { width: 100%; min-height: 44px; padding: 11px 13px; }
.field textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
.smart-paste { background: var(--brand-soft); border: 1px dashed #c7c9f5; border-radius: var(--radius-sm); padding: 14px 16px; gap: 9px; }
.smart-paste label { color: var(--brand-strong); }
.smart-paste textarea { min-height: 104px; background: #fff; }
.smart-paste .button-row { margin-top: 12px; }
.smart-paste .field-hint { margin: 8px 0 0; }
.batch-row-error { background: rgba(239, 68, 68, .05); }
.batch-row-error:hover { background: rgba(239, 68, 68, .09); }
.batch-goods { max-width: 360px; }
.modal-actions { position: sticky; bottom: 0; padding: 18px 28px; border-top: 1px solid var(--line-soft); background: #fbfbfe; display: flex; justify-content: flex-end; gap: 10px; }
.form-products { padding: 4px 28px 12px; }
.form-products .panel-head { padding: 0 0 14px; }
.form-products .table-wrap { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.form-products .field-hint { margin: 12px 0 0; }
#form-tm-name[readonly], #form-tm-class[readonly] { background: var(--line-soft); color: var(--ink-soft); cursor: default; }

.picker-trigger {
  width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; text-align: left; font-size: 14px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.picker-trigger:hover { border-color: var(--brand); }
.picker-trigger:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.picker-trigger .chev { width: 18px; height: 18px; flex: 0 0 18px; fill: var(--muted); }
.picker-trigger .muted { color: var(--muted); }

#picker-backdrop { z-index: 120; }
.picker-modal { width: min(560px, 100%); display: flex; flex-direction: column; }
.picker-body { padding: 20px 28px 8px; display: flex; flex-direction: column; gap: 10px; }
.picker-body .search-box { width: 100%; }
.picker-list { margin-top: 4px; max-height: min(52vh, 460px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.picker-item {
  width: 100%; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px;
  background: #fff; text-align: left; display: flex; flex-direction: column; gap: 4px;
  transition: background .15s, border-color .15s;
}
.picker-item:hover { background: var(--brand-soft); border-color: var(--brand); }
.picker-item-name { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.picker-item-name strong { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.picker-item-name em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.picker-item-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }

/* ============================ Toast ============================ */
.toast { position: fixed; right: 26px; bottom: 26px; padding: 13px 20px; border-radius: var(--radius-sm); color: #fff; background: #1e2233; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(14px); pointer-events: none; transition: .25s cubic-bezier(.16, 1, .3, 1); z-index: 150; font-weight: 500; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* ============================ 工具类 ============================ */
.hidden { display: none !important; }
[hidden] { display: none !important; }
.mobile-only { display: none; }
.empty-row { height: 140px; color: var(--muted); text-align: center; }

/* ============================ 登录页 ============================ */
.login-screen {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(135deg, #221f4d 0%, #1a1840 55%, #14132f 100%);
}
.login-card {
  width: min(420px, 100%); background: var(--card); border-radius: 22px; padding: 40px 36px;
  box-shadow: var(--shadow-lg); animation: pop .3s cubic-bezier(.16, 1, .3, 1);
}
.login-brand { display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 22px; }
.login-brand .brand-text strong { color: var(--ink); font-size: 18px; letter-spacing: .14em; }
.login-brand .brand-text span { color: var(--muted); font-size: 11px; }
.login-title { margin: 0; text-align: center; font-size: 22px; font-weight: 700; }
.login-sub { margin: 8px 0 26px; text-align: center; color: var(--muted); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .field input { width: 100%; min-height: 46px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.login-error { margin: 0; padding: 10px 13px; border-radius: var(--radius-sm); background: rgba(239, 68, 68, .1); color: var(--danger); font-size: 13px; font-weight: 500; }
.login-submit { justify-content: center; height: 48px; margin-top: 4px; font-size: 15px; letter-spacing: .3em; }

/* ============================ 侧边栏用户区 ============================ */
.sidebar-user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 13px; border-top: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-user + .sidebar-foot { margin-top: 0; }
.sidebar-user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sidebar-user-avatar {
  width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px;
  background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 16px; box-shadow: var(--shadow-brand);
}
.sidebar-user-meta { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user-meta strong { color: #fff; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-meta em { font-style: normal; color: #8b8fc0; font-size: 11.5px; }
.logout-btn {
  flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px;
  color: #a7abd1; background: rgba(255, 255, 255, .05); transition: background .15s, color .15s;
}
.logout-btn:hover { background: rgba(239, 68, 68, .22); color: #fff; }
.logout-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ============================ 角色标签 ============================ */
.role-pill { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); background: var(--line-soft); }
.role-pill.admin { color: var(--brand-strong); background: var(--brand-soft); }

/* ============================ 批量删除 ============================ */
.btn-danger { color: #fff; background: linear-gradient(135deg, #f87171, #ef4444); box-shadow: 0 8px 18px rgba(239, 68, 68, .28); }
.btn-danger:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 12px 24px rgba(239, 68, 68, .36); }
#trademark-select-toggle.active { box-shadow: 0 0 0 3px rgba(99, 102, 241, .35), var(--shadow-brand); filter: brightness(.96); }

/* 新增下拉菜单 */
.dropdown { position: relative; display: inline-flex; }
.dropdown .chev { width: 16px; height: 16px; fill: currentColor; margin-left: 2px; opacity: .85; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 168px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 2px; }
.dropdown-item { width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.dropdown-item:hover { background: var(--brand-soft); color: var(--brand-strong); }

.select-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 22px; border-bottom: 1px solid var(--line-soft); background: var(--brand-soft);
}
.select-bar .select-inline { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.select-bar .select-inline input { width: 16px; height: 16px; accent-color: var(--brand-strong); cursor: pointer; }
.select-bar .text-btn { padding: 6px 10px; }
.select-count { font-weight: 700; color: var(--brand-strong); }
.select-bar-spacer { flex: 1; }
.select-tip { color: var(--muted); font-size: 12px; }

.select-cell { width: 44px; text-align: center; padding-left: 18px; padding-right: 0; }
.select-cell input { width: 16px; height: 16px; accent-color: var(--brand-strong); cursor: pointer; vertical-align: middle; }
tbody tr.row-selected { background: rgba(99, 102, 241, .1); }
tbody tr.row-selected:hover { background: rgba(99, 102, 241, .16); }

.batch-delete-body { padding: 22px 28px 6px; }
.del-warning { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.del-warning strong { color: var(--danger); }
.del-list { max-height: min(48vh, 420px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px; background: var(--bg); }
.del-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; background: #fff; border: 1px solid var(--line-soft); }
.del-idx { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--line-soft); color: var(--muted); font-size: 12px; font-weight: 700; }
.del-name { flex: 1; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================ 响应式 ============================ */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .query-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: calc(-1 * var(--sidebar-w) - 10px); width: var(--sidebar-w); transition: left .25s cubic-bezier(.16, 1, .3, 1); box-shadow: 12px 0 40px rgba(0, 0, 0, .25); }
  .sidebar.open { left: 0; }
  .main { padding: 0 16px 40px; }
  .topbar { margin: 0 -16px 22px; padding: 0 16px; height: 70px; }
  .nav-item.active::before { left: 0; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; gap: 12px; }
  .stat-icon { width: 42px; height: 42px; flex-basis: 42px; }
  .stat-meta strong { font-size: 23px; }
  .section-intro { flex-direction: column; align-items: flex-start; gap: 14px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box, .search-box.wide, .compact-input, select { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .modal-backdrop { padding: 12px; }
  .modal { max-height: calc(100vh - 24px); }
  .topbar .eyebrow { display: none; }
  .today { font-size: 11px; padding: 6px 10px; }
}
