/* ===========================================================
   中韩跨境工商税务订单管理系统 · 基础样式与组件
   Cross-border Business & Tax Order System · Base UI
   =========================================================== */

:root {
  /* 品牌色 */
  --brand: #2b5cff;
  --brand-600: #1e4be0;
  --brand-700: #1a3fb8;
  --brand-100: #dfe8ff;
  --brand-50: #eef3ff;
  --gold: #c8a45c;

  /* 中性色 */
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #101828;
  --text-2: #475467;
  --text-3: #98a2b3;
  --line: #e7eaf1;
  --line-2: #f0f2f7;

  /* 语义色 */
  --ok: #12a150;
  --ok-bg: #e9f9ef;
  --warn: #e08700;
  --warn-bg: #fff7e6;
  --danger: #e5484d;
  --danger-bg: #fdeeee;
  --info: #0b8ce8;
  --info-bg: #e8f4fe;
  --purple: #7c5cf0;
  --purple-bg: #f1edfe;
  --slate: #6b7785;
  --slate-bg: #eef1f5;

  /* 尺寸 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 2px 6px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .10);
  --shadow-lg: 0 20px 48px rgba(16, 24, 40, .18);
  --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1b2440 100%);
  --top-h: 60px;
  --side-w: 238px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Malgun Gothic", "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.ko { font-size: 13.5px; }

/* ---------- 内联 SVG 图标尺寸兜底 ----------
   说明：所有图标来自 <use> sprite，本身无 width/height；
   此处统一兜底 16px，避免未被具体规则覆盖时撑满容器。
   图表 SVG（折线/柱状/环形/迷你趋势）均带内联 style，优先级更高，不受影响。 */
svg:not([width]) { width: 16px; height: 16px; flex: none; }
.stat .trend svg { width: 13px; height: 13px; }
.badge svg, .tag svg, .chip svg, .legend .lg-item svg, .kv-inline svg { width: 12px; height: 12px; }
.pager .pages button svg { width: 14px; height: 14px; }
.card-bd > .ic svg, .card-bd > div > .ic svg { width: 22px; height: 22px; }
.msg-panel .mp-item svg { width: 15px; height: 15px; }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd2de; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #aeb7c6; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--text-3); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.ac { align-items: center; }
.jb { justify-content: space-between; }
.je { justify-content: flex-end; }
.jc { justify-content: center; }
.wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.grow { flex: 1; }
.pointer { cursor: pointer; }
.flip { transform: rotate(180deg); }

/* ---------- 布局栅格 ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
.g-3-1 { grid-template-columns: 3fr 1fr; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
  min-height: 54px;
}
.card-hd h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-hd .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card-bd { padding: 18px; }
.card-bd.tight { padding: 12px; }
.card-bd.flush { padding: 0; }

.sec-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
  margin: 0 0 12px;
}
.sec-title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), #6f9bff);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: .16s ease;
}
.btn:hover { color: var(--text); border-color: #d3d9e4; background: #fafbfe; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn.primary {
  background: linear-gradient(135deg, var(--brand), #4b78ff);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(43, 92, 255, .28);
}
.btn.primary:hover { filter: brightness(1.06); color: #fff; }

.btn.dark { background: #1d2939; border-color: #1d2939; color: #fff; }
.btn.dark:hover { background: #101828; color: #fff; }

.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { color: #fff; filter: brightness(1.05); }

.btn.danger { background: #fff; border-color: #f3c9ca; color: var(--danger); }
.btn.danger:hover { background: var(--danger-bg); color: var(--danger); border-color: #edb1b3; }

.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--slate-bg); color: var(--text); }

.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn.sm svg { width: 13px; height: 13px; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- 分段控件 ---------- */
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: #eef1f7; border-radius: 9px;
}
.segmented button {
  height: 28px; padding: 0 12px; border-radius: 7px;
  font-size: 12.5px; color: var(--text-2); transition: .16s;
  white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button.on {
  background: #fff; color: var(--brand); font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* ---------- 徽章 / 状态 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-slate { background: var(--slate-bg); color: var(--slate); }
.b-pay { background: var(--warn-bg); color: var(--warn); }
.b-confirm { background: var(--info-bg); color: var(--info); }
.b-process { background: var(--brand-50); color: var(--brand); }
.b-renew { background: var(--purple-bg); color: var(--purple); }
.b-done { background: var(--ok-bg); color: var(--ok); }
.b-abnormal { background: var(--danger-bg); color: var(--danger); }
.b-cancel { background: var(--slate-bg); color: var(--slate); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; background: #f2f4f8; color: var(--text-2);
}
.tag.blue { background: var(--brand-50); color: var(--brand); }
.tag.gold { background: #fbf5e9; color: #9a7b32; }
.tag.green { background: var(--ok-bg); color: var(--ok); }
.tag.red { background: var(--danger-bg); color: var(--danger); }
.tag.purple { background: var(--purple-bg); color: var(--purple); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: #f2f4f8; color: var(--text-2); font-size: 12px;
  border: 1px solid transparent;
}
.chip.on { background: var(--brand-50); color: var(--brand); border-color: #cfdcff; font-weight: 500; }
.chip .x { color: var(--text-3); }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.tbl th {
  position: sticky; top: 0; z-index: 2;
  background: #f8fafd; color: var(--text-2);
  font-weight: 600; font-size: 12.5px;
  text-align: left; padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
table.tbl tbody tr { transition: background .14s; }
table.tbl tbody tr:hover { background: #fafbfe; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tbody tr.sel { background: var(--brand-50); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .oid { font-weight: 600; color: var(--brand); }
table.tbl .actions { display: flex; gap: 4px; flex-wrap: wrap; }
table.tbl td .row-main { font-weight: 500; }
table.tbl td .row-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.empty {
  padding: 56px 20px; text-align: center; color: var(--text-3);
}
.empty svg { width: 52px; height: 52px; opacity: .35; margin-bottom: 12px; }

/* ---------- 分页 ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--text-2); flex-wrap: wrap;
}
.pager .pages { display: flex; gap: 4px; align-items: center; }
.pager .pages button {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font-size: 12.5px;
}
.pager .pages button:hover:not([disabled]) { border-color: var(--brand); color: var(--brand); }
.pager .pages button.on {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
}
.pager .pages button[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field > label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--text-3); }

.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: .16s; outline: none; color: var(--text);
}
.input::placeholder, .textarea::placeholder { color: #b3bbc9; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 92, 255, .12);
}
.textarea { height: auto; min-height: 86px; padding: 9px 12px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px;
}
.input.with-icon { padding-left: 34px; }

.switch {
  /* display:inline-block 必需：span 默认 inline，宽高会失效（非 flex 容器下会塌成一条线） */
  display: inline-block; position: relative; width: 40px; height: 22px; border-radius: 999px;
  background: #d7dde7; transition: .2s; flex: none;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .25); transition: .2s;
}
.switch.on { background: var(--brand); }
.switch.on::after { left: 20px; }
.switch.sm { width: 34px; height: 19px; }
.switch.sm::after { width: 15px; height: 15px; }
.switch.sm.on::after { left: 17px; }

.check {
  width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #c6cddb;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: #fff; transition: .15s;
}
.check.on { background: var(--brand); border-color: var(--brand); }
.check.on::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.radio {
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c6cddb;
  background: #fff; flex: none; position: relative; transition: .15s;
}
.radio.on { border-color: var(--brand); border-width: 5px; }

/* ---------- 筛选工具条 ---------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2); background: #fff;
}
.toolbar .spacer { flex: 1; }
.search-box { position: relative; }
.search-box svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-3);
}
.search-box .input { padding-left: 33px; width: 230px; }

/* ---------- 统计卡 ---------- */
.stat {
  position: relative; display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-xs); overflow: hidden;
}
.stat .ic {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.stat .ic svg { width: 21px; height: 21px; }
.stat .ic.blue { background: var(--brand-50); color: var(--brand); }
.stat .ic.green { background: var(--ok-bg); color: var(--ok); }
.stat .ic.gold { background: #fbf5e9; color: #b28a34; }
.stat .ic.red { background: var(--danger-bg); color: var(--danger); }
.stat .ic.purple { background: var(--purple-bg); color: var(--purple); }
.stat .ic.info { background: var(--info-bg); color: var(--info); }
.stat .k { font-size: 12.5px; color: var(--text-3); }
.stat .v {
  font-size: 25px; font-weight: 650; letter-spacing: -.4px;
  font-variant-numeric: tabular-nums; margin-top: 2px; line-height: 1.2;
}
.stat .v small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.stat .trend { font-size: 12px; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.stat .trend.up { color: var(--ok); }
.stat .trend.down { color: var(--danger); }
.stat .spark { position: absolute; right: 0; bottom: 0; opacity: .5; }

/* ---------- 进度条 ---------- */
.progress { height: 6px; border-radius: 999px; background: #edf0f6; overflow: hidden; }
.progress > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #6d95ff); transition: width .4s;
}
.progress.ok > i { background: linear-gradient(90deg, var(--ok), #4ecb7d); }
.progress.warn > i { background: linear-gradient(90deg, var(--warn), #f5b942); }
.progress.danger > i { background: linear-gradient(90deg, var(--danger), #f2797d); }
.progress.sm { height: 4px; }

/* ---------- 时间轴 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(180deg, #dbe3f4, #eef1f7);
}
.timeline .tl-item { position: relative; padding: 0 0 20px; }
.timeline .tl-item:last-child { padding-bottom: 0; }
.timeline .tl-item::before {
  content: ""; position: absolute; left: -24px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2.5px solid #cdd6e6; z-index: 1;
}
.timeline .tl-item.done::before { border-color: var(--ok); background: var(--ok); }
.timeline .tl-item.active::before {
  border-color: var(--brand); background: var(--brand);
  box-shadow: 0 0 0 4px rgba(43, 92, 255, .16);
}
.timeline .tl-item.warn::before { border-color: var(--warn); background: var(--warn); }
.timeline .tl-item.danger::before { border-color: var(--danger); background: var(--danger); }
.timeline .tl-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline .tl-hd .name { font-weight: 600; font-size: 13.5px; }
.timeline .tl-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.7; }
.timeline .tl-body {
  margin-top: 8px; padding: 10px 12px; background: #f8fafd;
  border: 1px solid var(--line-2); border-radius: 9px; font-size: 12.5px; color: var(--text-2);
}

/* ---------- 描述列表 ---------- */
.desc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.desc.one { grid-template-columns: 1fr; }
.desc .d-item {
  display: flex; gap: 10px; padding: 11px 2px;
  border-bottom: 1px dashed var(--line-2); font-size: 13px;
}
.desc .d-item .dk { color: var(--text-3); flex: none; width: 96px; }
.desc .d-item .dv { color: var(--text); font-weight: 500; word-break: break-all; }
.desc.two-col .d-item:nth-child(odd) { padding-right: 20px; }

/* ---------- 弹窗 / 抽屉 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45);
  backdrop-filter: blur(2px); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal {
  background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 560px;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: pop .2s ease; overflow: hidden;
}
.modal.wide { max-width: 760px; }
.modal.xwide { max-width: 1000px; }
.modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.modal-hd h3 { font-size: 15.5px; }
.modal-hd .close { color: var(--text-3); display: flex; padding: 4px; border-radius: 6px; }
.modal-hd .close:hover { background: var(--slate-bg); color: var(--text); }
.modal-bd { padding: 20px; overflow-y: auto; }
.modal-ft {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--line-2); background: #fbfcfe;
}

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(920px, 92vw);
  background: var(--bg); z-index: 210; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slideIn .22s ease;
}
.drawer-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--line);
}
.drawer-bd { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-ft {
  padding: 12px 20px; background: #fff; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ---------- Toast ---------- */
.toasts {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  min-width: 220px; max-width: 460px; padding: 11px 16px;
  background: #1d2939; color: #fff; border-radius: 10px;
  box-shadow: var(--shadow-md); font-size: 13.5px;
  animation: pop .2s ease;
}
.toast svg { width: 17px; height: 17px; flex: none; }
.toast.ok svg { color: #4ecb7d; }
.toast.err svg { color: #ff8a8e; }
.toast.warn svg { color: #ffc65c; }

/* ---------- 顶部提示条 ---------- */
.notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 10px; font-size: 12.8px; line-height: 1.65;
}
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.notice.info { background: var(--info-bg); color: #0a6cad; }
.notice.warn { background: var(--warn-bg); color: #96600a; }
.notice.danger { background: var(--danger-bg); color: #b53a3e; }
.notice.brand { background: var(--brand-50); color: var(--brand-700); }

/* ---------- 文档 / 附件 ---------- */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line-2);
  border-radius: 10px; background: #fff; transition: .15s;
}
.doc-item:hover { border-color: #cfdcff; box-shadow: var(--shadow-xs); }
.doc-item .fi {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--slate-bg); color: var(--text-2);
}
.doc-item .fi.pdf { background: var(--danger-bg); color: var(--danger); }
.doc-item .fi.img { background: var(--purple-bg); color: var(--purple); }
.doc-item .fi.xls { background: var(--ok-bg); color: var(--ok); }
.doc-item .fi.doc { background: var(--info-bg); color: var(--info); }
.doc-item .fi svg { width: 17px; height: 17px; }
.doc-item .fi-name { font-size: 13px; font-weight: 500; }
.doc-item .fi-meta { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

.upload-box {
  border: 1.5px dashed #ccd6e6; border-radius: var(--radius);
  padding: 22px; text-align: center; color: var(--text-3);
  background: #fafbfe; transition: .18s; cursor: pointer;
}
.upload-box:hover { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.upload-box svg { width: 26px; height: 26px; margin-bottom: 6px; }

/* ---------- 头像 ---------- */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #5b7cfa, #2b5cff);
}
.avatar.g { background: linear-gradient(135deg, #34d399, #12a150); }
.avatar.o { background: linear-gradient(135deg, #fbbf24, #e08700); }
.avatar.p { background: linear-gradient(135deg, #a78bfa, #7c5cf0); }
.avatar.r { background: linear-gradient(135deg, #fb7185, #e5484d); }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.xl { width: 62px; height: 62px; font-size: 21px; }

.user-cell { display: flex; align-items: center; gap: 9px; }

/* ---------- 工具类 ---------- */
.kv-inline { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.money.cny::before { content: "¥"; font-size: .82em; margin-right: 1px; color: var(--text-3); }
.money.krw::after { content: " ₩"; font-size: .82em; margin-left: 1px; color: var(--text-3); }

.divider { height: 1px; background: var(--line-2); margin: 16px 0; }

.scroll-y { overflow-y: auto; }
.h-180 { height: 180px; }
.h-240 { height: 240px; }
.h-300 { height: 300px; }

.bar-line { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #eef1f7; }
.bar-line > i { display: block; height: 100%; }

.legend { display: flex; flex-direction: column; gap: 9px; }
.legend .lg-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend .lg-item .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend .lg-item .val { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

.rank-list { display: flex; flex-direction: column; gap: 14px; }
.rank-item { display: flex; align-items: center; gap: 10px; }
.rank-item .rk {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; background: var(--slate-bg); color: var(--text-2);
}
.rank-item:nth-child(1) .rk { background: linear-gradient(135deg, #f7c948, #e8a600); color: #fff; }
.rank-item:nth-child(2) .rk { background: linear-gradient(135deg, #c7d2e3, #a4b1c7); color: #fff; }
.rank-item:nth-child(3) .rk { background: linear-gradient(135deg, #e8b48a, #cf8f5c); color: #fff; }

table.mini { width: 100%; font-size: 12.5px; border-collapse: collapse; }
table.mini td { padding: 8px 4px; border-bottom: 1px dashed var(--line-2); }
table.mini td:last-child { text-align: right; font-weight: 600; }
