/* ====================================================================
   发稿云 · 后台管理系统
   「纸与墨」编辑部风格：暖白纸底 · 墨黑侧栏 · 朱砂红强调 · 衬线标题
   ==================================================================== */

:root {
  /* 品牌色（朱砂红 + 墨黑 + 金棕，克制的编辑部配色） */
  --primary: #c8402a;
  --primary-strong: #a83220;
  --primary-soft: #f7e7e2;
  --primary-border: #e5c8c0;
  /* 兼容别名（早期代码用 --red / --red-strong 引用朱砂红） */
  --red: #c8402a;
  --red-strong: #a83220;

  /* 语义色（低饱和、有纸墨质感） */
  --success: #3d5a40;
  --success-soft: #e8eee8;
  --warning: #a8783f;
  --warning-soft: #f5eee4;
  --danger: #c8402a;
  --danger-soft: #f7e7e2;
  --violet: #4a5568;
  --violet-soft: #e9ebee;
  --teal: #2f5a52;
  --teal-soft: #e4ecea;
  --blue: #2f4356;
  --blue-soft: #e7eaed;

  /* 中性色（纸墨） */
  --bg: #f5f1e9;
  --bg-soft: #faf7f0;
  --card: #fffdf8;
  --sidebar: #1a1612;
  --sidebar-2: #221d17;
  --sidebar-text: #8a8277;
  --sidebar-text-active: #f5f1e9;
  --text: #1a1612;
  --text-2: #544d43;
  --text-3: #9a9284;
  --border: #e0d8c8;
  --border-2: #d2c9b8;

  /* 阴影（轻、自然） */
  --shadow-sm: 0 1px 2px rgba(26, 22, 18, .05);
  --shadow: 0 3px 14px rgba(26, 22, 18, .09);
  --shadow-lg: 0 16px 44px rgba(26, 22, 18, .20);
  --shadow-primary: 0 6px 16px rgba(200, 64, 42, .26);

  /* 圆角（小，编辑部直角感） */
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 8px;

  --sidebar-w: 240px;
  --topbar-h: 60px;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9c1b1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #a89f8e; }
::-webkit-scrollbar-track { background: transparent; }

/* ====================================================================
   图标
   ==================================================================== */
.ico, [data-icon], .logo-ico, .field-ico, .btn-ico, .nav-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: none;
}
.ico svg, [data-icon] svg, .logo-ico svg, .field-ico svg, .btn-ico svg, .nav-ico svg {
  width: 100%; height: 100%;
  stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* ====================================================================
   登录页
   ==================================================================== */
.login-view {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 40px;
}
.login-shell {
  width: 900px; max-width: 100%; min-height: 520px;
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(26, 22, 18, .16);
}
.login-brand {
  position: relative;
  background: var(--ink);
  color: #f5f1e9;
  padding: 44px 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.login-brand::after {
  content: "云";
  position: absolute; right: -18px; bottom: -36px;
  font-family: var(--serif); font-size: 240px; font-weight: 700;
  color: rgba(255, 255, 255, .045); line-height: 1; pointer-events: none;
}
.login-brand-inner { position: relative; z-index: 1; }
.logo-mark {
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font-family: var(--serif); font-weight: 700;
}
.logo-mark.sm { width: 36px; height: 36px; font-size: 19px; }
.login-logo {
  width: 52px; height: 52px; border-radius: 4px;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 27px; font-weight: 700;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(200, 64, 42, .30);
}
.login-title { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: 2px; margin-bottom: 6px; }
.login-sub { color: #8a8277; font-size: 14px; margin-bottom: 30px; }
.login-points { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.login-points li { display: flex; align-items: center; gap: 10px; color: #c9c1b1; font-size: 13.5px; }
.login-points .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.login-brand-foot { position: relative; z-index: 1; color: #6b6358; font-size: 12px; letter-spacing: 1px; }

.login-panel { background: var(--card); display: flex; align-items: center; justify-content: center; padding: 44px; }
.login-card { width: 100%; max-width: 300px; }
.login-card-title { font-family: var(--serif); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.login-card-sub { color: var(--text-3); font-size: 13px; margin-bottom: 28px; }
.login-tip { margin-top: 20px; text-align: center; color: var(--text-3); font-size: 12px; }

/* ====================================================================
   布局
   ==================================================================== */
.app-view { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none;
  background: var(--sidebar);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-head { display: flex; align-items: center; gap: 11px; padding: 18px 20px 14px; }
.sidebar-brand { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-brand-name { font-family: var(--serif); color: #f5f1e9; font-weight: 700; font-size: 16px; letter-spacing: 1px; }
.sidebar-brand-en { color: #6b6358; font-size: 10px; letter-spacing: 1px; }

.sidebar-nav { flex: 1; padding: 4px 12px; overflow-y: auto; }
.nav-group { padding: 14px 12px 5px; font-size: 11px; color: #6b6358; letter-spacing: 2px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 13px; margin-bottom: 2px;
  border-radius: 3px;
  color: var(--sidebar-text); font-size: 14px;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #e9e4d8; }
.nav-item.is-active { background: rgba(200, 64, 42, .16); color: #fff; }
.nav-item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 2px; background: var(--red);
}
.nav-item .nav-ico { width: 18px; height: 18px; opacity: .85; }
.nav-badge {
  margin-left: auto; font-style: normal;
  background: var(--red); color: #fff;
  font-size: 11px; min-width: 17px; height: 17px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.nav-divider { height: 1px; background: rgba(255, 255, 255, .07); margin: 12px 8px; }

.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.user-name { color: #e9e4d8; font-size: 13px; }
.user-role { color: #6b6358; font-size: 11px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 4px;
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--primary); }
.icon-btn .ico, .icon-btn [data-icon] { width: 18px; height: 18px; }
.sidebar-foot .icon-btn { color: #6b6358; }
.sidebar-foot .icon-btn:hover { background: rgba(255,255,255,.06); color: #e9e4d8; }

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

.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; align-items: baseline; gap: 13px; }
.page-title { font-family: var(--serif); font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.page-crumb { color: var(--text-3); font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.content { padding: 24px 26px 48px; flex: 1; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ====================================================================
   按钮（实色，无渐变）
   ==================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 3px;
  font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn .btn-ico { width: 16px; height: 16px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-strong); }
.btn-ghost { background: var(--card); color: var(--text-2); border: 1px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: #f0d8d1; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover { background: #f0d8d1; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ====================================================================
   卡片
   ==================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 20px; border-bottom: 1px solid var(--border);
}
.card-title { font-family: var(--serif); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: .5px; }
.card-title .ico { width: 17px; height: 17px; color: var(--red); }
.card-body { padding: 20px; }
.card-body.no-pad { padding: 0; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px 20px; display: flex; align-items: center; gap: 15px;
  transition: border-color .18s;
}
.stat-card:hover { border-color: var(--border-2); }
.stat-ico {
  width: 46px; height: 46px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
}
.stat-ico .ico, .stat-ico [data-icon] { width: 21px; height: 21px; }
.stat-ico.blue { background: var(--blue-soft); color: var(--blue); }
.stat-ico.green { background: var(--success-soft); color: var(--success); }
.stat-ico.orange { background: var(--warning-soft); color: var(--warning); }
.stat-ico.violet { background: var(--violet-soft); color: var(--violet); }
.stat-ico.red { background: var(--danger-soft); color: var(--danger); }
.stat-ico.teal { background: var(--teal-soft); color: var(--teal); }
.stat-ico.indigo { background: var(--primary-soft); color: var(--primary); }
.stat-info { flex: 1; min-width: 0; }
.stat-label { color: var(--text-3); font-size: 13px; margin-bottom: 3px; }
.stat-value { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.stat-foot { color: var(--text-3); font-size: 12px; margin-top: 2px; }

/* ====================================================================
   表格（细线，报纸式）
   ==================================================================== */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; padding: 11px 16px;
  color: var(--text-3); font-weight: 600; font-size: 12.5px;
  background: var(--bg-soft); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--bg-soft); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .price { color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.tbl .link-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .link-cell a { color: var(--primary); }
.tbl .empty { text-align: center; color: var(--text-3); padding: 40px 0; }

/* 状态标签（克制色，小圆角） */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 3px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.waiting { background: var(--primary-soft); color: var(--primary); }
.tag.arranged { background: var(--violet-soft); color: var(--violet); }
.tag.published { background: var(--success-soft); color: var(--success); }
.tag.rejected { background: var(--danger-soft); color: var(--danger); }
.tag.refunding { background: var(--warning-soft); color: var(--warning); }
.tag.rewriting { background: var(--teal-soft); color: var(--teal); }
.tag.error { background: #efece3; color: var(--text-3); }

/* ====================================================================
   Tab
   ==================================================================== */
.tabs { display: flex; gap: 4px; padding: 3px; background: var(--bg); border-radius: 4px; width: fit-content; flex-wrap: wrap; }
.tab {
  padding: 7px 15px; border-radius: 3px;
  font-size: 13.5px; color: var(--text-2);
  transition: all .15s; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--card); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); }
.tab .count { font-size: 11px; color: var(--text-3); margin-left: 4px; }

/* ====================================================================
   表单
   ==================================================================== */
.field { margin-bottom: 18px; }
.field-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }
.field-label .req { color: var(--danger); margin-left: 2px; }
.field-control { position: relative; display: flex; align-items: center; }
.field-ico { position: absolute; left: 14px; color: var(--text-3); width: 18px; height: 18px; pointer-events: none; transition: color .18s; z-index: 1; }
.field-control:focus-within .field-ico { color: var(--primary); }
/* 覆盖 .field 下所有文本框/下拉框（无论是否套 .field-control），排除 radio/checkbox */
.field input:not([type="radio"]):not([type="checkbox"]),
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #c9bfae;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: var(--text);
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  height: 42px;
  padding: 0 14px;
}
.field textarea {
  padding: 11px 14px;
  line-height: 1.6;
  resize: vertical;
  min-height: 80px;
}
.field input:not([type="radio"]):not([type="checkbox"]):hover,
.field textarea:hover,
.field select:hover { border-color: #a89e8c; }
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200, 64, 42, .12);
}
.field input::placeholder, .field textarea::placeholder { color: #b5ac9d; }
.field .field-control input.has-ico { padding-left: 42px; }
.field-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

/* 富文本 */
.rich-editor { border: 1px solid #c9bfae; border-radius: 8px; overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.rich-editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(200, 64, 42, .12); }
.rich-toolbar { display: flex; gap: 2px; padding: 5px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.rich-btn { width: 29px; height: 29px; border-radius: 5px; color: var(--text-2); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.rich-btn:hover { background: var(--card); color: var(--primary); }
.rich-btn b { font-weight: 700; }
.rich-btn i { font-style: italic; }
.rich-content { min-height: 180px; max-height: 420px; overflow-y: auto; padding: 14px; outline: none; line-height: 1.7; }
.rich-content:empty::before { content: attr(data-placeholder); color: var(--text-3); }

/* 搜索与筛选 */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box .field-ico { left: 13px; }
.search-box input {
  height: 42px; padding: 0 14px 0 38px;
  border: 1px solid #c9bfae; border-radius: 8px;
  background: #fff; width: 240px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.search-box input:hover { border-color: #a89e8c; }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(200, 64, 42, .12); }
.search-box input::placeholder { color: #b5ac9d; }
.select-mini {
  height: 42px; padding: 0 12px;
  border: 1px solid #c9bfae; border-radius: 8px;
  background: #fff; color: var(--text-2); outline: none; cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.select-mini:hover { border-color: #a89e8c; }
.select-mini:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(200, 64, 42, .12); }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--border); }
.pager-btn { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 3px; border: 1px solid var(--border-2); background: var(--card); color: var(--text-2); font-size: 13px; }
.pager-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager-btn.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-info { color: var(--text-3); font-size: 12.5px; margin-right: 10px; }

/* ====================================================================
   媒体选择
   ==================================================================== */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.media-card {
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--card); padding: 16px; cursor: pointer;
  transition: border-color .16s; position: relative;
}
.media-card:hover { border-color: var(--primary); }
.media-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(200, 64, 42, .12); }
.media-card.is-selected::after {
  content: "✓"; position: absolute; top: 10px; left: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.media-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.media-avatar {
  width: 40px; height: 40px; border-radius: 3px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 17px; font-weight: 700; color: #fff;
}
.media-name { font-weight: 600; font-size: 14.5px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.media-type-tag { font-size: 11px; color: var(--text-3); }
.media-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 3px;
  background: var(--bg); color: var(--text-2); font-size: 12px; border: 1px solid var(--border);
}
.chip.blue { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.media-price { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); display: flex; align-items: baseline; justify-content: space-between; }
.media-price .p { font-family: var(--serif); color: var(--primary); font-weight: 700; font-size: 17px; }
.media-price .p small { font-size: 12px; font-weight: 400; color: var(--text-3); }

/* ====================================================================
   发稿步骤
   ==================================================================== */
.steps { display: flex; align-items: center; margin-bottom: 22px; }
.step { display: flex; align-items: center; gap: 10px; }
.step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 13px; font-weight: 700;
  background: var(--bg); color: var(--text-3); border: 1.5px solid var(--border-2);
  transition: all .2s;
}
.step-text { font-size: 13.5px; color: var(--text-3); }
.step.is-active .step-dot { background: var(--primary); color: #fff; border-color: var(--primary); }
.step.is-active .step-text { color: var(--text); font-weight: 600; }
.step.is-done .step-dot { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.step-line { width: 60px; height: 1px; background: var(--border-2); margin: 0 12px; }
.step-line.done { background: var(--success); }

/* ====================================================================
   品牌
   ==================================================================== */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.brand-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--card); transition: border-color .16s;
}
.brand-card:hover { border-color: var(--border-2); }
.brand-avatar { width: 40px; height: 40px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 17px; color: #fff; flex: none; }
.brand-name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ====================================================================
   钱包
   ==================================================================== */
.wallet-hero {
  background: var(--ink); border-radius: var(--r-lg);
  padding: 30px 32px; color: #f5f1e9;
  position: relative; overflow: hidden;
}
.wallet-hero::after {
  content: "账"; position: absolute; right: -10px; top: -30px;
  font-family: var(--serif); font-size: 200px; font-weight: 700;
  color: rgba(255, 255, 255, .04); line-height: 1; pointer-events: none;
}
.wallet-label { color: #8a8277; font-size: 13px; margin-bottom: 6px; }
.wallet-balance { font-family: var(--serif); font-size: 42px; font-weight: 700; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.wallet-row { display: flex; gap: 40px; margin-top: 20px; position: relative; z-index: 1; }
.wallet-stat .k { color: #6b6358; font-size: 12px; }
.wallet-stat .v { font-family: var(--serif); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ====================================================================
   图表
   ==================================================================== */
.chart-wrap { position: relative; }
.chart-legend { display: flex; gap: 16px; margin-top: 12px; }
.chart-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.chart-legend-item .c { width: 10px; height: 10px; border-radius: 2px; }
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.donut-legend-item .c { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.donut-legend-item .n { flex: 1; color: var(--text-2); }
.donut-legend-item .v { font-family: var(--serif); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ====================================================================
   空状态
   ==================================================================== */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty-state .ico { width: 48px; height: 48px; color: #d4ccbb; margin: 0 auto 12px; }
.empty-state p { font-size: 13.5px; }

/* ====================================================================
   模态框 / 抽屉
   ==================================================================== */
.modal-mask, .drawer-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(26, 22, 18, .5);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .18s ease;
}
.drawer-mask { justify-content: flex-end; }
.modal {
  background: var(--card); border-radius: var(--r-lg);
  width: 560px; max-width: calc(100vw - 40px);
  max-height: calc(100vh - 60px);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp .22s ease;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-title { font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }
.drawer {
  background: var(--card); width: 500px; max-width: calc(100vw - 40px);
  height: 100%; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slideLeft .22s ease;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 22px; overflow-y: auto; flex: 1; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* Toast */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 4px;
  background: var(--card); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); font-size: 13.5px;
  animation: slideLeft .25s ease;
  min-width: 260px; max-width: 380px;
}
.toast .ico { width: 18px; height: 18px; flex: none; }
.toast.success .ico { color: var(--success); }
.toast.error .ico { color: var(--danger); }
.toast.info .ico { color: var(--primary); }
.toast.warn .ico { color: var(--warning); }

/* 详情键值 */
.detail-list { display: flex; flex-direction: column; }
.detail-row { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: none; }
.detail-row .k { width: 100px; flex: none; color: var(--text-3); font-size: 13px; }
.detail-row .v { flex: 1; color: var(--text); word-break: break-all; }

/* ====================================================================
   日志 / 收藏
   ==================================================================== */
.log-list { display: flex; flex-direction: column; }
.log-item { display: flex; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.log-item:last-child { border-bottom: none; }
.log-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.log-dot.info { background: var(--blue); }
.log-dot.error { background: var(--danger); }
.log-dot.warn { background: var(--warning); }
.log-body { flex: 1; }
.log-msg { font-size: 13.5px; color: var(--text); }
.log-time { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 17px; line-height: 1;
  transition: all .15s;
}
.fav-btn:hover { background: var(--bg); color: var(--warning); }
.fav-btn.active { color: var(--warning); }
.fav-btn .ico { width: 17px; height: 17px; }

/* 响应式 */
@media (max-width: 1200px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}
