/* ============================================================
   ECM 管理台 · 设计系统
   浅色、低对比、信息密度高 —— 这是每天盯四小时以上的界面，
   所以优先级是「扫得快」而不是「看起来酷」。
   ============================================================ */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f2f4f7;
  --ink: #0f172a;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e7ec;
  --line-2: #f0f2f5;

  --brand: #0f766e;
  --brand-600: #0d9488;
  --brand-soft: #ecfdf5;
  --brand-line: #99f6e4;

  --danger: #b42318;
  --danger-soft: #fef3f2;
  --danger-line: #fecdca;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --warn-line: #fedf89;
  --success: #067647;
  --success-soft: #ecfdf3;
  --success-line: #abefc6;
  --info: #175cd3;
  --info-soft: #eff8ff;
  --info-line: #b2ddff;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-2: 0 4px 12px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-3: 0 16px 40px rgba(16, 24, 40, .14);
  --sans: "Inter", -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
a { color: var(--brand); text-decoration: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #98a2b3; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------- 布局 ---------------------------- */
.layout { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: #0d1b1a;
  color: #c7d2d0;
  padding: 18px 14px 14px;
  gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(140deg, #14b8a6, #0f766e);
  color: #fff; font-weight: 700; font-size: 16px;
  display: grid; place-items: center; flex: none;
  box-shadow: 0 2px 8px rgba(20, 184, 166, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-text strong { color: #f0fdfa; font-size: 14px; letter-spacing: .2px; }
.brand-text span { color: #5f7c78; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: #9db4b1; font-size: 13px; cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #e6f5f2; }
.nav-item.active { background: rgba(20, 184, 166, .16); color: #5eead4; font-weight: 600; }
.nav-item .icon { width: 17px; height: 17px; flex: none; opacity: .9; }
.nav-item .count {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: rgba(255, 255, 255, .1); color: #cfe8e4;
  padding: 1px 6px; border-radius: 20px; min-width: 20px; text-align: center;
}
.nav-item.alert .count { background: rgba(248, 113, 113, .22); color: #fca5a5; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .07); margin: 8px 6px; }
.nav-label { font-size: 10.5px; color: #47605d; letter-spacing: 1px; padding: 8px 10px 4px; text-transform: uppercase; }

.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .07); padding-top: 10px; font-size: 11.5px; }
.sys-status { display: flex; align-items: center; gap: 7px; color: #8ba9a5; padding: 2px 6px; }
.sys-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
.sys-status.warn .dot { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .15); }
.sys-status.error .dot { background: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }
.version { color: #3f5653; padding: 4px 6px 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 26px; background: rgba(244, 245, 247, .88);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar-left h1 { font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
.topbar-left p { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.search-wrap { position: relative; }
.search-wrap .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; stroke: var(--muted-2); fill: none; stroke-width: 1.8; }
.search {
  width: 250px; height: 34px; padding: 0 12px 0 32px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); font-size: 13px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, .1); }

.view { padding: 20px 26px 60px; max-width: 1560px; width: 100%; }

/* ---------------------------- 图标 ---------------------------- */
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------- 按钮 ---------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .14s; white-space: nowrap;
  box-shadow: var(--shadow-1);
}
.btn:hover { background: var(--surface-3); border-color: #d0d5dd; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(15, 118, 110, .2); }
.btn-primary:hover { background: #0b5f59; border-color: #0b5f59; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #912018; border-color: #912018; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-block { width: 100%; justify-content: center; }
.btn-soft-danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.btn-soft-danger:hover { background: #fee4e2; }

/* ---------------------------- 卡片 ---------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2);
}
.card-head h2 { font-size: 13.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 8px 0; }

/* ---------------------------- 指标卡 ---------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 15px 16px; box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); opacity: .8; }
.kpi.warn::after { background: #f79009; }
.kpi.danger::after { background: #f04438; }
.kpi.info::after { background: #2e90fa; }
.kpi-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 25px; font-weight: 680; letter-spacing: -.6px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-foot { margin-top: 6px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.delta { font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.delta.up { color: var(--danger); }
.delta.down { color: var(--success); }
.delta.flat { color: var(--muted); }

/* ---------------------------- 网格 ---------------------------- */
.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------------------------- 徽标 ---------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 20px; font-size: 11.5px; font-weight: 550;
  border: 1px solid transparent; white-space: nowrap; line-height: 1.6;
}
.badge.muted { background: var(--surface-3); color: var(--muted); border-color: var(--line); }
.badge.primary { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.badge.success { background: var(--success-soft); color: var(--success); border-color: var(--success-line); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.badge.info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.ch-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px;
  border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-2); white-space: nowrap;
}
.tag-mono { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }

/* ---------------------------- 表格 ---------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.tbl thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2); color: var(--muted);
  font-size: 11.5px; font-weight: 600; text-align: left; letter-spacing: .2px;
  padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr { transition: background .1s; }
table.tbl tbody tr:hover { background: #fbfcfd; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tbody tr:last-child td { border-bottom: none; }
.td-main { font-weight: 550; color: var(--ink); }
.td-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 30px; height: 30px; margin-bottom: 10px; stroke: var(--muted-2); opacity: .6; }
.empty p { font-size: 12.5px; }
.empty strong { display: block; font-size: 13.5px; color: var(--ink-2); margin-bottom: 4px; }

/* ---------------------------- 筛选栏 ---------------------------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; box-shadow: var(--shadow-1); }
.tab {
  padding: 5px 11px; border-radius: 7px; border: none; background: none;
  font-size: 12.5px; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 5px;
  transition: all .12s; white-space: nowrap;
}
.tab:hover { color: var(--ink-2); background: var(--surface-3); }
.tab.active { background: var(--brand); color: #fff; font-weight: 600; }
.tab.active .n { background: rgba(255, 255, 255, .22); }
.tab .n { font-size: 10.5px; background: var(--surface-3); padding: 0 5px; border-radius: 10px; color: inherit; min-width: 16px; text-align: center; }
.spacer { flex: 1; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); font-size: 13px; color: var(--ink); font-family: inherit;
  transition: border-color .15s, box-shadow .15s; width: 100%;
}
.textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, .1);
}
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5 10 4.5' stroke='%23667085' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 26px; width: auto; min-width: 110px; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 20px; background: #d0d5dd; border: none; cursor: pointer; transition: background .18s; flex: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .2); transition: transform .18s; }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(16px); }

/* ---------------------------- 待办 ---------------------------- */
.todo { display: flex; flex-direction: column; }
.todo-item {
  display: flex; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; transition: background .1s; align-items: flex-start;
}
.todo-item:hover { background: var(--surface-2); }
.todo-item:last-child { border-bottom: none; }
.todo-bar { width: 3px; border-radius: 3px; align-self: stretch; background: var(--line); flex: none; }
.todo-bar.danger { background: #f04438; }
.todo-bar.warning { background: #f79009; }
.todo-bar.info { background: #2e90fa; }
.todo-body { min-width: 0; flex: 1; }
.todo-title { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.todo-detail { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------- 图表 ---------------------------- */
.chart-box { padding: 6px 6px 0; }
.chart-legend { display: flex; gap: 14px; padding: 0 14px 12px; font-size: 11.5px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.bar-row { display: flex; align-items: center; gap: 10px; padding: 7px 18px; font-size: 12.5px; }
.bar-row .name { width: 54px; color: var(--ink-2); flex: none; }
.bar-track { flex: 1; height: 7px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--brand); transition: width .5s cubic-bezier(.4, 0, .2, 1); }
.bar-row .val { width: 74px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 550; }

/* ---------------------------- 抽屉 ---------------------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .38);
  backdrop-filter: blur(2px); z-index: 60; animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 620px; max-width: 94vw;
  background: var(--surface); z-index: 61; display: flex; flex-direction: column;
  box-shadow: var(--shadow-3); animation: slideIn .22s cubic-bezier(.32, .72, 0, 1);
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.drawer-head h2 { font-size: 15px; font-weight: 650; }
.drawer-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); flex-wrap: wrap; }
.icon-btn { width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 520px; max-width: 94vw; max-height: 88vh; background: var(--surface);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3); z-index: 61;
  display: flex; flex-direction: column; animation: pop .18s cubic-bezier(.32, .72, 0, 1);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 15px; font-weight: 650; }
.modal-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ---------------------------- 详情排版 ---------------------------- */
.section { margin-bottom: 20px; }
.section-title { font-size: 11.5px; font-weight: 650; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 7px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.amount-box { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; }
.amount-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; color: var(--ink-2); }
.amount-row.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; font-weight: 650; font-size: 14px; color: var(--ink); }
.amount-row .v { font-variant-numeric: tabular-nums; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 13px; font-size: 12.5px; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--muted-2);
}
.tl-item.auto::before { border-color: var(--brand-600); background: var(--brand-soft); }
.tl-item.user::before { border-color: var(--info); background: var(--info-soft); }
.tl-item .t { color: var(--muted); font-size: 11px; margin-left: 6px; }
.tl-item .d { color: var(--ink-2); margin-top: 1px; }

.item-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.item-row:last-child { border-bottom: none; }
.thumb {
  width: 38px; height: 38px; border-radius: 8px; flex: none;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 650; font-size: 15px;
  border: 1px solid var(--brand-line);
}
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 550; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.item-price { text-align: right; font-variant-numeric: tabular-nums; flex: none; }

/* ---------------------------- 提示与状态 ---------------------------- */
.notice {
  display: flex; gap: 9px; padding: 10px 13px; border-radius: var(--r);
  font-size: 12.5px; line-height: 1.6; border: 1px solid;
}
.notice .icon { margin-top: 1px; }
.notice.info { background: var(--info-soft); border-color: var(--info-line); color: #1849a9; }
.notice.warn { background: var(--warn-soft); border-color: var(--warn-line); color: #93370d; }
.notice.danger { background: var(--danger-soft); border-color: var(--danger-line); color: #912018; }
.notice.success { background: var(--success-soft); border-color: var(--success-line); color: #05603a; }
.notice.muted { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }

.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: flex-start; gap: 9px; min-width: 240px; max-width: 380px;
  background: #101828; color: #f2f4f7; padding: 11px 14px; border-radius: var(--r);
  box-shadow: var(--shadow-3); font-size: 12.5px; animation: toastIn .2s cubic-bezier(.32, .72, 0, 1);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.success { background: #054f31; }
.toast.error { background: #7a271a; }
.toast.warn { background: #7a2e0e; }
.toast .icon { margin-top: 1px; }

.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: var(--line); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #f2f4f7 25%, #e9ebef 37%, #f2f4f7 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------------------------- 渠道卡 ---------------------------- */
.ch-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.ch-head { padding: 16px 18px 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: flex-start; gap: 11px; }
.ch-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.ch-name { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.ch-platform { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ch-body { padding: 14px 18px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.cap-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.cap-table td { padding: 4px 0; color: var(--ink-2); }
.cap-table td:last-child { text-align: right; }
.yes { color: var(--success); font-weight: 600; }
.no { color: var(--muted-2); }
.ch-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 7px; flex-wrap: wrap; background: var(--surface-2); }
.flow-list { margin: 0; padding-left: 16px; font-size: 12px; color: var(--ink-2); line-height: 1.75; }
.flow-list li { margin-bottom: 3px; }
.flow-list li::marker { color: var(--brand-600); }

/* ---------------------------- 响应式 ---------------------------- */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px; overflow-x: auto; }
  .nav { flex-direction: row; }
  .nav-label, .nav-sep, .sidebar-foot, .brand-text span { display: none; }
  .kpi-grid, .grid-3 { grid-template-columns: 1fr 1fr; }
  .search { width: 150px; }
  .view { padding: 14px; }
  .drawer { width: 100vw; }
}
