/* ─── Design tokens · 鹿港靛紫品牌体系（对齐卡片模版 base.html）──────── */
:root {
  /* 品牌主色：靛紫渐变（与卡片头一致 #6366f1→#8b5cf6→#a78bfa） */
  --brand:    #6366f1;
  --brand-2:  #8b5cf6;
  --brand-3:  #a78bfa;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --accent:   #6366f1;
  --accent-d: #4f46e5;
  --gold:     #d97706;
  /* 暖紫中性（对齐卡片文字/线条/底色） */
  --text:    #1e1b2e;
  --text-2:  #5b5672;
  --muted:   #8b85a0;
  --bg:      #f2f0fa;
  --card:    #ffffff;
  --inset:   #f8f7fc;
  --inset-2: #faf9fd;
  --line:    #ebe8f4;
  --line-2:  #e8e5f0;
  --field-bd:#ddd8ec;
  /* 看板四象限语义色（用户满意，保持不变） */
  --sell:    #16a34a;
  --buy:     #2563eb;
  --trade:   #7c3aed;
  --rent:    #b45309;
  /* 靛紫染色的层次阴影 */
  --sh-xs: 0 1px 2px rgba(99,102,241,.07);
  --sh-sm: 0 2px 8px rgba(99,102,241,.09), 0 1px 2px rgba(30,27,46,.04);
  --sh-md: 0 6px 22px rgba(99,102,241,.13), 0 2px 6px rgba(30,27,46,.05);
  --sh-lg: 0 16px 44px rgba(76,29,149,.20), 0 6px 14px rgba(30,27,46,.09);
  --r:  9px;
  --rm: 13px;
  --rl: 17px;
  --t: .16s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ──────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
/* hidden 属性必须压过任何 display 规则 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 暖紫极淡底色 + 顶部双光晕，让白卡片浮起来（一流网站的氛围底） */
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(139,92,246,.10), transparent 60%),
    radial-gradient(820px 400px at 92% -6%, rgba(99,102,241,.09), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv01", "ss01";
}

/* 数字统一等宽对齐（价格/数量/编号更整齐——一流站细节） */
.lst-price, .lst-qty, .lst-code, .extra-price, .quick-metrics strong,
.total-badge, .count, .nav-badge, .inline-badge, .my-row-line2, .auth-chip {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

::selection { background: rgba(99,102,241,.22); color: var(--text); }

/* 品牌化滚动条 */
* { scrollbar-width: thin; scrollbar-color: #cdc6e6 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: #cdc6e6;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: #b3a9da; background-clip: content-box; }

/* ─── Page ───────────────────────────────────────────────────────── */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

/* 入场动画（克制、尊重 reduced-motion） */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sidebar { animation: reveal-up .45s cubic-bezier(.22,.61,.36,1) both; }
.topbar  { animation: reveal-up .45s cubic-bezier(.22,.61,.36,1) both; animation-delay: .05s; }
/* 切换视图时当前面板整块淡入上移 */
[data-view-panel]:not([hidden]) {
  animation: reveal-up .34s cubic-bezier(.22,.61,.36,1) both;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── App shell 应用外壳（侧边栏 + 主区 + 底部Tab）──────────────────── */
.app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 22px;
  background: var(--brand-grad);
  box-shadow: 0 4px 12px rgba(99,102,241,.34);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 16px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.brand-text .brand-en {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #4b3a8a;
  margin-top: 1px;
  line-height: 1.15;
}
.brand-text span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  border: 0; background: transparent;
  padding: 11px 12px;
  border-radius: 11px;
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  transition: background var(--t), color var(--t);
  text-align: left;
}
.nav-item .ni-ico { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: var(--inset); color: var(--text); }
.nav-item.nav-active {
  background: linear-gradient(135deg, rgba(99,102,241,.13), rgba(139,92,246,.10));
  color: var(--accent-d);
}
.nav-item.nav-active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-grad);
}
.nav-item .nav-badge { margin-left: auto; }

.nav-item.nav-disabled {
  opacity: .55;
}
.nav-item.nav-disabled:hover {
  background: transparent;
  color: var(--text-2);
}

.sidebar-foot { margin-top: auto; padding-top: 12px; }
.side-safe {
  font-size: 11px; color: #92400e; font-weight: 700;
  background: linear-gradient(90deg, #fffbeb, #fef9ee);
  border: 1px solid #fcd34d; border-radius: 10px;
  padding: 9px 10px; text-align: center; line-height: 1.5;
}

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-brand-mini { display: none; font-size: 20px; }
#viewTitle { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.topbar-right input { width: 130px; }

.view-area { max-width: 1140px; width: 100%; margin: 0 auto; padding: 16px 24px 40px; }

/* ─── 移动端底部 Tab 栏 ─── */
.bottom-tabs { display: none; }

/* ─── Beta strip ─────────────────────────────────────────────────── */
.beta-strip {
  background: linear-gradient(90deg, #fffbeb, #fef9ee);
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: var(--rm);
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  padding: 7px 12px;
  letter-spacing: .02em;
  box-shadow: var(--sh-xs);
}

/* ─── Header · 鹿港靛紫品牌渐变（与卡片头同源）────────────────────── */
.market-header {
  margin-top: 12px;
  background: var(--brand-grad);
  color: #fff;
  border-radius: var(--rl);
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 14px 40px rgba(99,102,241,.30), 0 4px 12px rgba(76,29,149,.18);
  position: relative;
  overflow: hidden;
}

/* 右上柔光球（呼应卡片 .card-header::after） */
.market-header::after {
  content: "";
  position: absolute;
  top: -70px; right: -40px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,.20) 0%, transparent 62%);
  border-radius: 50%;
  pointer-events: none;
}

/* 细网格底纹，增加科技/高级质感 */
.market-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}

.header-brand { position: relative; z-index: 1; }

h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 1px 3px rgba(76,29,149,.35);
}

.subtitle {
  margin: 5px 0 0;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  letter-spacing: .02em;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.header-actions input {
  width: 140px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  border-radius: var(--r);
  padding: 8px 12px;
  font-size: 13px;
  transition: background var(--t), border-color var(--t);
}

.header-actions input::placeholder { color: rgba(255,255,255,.4); }

.header-actions input:focus {
  outline: none;
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.45);
  box-shadow: none;
}

.total-badge {
  background: var(--inset);
  border: 1px solid var(--line);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .02em;
}

/* ─── Navigation ─────────────────────────────────────────────────── */
.page-nav {
  display: flex;
  gap: 4px;
  margin: 10px 0 0;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rm);
  box-shadow: var(--sh-xs);
}

.page-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 6px;
  border-radius: var(--r);
  transition: background var(--t), color var(--t), box-shadow var(--t);
}

.page-nav a:hover {
  background: #f1f5f9;
  color: var(--text);
}

.page-nav a.nav-active {
  background: var(--brand-grad);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(99,102,241,.36);
}

/* ─── Quick metrics ──────────────────────────────────────────────── */
.quick-metrics {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-metrics article {
  background: linear-gradient(180deg, #ffffff, var(--inset-2));
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 10px 12px 10px 16px;
  box-shadow: var(--sh-xs);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--t), transform var(--t);
}

.quick-metrics article:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

.quick-metrics article::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.quick-metrics article:nth-child(1)::before { background: var(--sell); }
.quick-metrics article:nth-child(2)::before { background: var(--buy); }
.quick-metrics article:nth-child(3)::before { background: var(--trade); }
.quick-metrics article:nth-child(4)::before { background: var(--rent); }

.quick-metrics p {
  margin: 0;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.quick-metrics strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--text);
}

/* ─── Filters ────────────────────────────────────────────────────── */
.filters {
  margin-top: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 14px 16px;
  box-shadow: var(--sh-xs);
}

.filter-main {
  display: grid;
  gap: 8px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

/* ─── Form controls ──────────────────────────────────────────────── */
input, select, textarea, button { font: inherit; }

input, select, textarea {
  background: var(--inset);
  border: 1.5px solid var(--field-bd);
  border-radius: var(--r);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

/* 彻底移除数字输入框的上下箭头（历史遗留/某些浏览器仍会给 spinbutton） */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.16);
  background: #fff;
}

/* ─── Chips ──────────────────────────────────────────────────────── */
.chips {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border: 1.5px solid var(--field-bd);
  background: var(--card);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.chip.active {
  background: #eef2ff;
  border-color: var(--accent);
  color: var(--accent-d);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(99,102,241,.18);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}

/* ─── Board (结构与线上一致，勿改 DOM/CSS 层级) ───────────────────── */
.board {
  margin-top: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rm);
  overflow: hidden;
  box-shadow: var(--sh-xs);
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.col {
  padding: 8px 12px 10px;
  min-width: 0;
  overflow: hidden;
}

.col + .col { border-left: 1px solid var(--line); }

.col-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 2px solid currentColor;
}

.col.sell .col-head { color: #16a34a; }
.col.buy .col-head  { color: #2563eb; }

.count {
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 8px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}

.list { min-height: 120px; }

.lst {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  border-bottom: 1px dashed #f0eef8;
  padding: 5px 4px;
  font-size: 11.5px;
  line-height: 1.35;
}

.lst:last-child { border-bottom: 0; }

.lst-num {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  background: #e2e8f0;
  flex-shrink: 0;
  margin-top: 1px;
}

.col.sell .lst-num { color: #047857; background: #d1fae5; }
.col.buy  .lst-num { color: #6d28d9; background: #ede9fe; }

.lst-num.official {
  background: linear-gradient(135deg, #b45309, #d97706, #fbbf24);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 0 0 2px #fef3c7, 0 2px 6px rgba(180, 83, 9, 0.5);
  transform: scale(1.08);
}

.lst-num.official::before {
  content: "📌";
  position: absolute;
  top: -7px;
  right: -8px;
  font-size: 11px;
  background: #fff;
  border-radius: 50%;
  padding: 1px 1px 0 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  line-height: 1;
}

.lst-main { flex: 1; min-width: 0; }

.lst-line1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.lst-line2 {
  margin-top: 2px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
}

.lst-line2 .lst-price { grid-column: 1; }
.lst-line2 .lst-total { grid-column: 2; }
.lst-line2 .lst-loc { grid-column: 3; }

.lst-line3 {
  margin-top: 2px;
  font-size: 9.5px;
  color: #8b85a0;
  display: grid;
  grid-template-columns: minmax(3.2em, auto) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
}

.lst-line3 .lst-code { grid-column: 1; }
.lst-line3 .lst-meta { grid-column: 2; }
.lst-line3 .lst-act { grid-column: 3; }

/* 委员会模式：把「接单 / 委改 / 委撤」收进同一列（接单下方竖排） */
.lst-line3.lst-line3-has-comm { align-items: start; }

.lst-act-col {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.lst-act-col .lst-act { width: 86px; }
.lst-act-col .mini-btn-comm { width: auto; }

.lst-total[hidden] { display: none !important; }

.lst-name {
  margin: 0;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.lst-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.lst-name-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.lst-name-text {
  font-weight: 700;
  font-size: 13px;
  color: #1e1b2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.lst-en {
  display: inline-block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 400;
  margin-left: 4px;
  vertical-align: middle;
}

.lst-quality {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 9.5px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

.lst-qty {
  margin: 0;
  color: #5b5672;
  font-size: 10.5px;
  font-weight: 600;
  flex-shrink: 0;
  padding-top: 1px;
  line-height: 1.35;
}

.lst-loc {
  margin: 0;
  color: #6b7280;
  font-size: 10.5px;
  flex: 1;
  min-width: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lst-meta {
  margin: 0;
  min-width: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-self: end;
}

.lst-meta .lst-cred {
  margin-left: 4px;
}

.lst-price {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  color: #d97706;
  flex-shrink: 0;
}

.col.buy .lst-price { color: #7c3aed; }

.lst-total {
  margin: 0;
  font-size: 9.5px;
  font-weight: 700;
  color: #d97706;
  flex-shrink: 0;
}

.col.buy .lst-total { color: #7c3aed; }

.lst-code {
  margin: 0;
  font-family: Menlo, Consolas, monospace;
  font-size: 9.5px;
  color: #8b85a0;
  font-weight: 700;
  flex-shrink: 0;
}

.lst-seller {
  color: #475569;
  font-weight: 600;
}

.lst-cred {
  display: inline-block;
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 3px;
  padding: 0 4px;
  margin-left: 4px;
  font-weight: 700;
}

.lst-cred-official {
  background: transparent;
  color: #b45309;
  margin-left: 0;
}

.lst-act {
  align-self: center;
  margin-left: 4px;
}

.mini-btn {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  font-weight: 600;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}

.mini-btn:hover {
  background: #e0e7ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(67,56,202,.2);
}

.footer-extra {
  padding: 8px 14px 4px;
  background: #faf9fd;
}

.extra-block { margin-top: 4px; }

.extra-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.extra-head.trade { color: #9333ea; }
.extra-head.rent  { color: #d97706; }

.extra-head .count {
  font-size: 9.5px;
  margin-left: 3px;
}

.extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed #f0eef8;
  padding: 3px 0;
  font-size: 11px;
  color: #1e1b2e;
}

.extra-row:last-child { border-bottom: 0; }

.extra-num {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  text-align: center;
  font-weight: 800;
  font-size: 10px;
  line-height: 18px;
}

.extra-block .extra-head.trade ~ #tradeList .extra-row .extra-num {
  background: #ede9fe;
  color: #6d28d9;
}

.extra-block .extra-head.rent ~ #rentList .extra-row .extra-num {
  background: #fef3c7;
  color: #b45309;
}

.extra-code {
  flex-shrink: 0;
  font-family: Menlo, Consolas, monospace;
  font-size: 9.5px;
  color: #8b85a0;
  margin-right: 2px;
}

.extra-name {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extra-official {
  display: inline-block;
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 3px;
  vertical-align: middle;
}

.extra-price {
  margin: 0;
  color: #d97706;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.extra-act {
  flex-shrink: 0;
}

/* ─── Section containers ─────────────────────────────────────────── */
.my-center,
.committee-center,
.help-center,
.fleet-center {
  margin-top: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 16px 20px;
  box-shadow: var(--sh-xs);
}

/* ─── Fleet management ───────────────────────────────────────────── */
.fleet-role-card {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--rm);
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}

.fleet-role-card strong {
  color: var(--accent-d);
  font-size: 15px;
}

.fleet-draft-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--rm);
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.fleet-section-head {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}

.fleet-jielong-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fleet-jielong-card {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 12px 14px;
  background: var(--card);
}

.fleet-jielong-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.fleet-jielong-card .fj-meta {
  margin: 3px 0;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}

.fleet-jielong-card .fj-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-d);
  background: #eef2ff;
  border-radius: 6px;
  padding: 1px 6px;
}

.fleet-cmd-grid {
  margin-top: 8px;
}

.fleet-stats-panel {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--rm);
  background: var(--inset);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
}

.fleet-sections-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fleet-group-block {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  overflow: hidden;
  background: var(--card);
}

.fleet-group-head {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(90deg, #eef2ff, #fafafa);
  border-bottom: 1px solid var(--line);
}

.fleet-signup-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.fleet-target-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 10px 12px 12px;
  margin: 10px 0 0;
}

.fleet-target-fieldset legend {
  font-size: 12px;
  font-weight: 700;
  padding: 0 4px;
}

.fleet-target-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 6px 0;
}

.fleet-dispatch-create-dialog { max-width: 760px; width: min(96vw, 760px); }

.fleet-squad-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fleet-squad-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  background: var(--card);
  cursor: pointer;
}

.fleet-squad-chip.active {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.10));
  color: var(--accent-d);
}

.fleet-squad-editors { display: flex; flex-direction: column; gap: 10px; }

.fleet-squad-editor {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  background: var(--card);
  padding: 10px 12px;
}

.fleet-squad-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.fleet-squad-editor-head strong { font-size: 13px; }

.fleet-role-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.fleet-role-row {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr auto;
  gap: 8px;
  align-items: center;
}

.fleet-role-row input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.fleet-role-row .mini-btn { padding: 8px 10px; }

.fleet-add-role {
  margin-top: 8px;
}

.fleet-detail-dialog {
  max-width: 640px;
  width: min(96vw, 640px);
}

.fleet-detail-body {
  padding: 0 18px 12px;
  max-height: min(70vh, 520px);
  overflow: auto;
  font-size: 13px;
  line-height: 1.55;
}

.fleet-detail-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--text-2);
}

.fleet-signup-list {
  margin: 0;
  padding-left: 18px;
}

.fleet-signup-list li {
  margin: 4px 0;
}

.fleet-dispatch-squad {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--rm);
  background: var(--inset);
}

.fleet-dispatch-squad h5 {
  margin: 0 0 6px;
  font-size: 12px;
}

.fleet-dispatch-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 6px;
}

.fleet-dispatch-headline strong { font-size: 13px; }
.fleet-dispatch-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fleet-dispatch-badges .fj-badge { margin-left: 0; }

.fleet-dispatch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 520px) {
  .fleet-dispatch-grid { grid-template-columns: 1fr; }
}

.fleet-dispatch-role {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 10px 8px;
}

.fleet-dispatch-role-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.fleet-dispatch-role-title span {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.fleet-dispatch-slots {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fleet-dispatch-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 12px;
  color: var(--text-2);
}

.fleet-dispatch-slot .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: #d1d5db;
}

.fleet-dispatch-slot.filled .dot { background: #22c55e; }
.fleet-dispatch-slot.empty  .dot { background: #f59e0b; }
.fleet-dispatch-slot .line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fleet-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ─── Help ───────────────────────────────────────────────────────── */
.help-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.help-card {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 14px 16px;
  background: var(--inset);
  transition: box-shadow var(--t);
}

.help-card:hover { box-shadow: var(--sh-sm); }

.help-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.help-card p {
  margin: 4px 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

.help-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  background: #eef2ff;
  color: var(--accent-d);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ─── Committee row ──────────────────────────────────────────────── */
.committee-row {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 10px 14px;
  background: var(--inset);
  transition: box-shadow var(--t);
}

.committee-row:hover { box-shadow: var(--sh-xs); }

.committee-row .my-row-line1,
.committee-row .my-row-line2 { font-size: 12px; }

/* ─── My head ────────────────────────────────────────────────────── */
.my-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.my-head strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
}

/* 区块标题前的品牌渐变竖条 */
.my-head strong::before {
  content: "";
  width: 4px;
  height: 17px;
  border-radius: 3px;
  margin-right: 9px;
  background: var(--brand-grad);
}

.my-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* 强制在第 4 / 5 按钮间换行 */
.actions-break {
  flex-basis: 100%;
  height: 0;
}

.my-hint {
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
  min-height: 18px;
}

.my-tools {
  margin: 8px 0;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.my-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

/* ─── My row ─────────────────────────────────────────────────────── */
.my-row {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 10px 14px;
  background: var(--inset);
  transition: box-shadow var(--t);
}

.my-row:hover { box-shadow: var(--sh-sm); }

.my-row-line1,
.my-row-line2 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.my-row-line1 { font-size: 13px; font-weight: 700; }

.my-row-line2 {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-2);
}

.my-row-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.primary-btn, .ghost-btn, .icon-btn {
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
  font-weight: 600;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}

.primary-btn {
  color: #fff;
  background: var(--brand-grad);
  padding: 9px 17px;
  font-size: 13px;
  box-shadow: 0 3px 10px rgba(99,102,241,.32);
}

.primary-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99,102,241,.42);
}

.primary-btn:active { transform: none; }

.ghost-btn {
  background: var(--card);
  border: 1.5px solid var(--field-bd);
  color: var(--text-2);
  padding: 7px 12px;
  font-size: 12px;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}

.ghost-btn:hover {
  background: var(--inset);
  border-color: var(--accent);
  color: var(--accent-d);
  transform: translateY(-1px);
}

.icon-btn {
  width: 30px;
  height: 30px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--t);
}

.icon-btn:hover { color: var(--text-2); }

/* ─── Dialogs ────────────────────────────────────────────────────── */
.dialog {
  border: 1px solid var(--line);
  border-radius: var(--rl);
  background: var(--card);
  width: min(760px, 92vw);
  color: var(--text);
  box-shadow: var(--sh-lg);
  padding: 0;
}

.dialog::backdrop {
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(2px);
}

.dialog form { padding: 20px; }

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.dialog-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-fields {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.action-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

.action-field small {
  color: var(--muted);
  margin-top: 2px;
}

.action-field input,
.action-field textarea,
.action-field select {
  background: var(--inset);
  color: var(--text);
  border: 1.5px solid var(--field-bd);
  border-radius: var(--r);
  padding: 8px 10px;
  font-size: 13px;
}

.action-field input[readonly] { opacity: .72; cursor: default; }

.action-field textarea[readonly] {
  font-size: 11px;
  line-height: 1.5;
  max-height: 220px;
  overflow-y: auto;
  opacity: .72;
  cursor: default;
}

.dialog-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

label > textarea { margin-top: 5px; }

.dialog-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ─── Todo banner ────────────────────────────────────────────────── */
.todo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 16px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: var(--rm);
  font-size: 13px;
  color: #9a3412;
  box-shadow: var(--sh-xs);
}

.todo-banner-btn {
  margin-left: auto;
  border: 0;
  background: #ea580c;
  color: #fff;
  border-radius: var(--r);
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: background var(--t);
}

.todo-banner-btn:hover { background: #c2410c; }

/* ─── Misc ───────────────────────────────────────────────────────── */
.nav-badge, .inline-badge {
  display: inline-block;
  min-width: 16px;
  margin-left: 4px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  vertical-align: middle;
}

.nav-badge[hidden], .inline-badge[hidden] { display: none; }

#section-market, #section-mine, #section-committee, #section-help {
  scroll-margin-top: 12px;
}

.fee-panel { grid-template-columns: auto auto auto !important; }

#committeeFeePanel {
  margin: 8px 0;
  gap: 8px;
  align-items: center;
}

#committeeFeePanel strong {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #059669;
  line-height: 1.4;
}

.field-hint.muted { color: var(--muted); }

/* requires_note 品类的醒目提示（型号配色填备注）*/
.field-hint.warn {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 11.5px;
}

.dialog-grid .span-2 { grid-column: span 2; }

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-size: 13px !important;
  color: var(--text) !important;
}

.checkbox-label input { width: auto; }

.empty {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 28px 8px;
}

/* ─── Proof viewer ───────────────────────────────────────────────── */
.proof-viewer-dialog {
  width: min(92vw, 720px);
  max-height: 90vh;
  border: none;
  padding: 0;
  border-radius: var(--rl);
}

.proof-header {
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 0;
}

.proof-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.proof-toolbar .btn-sm { padding: 4px 10px; font-size: 12px; }

#proofZoomLevel {
  font-size: 12px;
  color: var(--muted);
  min-width: 42px;
  text-align: center;
}

.proof-viewer-body {
  padding: 8px 12px 16px;
  background: #0f172a;
  max-height: calc(90vh - 60px);
  overflow: auto;
}

.proof-viewer-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  transform-origin: center top;
  transition: transform .15s ease;
}

/* ─── My row actions ─────────────────────────────────────────────── */
.my-row-actions .mini-btn.btn-good {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.proof-row { gap: 6px; flex-wrap: wrap; }

.proof-row .mini-btn,
.proof-row .ghost-mini { font-size: 11px; padding: 4px 8px; }

.mini-link { font-size: 11px; color: #7dd3fc; text-decoration: none; }

/* 鹿港贸易服务官方徽章 */
.official-badge {
  display: inline-block;
  background: linear-gradient(90deg, #b45309, #d97706);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 5px;
  vertical-align: middle;
  letter-spacing: .02em;
}

/* 看板挂单徽章：品质分 / 必整批 */
.lst-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 5px;
  vertical-align: middle;
  letter-spacing: .02em;
}
.badge-quality { background: #ecfccb; color: #4d7c0f; border: 1px solid #d9f99d; }
.badge-whole   { background: #fef9c3; color: #a16207; border: 1px solid #fde68a; }
.badge-partial { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

/* 登录态 chip（亮色顶栏） */
.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: var(--accent-d);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .02em;
  max-width: 360px;
  overflow: hidden;
}

.auth-chip .auth-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(99,102,241,.25);
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.auth-chip .auth-avatar-fallback {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--brand-grad);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(99,102,241,.25);
}

.auth-chip .auth-avatar[style*="display: none"] + .auth-avatar-fallback {
  display: inline-flex;
}

.auth-chip .auth-avatar-fallback + .auth-lines {
  min-width: 0;
}

.auth-chip .auth-lines {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.auth-chip .auth-line1 {
  font-size: 12px;
  font-weight: 800;
  color: #1e1b2e;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-chip .auth-line2 {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-d);
  opacity: .92;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-chip.auth-miss {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.auth-chip.auth-miss .auth-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,.18);
}

.auth-chip.auth-miss .auth-miss-text {
  font-weight: 800;
  letter-spacing: .02em;
}

/* 委员会操作按钮（看板行） */
.mini-btn-comm {
  background: transparent;
  border: 0;
  color: #b45309;
  padding: 2px 2px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}

.mini-btn-comm:hover {
  background: rgba(251, 191, 36, .16);
  box-shadow: none;
}

/* ─── 全局加载进度条 ─── */
#globalProgress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}
#globalProgress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, #6366f1, #a78bfa, transparent);
  opacity: 0;
  transform: translateX(-100%);
}
#globalProgress.active::before {
  opacity: 1;
  animation: gp-slide 1.05s ease-in-out infinite;
}
@keyframes gp-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(360%); }
}

/* ─── Toast 通知 ─── */
#toastHost {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 440px);
}
.toast {
  pointer-events: auto;
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--rm);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-line;
  color: #fff;
  box-shadow: var(--sh-lg);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: linear-gradient(135deg, #16a34a, #15803d); }
.toast-error   { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.toast-info    { background: linear-gradient(135deg, #6366f1, #7c3aed); }

/* ─── 确认弹窗 ─── */
.confirm-dialog { width: min(440px, 92vw); }
.confirm-body { padding: 22px 22px 6px; }
.confirm-title { margin: 0 0 10px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.confirm-msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
  white-space: pre-line;
  max-height: 52vh;
  overflow-y: auto;
}
.confirm-dialog .dialog-footer { padding: 14px 22px 18px; margin-top: 10px; }
.danger-btn { background: #dc2626 !important; box-shadow: 0 2px 6px rgba(220,38,38,.3) !important; }
.danger-btn:hover { background: #b91c1c !important; }

/* ─── 全局忙碌态：防重复提交 ─── */
body.is-busy { cursor: progress; }
body.is-busy .primary-btn,
body.is-busy .mini-btn { pointer-events: none; opacity: .55; }

/* ─── 移动端底部 Tab 栏样式 ─── */
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 0 max(7px, env(safe-area-inset-bottom));
  position: relative;
  transition: color var(--t);
}
.tab-item .tab-ico { font-size: 19px; line-height: 1; filter: grayscale(.4) opacity(.7); transition: filter var(--t); }
.tab-item.nav-active { color: var(--accent-d); }
.tab-item.nav-active .tab-ico { filter: none; }
.tab-item .nav-badge { position: absolute; top: 4px; right: 22%; margin: 0; }

.lst-line3-comm {
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

/* 卖家筛选 chip（可点清除） */
.seller-chip {
  background: #fff7ed !important;
  border-color: #fdba74 !important;
  color: #9a3412 !important;
}
.seller-chip:hover { background: #ffedd5 !important; }

/* 详情底部操作按钮排版 */
.d-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.d-detail-actions .btn-sm { padding: 7px 12px; font-size: 12px; }

/* 空状态操作按钮 */
.empty-cta {
  margin-top: 10px;
  display: inline-block;
}

/* 热榜成交占比条（对齐 QQ 热榜卡进度条） */
.hot-bar {
  margin-top: 7px;
  height: 5px;
  background: var(--inset);
  border-radius: 999px;
  overflow: hidden;
}
.hot-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand-grad);
}

/* 挂单详情底部操作按钮 */
.d-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.d-detail-actions .btn-sm { padding: 7px 12px; font-size: 12px; flex: 1; }
.d-detail-actions .js-take-btn { flex: 1.4; }

/* ─── 可点元素（商品名 / 订单标题 / 指导价条目）─── */
.clickable {
  cursor: pointer;
  transition: color var(--t);
}
.clickable:hover { color: var(--accent-d); text-decoration: underline; text-underline-offset: 2px; }

/* ─── 详情弹窗（QQ 卡片风格）─── */
.detail-dialog { width: min(460px, 92vw); padding: 0; overflow: hidden; }
.detail-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 18px;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.detail-banner .db-code {
  background: rgba(255,255,255,.25);
  border-radius: 8px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.detail-body { padding: 16px 18px 6px; }
.d-hero {
  text-align: center;
  padding: 2px 0 12px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 10px;
}
.d-hero-name { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.35; }
.d-hero-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.d-hero-price { font-size: 16px; font-weight: 800; color: var(--gold); margin-top: 6px; }
.d-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.45;
  border-bottom: 1px solid var(--inset);
}
.d-row:last-child { border-bottom: 0; }
.d-lbl { color: var(--muted); }
.d-val { color: var(--text); font-weight: 600; word-break: break-word; }
.d-val.strong { color: var(--accent-d); font-weight: 800; }
.d-uex {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--r);
  padding: 9px 12px;
  font-size: 12px;
  color: #0c4a6e;
  line-height: 1.7;
  margin-top: 10px;
}
.d-uex-head { font-weight: 800; margin-bottom: 2px; }
.detail-dialog .dialog-footer { padding: 12px 18px 16px; margin-top: 8px; }

/* ─── Media queries ──────────────────────────────────────────────── */
@media (max-width: 920px) {
  /* 应用外壳切换：隐藏侧边栏 → 底部 Tab 栏 */
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .bottom-tabs {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(99,102,241,.08);
  }
  .main { padding-bottom: 64px; }       /* 给底部 Tab 栏留空间 */
  .topbar-brand-mini { display: inline; }
  /* 顶栏纵向两行：第一行 logo+标题，第二行登录/发布按钮组，避免 375px 挤压换行 */
  .topbar {
    padding: 10px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .topbar-left { justify-content: flex-start; }
  .topbar-right { width: 100%; gap: 6px; flex-wrap: nowrap; }
  .topbar-right input { flex: 1; width: auto; min-width: 80px; }
  .topbar-right .ghost-btn,
  .topbar-right .primary-btn { white-space: nowrap; flex-shrink: 0; }
  .topbar .total-badge { display: none; } /* 移动端顶栏腾空间 */
  #joinGuideBtn { display: none; }         /* 移动端隐藏「新用户?」：登录失败会自动弹引导 + 帮助页有加入卡 */
  #authChip { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .view-area { padding: 14px 16px 28px; }

  .filter-main { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .my-tools { grid-template-columns: 1fr; }
  .col + .col { border-left: 0; border-top: 1px solid var(--line); }
  .dialog-grid .span-2 { grid-column: span 1; }
  .dialog-grid { grid-template-columns: 1fr; }
  .my-head { flex-direction: column; align-items: flex-start; }
  .my-actions { width: 100%; justify-content: flex-start; }
  .actions-break { display: none; }   /* 移动端按钮自然换行，无需强制断行 */
  #toastHost { top: 10px; }
}

@media (max-width: 560px) {
  .filter-main { grid-template-columns: 1fr; }
  .quick-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
