/* ============================================================
   collection · 龙族谷子收藏台账
   设计语言「浪花描边 / Foam-line」
   浮世绘三色 × 手绘描边 × 纸感光影
   ============================================================ */

:root {
  /* —— 浮世绘三色（神奈川冲浪里）+ 纸面 —— */
  --paper:    #f3ecdf;   /* 暖米纸面 */
  --paper-2:  #e9dfcb;   /* 纸面阴影区 */
  --card:     #faf6ec;   /* 卡面 */
  --card-2:   #f1ead9;   /* 卡内凹陷 */

  --ink:      #1e2c39;   /* 墨线 / 正文（普鲁士近黑）*/
  --ink-2:    #3f5468;
  --ink-soft: #74859a;
  --ink-faint:#9aa7b4;

  --wave:     #3472a1;   /* 主蓝 */
  --wave-deep:#234f74;
  --wave-soft:#6f9fc2;
  --foam:     #e8ecf0;   /* 泡沫白 */
  --mist:     #c9c2bd;   /* 暖灰 */

  /* —— 场景点缀色（语义用）—— */
  --sky:   #93c2c2;      /* 天青 */
  --sun:   #d6a23f;      /* 路桩黄 */
  --coral: #bd4a32;      /* 校服红 */

  --line: rgba(30, 44, 57, .9);
  --sh-soft: 7px 13px 28px -12px rgba(30, 44, 57, .42);
  --sh-near: 1.5px 2.5px 0 rgba(30, 44, 57, .07);
  --r: 20px;
  --maxw: 1180px;
  --brush: "Ma Shan Zheng", "STKaiti", "KaiTi", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(147, 194, 194, .26), transparent 62%),
    radial-gradient(900px 600px at -6% 4%, rgba(111, 159, 194, .20), transparent 58%),
    linear-gradient(180deg, #f7f2e9 0%, var(--paper) 32%, var(--paper-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* 纸张颗粒（feTurbulence data-uri，乘法叠加做出纸感）*/
.paper-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* 全局抖动滤镜的承载 svg */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; position: relative; z-index: 2; }

a { color: inherit; }

/* ============================================================
   手绘描边 —— 通用：元素 ::before 画一圈抖动墨框
   ============================================================ */
.hd { position: relative; }
.hd::before {
  content: ""; position: absolute; inset: 0;
  border: 2px solid var(--line); border-radius: inherit;
  filter: url(#roughen);
  pointer-events: none;
}
.hd.thin::before { border-width: 1.6px; }
.hd.dbl::after {
  content: ""; position: absolute; inset: 3px; border: 1.2px solid rgba(30,44,57,.35);
  border-radius: inherit; filter: url(#roughen2); pointer-events: none;
}

/* ============================================================
   顶栏 + 浪花 banner（签名）
   ============================================================ */
header.top { position: relative; z-index: 2; overflow: hidden; }
.hero {
  position: relative; padding: 30px 0 0;
}
.hero-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.brand h1 {
  font-family: var(--brush); font-weight: 400;
  font-size: 46px; line-height: 1.05; margin: 0; color: var(--ink);
  letter-spacing: 2px; text-shadow: 1px 2px 0 rgba(52,114,161,.12);
}
.brand .sub {
  display: inline-block; margin-top: 8px; font-size: 13.5px; color: var(--ink-2);
  background: var(--foam); padding: 3px 12px; border-radius: 999px; letter-spacing: .5px;
}
/* 右上三色点（呼应配色卡）*/
.tri-dots { display: flex; gap: 9px; padding-top: 10px; }
.tri-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.6px solid var(--line); filter: url(#roughen2); }
.tri-dots i:nth-child(1) { background: var(--mist); }
.tri-dots i:nth-child(2) { background: var(--foam); }
.tri-dots i:nth-child(3) { background: var(--wave); }

.top-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 6px; }
/* 只读模式（非本人）：隐藏所有编辑入口 */
body.readonly #btn-add,
body.readonly #btn-export,
body.readonly #btn-reset,
body.readonly #btn-pick-img,
body.readonly .card .acts,
body.readonly .t-acts,
body.readonly .table-bar,
body.readonly .sticker-tools { display: none !important; }

.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mist); border: 1.5px solid var(--line); flex: 0 0 auto; }
.sync-dot.on { background: var(--ok, #4f9d69); }
.sync-dot.busy { background: var(--sun); animation: syncpulse 1s ease-in-out infinite; }
@keyframes syncpulse { 50% { opacity: .35; } }

/* 浪花 SVG 横幅 */
.wave-band { width: 100%; display: block; margin-top: 10px; }
.wave-band svg { width: 100%; height: auto; display: block; }

/* ============================================================
   按钮 —— 描边 + 按下下沉
   ============================================================ */
.btn {
  position: relative; border: none; background: var(--card); color: var(--ink);
  padding: 9px 16px; border-radius: 13px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
  box-shadow: 2.5px 3px 0 rgba(30,44,57,.9);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; border: 2px solid var(--line);
  border-radius: inherit; filter: url(#roughen); pointer-events: none;
}
.btn:hover { background: #fffdf6; }
.btn:active { transform: translate(2.5px, 3px); box-shadow: 0 0 0 rgba(30,44,57,.9); }
.btn.primary { background: var(--wave); color: #f6f9fb; }
.btn.primary:hover { background: var(--wave-deep); }
.btn.ghost { background: transparent; box-shadow: 1.5px 2px 0 rgba(30,44,57,.55); }
.btn.sm { padding: 5px 11px; font-size: 12px; border-radius: 10px; box-shadow: 2px 2.5px 0 rgba(30,44,57,.75); }
.btn.sm:active { transform: translate(2px, 2.5px); box-shadow: 0 0 0; }
.btn.danger { color: var(--coral); }

/* ============================================================
   总览统计
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0 8px; }
.stat {
  position: relative; background: var(--card); border-radius: var(--r);
  padding: 17px 19px; box-shadow: var(--sh-soft), var(--sh-near);
}
.stat .k { color: var(--ink-soft); font-size: 12px; letter-spacing: 1px; }
.stat .v { font-size: 30px; font-weight: 800; margin-top: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.stat .v.blue { color: var(--wave); }

.status-bar {
  display: flex; height: 11px; border-radius: 7px; overflow: hidden; margin-top: 12px;
  background: var(--card-2); box-shadow: inset 1px 1px 2px rgba(30,44,57,.12);
}
.status-bar i { display: block; height: 100%; }
.status-legend { display: flex; flex-wrap: wrap; gap: 9px 12px; margin-top: 11px; font-size: 11px; color: var(--ink-2); }
.status-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1px solid rgba(30,44,57,.5); }

/* ============================================================
   筛选
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 20px 0 6px; }
.chip {
  position: relative; border: none; background: var(--card); color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  box-shadow: var(--sh-near); transition: .14s;
}
.chip::before {
  content: ""; position: absolute; inset: 0; border: 1.7px solid var(--line);
  border-radius: inherit; filter: url(#roughen2); pointer-events: none;
}
.chip:hover { color: var(--ink); background: #fffdf6; }
.chip.on { color: #f6f9fb; background: var(--wave); }
.chip .pip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; border: 1px solid rgba(30,44,57,.45); }

.filters .sep { width: 1px; height: 24px; background: rgba(30,44,57,.25); margin: 0 4px; }
.field-wrap { position: relative; display: inline-block; }
.filters select, .filters input {
  position: relative; background: var(--card); border: none; color: var(--ink);
  border-radius: 11px; padding: 8px 12px; font-size: 13px; font-weight: 500; box-shadow: var(--sh-near);
  font-family: inherit;
}
.filters .field-wrap::before {
  content: ""; position: absolute; inset: 0; border: 1.7px solid var(--line);
  border-radius: 11px; filter: url(#roughen2); pointer-events: none; z-index: 2;
}
.filters input { width: 168px; }
.filters select:focus, .filters input:focus { outline: none; }

/* ============================================================
   角色分区
   ============================================================ */
.char-section { margin: 34px 0; scroll-margin-top: 20px; }
.char-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.char-head .blot {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--line); filter: url(#roughen); box-shadow: 1.5px 2px 0 rgba(30,44,57,.18);
}
.char-head h2 { font-family: var(--brush); font-weight: 400; margin: 0; font-size: 25px; letter-spacing: 1px; }
.char-head .meta { color: var(--ink-soft); font-size: 12.5px; }
.char-head .count {
  margin-left: auto; color: var(--ink-2); font-size: 12.5px; font-weight: 600;
  background: var(--foam); padding: 4px 12px; border-radius: 999px;
}
.char-head .spend { color: var(--wave-deep); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 18px; }

/* —— 卡片 —— */
.card {
  position: relative; background: var(--card); border-radius: var(--r); overflow: visible;
  box-shadow: var(--sh-soft), var(--sh-near);
  transition: transform .16s cubic-bezier(.2,.8,.3,1), box-shadow .16s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border: 2px solid var(--line);
  border-radius: inherit; filter: url(#roughen); pointer-events: none; z-index: 3;
}
.card:hover { transform: translateY(-5px) rotate(-.6deg); box-shadow: 9px 18px 34px -12px rgba(30,44,57,.5), var(--sh-near); }

.card .thumb {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--r) var(--r) 0 0; overflow: hidden;
  background: var(--card-2); display: flex; align-items: center; justify-content: center;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb .noimg { width: 56%; height: 56%; opacity: .55; }

/* 类型标签（左上）*/
.badge-type {
  position: absolute; left: 9px; top: 9px; z-index: 4;
  background: var(--paper); color: var(--ink); border-radius: 999px;
  padding: 3px 11px; font-size: 11px; font-weight: 600; box-shadow: 1px 1.5px 0 rgba(30,44,57,.55);
}
.badge-type::before { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--line); border-radius: inherit; filter: url(#roughen2); }

/* 状态印章（右上）—— 颜色+形状即语义 */
.seal {
  position: absolute; right: 9px; top: 9px; z-index: 4;
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 11px; font-weight: 800; line-height: 1.05; color: var(--ink);
  transform: rotate(-9deg);
}
.seal .ring { position: absolute; inset: 0; border: 2.4px solid currentColor; filter: url(#roughen); }
.seal .txt { position: relative; z-index: 1; padding: 0 2px; letter-spacing: -.5px; }
.seal.round .ring { border-radius: 50%; }
.seal.box .ring { border-radius: 5px; }
.seal.fill { color: #f6f9fb; }
.seal.fill .ring { background: var(--seal-c); border-color: var(--seal-bd, rgba(30,44,57,.85)); }
.seal { color: var(--seal-c); }

.card .body { padding: 11px 13px 13px; position: relative; z-index: 2; }
.card .row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card .price { color: var(--wave-deep); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.card .qty { color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.card .sub { color: var(--ink-soft); font-size: 11.5px; margin-top: 5px; min-height: 14px; }
.card .acts { display: flex; gap: 7px; margin-top: 11px; }
.card .acts .btn { flex: 1; justify-content: center; }

.empty-char {
  position: relative; color: var(--ink-soft); font-size: 13px; border-radius: var(--r);
  padding: 20px; text-align: center; background: rgba(250,246,236,.5);
}
.empty-char::before { content: ""; position: absolute; inset: 0; border: 1.8px dashed rgba(30,44,57,.4); border-radius: inherit; filter: url(#roughen2); }

.empty-all { text-align: center; padding: 64px 20px; color: var(--ink-2); }
.empty-all svg { width: 96px; height: 96px; opacity: .7; margin-bottom: 8px; }
.empty-all h3 { font-family: var(--brush); font-weight: 400; font-size: 26px; color: var(--ink); margin: 6px 0; }

/* ============================================================
   弹窗 / 表单
   ============================================================ */
.modal-bg {
  position: fixed; inset: 0; background: rgba(30,44,57,.42); backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center; z-index: 100;
  padding: 44px 16px; overflow: auto;
}
.modal-bg.open { display: flex; }
.modal { position: relative; background: var(--paper); border-radius: 22px; width: 100%; max-width: 540px; box-shadow: 0 24px 60px -18px rgba(30,44,57,.55); }
.modal::before { content: ""; position: absolute; inset: 0; border: 2.4px solid var(--line); border-radius: inherit; filter: url(#roughen); pointer-events: none; }
.modal h3 { font-family: var(--brush); font-weight: 400; font-size: 23px; margin: 0; padding: 18px 22px 14px; }
.modal .form { padding: 6px 22px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.field input, .field select, .field textarea {
  position: relative; background: var(--card); border: none; color: var(--ink);
  border-radius: 11px; padding: 10px 12px; font-size: 13.5px; width: 100%; font-family: inherit;
  box-shadow: inset 1px 1px 2px rgba(30,44,57,.06);
}
.input-hd { position: relative; display: block; }
.input-hd::before { content: ""; position: absolute; inset: 0; border: 1.7px solid var(--line); border-radius: 11px; filter: url(#roughen2); pointer-events: none; z-index: 2; }
.field textarea { resize: vertical; min-height: 56px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; }

.img-pick { display: flex; align-items: center; gap: 13px; }
.preview { width: 70px; height: 70px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; background: var(--card); position: relative; }
.preview.empty { display: flex; align-items: center; justify-content: center; }
.preview.empty svg { width: 60%; height: 60%; opacity: .5; }
.preview::before { content: ""; position: absolute; inset: 0; border: 1.8px solid var(--line); border-radius: 12px; filter: url(#roughen2); }

.modal .foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px 18px; }
.hint { color: var(--ink-soft); font-size: 11.5px; }

/* ============================================================
   Toast / 页脚
   ============================================================ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(18px);
  background: var(--ink); color: var(--paper); padding: 11px 20px; border-radius: 13px;
  font-size: 13px; font-weight: 600; box-shadow: var(--sh-soft); opacity: 0; pointer-events: none;
  transition: .25s; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer.foot-note { color: var(--ink-soft); font-size: 12px; text-align: center; padding: 44px 0 54px; position: relative; z-index: 2; }
footer.foot-note code { background: var(--card); padding: 2px 7px; border-radius: 6px; box-shadow: var(--sh-near); }

/* ============================================================
   视图切换（展示柜 / 台账）
   ============================================================ */
.viewseg { position: relative; display: inline-flex; gap: 2px; background: var(--card); border-radius: 13px; padding: 3px; box-shadow: var(--sh-near); }
.viewseg::before { content: ""; position: absolute; inset: 0; border: 2px solid var(--line); border-radius: 13px; filter: url(#roughen); pointer-events: none; }
.viewseg button { position: relative; border: none; background: none; font-family: inherit; font-weight: 700; font-size: 13.5px; color: var(--ink-2); padding: 8px 16px; border-radius: 10px; cursor: pointer; transition: .16s; }
.viewseg button.on { background: var(--wave); color: #f6f9fb; box-shadow: 1.5px 2px 0 rgba(30,44,57,.5); }

/* ============================================================
   展示柜
   ============================================================ */
.cabinet-frame {
  position: relative; margin: 22px 0 8px; padding: 16px; border-radius: 28px;
  background: linear-gradient(160deg, #b78a5c 0%, #9a6c42 45%, #835a36 100%);
  box-shadow: var(--sh-soft), inset 0 1px 0 rgba(255,255,255,.25);
}
.cabinet-frame::before { content: ""; position: absolute; inset: 0; border: 2.4px solid var(--line); border-radius: inherit; filter: url(#roughen); pointer-events: none; }
.cabinet {
  position: relative; height: 600px; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.18), transparent 55%),
    linear-gradient(180deg, #e7e0d0 0%, #d9d3c6 60%, #cfc8ba 100%);
  box-shadow: inset 0 14px 28px -14px rgba(30,44,57,.45), inset 0 -8px 18px -10px rgba(30,44,57,.3);
  touch-action: none;
}
/* 隔板（透视深度）*/
.cabinet .shelf { position: absolute; left: 0; right: 0; height: 14px; pointer-events: none; }
.cabinet .shelf::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 7px; background: linear-gradient(180deg, rgba(131,90,54,.55), rgba(131,90,54,.15)); box-shadow: 0 -2px 5px rgba(30,44,57,.28); }
.cabinet .shelf::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(180deg, rgba(255,255,255,.5), transparent); }
/* 玻璃反光 */
.cabinet .glass { position: absolute; inset: 0; pointer-events: none; z-index: 9000;
  background: linear-gradient(115deg, rgba(255,255,255,.16) 0%, transparent 22%, transparent 60%, rgba(255,255,255,.08) 78%, transparent 92%); }
.cabinet.drop-active { box-shadow: inset 0 0 0 3px var(--wave), inset 0 14px 28px -14px rgba(30,44,57,.45); }
.cabinet-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px;
  color: var(--ink-soft); font-size: 14px; font-weight: 600; pointer-events: none; text-align: center; padding: 20px;
}
.cabinet-hint svg { width: 76px; height: 76px; opacity: .55; }
.cabinet-tip { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 9001; color: rgba(255,255,255,.85); font-size: 11.5px; font-weight: 600; pointer-events: none; text-shadow: 0 1px 2px rgba(30,44,57,.4); letter-spacing: .3px; }

/* —— 贴纸 —— */
.sticker {
  position: absolute; top: 0; left: 0; width: 132px; cursor: grab; touch-action: none;
  will-change: transform; user-select: none; -webkit-user-select: none;
  transition: filter .15s ease;
}
.sticker .pic { display: block; width: 100%; aspect-ratio: 1/1; object-fit: contain;
  filter:
    drop-shadow(2px 0 0 #fbf7ee) drop-shadow(-2px 0 0 #fbf7ee)
    drop-shadow(0 2px 0 #fbf7ee) drop-shadow(0 -2px 0 #fbf7ee)
    drop-shadow(1.4px 1.4px 0 #fbf7ee) drop-shadow(-1.4px -1.4px 0 #fbf7ee)
    drop-shadow(0 7px 9px rgba(30,44,57,.4));
}
.sticker.rect .pic { border-radius: 12px; aspect-ratio: 1/1; }
.sticker.dragging { cursor: grabbing; transition: none; z-index: 8000 !important; }
.sticker.dragging .pic { filter:
    drop-shadow(2px 0 0 #fbf7ee) drop-shadow(-2px 0 0 #fbf7ee)
    drop-shadow(0 2px 0 #fbf7ee) drop-shadow(0 -2px 0 #fbf7ee)
    drop-shadow(0 16px 18px rgba(30,44,57,.45)); }
.sticker.sel .pic { filter:
    drop-shadow(2.5px 0 0 var(--wave)) drop-shadow(-2.5px 0 0 var(--wave))
    drop-shadow(0 2.5px 0 var(--wave)) drop-shadow(0 -2.5px 0 var(--wave))
    drop-shadow(0 7px 9px rgba(30,44,57,.4)); }
.sticker .tag { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap;
  background: var(--ink); color: var(--paper); font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  opacity: 0; transition: opacity .15s; pointer-events: none; }
.sticker:hover .tag, .sticker.sel .tag { opacity: 1; }
.sticker.cutting .pic { animation: shimmer 1.1s ease-in-out infinite; }
@keyframes shimmer { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes pop { 0% { transform: var(--tf) scale(.3); opacity: 0; } 60% { transform: var(--tf) scale(1.08); } 100% { transform: var(--tf) scale(1); opacity: 1; } }
.sticker.pop { animation: pop .42s cubic-bezier(.34,1.56,.5,1) both; }

/* 贴纸浮动工具条 */
.sticker-tools { position: absolute; z-index: 9500; display: flex; gap: 6px; transform: translate(-50%, -100%); }
.sticker-tools .btn { padding: 5px 10px; font-size: 12px; }

.cabinet-actions { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; margin: 18px 0 2px; }
.cabinet-actions .muted { color: var(--ink-faint); font-size: 11.5px; flex: 1; min-width: 160px; }
.cut-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; cursor: pointer; user-select: none; }
.cut-toggle input { width: 15px; height: 15px; accent-color: var(--wave); cursor: pointer; }

/* ============================================================
   表格视图（理性台账）
   ============================================================ */
.table-wrap {
  position: relative; margin: 22px 0 8px; background: var(--card);
  border-radius: var(--r); box-shadow: var(--sh-soft), var(--sh-near); overflow-x: auto;
}
.table-wrap::before { content: ""; position: absolute; inset: 0; border: 2px solid var(--line); border-radius: inherit; filter: url(#roughen); pointer-events: none; }
.goods-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.goods-table thead th {
  position: sticky; top: 0; z-index: 2; text-align: left; white-space: nowrap;
  background: var(--card-2); color: var(--ink-2); font-size: 12px; font-weight: 700;
  padding: 11px 12px; letter-spacing: .5px; border-bottom: 2px solid rgba(30,44,57,.45);
}
.goods-table th.right { text-align: right; }
.goods-table th.th-sort { cursor: pointer; user-select: none; }
.goods-table th.th-sort:hover { color: var(--ink); background: var(--card); }
.goods-table th.sorted { color: var(--wave-deep); }
.goods-table tbody td { padding: 9px 12px; border-bottom: 1px solid rgba(30,44,57,.1); vertical-align: middle; }
.goods-table tbody tr:last-child td { border-bottom: none; }
.goods-table tbody tr:hover { background: rgba(52,114,161,.06); }
.goods-table td.right { text-align: right; }
.goods-table .t-dim { color: var(--ink-soft); }
.goods-table .t-sub { color: var(--wave-deep); font-weight: 700; }
.goods-table .t-char { white-space: nowrap; font-weight: 600; }
.blot.sm { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; border: 1.4px solid var(--line); }
.t-img { width: 46px; }
.t-img img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; display: block; box-shadow: 1px 1.5px 0 rgba(30,44,57,.3); }
.t-noimg { display: block; width: 38px; height: 38px; border-radius: 8px; background: var(--card-2); box-shadow: inset 1px 1px 2px rgba(30,44,57,.12); }
.t-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; }
.t-status i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; border: 1px solid rgba(30,44,57,.4); }
.t-acts { white-space: nowrap; }
.t-acts .btn { margin-left: 5px; }
.table-foot { padding: 12px 14px; color: var(--ink-2); font-size: 12.5px; text-align: right; }
.table-foot .spend { color: var(--wave-deep); }
.goods-table .t-name { font-weight: 600; color: var(--ink); max-width: 240px; }

/* 卡片名称标题 */
.card .cardname { font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 5px; line-height: 1.3; word-break: break-word; }

/* 表格批量选择 */
.table-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 14px 0 8px; }
.table-bar .bar-info { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.goods-table .t-check { width: 36px; text-align: center; }
.goods-table .t-check input { width: 17px; height: 17px; accent-color: var(--wave); cursor: pointer; }
.goods-table tbody tr.row-sel { background: rgba(52,114,161,.12); }
.goods-table tbody tr.row-sel:hover { background: rgba(52,114,161,.16); }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .modal .form { grid-template-columns: 1fr; }
  .brand h1 { font-size: 36px; }
  .cabinet { height: 460px; }
  .sticker { width: 104px; }
}
