/* ─────────────────────────────────────────────────────────────
 * FinanceDesk 主题 v2(浅色主区 + 深色侧栏 · 红涨绿跌 · 中国惯例)
 * ───────────────────────────────────────────────────────────── */

:root {
  /* 侧栏(深色) */
  --side-bg: #1f1f23;
  --side-bg-2: #2a2a30;
  --side-border: #2f2f36;
  --side-text: #e6e6ea;
  --side-text-2: #a8a8b3;
  --side-text-3: #6c6c78;
  --side-active: #ffffff;
  --side-hover: rgba(255, 255, 255, 0.06);

  /* 主区(浅色) */
  --bg-0: #f5f5f7;
  --bg-1: #ffffff;
  --bg-2: #fafafb;
  --border: #ebebef;
  --border-soft: #f0f0f3;

  /* 文字 */
  --text-0: #1a1a1a;
  --text-1: #4b4b55;
  --text-2: #6b6b75;
  --text-3: #9ca3af;

  /* 中国惯例:涨红跌绿 */
  --up: #ef4444;
  --up-bg: rgba(239, 68, 68, 0.10);
  --down: #10b981;
  --down-bg: rgba(16, 185, 129, 0.10);

  /* 状态色 */
  --neutral: #9ca3af;
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.10);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);

  /* 品牌 */
  --brand: #f59e0b;

  --shadow-sm: 0 1px 2px rgba(15, 15, 20, 0.04);
  --shadow:    0 2px 8px rgba(15, 15, 20, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 15, 20, 0.10);

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 左侧深色导航 ───────────────────────────────────── */
.sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: var(--side-bg);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 18px 14px 14px;
  overflow-y: auto;
}

.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 6px 18px;
  border-bottom: 1px solid var(--side-border);
}
.brand-logo {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1a1100;
  overflow: hidden;
}
.brand-logo--img { background: transparent; }
.brand-logo--img > img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.brand-text { line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 14px; color: #fff; letter-spacing: 0.4px; }
.brand-sub  { font-size: 9px; color: var(--side-text-3); letter-spacing: 1.2px; margin-top: 2px; }

/* 导航项 */
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.side-nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--side-text-2);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.side-nav__item:hover { background: var(--side-hover); color: var(--side-text); }
.side-nav__item.active {
  background: rgba(255,255,255,0.08);
  color: var(--side-active);
}
.side-nav__indicator {
  position: absolute;
  left: -14px; top: 9px; bottom: 9px;
  width: 3px;
  background: transparent;
  border-radius: 2px;
}
.side-nav__item.active .side-nav__indicator { background: var(--brand); }
.side-nav__icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; }
.side-nav__label { flex: 1; }
.side-nav__badge {
  background: var(--up);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar__divider {
  height: 1px;
  background: var(--side-border);
  margin: 18px -14px 14px;
}

.sidebar__group { padding: 0 4px; margin-bottom: 18px; }
.sidebar__group-title {
  font-size: 10px;
  color: var(--side-text-3);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0 6px 8px;
  font-weight: 600;
}
.group-pill {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  color: var(--side-text-2);
  font-size: 12px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.group-pill:hover { background: var(--side-hover); color: var(--side-text); }
.group-pill__count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--side-text-3);
}

/* 行情状态区 */
.sidebar__status {
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid var(--side-border);
  font-size: 11px;
  color: var(--side-text-2);
  line-height: 1.6;
}
.conn-status__title {
  display: flex; align-items: center; gap: 6px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 12px;
}
.conn-status__line { color: var(--side-text-2); }
.conn-status__line.muted { color: var(--side-text-3); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--side-border); }

/* 用户区 */
.sidebar__user {
  margin-top: 10px;
  padding: 10px 8px;
  display: flex; align-items: center; gap: 10px;
  border-radius: var(--radius-sm);
  background: var(--side-bg-2);
  position: relative;
}
.avatar {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1a1100;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.avatar--img {
  background: transparent;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.user-text { flex: 1; line-height: 1.2; min-width: 0; }
.user-name { font-size: 12px; color: #fff; font-weight: 600; }
.user-role { font-size: 10px; color: var(--side-text-3); margin-top: 1px; }
.user-logout {
  color: var(--side-text-3);
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.user-logout:hover { background: var(--side-hover); color: var(--side-text); }

/* 通用点(用于连接状态、组合视角分类) */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot--ok   { background: var(--success); box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.dot--idle { background: var(--neutral); }
.dot--warn { background: var(--warn); }
.dot--up   { background: var(--up); }
.dot--down { background: var(--down); }
.dot--us   { background: #3b82f6; }
.dot--hk   { background: #10b981; }
.dot--cn   { background: #ef4444; }
.dot--cash { background: #9ca3af; }

/* ── 右侧主区 ───────────────────────────────────────── */
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-0);
  overflow: hidden;
}

/* 顶部信息条 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  min-height: 56px;
}
.topbar__left  { display: flex; align-items: baseline; gap: 14px; }
.topbar__right { display: flex; align-items: center; gap: 8px; }
.topbar__date { font-size: 12px; color: var(--text-2); }
.topbar__title { font-size: 18px; font-weight: 700; color: var(--text-0); }

.topbar__search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  width: 280px;
  color: var(--text-3);
  transition: border 0.15s;
}
.topbar__search:focus-within { border-color: var(--brand); }
.topbar__search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-0);
  padding: 0;
}
.topbar__search input::placeholder { color: var(--text-3); }
.kbd {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}

.topbar__source {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 11px;
  font-family: var(--mono);
  border: 1px solid rgba(16,185,129,0.2);
}

.icon-btn {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--bg-2); color: var(--text-0); }

/* 页面容器 */
.page-host {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 32px;
}
.page { max-width: 1280px; margin: 0 auto; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.page-title { font-size: 20px; font-weight: 600; margin: 0; }
.page-subtitle { color: var(--text-2); font-size: 12px; margin-top: 4px; }

/* ── 卡片 ───────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}
.card__eyebrow {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.card__title { font-size: 14px; font-weight: 700; color: var(--text-0); margin: 0; }
.card__hint { font-size: 11px; color: var(--text-2); }
.card__more {
  font-size: 11px;
  color: var(--text-2);
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer;
}
.card__more:hover { color: var(--text-0); }

/* ── 网格 ───────────────────────────────────────────── */
.grid { display: grid; gap: 12px; }
.grid--metrics-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid--indices-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--main-l2  { grid-template-columns: 1.55fr 1fr; gap: 14px; }
.grid--two      { grid-template-columns: 1fr 1fr; gap: 14px; }
.grid--three    { grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }

@media (max-width: 1180px) {
  .grid--metrics-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--indices-3 { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .grid--metrics-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--main-l2, .grid--two, .grid--three { grid-template-columns: 1fr; }
}

/* ── 市场状态行 ─────────────────────────────────────── */
.market-status {
  display: flex; gap: 18px;
  font-size: 12px;
  color: var(--text-1);
  margin-bottom: 14px;
  padding: 0 4px;
}
.market-status__item { display: inline-flex; align-items: center; gap: 6px; }
.market-status__item .label { color: var(--text-2); }
.market-status__item .value { font-weight: 600; }
.market-status__item .value.up   { color: var(--up); }
.market-status__item .value.down { color: var(--down); }
.market-status__item .value.idle { color: var(--text-2); }

/* ── 6 指标卡(单行) ─────────────────────────────────── */
.metric {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 6px;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}
.metric__label { font-size: 11px; color: var(--text-2); font-weight: 500; }
.metric__value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-0);
  margin-top: 2px;
  letter-spacing: -0.2px;
}
.metric__value.up   { color: var(--up); }
.metric__value.down { color: var(--down); }
.metric__delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  font-family: var(--mono);
}
.metric__delta--up      { color: var(--up); }
.metric__delta--down    { color: var(--down); }
.metric__delta--neutral { color: var(--text-3); }
.metric__meta { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* ── 3 指数卡(单行) ─────────────────────────────────── */
.index-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
  min-width: 0;
}
.index-card__head { display: flex; align-items: center; gap: 8px; }
.index-card__name { font-size: 13px; font-weight: 600; color: var(--text-0); }
.index-card__code { font-size: 10px; color: var(--text-3); font-family: var(--mono); margin-left: 4px; }
.index-card__price {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.index-card__price.up   { color: var(--up); }
.index-card__price.down { color: var(--down); }
.index-card__delta { font-family: var(--mono); font-size: 12px; }
.index-card__delta.up   { color: var(--up); }
.index-card__delta.down { color: var(--down); }
.index-card__delta.neutral { color: var(--text-3); }
.index-card__foot { display: flex; gap: 10px; font-size: 10px; color: var(--text-3); margin-top: auto; }
.index-card__foot .sep { color: var(--text-3); }

/* ── 持仓实时强弱(Live Strength 条形图) ────────────── */
.strength-bars { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 0; }
.strength-row { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; gap: 10px; font-size: 12px; }
.strength-row__label { display: flex; flex-direction: column; line-height: 1.25; }
.strength-row__label .sym { font-weight: 600; color: var(--text-0); font-size: 12px; }
.strength-row__label .meta { color: var(--text-3); font-size: 10px; font-family: var(--mono); margin-top: 2px; }
.strength-row__track {
  position: relative;
  height: 8px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
}
.strength-row__bar {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 99px;
}
.strength-row__bar.up   { background: var(--up); }
.strength-row__bar.down { background: var(--down); }
.strength-row__bar.flat { background: var(--text-3); }
.strength-row__pct {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.strength-row__pct.up   { color: var(--up); }
.strength-row__pct.down { color: var(--down); }
.strength-row__pct.flat { color: var(--text-2); }

/* ── 今日重点观察列表 ───────────────────────────────── */
.watch-list { display: flex; flex-direction: column; gap: 0; }
.watch-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.watch-row:last-child { border-bottom: none; }
.watch-row__num { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 2px; }
.watch-row__title { font-size: 13px; font-weight: 600; color: var(--text-0); }
.watch-row__summary { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.watch-row__tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}
.watch-row__tag.warn   { background: var(--warn-bg);   color: var(--warn); }
.watch-row__tag.danger { background: var(--danger-bg); color: var(--danger); }
.watch-row__tag.info   { background: var(--info-bg);   color: var(--info); }
.watch-row__tag.ok     { background: var(--success-bg);color: var(--success); }

/* ── 今日行动清单 ───────────────────────────────────── */
.action-list { display: flex; flex-direction: column; gap: 10px; }
.action-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
}
.action-row__check {
  width: 18px; height: 18px;
  border: 1.5px solid var(--text-3);
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--bg-1);
}
.action-row__check.checked { background: var(--success); border-color: var(--success); color: #fff; }
.action-row__main { flex: 1; }
.action-row__title { font-size: 13px; font-weight: 600; color: var(--text-0); }
.action-row__title.done { text-decoration: line-through; color: var(--text-3); }
.action-row__hint { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* ── 表格 ───────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.table th {
  color: var(--text-2);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.4px;
  background: var(--bg-2);
  position: sticky; top: 0;
}
.table td.num, .table th.num { text-align: right; font-family: var(--mono); }
.table tr:hover td { background: var(--bg-2); }
.table .symbol { font-weight: 600; color: var(--text-0); }
.table .name { color: var(--text-2); font-size: 12px; }

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  background: var(--bg-2);
  color: var(--text-2);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.tag--up    { background: var(--up-bg);   color: var(--up); }
.tag--down  { background: var(--down-bg); color: var(--down); }
.tag--warn  { background: var(--warn-bg); color: var(--warn); }
.tag--info  { background: var(--info-bg); color: var(--info); }
.tag--ok    { background: var(--success-bg); color: var(--success); }

.up   { color: var(--up); }
.down { color: var(--down); }

/* ── 表单 ───────────────────────────────────────────── */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-row label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.form-row input, .form-row select, .form-row textarea {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-0);
  outline: none;
  transition: border 0.15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--brand); }
.form-row .hint { font-size: 11px; color: var(--text-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-0);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, border 0.15s;
}
.btn:hover { background: var(--bg-2); border-color: var(--text-3); }
.btn--primary { background: var(--brand); color: #1a1100; border-color: var(--brand); }
.btn--primary:hover { background: #d97706; border-color: #d97706; }
.btn--danger  { background: var(--danger-bg); color: var(--danger); border-color: rgba(239,68,68,0.3); }
.btn--ghost   { background: transparent; border-color: var(--border-soft); color: var(--text-2); }
.btn--sm      { padding: 5px 10px; font-size: 12px; }

.action-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

/* ── 价签 8 维 ─────────────────────────────────────── */
.price-tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.price-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--text-2);
  font-family: var(--mono);
  white-space: nowrap;
}
.price-tag--warn { background: var(--warn-bg);   color: var(--warn); }
.price-tag--info { background: var(--info-bg);   color: var(--info); }
.price-tag--ok   { background: var(--success-bg); color: var(--success); }

/* ── 复盘卡片 ───────────────────────────────────────── */
.review-block { display: flex; flex-direction: column; gap: 8px; }
.review-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 11px; color: var(--text-2);
  padding-bottom: 8px; border-bottom: 1px solid var(--border-soft);
}
.review-body { color: var(--text-1); font-size: 13px; white-space: pre-wrap; word-break: break-word; }

/* ── 新闻 ───────────────────────────────────────────── */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-item {
  border-left: 3px solid var(--border);
  padding: 4px 0 4px 14px;
  transition: border-color 0.15s;
}
.news-item:hover { border-color: var(--brand); }
.news-item__title { font-weight: 600; color: var(--text-0); font-size: 14px; margin-bottom: 4px; }
.news-item__summary { color: var(--text-1); font-size: 13px; line-height: 1.55; }
.news-item__meta {
  margin-top: 6px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 11px; color: var(--text-2);
}
.news-item--related { border-left-color: var(--brand); }
.news-detail { white-space: pre-wrap; color: var(--text-1); font-size: 13px; }

/* ── 事件日历 ───────────────────────────────────────── */
.cal-day-header {
  display: grid; grid-template-columns: 100px 90px 1fr 100px 80px;
  font-size: 11px; text-transform: uppercase; color: var(--text-3);
  letter-spacing: 0.4px; padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.cal-row {
  display: grid; grid-template-columns: 100px 90px 1fr 100px 80px;
  font-size: 13px; padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  align-items: center;
}
.cal-row:hover { background: var(--bg-2); }
.cal-row__date { font-family: var(--mono); color: var(--text-1); }
.cal-row__date small { display: block; color: var(--text-3); font-size: 10px; }
.cal-row__market { color: var(--text-2); font-size: 12px; }
.cal-row__title { color: var(--text-0); }
.cal-row__src { font-size: 11px; }
.cal-row__status { font-size: 11px; }

/* ── 设置 ───────────────────────────────────────────── */
.setting-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.setting-row__label { color: var(--text-1); font-weight: 500; }
.setting-row__hint { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ── 多币种现金网格 ──────────────────────────────── */
.cash-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.cash-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.cash-cell__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: 0.04em;
}
.cash-cell input {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
}
@media (max-width: 720px) {
  .cash-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 空状态 ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-2);
}
.empty-state svg { margin-bottom: 12px; opacity: 0.6; }
.empty-state h3 { margin: 0 0 6px; color: var(--text-1); }
.empty-state p  { margin: 0; font-size: 13px; }

/* ── 复盘评分卡 ─────────────────────────────────────── */
.score-bar { display: inline-block; vertical-align: middle; width: 80px; height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.score-bar__fill { height: 100%; background: var(--brand); border-radius: 3px; }

/* ── 提示 ───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 13px;
  color: var(--text-0);
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast--ok  { border-color: var(--success); }
.toast--err { border-color: var(--danger); }

/* ── 模态 ───────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15,15,20,0.45); backdrop-filter: blur(4px); }
.modal__panel {
  position: relative;
  width: min(640px, calc(100% - 40px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.modal__title { font-size: 16px; font-weight: 600; margin: 0 0 18px; }
.modal__footer {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

/* ── 移动端断点 ─────────────────────────────────────── */
@media (max-width: 880px) {
  .sidebar { display: none; }
  .topbar { padding: 12px 14px; }
  .topbar__search { width: 160px; }
  .page-host { padding: 14px; }
  .cal-day-header, .cal-row { grid-template-columns: 1fr 1fr 2fr; gap: 6px; }
  .cal-row__market, .cal-day-header { display: none; }
  .setting-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ── CSV 导入器 ─────────────────────────────────────── */
.csv-importer__hint { color: var(--text-2); font-size: 13px; line-height: 1.6; margin: 0 0 14px; }
.csv-importer__top .action-bar { margin-bottom: 8px; }
.csv-map__sel { max-width: 300px; }
.csv-map__table th:first-child { width: 168px; }
.csv-preview__table { margin-top: 4px; }
.csv-preview__table th, .csv-preview__table td { font-size: 13px; }