/* ============================================================
   交易流程纪律系统 · Design Tokens（浅色主题 · 产品型寄存器）
   对标：Linear / TradingView 的克制专业感
   图标库：Lucide（16/20/24px，stroke 2px，全项目唯一）
   ============================================================ */

:root {
  /* ---------- A1-identity · Surface ---------- */
  --bg: #F6F7F9;            /* 页面背景：冷灰微蓝 */
  --surface: #FFFFFF;       /* 卡片/容器 */
  --surface-sunken: #F1F3F6;/* 凹陷区：分组底、表头、截图粘贴区 */

  /* ---------- A1-identity · Foreground ---------- */
  --fg: #181C22;            /* 主文本 */
  --muted: #5D6572;         /* 次级文本/小标题 */
  --meta: #929AA6;          /* 三级文本：时间戳、辅助说明 */

  /* ---------- A1-identity · Border ---------- */
  --border: #E2E5EA;        /* 默认边框 */
  --border-strong: #C9CFD8; /* 输入框默认边框 */

  /* ---------- A1-identity · Accent（每屏 ≤2 处可见使用） ---------- */
  --accent: #3E63DD;        /* 工具蓝：选中态、主按钮、聚焦 */
  --accent-on: #FFFFFF;
  --accent-hover: #3556C4;
  --accent-active: #2D4BAD;
  --accent-soft: #EDF1FD;   /* 选中态浅底（卡片选中、Tab 底） */

  /* ---------- A2 · Semantic（判定系统核心） ---------- */
  --success: #18794E;              /* 可以下单 / 做到 */
  --success-bg: #E9F5EE;
  --success-border: #B4DEC6;
  --warn: #A15C07;                 /* 可下单但有遗漏 / 注意 */
  --warn-bg: #FBF1E2;
  --warn-border: #EDD3AC;
  --danger: #CE2C31;               /* 阻断 · 不可下单 / 违规 */
  --danger-bg: #FCEBEC;
  --danger-border: #F3C1C4;

  /* ---------- C-extension · 盈亏/方向（中式交易惯例：红盈绿亏） ---------- */
  --pnl-up: #CE2C31;        /* 盈利 / 做多 */
  --pnl-up-bg: #FCEBEC;
  --pnl-down: #18794E;      /* 亏损 / 做空 */
  --pnl-down-bg: #E9F5EE;
  /* 说明：盈亏色与判定色同族是中式交易软件惯例。判定状态从不只靠颜色
     区分（必带图标+文字），盈亏数字必带 +/- 符号，场景不冲突。 */

  /* ---------- A1 · Typography ---------- */
  --font-display: "Inter", "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  --font-body: "Inter", "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "PingFang SC", monospace;
  /* 所有价格、R倍数、百分比、计数、评分一律用 --font-mono + tabular-nums */

  --text-xs: 12px;    /* 标签、meta、badge */
  --text-sm: 13px;    /* 辅助文本、表格次级 */
  --text-base: 14px;  /* 正文基准（工具型高密度） */
  --text-lg: 16px;    /* 强调正文、判定条文字 */
  --text-xl: 18px;    /* 卡片标题、步骤标题 */
  --text-2xl: 20px;   /* 页面标题 */
  --text-3xl: 24px;   /* 区块大标题 */
  --text-4xl: 32px;   /* KPI 数字、评分（配 mono） */

  --leading-body: 1.6;
  --leading-tight: 1.3;

  /* 字重三级：400 正文 / 510 按钮·表头·小标题 / 590 标题·判定·数字 */

  /* ---------- A2 · Spacing（4px 网格） ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* ---------- A2 · Radius（工具型，偏利落） ---------- */
  --radius-sm: 4px;    /* badge、tag、进度条 */
  --radius-md: 6px;    /* 按钮、输入框 */
  --radius-lg: 8px;    /* 卡片 */
  --radius-pill: 9999px; /* 判定 pill、方向 badge */

  /* ---------- A2 · Elevation（ring 优先，阴影克制） ---------- */
  --elev-flat: none;
  --elev-ring: 0 0 0 1px var(--border);
  --elev-raised: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px rgba(16, 24, 40, 0.06);
  --elev-modal: 0 8px 28px rgba(16, 24, 40, 0.14);
  --elev-bar: 0 -1px 2px rgba(16, 24, 40, 0.03), 0 -4px 12px rgba(16, 24, 40, 0.05); /* 底部 sticky 判定条 */

  /* ---------- A2 · Focus & Motion ---------- */
  --focus-ring: 0 0 0 3px rgba(62, 99, 221, 0.28);
  --motion-fast: 120ms;
  --motion-base: 150ms;
  --motion-enter: 200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  /* 禁止弹跳缓动；所有过渡 ≤300ms；支持 prefers-reduced-motion */

  /* ---------- A1-structure · Layout ---------- */
  --sidebar-w: 232px;
  --container-narrow: 760px;   /* 开单向导 / 复盘表单 / 规则库 */
  --container-wide: 1080px;    /* 持仓中 / 历史复盘 */
  --container-full: 1200px;    /* 统计面板 */
  --topbar-h: 52px;
  --verdictbar-h: 64px;        /* 判定条 */
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0ms;
    --motion-base: 0ms;
    --motion-enter: 0ms;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
