/* ============ 交易日志系统 · 暗色专业主题 ============ */
/* 颜色约定遵循A股习惯：红色=盈利，绿色=亏损 */
:root {
  --bg: #0d1117;
  --bg2: #10151d;
  --card: #161b24;
  --card2: #1b2230;
  --border: #263042;
  --text: #e6edf3;
  --muted: #8b98a9;
  --dim: #5c6878;
  --accent: #4c8dff;
  --accent2: #7aa7ff;
  --pos: #ff5d5d;          /* 盈利 · 红 */
  --pos-bg: rgba(255, 93, 93, .12);
  --neg: #2ec48f;          /* 亏损 · 绿 */
  --neg-bg: rgba(46, 196, 143, .12);
  --warn: #ffb64d;
  --holiday: #ff9a4d;      /* 周末/假日放松色（暖橙） */
  --danger: #ff6b6b;
  --good: #3fd08b;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  /* 固定在左侧，不随页面滚动；内容超高时菜单区内部滚动 */
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 50;
}
.logo {
  font-size: 17px; font-weight: 700; letter-spacing: 1px;
  padding: 4px 10px 18px; color: var(--text);
}
.logo .sub {
  display: block; font-size: 11px; font-weight: 400;
  color: var(--dim); letter-spacing: 2px; margin-top: 2px;
}
.logo .ver-badge {
  display: inline-block; margin: 6px 0 0 2px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .5px;
  color: var(--accent, #4c8dff);
  background: color-mix(in srgb, var(--accent, #4c8dff) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #4c8dff) 38%, transparent);
  border-radius: 20px; padding: 1px 8px; cursor: default;
}
.nav {
  display: flex; flex-direction: column; gap: 4px;
  flex: 1; min-height: 0; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(139,152,169,.4) transparent;
}
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(139,152,169,.35); border-radius: 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--muted); font-size: 14px;
  transition: all .15s;
}
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.active { background: rgba(76, 141, 255, .14); color: var(--accent2); font-weight: 600; }
.nav a .ico { width: 20px; text-align: center; font-size: 15px; }
/* 侧边栏二级菜单（交易查询 / 数据管理 / 系统管理 → 子模块），分组标题可点击折叠 */
.nav-group { display: flex; flex-direction: column; gap: 2px; margin: 2px 0; }
.nav-group-label {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px 5px; color: var(--text);
  font-size: 14px; font-weight: 600;
  background: none; border: none; font-family: inherit; text-align: left;
  cursor: pointer; border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-group-label:hover { background: var(--card); }
.nav-group-label .ico { width: 20px; text-align: center; font-size: 15px; }
.nav-group-label .glabel { flex: 1 1 auto; min-width: 0; }
.nav-group-label .caret {
  flex: 0 0 auto; font-size: 10px; line-height: 1;
  color: var(--dim); transition: transform .18s ease;
}
/* 折叠态：箭头旋转 -90°，子菜单收起（max-height 过渡，避免 display 切换的跳动） */
.nav-group.collapsed .nav-group-label { color: var(--muted); }
.nav-group.collapsed .nav-group-label .caret { transform: rotate(-90deg); }
.nav-sub-wrap {
  display: flex; flex-direction: column; gap: 2px;
  overflow: hidden; max-height: 420px;
  /* 手风琴瞬时展开/收起，不做过渡动画（需求 20260924：消除闪动） */
  transition: none;
}
.nav-group.collapsed .nav-sub-wrap { max-height: 0; }
.nav-group:hover .nav-group-label { color: var(--text); }
.nav-group:hover .nav-group-label .caret { transform: rotate(0deg); }
.nav a.nav-sub {
  padding: 6px 12px 6px 32px; font-size: 13px; color: var(--dim);
  position: relative;
}
.nav a.nav-sub::before {
  content: ''; position: absolute; left: 20px; top: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--dim); opacity: .55; transform: translateY(-50%);
}
.nav a.nav-sub:hover { color: var(--text); }
.nav a.nav-sub.active { color: var(--accent2); font-weight: 600; }
.nav a.nav-sub.active::before { background: var(--accent2); opacity: 1; }
.sidebar .foot {
  margin-top: auto; padding: 12px 10px 0;
  border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--dim); line-height: 1.8;
}

.main { flex: 1; margin-left: 232px; padding: 26px 30px 60px; min-width: 0; max-width: 1440px; }
/* 大屏适配（v1.85.0）：≥1600 放宽内容宽，表格与图表随之扩展 */
@media (min-width: 1600px) {
  .main { max-width: 1680px; padding: 30px 40px 70px; }
}
@media (min-width: 1920px) {
  .main { max-width: 1800px; }
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { font-size: 21px; font-weight: 700; }
.page-head .desc { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* ---------- 卡片 & KPI ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.card h3 {
  font-size: 14.5px; font-weight: 600; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.card h3 .hint { font-size: 12px; color: var(--dim); font-weight: 400; margin-left: auto; }

.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 18px;
}
.kpi {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 18px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
/* 迭代112：卡片顶部主题色渐变装饰条（随皮肤自动换色） */
.kpi::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2, var(--accent)));
  opacity: .9; pointer-events: none;
}
/* 迭代112：hover 边框变主题色 + 阴影 + 微上浮 */
.kpi:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(76, 141, 255, .14);
  transform: translateY(-2px);
}
.kpi .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi .label .ico { font-size: 13px; line-height: 1; }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.kpi .value.small { font-size: 19px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mt { margin-top: 16px; }

/* 盈亏颜色 */
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.flat { color: var(--muted); }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 9px 10px; color: var(--muted);
  font-weight: 500; font-size: 12px; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 9px 10px; border-bottom: 1px solid rgba(38, 48, 66, .55);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
tr:hover td { background: rgba(76, 141, 255, .05); }
td.num, th.num { text-align: right; }
.table-wrap { overflow-x: auto; }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 20px;
  font-size: 11.5px; line-height: 20px;
}
.badge.long { background: rgba(76,141,255,.14); color: var(--accent2); }
.badge.short { background: rgba(255,182,77,.14); color: var(--warn); }
.badge.open { background: rgba(255,182,77,.15); color: var(--warn); }
.badge.plan { background: rgba(63,208,139,.13); color: var(--good); }
.badge.noplan { background: rgba(255,107,107,.13); color: var(--danger); }
.badge.tag { background: rgba(139,152,169,.14); color: var(--muted); }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field label b { color: var(--danger); font-weight: 400; }
input, select, textarea {
  width: 100%; padding: 8px 11px;
  background: var(--bg2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13.5px; font-family: inherit;
  outline: none; transition: border .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type="checkbox"] { width: auto; }
.field .help { font-size: 11.5px; color: var(--dim); margin-top: 4px; }
.field.full { grid-column: 1 / -1; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card2); color: var(--text);
  font-size: 13.5px; cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent2); color: #fff; }
.btn.danger { background: transparent; border-color: rgba(255,107,107,.4); color: var(--danger); }
.btn.danger:hover { background: rgba(255,107,107,.1); border-color: var(--danger); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-link {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 12.5px; font-family: inherit; padding: 2px 4px;
}
.btn-link:hover { color: var(--accent2); text-decoration: underline; }
.btn-link.del { color: var(--danger); }

/* ============================================================
   全站统一 UI 组件 · 样式1（默认）
   ------------------------------------------------------------
   约定（除特殊指定外，全站一律使用本节样式）：
     · 功能按钮 = 「功能图标 + 功能文字」，尺寸统一，含悬浮 / 按下 / 聚焦态
     · Tab 控件 = 「功能图标 + 功能文字」，含悬浮 / 选中态
     · 搜索框   = 同一套结构（图标 + 输入 + 清除），支持模糊联想与拼音搜索
     · 分页     = 同一套分页器（每页 10 / 20 / 30，默认 20）
   定制只允许改外观尺寸与布局方式，功能保持一致。
   ============================================================ */

/* ---------- ① 功能按钮 · 样式1（默认）：图标 + 文字 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--card2); color: var(--text);
  font-size: 13.5px; font-family: inherit; line-height: 1.25;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
}
.btn:hover { border-color: var(--accent); color: var(--accent2); background: rgba(76,141,255,.10); }
.btn:active { transform: translateY(1px); background: rgba(76,141,255,.18); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn > .bi { font-size: 14px; line-height: 1; }
.btn.sm { min-height: 28px; padding: 0 10px; gap: 4px; font-size: 12px; border-radius: 7px; }
.btn.sm > .bi { font-size: 12.5px; }
/* 语义变体（仅换配色，尺寸与交互与默认按钮完全一致） */
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.btn.primary:active { background: #3a78e0; }
.btn.danger { background: transparent; border-color: rgba(255,107,107,.4); color: var(--danger); }
.btn.danger:hover { background: rgba(255,107,107,.12); border-color: var(--danger); color: var(--danger); }
.btn.danger:active { background: rgba(255,107,107,.2); }
.btn.ok { background: transparent; border-color: rgba(63,208,139,.4); color: var(--good); }
.btn.ok:hover { background: rgba(63,208,139,.12); border-color: var(--good); color: var(--good); }
.btn.warn { background: transparent; border-color: rgba(255,182,77,.4); color: var(--warn); }
.btn.warn:hover { background: rgba(255,182,77,.12); border-color: var(--warn); color: var(--warn); }

/* ---------- ② 行内功能列按钮（表格「功能列」用，同一套交互） ---------- */
.btn-link {
  display: inline-flex; align-items: center; gap: 3px;
  min-height: 24px; padding: 0 7px; border-radius: 6px;
  border: 1px solid transparent; background: none;
  color: var(--accent); font-size: 12.5px; font-family: inherit;
  cursor: pointer; white-space: nowrap; line-height: 1.25;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-link:hover {
  background: rgba(76,141,255,.12); border-color: rgba(76,141,255,.35);
  color: var(--accent2); text-decoration: none;
}
.btn-link:active { background: rgba(76,141,255,.22); }
.btn-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-link.del { color: var(--danger); }
.btn-link.del:hover { background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.4); color: var(--danger); }
.btn-link.ok { color: var(--good); }
.btn-link.ok:hover { background: rgba(63,208,139,.12); border-color: rgba(63,208,139,.4); color: var(--good); }
.btn-link.warn { color: var(--warn); }
.btn-link.warn:hover { background: rgba(255,182,77,.12); border-color: rgba(255,182,77,.4); color: var(--warn); }

/* ---------- ③ 统一搜索框（模糊联想 + 拼音搜索） ---------- */
.search-box {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 0 10px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  flex: 0 1 260px; min-width: 170px;
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(76,141,255,.15); }
.search-box .sb-ico { flex: 0 0 auto; font-size: 13px; color: var(--dim); line-height: 1; }
.search-box input {
  flex: 1 1 auto; min-width: 0; width: auto; min-height: 0;
  padding: 0; border: none; background: none; border-radius: 0;
  font-size: 13.5px; color: var(--text);
}
.search-box input:focus { border: none; box-shadow: none; outline: none; }
.search-box .sb-clear {
  flex: 0 0 auto; display: none; width: 18px; height: 18px; padding: 0;
  align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: rgba(139,152,169,.22);
  color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer;
}
.search-box.has-val .sb-clear { display: inline-flex; }
.search-box .sb-clear:hover { background: rgba(255,107,107,.25); color: var(--danger); }
.search-box.sm { min-height: 28px; padding: 0 9px; min-width: 150px; flex-basis: 200px; }
.search-box.sm input { font-size: 12.5px; }
.search-box .suggest-list { left: 0; right: 0; }

/* ---------- 皮肤设置弹框面板（迭代154） ---------- */
.theme-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tp-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--card2); cursor: pointer; transition: all .12s;
  font-family: inherit; font-size: 13.5px; color: var(--text); text-align: left;
}
.tp-item:hover { border-color: var(--accent); }
.tp-item.cur { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tp-swatch { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; border: 1px solid rgba(127,127,127,.35); }
.tp-name { flex: 1; min-width: 0; }
.tp-cur { color: var(--accent); font-weight: 700; visibility: hidden; }
.tp-item.cur .tp-cur { visibility: visible; }

/* ---------- 表头排序（迭代153：期初底仓页） ---------- */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--accent); }
th.sortable::after { content: '⇅'; font-size: 10px; margin-left: 5px; color: var(--dim); }
th.sort-asc::after { content: '▲'; color: var(--accent); }
th.sort-desc::after { content: '▼'; color: var(--accent); }

/* ---------- ④ 统一分页器（10 / 20 / 30，默认 20） ---------- */
.pagesize {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted);
}
.pagesize select {
  width: auto; min-width: 68px;
  min-height: 28px; padding: 0 8px;
  font-size: 12.5px; border-radius: 7px;
}
.page-jump {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--muted);
}
.page-jump input {
  width: 58px; min-height: 28px; padding: 0 8px;
  font-size: 12.5px; text-align: center; border-radius: 7px;
}

/* ---------- ⑤ 统一「勾选列 / 功能列 / 标的列」固定表头 ---------- */
table.sticky-cols th.chk, table.sticky-cols td.chk { width: 38px; text-align: center; }
table.sticky-cols th.op, table.sticky-cols td.op { white-space: nowrap; }
table.sticky-cols td.op { display: table-cell; }
table.sticky-cols td.op > .btn-link { vertical-align: middle; }
table.sticky-cols td.op form { display: inline; }
table.sticky-cols .row-pick { cursor: pointer; }

/* ---------- ⑥ 统一可折叠卡片（整行标题可点击折叠，默认展开） ----------
   结构见 _ui.html 的 fold_card 宏；开合逻辑由 base.html 的 .card.fold 脚本统一处理。
   折叠状态按「页面路径 + data-fold」记忆在 sessionStorage。 */
.card.fold { padding: 0; overflow: hidden; }
.card.fold > .fold-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 14px 16px 12px;
  background: none; border: none; font-family: inherit;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  text-align: left; cursor: pointer;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.card.fold > .fold-head:hover { background: var(--bg2); color: var(--accent2); }
.card.fold > .fold-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.card.fold .fold-head .ft { flex: 0 0 auto; }
.card.fold .fold-head .fh {
  margin-left: auto; min-width: 0;
  font-size: 12px; font-weight: 400; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card.fold .fold-head .caret {
  flex: 0 0 auto; font-size: 10px; line-height: 1; color: var(--dim);
  transition: transform .18s ease;
}
.card.fold.collapsed .fold-head .caret { transform: rotate(-90deg); }
.card.fold.collapsed > .fold-head { color: var(--muted); }
.card.fold > .fold-body { padding: 0 16px 16px; }
.card.fold.collapsed > .fold-body { display: none; }
/* 折叠容器内的关键指标块：改用更深的内嵌底色，避免与容器底色融为一体 */
.card.fold > .fold-body .kpi { background: var(--bg2); }
/* 折叠容器内的子卡片（图 / 表容器）：去掉重复边框，避免「卡片套卡片」 */
.card.fold > .fold-body .card { background: none; border: none; padding: 0; }
/* 折叠容器内的筛选表单（详情查询页）：同理去重复底色 / 边框 */
.card.fold > .fold-body .filter-bar {
  background: none; border: none; padding: 0 0 2px; margin-bottom: 0;
}

/* ---------- 提示 ---------- */
.flash { padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; }
.flash.ok { background: rgba(63,208,139,.12); border: 1px solid rgba(63,208,139,.35); color: var(--good); }
.flash.error { background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.35); color: var(--danger); }

.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.empty .big { font-size: 40px; margin-bottom: 12px; }
.empty p { margin-bottom: 16px; }

/* ---------- 指导卡片 ---------- */
.insight {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 13px; background: var(--card);
  border-left: 4px solid var(--dim);
}
.insight.danger { border-left-color: var(--danger); background: linear-gradient(90deg, rgba(255,107,107,.07), var(--card) 45%); }
.insight.warn { border-left-color: var(--warn); background: linear-gradient(90deg, rgba(255,182,77,.07), var(--card) 45%); }
.insight.info { border-left-color: var(--accent); background: linear-gradient(90deg, rgba(76,141,255,.07), var(--card) 45%); }
.insight.good { border-left-color: var(--good); background: linear-gradient(90deg, rgba(63,208,139,.07), var(--card) 45%); }
.insight .top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.insight .top .t { font-size: 15px; font-weight: 600; }
.lv {
  font-size: 11px; padding: 1px 9px; border-radius: 20px; font-weight: 600;
}
.lv.danger { background: rgba(255,107,107,.16); color: var(--danger); }
.lv.warn { background: rgba(255,182,77,.16); color: var(--warn); }
.lv.info { background: rgba(76,141,255,.16); color: var(--accent2); }
.lv.good { background: rgba(63,208,139,.16); color: var(--good); }
.insight .detail { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.insight .sugg {
  font-size: 13px; color: var(--text);
  background: var(--bg2); border-radius: 8px; padding: 9px 13px;
}
.insight .sugg::before { content: "▸ 改进建议："; color: var(--accent2); font-weight: 600; }

/* ---------- 画像 ---------- */
.radar-wrap { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.dim-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid rgba(38,48,66,.5); }
.dim-row:last-child { border-bottom: none; }
.dim-row .name { width: 76px; font-size: 13.5px; flex-shrink: 0; }
.dim-row .bar { flex: 1; height: 8px; border-radius: 6px; background: var(--bg2); overflow: hidden; }
.dim-row .bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #6ee7ff); }
.dim-row .score { width: 42px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.dim-row .note { width: 100%; font-size: 11.5px; color: var(--dim); flex-basis: 100%; }

.health { text-align: center; padding: 10px 0 4px; }
.health .score { font-size: 44px; font-weight: 800; line-height: 1.1; }
.health .grade { font-size: 15px; margin-top: 2px; }

/* ---------- 图表容器 ---------- */
.chart-box { position: relative; width: 100%; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px; margin-bottom: 16px;
}
.filter-bar .field { min-width: 120px; }
.filter-bar .field input, .filter-bar .field select { padding: 6px 9px; font-size: 13px; }
.filter-bar .field label { margin-bottom: 3px; font-size: 11.5px; }
/* 筛选栏内：搜索/重置 与 勾选/导出 按钮组分隔线 */
.filter-sep { width: 1px; align-self: stretch; margin: 4px 10px; background: var(--border); }
/* 搜索框动态联想下拉 */
.suggest-wrap { position: relative; }
.suggest-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  margin-top: 4px; padding: 4px;
  background: var(--card); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  max-height: 260px; overflow-y: auto;
}
.sg-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.sg-item:hover, .sg-item.cur { background: rgba(76,141,255,.14); }
.sg-code { color: var(--accent2); font-weight: 600; min-width: 62px; }
.sg-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------- 其他 ---------- */
.star { color: var(--warn); letter-spacing: 1px; }
.note-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
code { background: var(--bg2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: var(--accent2); }
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
/* 账户与费用设置：字段自适应铺满容器（窄屏自动降为单列） */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
/* 参数配置：容器内为说明区预留的顶栏（数据使用范围） */
.scope-note {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 14px; margin-bottom: 16px; font-size: 12.8px; line-height: 1.85;
  color: var(--muted);
}
.scope-note b { color: var(--text); }
.scope-note .sn-title { color: var(--accent2); font-weight: 600; }
.scope-note ul { margin: 4px 0 0; padding-left: 18px; }
.scope-note li { margin: 2px 0; }
.scope-note code { font-size: 12px; }

/* 系统重置：两个危险操作并排，各自列出「影响的数据 / 范围 / 不受影响」 */
/* ── 系统重置（备份导出页）：可折叠危险区 + 重设计排版（需求 20260921-1202） ── */
.danger-card { border-color: rgba(255,107,107,.45); }
.danger-card .fold-head .ft { color: #e05656; }
.danger-card .fold-head .fh { color: rgba(224,86,86,.75); }
.danger-grid {
  /* 需求 20260924：系统重置页三个危险操作容器各占一行显示 */
  display: grid; grid-template-columns: 1fr;
  gap: 16px; align-items: stretch;
}
.danger-item {
  display: flex; flex-direction: column;
  padding: 16px 18px; border-radius: 12px;
  background: rgba(255,107,107,.05); border: 1px solid rgba(255,107,107,.35);
}
.danger-item .di-head {
  font-size: 15px; font-weight: 700; color: #e05656; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.danger-item .di-desc { font-size: 12.8px; color: var(--muted); line-height: 1.8; }
.danger-item .di-scope {
  margin: 12px 0 0; font-size: 12.5px; line-height: 1.7;
  display: grid; grid-template-columns: 72px 1fr; gap: 8px 12px; align-items: start;
}
.danger-item .di-scope dt {
  color: #e05656; font-weight: 600; font-size: 12px;
  background: rgba(255,107,107,.08); border-radius: 6px;
  padding: 2px 6px; text-align: center; white-space: nowrap;
}
.danger-item .di-scope dd { margin: 0; color: var(--muted); }
.danger-item .di-scope code { font-size: 11.5px; }
.danger-item .di-actions {
  margin-top: auto; padding-top: 12px;
  border-top: 1px dashed rgba(255,107,107,.25);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.danger-item .di-actions form { margin: 0; }
/* 平仓记录 → 回合明细弹窗里的「手动平仓」操作条（需求 20260921-1344-1） */
.mc-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: flex-end; margin: 10px 0 2px;
}
.mc-bar #mcHint { flex: 1 1 260px; line-height: 1.6; }
.summary-strip {
  display: flex; gap: 26px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 18px; margin-bottom: 16px; font-size: 13px; color: var(--muted);
}
.summary-strip b { font-size: 16px; margin-left: 6px; }
/* 深度分析顶部容器：总概条放进左右并排栅格的左列，改为纵向堆叠、去掉外卡片感 */
.summary-strip.strip-col {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  margin-bottom: 0;
}
.js-drill-table tbody tr[data-key] { cursor: pointer; }
.js-drill-table tbody tr[data-key]:hover { background: var(--bg2); }
#stockTable tbody tr[data-code] { cursor: pointer; }
#stockTable tbody tr[data-code]:hover { background: var(--bg2); }
/* 交易标的页：单标的看板卡片整卡可点（弹窗显示详细内容） */
.kpi.kpi-click { cursor: pointer; }
.kpi.kpi-click:hover { border-color: var(--accent); }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .radar-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; overflow: visible; }
  .main { margin-left: 0; }
  .nav { overflow: visible; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ============ 交割单识别（OCR） ============ */
.callout {
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, rgba(76,141,255,.08), var(--card) 45%);
  border-radius: var(--radius); padding: 13px 16px; margin-bottom: 16px;
  font-size: 13px; color: var(--muted); line-height: 1.75;
}
.callout b { color: var(--text); }
.callout.warn {
  border-left-color: var(--warn);
  background: linear-gradient(90deg, rgba(255,182,77,.09), var(--card) 45%);
}
.callout.info { border-left-color: var(--accent); }
.warn-list { margin: 6px 0 0 18px; }
.warn-list li { margin-bottom: 3px; }

.drop-zone {
  border: 1.5px dashed var(--border); border-radius: var(--radius);
  padding: 26px 18px; text-align: center; cursor: pointer;
  transition: all .15s; background: var(--bg2);
}
.drop-zone:hover, .drop-zone.over {
  border-color: var(--accent); background: rgba(76,141,255,.06);
}
.drop-zone .dz-icon { font-size: 30px; }
.drop-zone .dz-title { font-size: 14px; font-weight: 600; margin-top: 6px; }
.drop-zone .dz-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.drop-zone .dz-link { color: var(--accent); text-decoration: underline; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb {
  position: relative; width: 116px; border: 1px solid var(--border);
  border-radius: 9px; overflow: hidden; background: var(--bg2);
}
.thumb img { display: block; width: 100%; height: 74px; object-fit: cover; }
.thumb .thumb-pdf {
  display: flex; align-items: center; justify-content: center;
  height: 74px; font-size: 13px; font-weight: 600;
  color: var(--dim); background: var(--bg2); letter-spacing: .5px;
}
.thumb .thumb-cap {
  font-size: 10.5px; color: var(--dim); padding: 4px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb .thumb-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,.6); color: #fff; font-size: 11px; line-height: 20px;
  padding: 0;
}
.thumb .thumb-del:hover { background: var(--danger); }

.ocr-actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 18px 0 16px;
}
.ocr-status { font-size: 13px; color: var(--muted); }
.ocr-commit-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
}

/* 入库写入进度条 */
.commit-progress { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; }
.cp-bar {
  flex: 1; height: 10px; border-radius: 99px; overflow: hidden;
  background: var(--bg2); border: 1px solid var(--border);
}
.cp-fill {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .2s ease;
}
.cp-text { font-size: 12.5px; color: var(--muted); white-space: nowrap; min-width: 120px; }

.row-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px;
}
.row-note { font-size: 11.5px; color: var(--dim); }

/* 分页条 */
.pager {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 12px;
}
.pager-info { font-size: 12px; color: var(--muted); margin-right: 8px; }
.pager-btn {
  padding: 5px 12px; font-size: 13px; border-radius: 6px;
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; line-height: 1.4;
  cursor: pointer; transition: all .15s;
}
.pager-btn:hover:not(:disabled):not(.cur) {
  border-color: var(--accent); color: var(--accent2); background: var(--card);
}
.pager-btn.cur {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 700; cursor: default;
  min-width: 34px;
}
.pager-btn:disabled { opacity: .35; cursor: not-allowed; }
.pager-dots { color: var(--muted); font-size: 13px; padding: 0 2px; }

/* 可折叠的识别提醒 */
details.callout { cursor: pointer; }
details.callout > summary {
  font-weight: 600; user-select: none; list-style: none;
  display: flex; align-items: center; gap: 6px;
}
details.callout > summary::-webkit-details-marker { display: none; }
details.callout > summary::before { content: '▸'; font-size: 12px; transition: transform .15s; }
details.callout[open] > summary::before { transform: rotate(90deg); }
details.callout > summary .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
details.callout[open] > summary { margin-bottom: 8px; }


/* 表格内可编辑单元格 */
.cell-input {
  padding: 4px 7px; font-size: 12.5px; border-radius: 6px;
  min-width: 76px; background: var(--bg2);
}
.cell-input.num-cell { min-width: 84px; text-align: right; }
td .cell-input[type="date"] { min-width: 126px; }
tr.dup-row td { background: rgba(255,182,77,.06); }
.badge.noplan { white-space: nowrap; }


/* ---------- 状态/周期 Tab ---------- */
/* 工具栏：Tab 靠左、操作按钮靠右，位置固定不随标题描述长度变化 */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.toolbar-actions .btn { white-space: nowrap; }
/* 工具栏内联搜索表单（Tab 页：Tab 靠左、搜索靠右，不黏连）
   搜索框统一使用 .search-box（见「全站统一 UI 组件」一节），此处只定布局 */
.toolbar-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
/* 勾选列（交易查询导出指定交易） */
table th.chk, table td.chk { width: 34px; text-align: center; padding: 6px 4px; }
table td.chk input, table th.chk input { cursor: pointer; }
/* ============================================================
   Tab 控件 · 样式1（默认）：功能图标 + 功能文字
   Tab 页内容统一为「Tab 行 → 搜索栏 → 明细内容」
   ============================================================ */
.seg {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
}
.seg-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 7px; font-size: 13px;
  color: var(--muted); text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .06s;
}
.seg-item .si { font-size: 13px; line-height: 1; }
.seg-item:hover { color: var(--text); background: rgba(76,141,255,.10); }
.seg-item:active { transform: translateY(1px); }
.seg-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-item.cur { background: var(--accent); color: #fff; font-weight: 600; }
.seg-item.cur:hover { background: var(--accent2); color: #fff; }
.sm-seg { margin-left: 12px; vertical-align: middle; }
.sm-seg .seg-item { padding: 3px 10px; font-size: 12px; }

.period-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px;
}
.period-controls { display: inline-flex; align-items: center; gap: 8px; }
.cell-input.sm { padding: 4px 8px; font-size: 13px; }

/* ---------- 脏数据标识 ---------- */
.badge.inv {
  background: rgba(255,93,93,.14); color: var(--neg, #ff5d5d);
  border: 1px solid rgba(255,93,93,.35); font-size: 11px; padding: 1px 6px;
}
.inv-row { opacity: .55; }
.inv-row td { text-decoration-color: rgba(255,93,93,.5); }
.btn-link.warn { color: var(--warn, #e8a23c); }
.btn-link.ok { color: var(--pos, #2ec48f); }

/* ---------- 复盘日记 ---------- */
.diary-card { padding: 14px; }
.diary-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.diary-nav {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 5px 8px 5px 12px;
  transition: border-color .12s;
}
.diary-nav:focus-within { border-color: var(--accent); }
.diary-nav .nav-lab { font-size: 12px; color: var(--dim); white-space: nowrap; }
.diary-nav .date-pick {
  background: transparent; border: none; padding: 2px 4px 2px 0;
  font-size: 13px; color: var(--text); width: 126px; color-scheme: dark;
}
.diary-nav .date-pick:focus { outline: none; border: none; box-shadow: none; }
/* ================= 统一日历控件 TJCalendar（static/tj-calendar.js） =================
   日 / 月 / 年 三级视图 + 数据标记 + 过去(灰)/未来(虚线)样式，
   输入框弹层模式与整页内嵌模式共用同一套结构与样式。 */
.tj-cal { --tj-cell-min: 86px; user-select: none; }
.tj-cal-nav { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; flex-wrap: wrap; }
.tj-cal-pg {
  width: 30px; height: 30px; flex: none; cursor: pointer; line-height: 1;
  background: var(--card2); color: var(--text); font-size: 15px;
  border: 1px solid var(--border); border-radius: 8px;
}
.tj-cal-pg:hover { border-color: var(--accent); color: var(--accent2); }
.tj-cal-title {
  display: flex; align-items: baseline; gap: 8px; flex: 0 1 auto;
  font-size: 14px; font-weight: 600;
}
.tj-cal-sub { font-size: 11.5px; font-weight: 400; color: var(--dim); }
.tj-cal-drill { cursor: pointer; padding: 1px 6px; border-radius: 6px; border: 1px dashed transparent; }
.tj-cal-drill:hover { color: var(--accent2); border-color: var(--border); background: var(--card2); }
.tj-cal-today {
  flex: none; cursor: pointer; font-size: 12px; padding: 5px 10px;
  border-radius: 8px; background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.tj-cal-today:hover { color: var(--accent2); border-color: var(--accent); }

/* 需求 20261013：列宽用 minmax(0,1fr) —— 让列可收缩到内容以下，避免长标题撑变形整月 */
.tj-cal-head, .tj-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.tj-cal-head { margin-bottom: 6px; }
.tj-cal-head-mon { display: none; }
.tj-cal-wd { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.tj-cal-wd.wkend { color: var(--holiday); }
.tj-cal-grid-mon { grid-template-columns: repeat(4, 1fr); gap: 8px; }

.tj-cal-cell {
  position: relative;
  min-height: var(--tj-cell-min);
  min-width: 0;   /* 需求 20261013：格子可随列宽收缩，长内容不撑变形整月 */
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 8px; cursor: pointer; background: var(--card2);
  transition: border-color .12s, background .12s;
  display: flex; flex-direction: column; gap: 4px;
}
/* 迭代134：节假日背景层（绝对定位铺满格子，半透明琥珀色）与名称角标 */
.tj-cal-hol-bg {
  position: absolute; inset: 0; border-radius: 8px; z-index: 0;
  background: rgba(217, 119, 6, .14); pointer-events: none;
}
.tj-cal-hol-name {
  position: absolute; top: 2px; right: 7px; z-index: 1;
  max-width: 72%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 10px; line-height: 1.35; font-weight: 700;
  color: #b45309; pointer-events: none; text-align: right;
  text-shadow: 0 0 3px var(--card2, #fff);
}
.tj-cal-hol-name::before { content: '🎉 '; }
/* 迭代134-F：调休上班（周末补班）与节假日配色区分 */
.tj-cal-hol-bg.work { background: rgba(100, 116, 139, .16); }
/* 迭代173：调休上班格内注明「调休上班」（字多，略缩小字号、放宽占位） */
.tj-cal-hol-name.work { color: #64748b; font-size: 9px; max-width: 85%; }
.tj-cal-hol-name.work::before { content: '🏢 '; }
.tj-cal-cell:hover { border-color: var(--accent); }
.tj-cal-cell.out { opacity: .38; }
.tj-cal-cell.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tj-cal-cell.sel { background: rgba(76, 141, 255, .16); border-color: var(--accent); }
/* 过去日期置灰；未来日期（超过当前系统时间）用虚线+更浅的样式区分 */
.tj-cal-cell.past { background: var(--bg2); }
.tj-cal-cell.past .tj-cal-num { color: var(--dim); }
.tj-cal-cell.future { background: transparent; border-style: dashed; }
.tj-cal-cell.future .tj-cal-num { color: var(--muted); opacity: .78; }
.tj-cal-cell.past.has-data, .tj-cal-cell.future.has-data { border-color: rgba(76, 141, 255, .5); }

.tj-cal-num { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
/* 统一标记元素：日 / 月 / 年「有数据」时视觉完全一致 */
.tj-mark {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(76, 141, 255, .18);
}
.tj-cal-cell.has-data .tj-cal-num { color: var(--accent2); }

/* 月 / 年视图格子 */
.tj-cal-mcell, .tj-cal-ycell { min-height: 62px; align-items: center; justify-content: center; }
.tj-cal-mcell .tj-cal-num, .tj-cal-ycell .tj-cal-num { font-size: 14px; }
.tj-cal-grid-year { gap: 8px; }
.chip {
  font-size: 11px; padding: 1px 7px; border-radius: 9px;
  background: rgba(76,141,255,.15); color: var(--accent);
}
.chip.inv { background: rgba(255,93,93,.15); color: var(--neg, #ff5d5d); }
.chip.dia { background: rgba(46,196,143,.15); color: var(--pos, #2ec48f); }

.day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.day-trades { margin-bottom: 14px; }
.day-trades h4 { margin: 6px 0; }
.diary-editor { border-top: 1px solid var(--border); padding-top: 12px; }
.diary-editor textarea {
  width: 100%; min-height: 160px; resize: vertical;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font-size: 13.5px; line-height: 1.7;
  font-family: inherit;
}
.diary-editor textarea:focus { outline: none; border-color: var(--accent); }
.diary-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.img-thumb { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-del {
  position: absolute; top: 2px; right: 4px; cursor: pointer;
  color: #fff; background: rgba(0,0,0,.55); border-radius: 50%;
  width: 18px; height: 18px; line-height: 16px; text-align: center; font-size: 13px;
}
.diary-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- 行点击跳详情 ---------- */
tr[data-href] { cursor: pointer; }

/* ---------- 逻辑删除（回收站） ---------- */
.del-row { opacity: .45; }
.badge.delb {
  background: rgba(139,152,169,.15); color: var(--muted);
  border: 1px dashed var(--border); font-size: 11px; padding: 1px 6px;
}

/* ---------- 交易详情页 ---------- */
.detail-table th {
  width: 96px; color: var(--muted); font-weight: 500; vertical-align: top;
}
.detail-table td { white-space: normal; }

/* ---------- 日记 Markdown 编辑器 ---------- */
.diary-ed-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; gap: 10px; flex-wrap: wrap;
}
.diary-ed-head .hint { font-size: 11.5px; color: var(--dim); font-weight: 400; }
.md-toolbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin-bottom: 8px; padding: 6px 8px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
}
.md-btn {
  padding: 3px 9px; font-size: 12px; border: 1px solid transparent;
  background: transparent; color: var(--muted); border-radius: 6px;
  cursor: pointer; font-family: inherit; line-height: 1.5;
}
.md-btn:hover { color: var(--accent2); border-color: var(--border); background: var(--card2); }
.md-btn.b { font-weight: 700; }
.md-btn.i { font-style: italic; }
.md-sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.md-preview {
  min-height: 160px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 16px; line-height: 1.8; font-size: 13.5px; overflow-x: auto;
}
.md-preview h1, .md-preview h2, .md-preview h3, .md-preview h4 {
  margin: 12px 0 6px; line-height: 1.4;
}
.md-preview h1 { font-size: 19px; border-bottom: 1px solid var(--border); padding-bottom: 5px; }
.md-preview h2 { font-size: 16.5px; }
.md-preview h3 { font-size: 14.5px; }
.md-preview h4 { font-size: 13.5px; }
.md-preview p { margin: 6px 0; }
.md-preview ul, .md-preview ol { margin: 6px 0; padding-left: 24px; }
.md-preview li { margin: 2px 0; }
.md-preview blockquote {
  margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--accent);
  background: rgba(76,141,255,.07); border-radius: 0 6px 6px 0; color: var(--muted);
}
.md-preview blockquote p { margin: 2px 0; }
.md-preview pre {
  background: #0a0e14; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; overflow-x: auto; margin: 8px 0;
}
.md-preview pre code { background: none; padding: 0; color: #c9d6e8; font-size: 12.5px; }
.md-preview table { margin: 8px 0; }
.md-preview table th, .md-preview table td { padding: 5px 10px; }
.md-preview img { max-width: 92%; max-height: 320px; border-radius: 8px; margin: 4px 0; display: block; }
.md-preview hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.md-preview .md-ext { color: var(--dim); }
.md-preview a { text-decoration: underline; }

/* ---------- 表头排序 ---------- */
.th-sort { cursor: pointer; user-select: none; }
a.th-sort { color: var(--muted); }
a.th-sort:hover { color: var(--accent2); text-decoration: none; }
a.th-sort.cur { color: var(--accent2); font-weight: 600; }
.th-sort .arr { font-size: 10px; margin-left: 2px; }

/* ---------- 交易日历单元格内容行（统一日历控件的内容插槽） ---------- */
/* 简版/详版：详版日期数字与数据摘要靠左对齐；简版（弹层）内容居中 */
.tj-cal-detail .tj-cal-num { justify-content: flex-start; }
.tj-cal-detail .tj-cal-lines { text-align: left; }
.tj-cal-simple .tj-cal-num { justify-content: center; }
.tj-cal-simple .tj-cal-cell { align-items: center; justify-content: center; }
/* 简版「有数据」附注提示（可选，默认只显示突出标记） */
.tj-cal-hint { font-size: 10.5px; color: var(--dim); line-height: 1.5; }
/* 详版数据摘要支持自定义跳转：节点带 data-href 即可点击 */
.tj-cal-lines [data-href] { cursor: pointer; }
.tj-cal-lines [data-href]:hover { text-decoration: underline; }
/* 需求 20261013：摘要容器 / 摘要行放开收缩限制，让 .tj-cal-line 的省略号真正生效
   （grid 项与 flex 项默认 min-width:auto 不允许收缩，长标题会把整列撑宽变形） */
.tj-cal-lines { display: flex; flex-direction: column; gap: 1px; overflow: hidden;
  min-width: 0; max-width: 100%; }
.tj-cal-line {
  font-size: 11px; line-height: 1.5; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.ln-buy { color: var(--pos); }
.ln-sell { color: var(--neg); }
.ln-dia { color: var(--accent2); }
.tj-cal-more { color: var(--dim); font-size: 10.5px; }
/* 需求 20260926：日期格首行「当日交易总数」，如 5笔（2买；3卖）；买红 / 卖绿 */
.cal-cnt { color: var(--muted); font-weight: 600; }
.cal-cnt .cb { color: var(--pos); }
.cal-cnt .cs { color: var(--neg); }
/* 「日」维度：单格通栏，逐条换行全部展示（不折叠、不截断、字号放大） */
.tj-cal-grid-oneday { grid-template-columns: 1fr; }
.tj-cal-grid-oneday .tj-cal-cell { min-height: 0; cursor: default; padding: 12px 16px; }
.tj-cal-grid-oneday .tj-cal-num { font-size: 15px; }
.tj-cal-grid-oneday .tj-cal-lines { overflow: visible; gap: 6px; }
.tj-cal-grid-oneday .tj-cal-line { font-size: 13px; white-space: normal; line-height: 1.6; }
.cal-pnl { font-weight: 600; margin-left: 6px; }
/* 摘要行就地弹窗（需求 20260920-2244）：不再用 data-href 跳转 */
.tj-cal-lines [data-cal-trade], .tj-cal-lines [data-cal-diary] { cursor: pointer; }
.tj-cal-lines [data-cal-trade]:hover, .tj-cal-lines [data-cal-diary]:hover { text-decoration: underline; }
/* 摘要详情弹窗（交易日历页专用，独立于其他模块弹窗） */
#calItemMask { z-index: 120; }
#calItemMask .detail-table th { width: 88px; }
.cal-dia-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 2px 0 8px; color: var(--dim); font-size: 12.5px;
}
.cal-dia-meta a { color: var(--accent2); }
.cal-dia-child { margin: 3px 0; font-size: 13px; }
.cal-dia-child span { color: var(--dim); font-size: 12px; margin-left: 6px; }
#calItemBody .md-preview { min-height: 0; max-height: 46vh; overflow: auto; }

/* ---------- 日记卡片（主/附日记） ---------- */
.diary-list-wrap { border-top: 1px solid var(--border); padding-top: 4px; }
.d-card {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg2); padding: 12px 14px; margin: 10px 0;
}
.d-card.is-app { border-left: 3px solid var(--accent); }
.d-card.nested { background: var(--card); margin-left: 18px; }
.d-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.d-title { font-size: 14.5px; }
.d-time { font-size: 11.5px; color: var(--dim); }
.d-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.badge.main { background: rgba(76,141,255,.16); color: var(--accent2); }
.badge.appb { background: rgba(110,231,255,.12); color: #6ee7ff; }
.d-parent { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.d-body { border-radius: 8px; }
.d-body.md-preview { min-height: 0; }
.d-children-head {
  font-size: 12.5px; color: var(--muted); font-weight: 600;
  margin: 12px 0 2px; padding-top: 10px; border-top: 1px dashed var(--border);
}
.ed-form { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 10px; }
.ed-form .field { flex: 1; min-width: 240px; }

/* ---------- 附件 ---------- */
.att-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.att-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card2); color: var(--text); font-size: 12.5px;
}
.att-chip span { color: var(--dim); font-size: 11px; }
.att-chip:hover { border-color: var(--accent); color: var(--accent2); text-decoration: none; }
.att-del {
  cursor: pointer; color: var(--dim); font-weight: 700; margin-left: 2px;
  padding: 0 2px;
}
.att-del:hover { color: var(--danger); }

/* ---------- 交易查询：固定左侧列（证券代码/名称/操作） ---------- */
table.sticky-cols th.stc, table.sticky-cols td.stc {
  position: sticky; z-index: 2; background: var(--card);
  border-right: 1px solid var(--border);
}
/* 勾选列（第1列）同样固定 */
table.sticky-cols th.chk, table.sticky-cols td.chk {
  position: sticky; z-index: 2; background: var(--card);
  border-right: 1px solid var(--border); left: 0;
}
table.sticky-cols thead th.chk { z-index: 3; }
table.sticky-cols tr:hover td.chk { background: #1a2130; }
table.sticky-cols thead th.stc { z-index: 3; }
tr:hover table.sticky-cols td.stc, table.sticky-cols tr:hover td.stc {
  background: #1a2130;
}
table.sticky-cols th.stc.op, table.sticky-cols td.stc.op {
  box-shadow: 2px 0 6px rgba(0, 0, 0, .35);
}
/* 详情查询（需求 20260923-1218-4）：「筛选与导出」容器与详情列表紧挨（视觉上连成一块） */
.card.tight-next { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.card.tight-next + .card { margin-top: -1px; border-top-left-radius: 0; border-top-right-radius: 0; }
/* 仪表盘 KPI 压缩（需求 20260923-1218-9）：更小的内边距与字号，单行容纳更多卡片 */
.kpi-compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.kpi-compact .kpi { padding: 8px 10px; min-width: 0; overflow: hidden; }
.kpi-compact .kpi .sub { word-break: break-all; }
.kpi-compact .kpi .label { font-size: 11.5px; margin-bottom: 2px; }
.kpi-compact .kpi .value { font-size: 17px; }
.kpi-compact .kpi .value.small { font-size: 14px; }
.kpi-compact .kpi .sub { font-size: 11px; }
/* 关键指标卡面优化（迭代103）：label 图标对齐 + hover 高亮 + 顶部主题色装饰条 */
.kpi-compact .kpi { position: relative; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.kpi-compact .kpi::before { content:''; position:absolute; left:0; top:0; right:0; height:2.5px; background:linear-gradient(90deg, var(--accent), rgba(0,0,0,0)); opacity:.5; pointer-events:none; }
.kpi-compact .kpi:hover { border-color: var(--accent); box-shadow: 0 3px 10px rgba(0,0,0,.16); transform: translateY(-1px); }
.kpi-compact .kpi .label { display:flex; align-items:center; gap:5px; }
.kpi-compact .kpi .label .ico { font-size:14px; line-height:1; flex:0 0 auto; }
.kpi-info { font-size: 12px; padding: 0 2px; cursor: help; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .3px; }

/* ---------- 附日记折叠 ---------- */
.tgl-head { cursor: pointer; user-select: none; }
.tgl-head:hover { color: var(--accent2); }
.tgl-ico { font-size: 11px; font-weight: 400; color: var(--dim); margin-left: 6px; }

/* ---------- 登录 / 数据保护 ---------- */
.login-wrap { display: flex; justify-content: center; padding-top: 8vh; }
.login-card { width: 380px; padding: 34px 32px 26px; text-align: center; }
.login-logo { font-size: 44px; margin-bottom: 6px; }
.login-card h1 { font-size: 20px; margin-bottom: 8px; }
.login-form { text-align: left; margin-top: 14px; }
.login-form .btn { width: 100%; margin-top: 6px; }
.login-foot { margin-top: 16px; font-size: 11.5px; color: var(--dim); }
/* ---------- 侧栏用户入口（迭代151/152） ---------- */
.up-theme {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 8px; color: var(--muted); font-size: 13.5px;
  cursor: pointer; transition: all .12s;
}
.up-theme:hover { background: var(--card2); color: var(--text); }
.up-theme .ico { width: 18px; text-align: center; font-size: 14px; }
.up-theme .tlbl { flex: 0 0 auto; }
.up-theme .cur-theme { flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px;
  color: var(--accent); }
.up-theme .u-caret { font-size: 10px; color: var(--dim); transition: transform .15s; }
.up-theme[aria-expanded="true"] .u-caret { transform: rotate(180deg); }
.up-theme-list {
  position: static; width: auto; margin: 0 6px 6px;
  display: none; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card2); padding: 4px;
}
.up-theme-list.open { display: block; }
.side-user {
  /* 迭代169：与下方用户入口样式保持一致（border-top 分隔、hover 背景、可点击） */
  position: relative; flex-shrink: 0; margin: 10px 12px 2px; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border-top: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); font-size: 13px; transition: all .15s;
}
.side-user:hover { background: var(--card); color: var(--text); }
.side-user .ico { width: 20px; text-align: center; font-size: 15px; }
.side-user .uname { flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.side-user .u-caret { font-size: 10px; color: var(--dim); transition: transform .15s; }
.side-user.open .u-caret { transform: rotate(180deg); }
.nav-user {
  position: relative; flex-shrink: 0; margin-top: 10px; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border-top: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); font-size: 13px; transition: all .15s;
}
.nav-user:hover { background: var(--card); color: var(--text); }
.nav-user .ico { width: 20px; text-align: center; font-size: 15px; }
.nav-user .uname { flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.nav-user .u-caret { font-size: 10px; color: var(--dim); transition: transform .15s; }
.nav-user.open .u-caret { transform: rotate(180deg); }
.user-pop {
  /* 迭代172：fixed 定位避免被侧栏裁剪；背景/边框/阴影强化，与主背景明显区分 */
  position: fixed; left: 246px; bottom: 58px; width: 272px;
  background: var(--card2); border: 1px solid var(--accent);
  border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.65), 0 0 0 1px rgba(0,0,0,.35);
  padding: 6px; display: none; z-index: 300;
}
.user-pop.open { display: block; }
@media (max-width: 900px) {
  .user-pop { position: fixed; left: 12px; right: 12px; bottom: 12px;
    width: auto; }
}
.up-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px; }
.up-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.up-name { font-size: 14px; font-weight: 600; color: var(--text);
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-role { font-size: 11.5px; color: var(--muted); }
.up-menu { border-top: 1px solid var(--border); padding: 6px 0; }
.up-menu a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 8px; color: var(--muted); font-size: 13.5px;
  text-decoration: none; transition: all .12s;
}
.up-menu a:hover { background: var(--card2); color: var(--text); }
.up-menu a .ico { width: 18px; text-align: center; font-size: 14px; }
.up-menu a.up-logout { color: var(--danger); }
.up-menu a.up-logout:hover { background: var(--pos-bg); color: var(--danger); }
/* 迭代160：浮层功能按钮（修改密码 / 退出登录）视觉与菜单项一致 */
.up-menu .up-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 8px; color: var(--muted); font-size: 13.5px;
  text-decoration: none; transition: all .12s;
  width: 100%; border: none; background: none; font-family: inherit;
  text-align: left; cursor: pointer;
}
.up-menu .up-item:hover { background: var(--card2); color: var(--text); }
.up-menu .up-item .ico { width: 18px; text-align: center; font-size: 14px; }
.up-menu .up-item.up-logout { color: var(--danger); }
.up-menu .up-item.up-logout:hover { background: var(--pos-bg); color: var(--danger); }

/* ---------- 交易日历优化（20260919-2227） ---------- */
/* 「写日记」核心按钮：醒目渐变 + 加大 */
.diary-write-btn {
  background: linear-gradient(135deg, #4c8dff, #7a5cff);
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  padding: 9px 22px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(76, 141, 255, .35);
  transition: transform .12s, box-shadow .12s;
}
.diary-write-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(76, 141, 255, .5);
}
/* 工具栏日历控件 */
.date-pick {
  background: var(--card2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  color-scheme: dark;
}
.date-pick:focus { outline: none; border-color: var(--accent); }

/* 日视图：与月网格明显区分的分区卡片布局 */
#dayView { display: flex; flex-direction: column; gap: 14px; }
.dv-banner {
  background: linear-gradient(135deg, rgba(76,141,255,.16), rgba(122,92,255,.10));
  border: 1px solid rgba(76, 141, 255, .35);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dv-banner-date {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--accent2);
}
.dv-section {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
}
.dv-title {
  margin: 0 0 12px;
  font-size: 15px;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
  line-height: 1.35;
}
.dv-trades .day-trades { margin-bottom: 0; }
.dv-diaries { border-left: 1px solid var(--border); }
.dv-diaries .dv-title { border-left-color: #b07aff; }
.trade-ref-line {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.trade-ref-line input { accent-color: var(--accent); }

/* ============================================================
   数据类型 / 数据来源 徽标（trades.data_type / trades.source）
   ============================================================ */
.badge.dt0 { background: rgba(63,208,139,.14); color: var(--good); }
.badge.dt1 { background: rgba(255,182,77,.16); color: var(--warn); }
.badge.dt2 { background: rgba(139,152,169,.16); color: var(--muted); }
.badge.dt3 { background: rgba(176,122,255,.16); color: #b07aff; }
.badge.dt4 { background: rgba(76,141,255,.14); color: var(--accent2); }
.src-tag { font-size: 11.5px; color: var(--dim); }
/* Tab 过多时自动换行，计数角标 */
.seg-wrap { flex-wrap: wrap; }
.seg-count {
  display: inline-block; margin-left: 5px; padding: 0 6px;
  border-radius: 9px; font-size: 11px; line-height: 17px;
  background: rgba(176,122,255,.22); color: #c9a6ff;
}

/* ============================================================
   移动端：顶栏 + 抽屉式侧边栏（≤900px）
   ============================================================ */
.topbar { display: none; }
.nav-mask { display: none; }

@media (max-width: 900px) {
  .topbar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 60;
    height: 54px; padding: 0 12px;
    background: var(--bg2); border-bottom: 1px solid var(--border);
  }
  .nav-toggle {
    width: 42px; height: 42px; flex: 0 0 42px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; line-height: 1;
    background: var(--card2); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
    cursor: pointer; font-family: inherit; padding: 0;
  }
  .nav-toggle:hover { border-color: var(--accent); }
  .topbar-title { font-size: 15px; font-weight: 700; letter-spacing: .5px; }
  .topbar-btn {
    margin-left: auto; padding: 8px 14px; border-radius: 9px;
    background: rgba(76,141,255,.16); color: var(--accent2);
    font-size: 13.5px; font-weight: 600; white-space: nowrap;
  }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 258px;
    height: auto; padding: 16px 12px;
    transform: translateX(-102%); transition: transform .22s ease;
    z-index: 80; overflow: hidden;
  }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .nav-mask {
    display: block; position: fixed; inset: 0; z-index: 70;
    background: rgba(0,0,0,.55); opacity: 0; pointer-events: none;
    transition: opacity .2s;
  }
  body.nav-open .nav-mask { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  /* 抽屉内菜单自身可滚动（覆盖更早的窄屏规则） */
  .nav { overflow-y: auto; overflow-x: hidden; }

  .main { margin-left: 0; padding: 14px 12px 48px; max-width: none; }

  /* 录入体验：单列表单 + 足够大的触控目标（≥44px）与 16px 字号（防 iOS 自动缩放） */
  .form-grid, .settings-grid { grid-template-columns: 1fr; }
  input, select, textarea {
    font-size: 16px; padding: 11px 12px; min-height: 44px; border-radius: 10px;
  }
  textarea { min-height: 110px; }
  .field label { font-size: 13.5px; margin-bottom: 6px; }
  .btn { min-height: 42px; font-size: 14.5px; padding: 9px 16px; }
  .btn.sm { min-height: 36px; font-size: 13px; padding: 6px 12px; }
  .btn-link { font-size: 14px; padding: 6px 5px; }
  /* 统一控件在移动端的尺寸（避免被上面的 input 大尺寸规则撑开） */
  .search-box { min-height: 44px; padding: 0 12px; flex: 1 1 100%; min-width: 0; }
  .search-box input { font-size: 16px; min-height: 0; padding: 0; border: none; }
  .search-box.sm { min-height: 38px; flex-basis: auto; }
  .search-box.sm input { font-size: 15px; }
  .pagesize select, .page-jump input { min-height: 36px; font-size: 13.5px; }
  .search-box .sb-clear { width: 22px; height: 22px; font-size: 13px; }
  .page-head { margin-bottom: 12px; }
  .page-head h1 { font-size: 19px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi .value { font-size: 20px; }

  /* Tab / 筛选栏在窄屏可横向排布并自动换行 */
  .toolbar, .filter-bar, .diary-toolbar, .ocr-actions, .ocr-commit-bar,
  .row-actions, .diary-actions {
    gap: 8px;
  }
  .filter-bar { padding: 12px; }
  .filter-bar .field { min-width: calc(50% - 5px); flex: 1; }
  .filter-sep { display: none; }
  .seg-item { padding: 7px 12px; font-size: 13.5px; }
  .pagination { justify-content: center; }
  .pager, .pager-info { justify-content: flex-start; }
  .login-wrap { padding-top: 4vh; }
  .login-card { width: 100%; padding: 26px 22px 20px; }
}

/* ============================================================
   窄屏表格卡片化（交易查询 / 数据维护列表）
   每行变成一张卡片，字段名由 td[data-label] 提供
   ============================================================ */
@media (max-width: 760px) {
  table.sticky-cols thead { display: none; }
  table.sticky-cols,
  table.sticky-cols tbody,
  table.sticky-cols tr,
  table.sticky-cols td { display: block; width: 100%; }
  table.sticky-cols tbody tr {
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--card2); padding: 10px 14px; margin-bottom: 12px;
  }
  table.sticky-cols tbody tr:hover td { background: transparent; }
  table.sticky-cols td {
    position: static !important; left: auto !important;
    background: transparent !important;
    border: none; border-bottom: 1px dashed rgba(38,48,66,.5);
    box-shadow: none !important;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 7px 0; white-space: normal; text-align: right;
  }
  table.sticky-cols td:last-child { border-bottom: none; }
  table.sticky-cols td::before {
    content: attr(data-label);
    flex: 0 0 76px; text-align: left;
    color: var(--muted); font-size: 12.5px;
  }
  table.sticky-cols td.chk { justify-content: flex-start; }
  table.sticky-cols td.chk::before { content: '选择'; }
  /* 证券行突出显示 */
  table.sticky-cols td.stc:not(.op) {
    font-size: 15.5px; font-weight: 600; color: var(--text);
  }
  /* 功能列：按钮排布宽松，便于点按 */
  table.sticky-cols td.op {
    display: flex; flex-wrap: wrap; gap: 4px 10px;
    justify-content: flex-start; padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  table.sticky-cols td.op::before { content: '功能'; }
  table.sticky-cols td.num { text-align: right; }
  .note-cell { max-width: 55vw; }
  .table-wrap { overflow-x: visible; }
}

/* ============================================================
   PC 端「一屏」紧凑化：压缩留白，常见页面尽量不滚动即可读完
   ============================================================ */
.main { padding: 18px 24px 44px; }
.page-head { margin-bottom: 13px; }
.card { padding: 14px 16px; }
.card h3 { margin-bottom: 10px; }
.card.mt, .mt { margin-top: 12px; }
.kpi-grid { gap: 11px; margin-bottom: 13px; }
.kpi { padding: 12px 15px; }
.kpi .value { font-size: 21px; }
.grid-2, .grid-3 { gap: 13px; }
th { padding: 7px 9px; }
td { padding: 7px 9px; }
.toolbar { margin-bottom: 11px; }
.filter-bar { padding: 11px 14px; margin-bottom: 12px; }
.summary-strip { padding: 10px 16px; margin-bottom: 12px; }
.pagination { margin-top: 10px; }
.settings-grid { gap: 12px 16px; }

/* ============================================================
   交易标的：统计分析看板 + 时间曲线
   ============================================================ */
.board-grid { align-items: stretch; }
.board-line {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 看板条目可点击：a 形式的 board-line / hot-item 保持原配色，悬停提示可跳转 */
a.board-line {
  display: block; color: inherit; text-decoration: none; border-radius: 6px;
}
a.board-line:hover { color: var(--accent2); }
a.hot-item { color: inherit; text-decoration: none; border-radius: 8px; }
a.hot-item:hover { background: var(--card2); }
a.hot-item:hover .nm { color: var(--accent2); }
.scroll-sub { max-height: 64px; overflow-y: auto; overflow-x: hidden; }
.scroll-sub::-webkit-scrollbar { width: 6px; }
.scroll-sub::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.hot-list { margin-top: 7px; display: flex; flex-direction: column; gap: 6px; }
.hot-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.hot-item .rank {
  flex: 0 0 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 5px; background: var(--card2); color: var(--muted);
  font-size: 11px; font-weight: 700;
}
.hot-item .nm {
  flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hot-item .wr {
  flex: 0 0 auto; color: var(--accent2); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
a.hot-item .cnt { flex: 0 0 auto; font-size: 11.5px; }

/* 周期区间说明行（交易分析页：Tab 下方一行文字） */
.period-line {
  font-size: 12.5px; color: var(--muted); margin: 10px 2px 0;
}
.period-line b { color: var(--text); font-variant-numeric: tabular-nums; }

.chart-tip {
  margin-top: 8px; text-align: center;
  font-size: 12px; color: var(--dim);
}
.chart-tip b { color: var(--muted); }

/* ============================================================
   交易分析 · 分析明细（收益与风险 / 交易行为 / 时间分布 / 标的维度）
   ============================================================ */
/* 明细模块内的小节标题 */
.sect-head { display: flex; align-items: baseline; gap: 10px; margin: 18px 2px 10px; }
.sect-head .sh-t { font-size: 15px; font-weight: 700; color: var(--text); }
.sect-head .sh-d { font-size: 12px; color: var(--dim); }
.sub-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text);
  margin: 2px 0 8px;
}
.sub-h .hint { font-size: 11.5px; color: var(--dim); font-weight: 400; }
/* 分组表头行（交易行为 / 时间分布共用一张表，按维度分段） */
tr.grp-head td {
  background: rgba(76, 141, 255, .07);
  color: var(--text); font-weight: 600; font-size: 12.5px;
  border-bottom: 1px solid var(--border);
}
tr.grp-head:hover td { background: rgba(76, 141, 255, .07); }
/* 榜单省略段提示行（标的排行只显示头尾各 N 名） */
tr.rank-gap td {
  text-align: center; color: var(--dim); font-size: 12px;
  background: rgba(127, 127, 127, .06); letter-spacing: .5px;
}
tr.rank-gap:hover td { background: rgba(127, 127, 127, .06); }
.mini-empty {
  padding: 18px 0; text-align: center;
  font-size: 12.5px; color: var(--dim);
}
.dist-note {
  margin-top: 8px; font-size: 12px; color: var(--dim); line-height: 1.8;
}
.dist-note b { font-variant-numeric: tabular-nums; }

/* 弹窗内「键值对」网格 */
.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; padding: 12px 0 4px; }
.kv { display: flex; align-items: baseline; gap: 8px; font-size: 13px; min-width: 0; }
.kv .k { flex: 0 0 92px; color: var(--muted); font-size: 12.5px; }
.kv .v {
  color: var(--text); font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 0; overflow-wrap: anywhere;
}
.modal-actions { padding: 10px 0 4px; border-top: 1px solid var(--border); margin-top: 8px; }
@media (max-width: 560px) {
  .kv-grid { grid-template-columns: 1fr; }
}

/* 待补充提示块（交易分析页） */
.todo-note { font-size: 13px; color: var(--muted); line-height: 1.8; }
.todo-note p { margin-bottom: 8px; }
.todo-note ul { margin: 0 0 8px 20px; }
.todo-note li { margin-bottom: 2px; }
.todo-note code { color: var(--accent2); }
.todo-note .dim { color: var(--dim); font-size: 12.5px; }

/* ---------- 弹窗（时间曲线数据点下钻 · PC 端） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, .62);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-mask[hidden] { display: none; }
.modal {
  width: 100%; max-width: 880px; max-height: 82vh;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .65);
}
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--card2);
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.modal-head .btn { margin-left: auto; }
.modal-body { padding: 4px 16px 14px; overflow: auto; }
.modal-body table th { border-bottom: 1px solid var(--border); }
.modal-body tr[data-href] { cursor: pointer; }
/* 宽弹窗（入库明细 / 平仓回合明细：列多，占用更大宽度） */
.modal-wide { max-width: 1200px; max-height: 88vh; }
.modal-body .cell-input { min-height: 26px; padding: 2px 6px; font-size: 12.5px; }
.modal-body .round-row { cursor: pointer; }
.modal-body .round-row:hover { background: var(--bg2); }

/* ============================================================
   全站统一对话框（TJDialog · 唯一实现，见 static/tj-dialog.js）
   原生 confirm / alert 在部分宿主环境贴窗口顶部弹出、样式不可控，
   全站一律改用本控件：遮罩固定定位 + flex 居中 → 恒在视口正中。
   ============================================================ */
.tj-dlg-mask {
  position: fixed; inset: 0; z-index: 320;
  background: rgba(0, 0, 0, .62);
  display: flex; align-items: center; justify-content: center;  /* 居中显示 */
  padding: 20px;
}
.tj-dlg-mask[hidden] { display: none; }
.tj-dlg {
  width: 100%; max-width: 540px; max-height: 84vh;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .62);
  animation: tj-dlg-in .16s ease-out;
}
@keyframes tj-dlg-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.tj-dlg-wide { max-width: 940px; max-height: 88vh; }
.tj-dlg-head {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 18px; background: var(--card2);
  border-bottom: 1px solid var(--border);
}
.tj-dlg-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.tj-dlg-ico { font-size: 15px; line-height: 1; }
.tj-dlg.danger .tj-dlg-head { background: rgba(255, 107, 107, .1); }
.tj-dlg.danger .tj-dlg-title { color: #ff8a8a; }
.tj-dlg-body {
  padding: 14px 18px; overflow: auto;
  font-size: 13.2px; line-height: 1.85; color: var(--muted);
  white-space: pre-line;                 /* 纯文本模式保留换行 */
  word-break: break-word;
}
.tj-dlg-body.as-html { white-space: normal; }
.tj-dlg-body b, .tj-dlg-body strong { color: var(--text); }
.tj-dlg-body code {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 5px; padding: 0 4px; font-size: 12.4px; color: var(--accent2);
}
.tj-dlg-body pre {
  white-space: pre-wrap; word-break: break-word;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin: 8px 0 0; font-size: 12.6px; line-height: 1.75;
  color: var(--text); max-height: 56vh; overflow: auto;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
}
/* 进度弹框（长任务：进度未结束时无法关闭，需求 20260921-1524） */
.tj-dlg-prog { padding: 4px 18px 14px; }
.tj-dlg-prog[hidden] { display: none; }
.tj-dlg-bar {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: var(--bg2); border: 1px solid var(--border);
}
.tj-dlg-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 999px; transition: width .28s ease;
}
.tj-dlg-bar.indet i {
  background: repeating-linear-gradient(115deg, var(--accent2) 0 14px,
              rgba(255, 255, 255, .18) 14px 28px);
  animation: tj-dlg-flow 1s linear infinite;
}
@keyframes tj-dlg-flow { from { background-position: 0 0; } to { background-position: 56px 0; } }
.tj-dlg-step {
  margin-top: 9px; font-size: 12.6px; color: var(--muted); line-height: 1.7;
  white-space: pre-line; word-break: break-word;
}
.tj-dlg-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 18px; border-top: 1px solid var(--border); background: var(--card2);
}

@media (max-width: 1100px) {
  .board-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .kpi-grid, .board-grid { grid-template-columns: 1fr; }
  .modal { max-height: 88vh; }
  .modal-mask { padding: 12px; }
}

/* ============================================================
   统一日历控件：日期输入框 + 弹层日历
   ============================================================ */
/* 输入框由控件接管后隐藏原生日历图标，保持一致的视觉 */
input.tj-date { cursor: pointer; background-image: none; padding-right: 10px; }
input.tj-date::-webkit-calendar-picker-indicator { display: none; opacity: 0; }
input.tj-date::-webkit-inner-spin-button { display: none; }

.tj-cal-pop {
  position: fixed; z-index: 300; width: 316px; padding: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}
.tj-cal-pop[hidden] { display: none; }
/* 弹层里格子更紧凑 */
.tj-cal-pop .tj-cal { --tj-cell-min: 34px; }
.tj-cal-pop .tj-cal-grid, .tj-cal-pop .tj-cal-head { gap: 3px; }
.tj-cal-pop .tj-cal-cell {
  min-height: 34px; padding: 0; border-color: transparent; background: transparent;
  align-items: center; justify-content: center; border-radius: 8px;
}
.tj-cal-pop .tj-cal-cell:hover { background: var(--card2); border-color: var(--border); }
.tj-cal-pop .tj-cal-cell.past { background: transparent; }
.tj-cal-pop .tj-cal-cell.future { border-style: dashed; }
.tj-cal-pop .tj-cal-num { justify-content: center; font-size: 12.5px; }
.tj-cal-pop .tj-cal-mcell, .tj-cal-pop .tj-cal-ycell { min-height: 46px; }

@media (max-width: 900px) {
  /* 移动端：弹层日历贴边、格子放宽到易点按的尺寸 */
  .tj-cal-pop { width: calc(100vw - 16px); max-width: 380px; }
  .tj-cal-pop .tj-cal-cell { min-height: 42px; }
  .tj-cal-pop .tj-cal-num { font-size: 13.5px; }
  .tj-cal-num { font-size: 13.5px; }
  .tj-cal-today { padding: 7px 12px; }
  .tj-cal-pg { width: 34px; height: 34px; }
  .tj-cal-cell { min-height: 92px; }
}

@media (max-width: 760px) {
  /* 整页日历：小屏压缩行高，保留可读性 */
  .tj-cal-head, .tj-cal-grid { gap: 4px; }
  .tj-cal-cell { min-height: 74px; padding: 5px 6px; }
  .tj-cal-mcell, .tj-cal-ycell { min-height: 54px; }
  .tj-cal-line { font-size: 10.5px; }
}

/* 图表容器：统一由 TJChart 控制高度（禁止内联 new Chart） */
.chart-box canvas { display: block; width: 100% !important; }


/* ============================================================
   交易指导：满屏一页卡片布局 + 依据交易弹窗（需求 20260923-1218-5/6）
   ============================================================ */
.page-head.slim { margin-bottom: 10px; }
.page-head.slim h1 { font-size: 19px; }
.page-head.slim .desc { font-size: 12px; }
.guide-strip {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 16px; margin-bottom: 12px;
}
.guide-strip .health { display: flex; align-items: baseline; gap: 10px; padding: 0; }
.guide-strip .health .score { font-size: 34px; }
.guide-strip .health .grade { font-size: 13px; margin: 0; }
.gsep { flex: 0 0 1px; height: 34px; background: var(--border); }
.gmeta { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.guide-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 11px; align-items: start;
}
.guide-grid .insight { margin-bottom: 0; padding: 11px 14px; }
.guide-grid .insight .top .t { font-size: 14px; }
.guide-grid .insight .detail { font-size: 12.5px; margin-bottom: 6px; }
.guide-grid .insight .sugg { font-size: 12.5px; padding: 7px 11px; }
.guide-grid .insight.gongfa .detail { margin-bottom: 0; }
.ev-foot { margin-top: 8px; display: flex; justify-content: flex-end; }
/* 依据交易 / 回合详情弹窗 */
.gev-wrap .summary-strip { margin-bottom: 10px; }
.gev-wrap .table-wrap table { width: 100%; }
.gev-bar {
  display: flex; align-items: center; gap: 14px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
}
.gev-bar .gev-count { font-size: 12.5px; margin-right: auto; }
.gev-kv {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: 12.5px; color: var(--muted); padding: 2px 0 4px;
}
.gev-kv b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ============================================================
   风格画像：满屏一页紧凑化（需求 20260923-1218-7）
   ============================================================ */
.dim-row.slim { padding: 6px 2px; gap: 10px; font-size: 12.5px; }
.dim-row.slim .name { flex: 0 0 62px; }
.dim-row.slim .note {
  flex: 1 1 auto; min-width: 0; font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.read-map td { font-size: 12px; padding: 6px 8px; color: var(--muted); }
table.read-map td b { color: var(--text); }

/* ============================================================
   多套皮肤（需求 20260923-1218-15）：body[data-theme] 覆盖 :root 变量，
   选择记忆在 localStorage（tjTheme），入口在侧边栏底部「🎨 换肤」。
   ============================================================ */
body[data-theme="obsidian"] {
  --bg: #050507; --bg2: #0a0a0d; --card: #101014; --card2: #17171d;
  --border: #23232c; --text: #e9e9ee; --muted: #9a9aa8; --dim: #62626f;
  --accent: #6f9dff; --accent2: #9db9ff;
  --pos-bg: rgba(255, 93, 93, .14); --neg-bg: rgba(46, 196, 143, .14);
}
body[data-theme="violet"] {
  --bg: #131021; --bg2: #171329; --card: #1d1832; --card2: #251e40;
  --border: #332a55; --text: #ece8f8; --muted: #a89fc8; --dim: #6f6695;
  --accent: #9a6bff; --accent2: #b795ff;
  --pos-bg: rgba(255, 93, 93, .14); --neg-bg: rgba(46, 196, 143, .14);
}
body[data-theme="forest"] {
  --bg: #0c1512; --bg2: #0f1a16; --card: #13211c; --card2: #182a23;
  --border: #24382f; --text: #e4efe9; --muted: #93a89e; --dim: #5e7368;
  --accent: #38b48a; --accent2: #6cd8b1;
  --pos-bg: rgba(255, 93, 93, .13); --neg-bg: rgba(46, 196, 143, .15);
}
body[data-theme="light"] {
  --bg: #f3f5f9; --bg2: #eceff5; --card: #ffffff; --card2: #f2f4f8;
  --border: #d9dfe9; --text: #1d2530; --muted: #5c687a; --dim: #8d97a8;
  --accent: #2f6fe4; --accent2: #1f56c0;
  --pos: #e03131; --pos-bg: rgba(224, 49, 49, .10);
  --neg: #0ca678; --neg-bg: rgba(12, 166, 120, .12);
}
body[data-theme="warm"] {
  --bg: #f7f3ec; --bg2: #f1ebdf; --card: #fffdf8; --card2: #f5f0e5;
  --border: #e2d8c6; --text: #3a3226; --muted: #7c705c; --dim: #a89a80;
  --accent: #c2701e; --accent2: #a05a10;
  --pos: #d64545; --pos-bg: rgba(214, 69, 69, .10);
  --neg: #2f9e6e; --neg-bg: rgba(47, 158, 110, .12);
}
/* 浅色皮肤下少量深色硬编码表面的兜底 */
body[data-theme="light"] tr.grp-head td, body[data-theme="warm"] tr.grp-head td { background: rgba(47, 111, 228, .08); }
body[data-theme="light"] tr.rank-gap td, body[data-theme="warm"] tr.rank-gap td { background: rgba(0, 0, 0, .05); }
/* 侧边栏换肤控件 */
.nav-theme {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 2px 0 0;
  font-size: 14px; color: var(--muted);
  border-radius: 8px;
}
.nav-theme .ico { width: 20px; text-align: center; font-size: 15px; }
.nav-theme .tlbl { flex: 0 0 auto; }
/* 自定义皮肤选择框：外观同原生 select，选项列表向上弹出（需求 20260924） */
.theme-sel {
  position: relative; flex: 1; min-width: 0;
}
.theme-sel > button {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; padding: 8px 12px; font-size: 14px;
  background: var(--bg2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; font-family: inherit; text-align: left;
}
.theme-sel > button .ts-caret { font-size: 11px; color: var(--dim); }
.theme-sel-list {
  display: none; position: absolute; bottom: calc(100% + 4px);
  left: 0; right: 0; z-index: 400;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px; box-shadow: 0 -8px 24px rgba(0,0,0,.35);
  max-height: none;
}
.theme-sel-list.open { display: block; }
.theme-sel-list button {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; background: none; color: var(--text);
  font-size: 13.5px; border-radius: 6px; cursor: pointer;
}
.theme-sel-list button:hover { background: var(--bg2); color: var(--accent2); }
.theme-sel-list button.cur { background: rgba(76,141,255,.14); color: var(--accent2); font-weight: 600; }

/* ============================================================
   记一笔：满屏一页紧凑表单（需求 20260923-1218-8）
   ============================================================ */
form.compact-form { max-width: none; }
form.compact-form .form-grid { grid-template-columns: repeat(3, 1fr); gap: 9px 14px; }
form.compact-form .field label { margin-bottom: 3px; font-size: 12px; }
form.compact-form .field input,
form.compact-form .field select,
form.compact-form .field textarea { padding: 7px 10px; font-size: 13px; }
form.compact-form .field .help { font-size: 11px; margin-top: 2px; }
form.compact-form hr.divider { margin: 10px 0; }
@media (max-width: 1100px) { form.compact-form .form-grid { grid-template-columns: 1fr 1fr; } }

/* 关键指标可点击（需求 20260923-1509） */
.kpi.clickable { cursor: pointer; transition: border-color .15s; }
.kpi.clickable:hover { border-color: var(--accent); }

/* ============================================================
   优化需求 20260923-1509：交易指导卡片 / 风格画像五维明细
   ============================================================ */
/* 交易指导：紧凑卡片，标题按等级着色、字号加大 */
.insight.guide-card { cursor: pointer; transition: border-color .15s; }
.insight.guide-card:hover { border-color: var(--accent); }
.insight.guide-card .top .t { font-size: 16.5px; }
.insight.danger.guide-card .top .t { color: var(--danger); }
.insight.warn.guide-card .top .t { color: var(--warn); }
.insight.info.guide-card .top .t { color: var(--accent2); }
.insight.good.guide-card .top .t { color: var(--good); }
.insight.guide-card .ev-count { font-size: 12.5px; margin-top: 6px; }

/* 风格画像：五维明细字号加大、整页字号统一 */
.radar-wrap ~ .card .dim-row .name,
.dim-row .name { font-size: 14px; }
.dim-row .score { font-size: 14.5px; }
.dim-row .note { font-size: 13.5px; line-height: 1.6; color: var(--text); }
/* 迭代49：交易指导「心法」整行突出 banner */
.gongfa-banner { margin: 12px 0; padding: 14px 18px; border-left: 4px solid var(--accent2); background: var(--bg2); }
.gongfa-banner .gongfa-title { font-size: 16px; font-weight: 800; color: var(--accent2); margin-bottom: 6px; }
.gongfa-banner .gongfa-body { font-size: 14px; line-height: 1.9; color: var(--text); }
/* 迭代49：风格画像「如何读这张画像」表格字号加大 */
.read-map td { font-size: 14px !important; line-height: 1.7; color: var(--text); }
.read-map td b { font-size: 14.5px; }
/* 迭代49：当天日记「主日记」头部单行高度 */
.d-card .d-head { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; min-height: 34px; }
.d-card .d-head .d-actions { margin-left: auto; white-space: nowrap; }
.d-card .d-head .d-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 数据环境（v1.86.0） ===== */
.demo-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px; border-radius: 10px;
  background: #fff7e6; border: 1px solid #f0c36d; color: #7a4b00;
  position: sticky; top: 8px; z-index: 40;
  box-shadow: 0 2px 10px rgba(122, 75, 0, .08);
}
.demo-banner .db-ico { font-size: 18px; }
.demo-banner .db-text { display: flex; flex-direction: column; gap: 2px; min-width: 240px; flex: 1; }
.demo-banner .db-text b { font-size: 13.5px; }
.demo-banner .db-text span { font-size: 12px; opacity: .85; line-height: 1.5; }
.demo-banner .db-source,
.demo-banner .db-lock {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px;
  background: rgba(122, 75, 0, .1); white-space: nowrap;
}
.demo-banner .db-link {
  font-size: 12px; color: #7a4b00; text-decoration: underline;
  white-space: nowrap;
}

/* ---- 交割单导入页 · 数据新鲜度提示条（需求 20261013，v1.87.0 并入）---- */
.fresh-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px;
  background: linear-gradient(90deg, rgba(76,141,255,.10), var(--card) 55%);
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px;
}
.fresh-strip.stale {
  border-left-color: var(--warn);
  background: linear-gradient(90deg, rgba(255,182,77,.13), var(--card) 55%);
}
.fresh-strip .fs-col { display: flex; flex-direction: column; gap: 2px; min-width: 190px; }
.fresh-strip .fs-label { font-size: 12.5px; color: var(--muted); }
.fresh-strip .fs-num {
  font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--text);
  letter-spacing: .4px; font-variant-numeric: tabular-nums;
}
.fresh-strip .fs-num.accent { color: var(--accent2); }
.fresh-strip.stale .fs-num.accent { color: var(--warn); }
.fresh-strip .fs-sub { font-size: 12.5px; color: var(--muted); }
.fresh-strip .fs-divider { width: 1px; align-self: stretch; min-height: 34px; background: var(--border); }
.fresh-strip .fs-tip { margin-left: auto; font-size: 12.5px; color: var(--muted); }
@media (max-width: 720px) {
  .fresh-strip .fs-divider { display: none; }
  .fresh-strip .fs-tip { margin-left: 0; }
  .fresh-strip .fs-num { font-size: 19px; }
}
