/* 车管家洗车 · UI 设计令牌
 * 方向 A「墨纸账簿」为默认主题；方向 B「车间工单」通过 [data-direction="b"] 覆盖。
 * 只允许页面引用 var(--token)，不要在页面里写裸色值。
 * 来源：Open Props 的尺度分层思路（MIT）+ 项目自有色板；无运行时依赖。
 */
:root {
  /* ---------- 字体 ---------- */
  --font-display: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Menlo, "Noto Sans Mono CJK SC", monospace;

  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 44px;

  --leading-tight: 1.18;
  --leading-snug: 1.38;
  --leading-normal: 1.62;
  --leading-loose: 1.8;

  --tracking-label: 0.08em;
  --tracking-tight: -0.01em;

  /* ---------- 色彩（方向 A：墨纸账簿） ---------- */
  --ink: #1b1c18;
  --ink-2: #35372f;
  --muted: #64665a;
  --muted-2: #8b8d7f;
  --paper: #f2eee3;
  --paper-2: #eae4d6;
  --surface: #fffcf5;
  --surface-2: #f7f3e8;
  --line: #dbd4c2;
  --line-strong: #c3bba5;

  --brand: #1e4c3f;
  --brand-2: #2a6553;
  --brand-deep: #14332b;
  --brand-soft: #e5eee7;
  --brand-ink: #fffcf5;

  --accent: #9a5a2b;
  --accent-2: #b16c37;
  --accent-soft: #f3e4d2;
  --accent-ink: #fffcf5;

  --ok: #2c6a4b;
  --ok-soft: #e3efe7;
  --warn: #7f5308;
  --warn-soft: #f7e9ca;
  --bad: #a3382f;
  --bad-soft: #f7e3df;
  --info: #2f5566;
  --info-soft: #e5edf0;

  --focus-color: #1e4c3f;
  --focus-ring: 0 0 0 1px var(--focus-color), 0 0 0 4px var(--brand-soft);
  --overlay: rgba(20, 22, 17, 0.46);
  --overlay-soft: rgba(20, 22, 17, 0.14);

  /* ---------- 圆角：按组件分档，不统一大圆角 ---------- */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-pill: 999px;

  /* ---------- 间距：4 的倍数 ---------- */
  --space-0: 0;
  --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;
  --space-16: 64px;

  /* ---------- 阴影：纸面轻投影，仅浮层使用 ---------- */
  --shadow-1: 0 1px 0 rgba(27, 28, 24, 0.04), 0 1px 2px rgba(27, 28, 24, 0.06);
  --shadow-2: 0 2px 6px rgba(27, 28, 24, 0.07), 0 12px 28px -16px rgba(27, 28, 24, 0.28);
  --shadow-pop: 0 4px 10px rgba(27, 28, 24, 0.08), 0 24px 48px -24px rgba(27, 28, 24, 0.36);

  /* ---------- 动效 ---------- */
  --dur-instant: 80ms;
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 240ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --lift: -1px;

  /* ---------- 层级 ---------- */
  --z-base: 1;
  --z-sticky: 20;
  --z-header: 30;
  --z-drawer: 60;
  --z-modal: 80;
  --z-toast: 100;

  /* ---------- 断点（供文档与容器查询参考） ---------- */
  --bp-mobile-s: 375px;
  --bp-mobile: 390px;
  --bp-mobile-l: 430px;
  --bp-tablet: 768px;
  --bp-desktop: 1280px;
  --bp-wide: 1440px;

  /* ---------- 容器尺寸 ---------- */
  --pc-sidebar: 248px;
  --pc-topbar: 60px;
  --pc-content-max: 1240px;
  --h5-max: 430px;
  --touch: 44px;
  --control-pc: 36px;
  --control-mobile: 48px;
}

/* 方向 B：车间工单（仅作为备选方向令牌，页面默认不加载） */
[data-direction="b"] {
  --font-display: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  --ink: #15181a;
  --ink-2: #2c3236;
  --muted: #5d6569;
  --muted-2: #8a9296;
  --paper: #eceee9;
  --paper-2: #e1e5de;
  --surface: #ffffff;
  --surface-2: #f4f6f2;
  --line: #d5dad3;
  --line-strong: #b9c1b9;

  --brand: #b4530a;
  --brand-2: #d06a1b;
  --brand-deep: #1f2933;
  --brand-soft: #fbeadb;
  --brand-ink: #ffffff;

  --accent: #0f6e68;
  --accent-2: #16857d;
  --accent-soft: #dff0ee;
  --accent-ink: #ffffff;

  --ok: #2b6b4d;
  --ok-soft: #e2f0e8;
  --warn: #8a5a05;
  --warn-soft: #fbefd5;
  --bad: #a83a31;
  --bad-soft: #fae5e2;
  --info: #2f5566;
  --info-soft: #e3eef2;

  --focus-color: #b4530a;
  --focus-ring: 0 0 0 1px var(--focus-color), 0 0 0 4px var(--brand-soft);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-1: 0 1px 2px rgba(21, 24, 26, 0.06);
  --shadow-2: 0 2px 4px rgba(21, 24, 26, 0.06), 0 14px 30px -18px rgba(21, 24, 26, 0.3);

  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 300ms;
  --lift: -2px;
}

/* 透明叠加色：避免在页面里写 rgba */
:root {
  --surface-a08: rgba(255, 252, 245, 0.08);
  --surface-a14: rgba(255, 252, 245, 0.14);
  --surface-a24: rgba(255, 252, 245, 0.24);
  --ink-a04: rgba(27, 28, 24, 0.04);
  --ink-a08: rgba(27, 28, 24, 0.08);
  --ink-a12: rgba(27, 28, 24, 0.12);
  --brand-a08: rgba(30, 76, 63, 0.08);
}
