/* UCL 二手交易平台 · 演示前端样式（零外部依赖，离线可用）
   ------------------------------------------------------------------
   设计令牌集中在这里，改主题只动这一段。 */
:root {
  --brand: #4b006e;          /* UCL 紫 */
  --brand-soft: #f3ecfa;
  --brand-ink: #35004e;
  --accent: #8a4fd3;
  --bg: #f5f4f8;
  --card: #ffffff;
  --ink: #1b1922;
  --muted: #6d6880;
  --line: #e5e2ec;
  --ok: #12855a;
  --ok-soft: #e6f6ee;
  --warn: #b26a00;
  --warn-soft: #fdf3e0;
  --danger: #c03636;
  --danger-soft: #fdeaea;
  --info: #2c5fb3;
  --info-soft: #eaf1fc;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(27, 25, 34, .06), 0 8px 24px -12px rgba(27, 25, 34, .18);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 .8em; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 10px; } .mt2 { margin-top: 20px; } .mt3 { margin-top: 30px; }
.mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 10px; } .mb2 { margin-bottom: 20px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.brand small { font-weight: 500; color: var(--muted); font-size: 12px; }
/* 顶栏下方的「快捷跳转」按钮行：一行独享，横向可滚动，窄屏自动溢出滚动 */
.jumpbar-wrap {
  position: sticky; top: 60px; z-index: 39;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.jumpbar {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 0; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.jumpbar::-webkit-scrollbar { height: 4px; }
.jumpbar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.jumpbar a {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: #3c3848; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.jumpbar a:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-ink); text-decoration: none; }
.jumpbar a.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.jumpbar a .ic { font-size: 14px; line-height: 1; }
.jumpbar a .pill { margin-left: 3px; }

/* 搜索框：输入框本身从 193px 基准加宽到 1.5 倍（290px），靠右对齐（左边界左移） */
.searchbar { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; margin-left: auto; }
.searchbar input { width: 290px; min-width: 290px; }

/* ---------------- 通用控件 ---------------- */
input, select, textarea, button { font: inherit; color: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 79, 211, .14);
}
textarea { min-height: 76px; resize: vertical; }
label.field { display: block; margin: 0 0 12px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #423d52; }
label.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: transform .06s, box-shadow .15s, background .15s;
}
.btn:hover { background: #faf9fc; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #3d005a; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: #fff; border-color: #f0c6c6; color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.block { width: 100%; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 18px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: #f1eff6; color: #4b4757; white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.brand { background: var(--brand-soft); color: var(--brand-ink); }
.pill.grayish { background: #eeedf1; color: #6d6880; }

.online { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.online .led { width: 8px; height: 8px; border-radius: 50%; background: #c3c0cc; }
.online.on .led { background: #17b978; box-shadow: 0 0 0 3px rgba(23, 185, 120, .18); animation: led 2.4s infinite; }
.online.on { color: var(--ok); }
@keyframes led { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid transparent; }
.alert.ok { background: var(--ok-soft); color: #0d5c3f; border-color: #c4e7d6; }
.alert.warn { background: var(--warn-soft); color: #7a4a00; border-color: #f2ddb4; }
.alert.danger { background: var(--danger-soft); color: #8f2626; border-color: #f3cfcf; }
.alert.info { background: var(--info-soft); color: #1f4784; border-color: #cfdff7; }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 30px; margin-bottom: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #fbfafd; }
tbody tr:hover { background: #fbfafd; }
.table-wrap { overflow-x: auto; }

/* ---------------- 商品网格 ---------------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.pcard:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(27,25,34,.06), 0 16px 32px -18px rgba(27,25,34,.3); }
.pcard .thumb {
  aspect-ratio: 4 / 3; background: linear-gradient(135deg, #efeaf7, #f7f6fb);
  display: flex; align-items: center; justify-content: center; color: #b3adc4; font-size: 26px; position: relative;
}
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .thumb .flags { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; flex-direction: column; align-items: flex-start; }
.pcard .thumb .flags .pill { box-shadow: 0 1px 4px rgba(0,0,0,.12); background: rgba(255,255,255,.95); }
.pcard .body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pcard .title { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.pcard .price { font-size: 18px; font-weight: 700; color: var(--brand); }
.pcard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard .seller { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.pcard .seller span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .actions { display: flex; gap: 6px; padding: 0 13px 13px; }
.pcard .actions .btn { flex: 1; }

/* ---------------- 商品详情 ---------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 20px; align-items: start; }
.detail .hero { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.detail .hero img { width: 100%; display: block; }
.detail .hero .ph { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; color: #b3adc4; font-size: 40px; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------------- KPI / 统计 ---------------- */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .03em; }
.kpi .value { font-size: 25px; font-weight: 700; line-height: 1.25; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.brand { background: linear-gradient(135deg, #4b006e, #7a2fb0); border-color: transparent; color: #fff; }
.kpi.brand .label, .kpi.brand .sub { color: rgba(255,255,255,.82); }
.stat-list { display: grid; gap: 8px; }
.stat-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.stat-row:last-child { border-bottom: none; }
.stat-row b { font-variant-numeric: tabular-nums; }

.chart-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.chart-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.chart-box h3 { margin-bottom: 2px; }
.chart-box .cap { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text { font-size: 11px; fill: var(--muted); font-family: inherit; }
svg.chart .axis { stroke: var(--line); stroke-width: 1; }
svg.chart .grid { stroke: #f0eef4; stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

/* ---------------- 时间线 / 列表 ---------------- */
.timeline { position: relative; padding-left: 20px; }
.timeline:before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 14px; }
.tl-item:before {
  content: ""; position: absolute; left: -19px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent);
}
.tl-item.good:before { border-color: var(--ok); }
.tl-item.bad:before { border-color: var(--danger); }
.list-item { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; align-items: flex-start; }
.list-item + .list-item { margin-top: 10px; }
.list-item .thumb-sm { width: 62px; height: 46px; border-radius: 6px; object-fit: cover; background: #efeaf7; flex: 0 0 auto; }
.list-item .thumb-sm.ph { display: flex; align-items: center; justify-content: center; color: #b3adc4; }
/* 收件箱里置顶的「待确认订单」条目：用告警色区分于普通私信 */
.list-item.inbox-order { background: var(--warn-soft); border-color: #f0d9b0; border-left: 3px solid var(--warn); align-items: center; }
.list-item.inbox-order + .list-item.inbox-order { margin-top: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-size: 13px; color: #423d52;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------------- 身份卡 / 步骤条 ---------------- */
.idcard {
  border-radius: var(--radius); padding: 20px; color: #fff;
  background: linear-gradient(135deg, #35004e 0%, #6a1fa0 55%, #8a4fd3 100%);
  box-shadow: var(--shadow);
}
.idcard .name { font-size: 21px; font-weight: 700; }
.idcard .mail { font-family: var(--mono); font-size: 12.5px; opacity: .9; }
.idcard .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.idcard .tags .pill { background: rgba(255,255,255,.16); color: #fff; }
.ladder { display: grid; gap: 10px; }
.ladder .step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.ladder .step .no {
  width: 24px; height: 24px; border-radius: 50%; background: #f1eff6; color: #6d6880; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex: 0 0 auto;
}
.ladder .step.done .no { background: var(--ok); color: #fff; }
.ladder .step.current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138,79,211,.12); }
.ladder .step.current .no { background: var(--accent); color: #fff; }

/* ---------------- 浮层 ---------------- */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.toast {
  background: #211d2b; color: #fff; padding: 11px 14px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); animation: pop .18s ease-out;
}
.toast.ok { background: #0f6b48; } .toast.err { background: #a52c2c; } .toast.warn { background: #8a5300; }
@keyframes pop { from { transform: translateY(8px); opacity: 0 } to { transform: none; opacity: 1 } }

.modal-back { position: fixed; inset: 0; background: rgba(20,17,28,.5); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); max-width: 560px; width: 100%; max-height: 88vh; overflow: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.modal .card-head { position: sticky; top: 0; background: #fff; }

footer.site { margin: 40px 0 60px; color: var(--muted); font-size: 13px; }
footer.site .row { border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------------- 交易流水 / 安全审计（只读提示 + 行内搜索） ---------------- */
.notice-lock {
  display: block; margin-top: 14px; padding: 12px 16px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #f0d68a; color: #6b4e00;
  font-size: 13px; line-height: 1.7;
}
.notice-lock b { color: #4a3500; }
.notice-lock .mono { background: rgba(0,0,0,.05); padding: 0 4px; border-radius: 4px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input {
  height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line);
  font-size: 13px; min-width: 190px;
}
@media (max-width: 860px) {
  .inline-form { width: 100%; margin-left: 0 !important; }
  .inline-form input { flex: 1; min-width: 0; }
  .notice-lock { font-size: 12px; }
}

/* ---------------- 消息中心（收件箱 / 发件箱 + 对话线程） ---------------- */
.msg-shell { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.msgtabs { display: flex; border-bottom: 1px solid var(--line); background: #fbfafd; }
.msgtab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 8px; font-size: 14px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s, background .15s;
}
.msgtab:hover { background: var(--brand-soft); color: var(--brand-ink); text-decoration: none; }
.msgtab.active { color: var(--brand-ink); border-bottom-color: var(--brand); background: #fff; }
.msg-list { max-height: 560px; overflow-y: auto; padding: 8px; }
.msg-item { display: block; padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; color: inherit; }
.msg-item:hover { background: #faf8fd; text-decoration: none; }
.msg-item.active { background: var(--brand-soft); border-color: #dbcbee; }
.msg-item.unread .msg-preview { color: var(--ink); font-weight: 600; }
.msg-item + .msg-item { margin-top: 4px; }
/* 预览单行截断：列表只用来扫一眼，全文在右侧对话里 */
.msg-preview {
  font-size: 13px; color: var(--muted); margin: 5px 0 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread-card { display: flex; flex-direction: column; }
.thread-body {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 440px; min-height: 220px; overflow-y: auto;
  padding: 14px 2px; margin-top: 10px; border-top: 1px solid var(--line);
}
.thread-empty { padding: 48px 20px; }
.thread-empty .big { font-size: 34px; margin-bottom: 8px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.bubble .btext { white-space: pre-wrap; word-break: break-word; }
.bubble .bmeta { font-size: 11px; opacity: .62; margin-top: 4px; }
.bubble.them { align-self: flex-start; background: #f3f1f8; color: var(--ink); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.thread-form { display: flex; gap: 9px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.thread-form textarea {
  flex: 1; resize: vertical; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.thread-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138,79,211,.12); }
.thread-form .btn { flex: 0 0 auto; }

/* ---------------- 骨架屏 ---------------- */
.skeleton { background: linear-gradient(90deg, #efeef3 25%, #f6f5f9 37%, #efeef3 63%); background-size: 400% 100%; animation: sk 1.3s infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 100% 50% } to { background-position: 0 50% } }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .msg-shell { grid-template-columns: 1fr; }
  .thread-body { max-height: none; }
  .msg-list { max-height: 320px; }
  .bubble { max-width: 88%; }
  .topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .searchbar { width: 100%; margin-left: 0; }
  .searchbar input { width: 100%; min-width: 0; }
  /* 窄屏顶栏高度不固定，跳转行不再吸顶，避免与顶栏重叠 */
  .jumpbar-wrap { position: static; }
}

/* ---------------- 工具类 ----------------
   CSP 是 style-src 'self'（不含 unsafe-inline），内联 style 属性会被浏览器静默丢弃，
   因此布局与尺寸一律走这里的类，不在模板里写 style="..."。 */
.thumb-sm { width: 62px; height: 46px; border-radius: 6px; object-fit: cover; background: #efeaf7; flex: 0 0 auto; }
.thumb-sm.ph { display: flex; align-items: center; justify-content: center; color: #b3adc4; }
.thumb-xs { width: 44px; height: 33px; border-radius: 5px; object-fit: cover; background: #efeaf7; flex: 0 0 auto; }

.w-full { width: 100%; }
.w110 { width: 110px; }
.w120 { width: 120px; }
.w150 { width: 150px; }
.w170 { width: 170px; }

.minw-280 { min-width: 280px; }
.minw-290 { min-width: 290px; }
.minw-300 { min-width: 300px; }
.minw-320 { min-width: 320px; }
.minw-340 { min-width: 340px; }
.minw-420 { min-width: 420px; }
.maxw-320 { max-width: 320px; }

/* 主栏 + 侧栏的两列块：宽屏并排，窄屏自动换行 */
.split { align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.side-340 { min-width: 280px; max-width: 340px; }
.side-360 { min-width: 290px; max-width: 360px; }
.narrow-460 { max-width: 460px; margin: 20px auto; }
.narrow-520 { max-width: 520px; margin: 20px auto; }

.gap5 { gap: 5px; }
.gap8 { gap: 8px; }
.gap9 { gap: 9px; }
.gap6-fixed { gap: 6px; flex: 0 0 auto; }
.gap7-min0 { gap: 7px; min-width: 0; }
.gap8-inherit { gap: 8px; color: inherit; }

.ml-auto { margin-left: auto; }
.ml6 { margin-left: 6px; }
.dim { opacity: .85; }
.pre-wrap { white-space: pre-wrap; }
.break-all { word-break: break-all; }
.maxw-320-break { max-width: 320px; word-break: break-all; }

/* 长文本单行截断（表格里的标题/哈希/UA 用） */
.ellipsis-120 { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.ellipsis-150 { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ellipsis-260 { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.c-warn { color: var(--warn); }
.stat-big { font-size: 30px; font-weight: 700; color: var(--brand); }
.code-badge { font-size: 15px; letter-spacing: 3px; }
.card-flat { box-shadow: none; background: #fbfafd; margin-top: 12px; }
/* 表格/卡片底部一行：上边框替代下边框；.tfoot-right 额外右对齐按钮 */
.card-head.tfoot { border-top: 1px solid var(--line); border-bottom: none; }
.card-head.tfoot-right { border-top: 1px solid var(--line); border-bottom: none; justify-content: flex-end; }

/* 图表：图例色块是 SVG（fill 呈现属性不受 style-src 限制），不用内联 background */
.legend svg.sw { display: inline-block; vertical-align: -1px; margin-right: 5px; }
.chart { max-width: 100%; height: auto; }
.chart.donut { margin: 0 auto; display: block; }

/* 邮箱小字：用户名后面跟「灰色 + 小两个字号 + 斜体」的邮箱。
   用 .umail 类而非内联 style —— CSP 是 style-src 'self'，内联样式会被静默丢弃。
   父级 15px → 12px，12px → 9.6px，正好「小两个字号」；与用户名之间留一点空隙。 */
.umail { font-size: .8em; font-style: italic; font-weight: 400; color: var(--muted); margin-left: 6px; }
