tokens.css 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /*
  2. * 运营支撑系统主题:冷灰工作区 + 青绿强调。
  3. * 业务页面只引用语义变量;颜色值集中在此文件维护。
  4. * .dark 预留给宿主主题切换,当前产品不增加主题开关。
  5. *
  6. * 色板口径(2026-11-19 依「跨境链路合同与工单表单原型」收口):
  7. * 主色 #0d7d72、亮青 #12a594(聚焦光圈)、画布 #f4f6f8、卡片边框 #e3e8ee。
  8. */
  9. :root {
  10. color-scheme: light;
  11. --radius: 0.75rem;
  12. /* 卡片与控件的圆角分开:卡片 14px、输入框 9px。⛔ 用 --radius 一档套死两者。 */
  13. --radius-card: 14px;
  14. --radius-control: 9px;
  15. --type-meta: 0.75rem;
  16. --type-support: 0.8125rem;
  17. --type-body: 0.875rem;
  18. --type-comfort: 0.9375rem;
  19. --type-section: 1rem;
  20. /* 中性层级:画布、容器、辅助区域、文本与控件边界。 */
  21. --background: #f4f6f8;
  22. --foreground: #16202b;
  23. --card: #ffffff;
  24. --card-foreground: var(--foreground);
  25. --popover: var(--card);
  26. --popover-foreground: var(--foreground);
  27. --surface-subtle: #f6f8fa;
  28. --secondary: #eff2f5;
  29. --secondary-foreground: #33404f;
  30. --muted: #f2f5f8;
  31. --muted-foreground: #6b7787;
  32. --text-secondary: #33404f;
  33. /* 表单编辑项标题:全站统一一档灰蓝、不加粗(业主 2026-11-19 定案)。
  34. ⛔ 不要用 --foreground/--text-secondary 代替:那会把标题拉回正文色或另起一档。 */
  35. --field-label: #5b6777;
  36. --icon: #7f8d9c;
  37. /* 标题后的问号提示图标:比 --icon 再浅一档(业主 2026-11-19 定案:问号颜色太深会显得表单杂乱)。
  38. 只在 hover/展开时提亮到 --primary,⛔ 用它代替其它图标的 --icon。 */
  39. --field-hint-icon: #93a7b2;
  40. --border: #e3e8ee;
  41. --border-subtle: #edf1f5;
  42. --border-hover: #c3d2d8;
  43. --input: #dfe5ec;
  44. /* 品牌与交互:主操作、选中、价格及键盘焦点。
  45. --primary-bright 只用于聚焦光圈与渐变,⛔ 当文字色(对比度不够)。 */
  46. --primary: #0d7d72;
  47. --primary-hover: #0b6b61;
  48. --primary-bright: #12a594;
  49. --primary-foreground: #ffffff;
  50. --primary-soft: #e8f5f3;
  51. --primary-soft-foreground: #0a6a61;
  52. --primary-border: #cfe9e5;
  53. --accent: var(--primary-soft);
  54. --accent-foreground: var(--primary-soft-foreground);
  55. --ring: var(--primary-bright);
  56. --ring-glow: rgb(18 165 148 / 13%);
  57. /* 状态色只表达状态,同时提供文字或图标。 */
  58. --success: #1a7a55;
  59. --success-soft: #eff8f4;
  60. --success-border: #cfeadd;
  61. --warning: #a96a00;
  62. --warning-soft: #fff4e2;
  63. --warning-border: #f5e3c6;
  64. --info: #1c64b4;
  65. --info-soft: #eaf4ff;
  66. --info-border: #d3e5f8;
  67. --destructive: #b04a3c;
  68. --destructive-hover: #97392d;
  69. --destructive-foreground: #ffffff;
  70. --destructive-soft: #fdf0ef;
  71. --destructive-border: #f4d8d4;
  72. /* 导航和浮层复用同一语义体系。 */
  73. --sidebar: #f0f4f5;
  74. --sidebar-foreground: var(--foreground);
  75. --sidebar-primary: var(--primary);
  76. --sidebar-primary-foreground: var(--primary-foreground);
  77. --sidebar-accent: var(--primary-soft);
  78. --sidebar-accent-foreground: var(--primary-soft-foreground);
  79. --sidebar-border: var(--border);
  80. --sidebar-ring: var(--ring);
  81. --notice: #263e48;
  82. --notice-foreground: #ffffff;
  83. --notice-hover: #38525c;
  84. --notice-border: #4b6570;
  85. --overlay: rgb(18 35 44 / 38%);
  86. /* 投影走「几乎看不见」的一档:卡片靠 1px 边框分层,⛔ 再加厚投影。 */
  87. --shadow-color: rgb(16 24 40 / 4%);
  88. --shadow-card: 0 1px 2px var(--shadow-color);
  89. --shadow-card-hover: 0 4px 14px rgb(16 24 40 / 8%);
  90. --shadow-floating-control: 0 4px 14px rgb(16 24 40 / 10%);
  91. --shadow-panel: 0 18px 60px rgb(16 24 40 / 12%);
  92. --shadow-dialog: 0 24px 80px rgb(16 24 40 / 18%);
  93. --shadow-toast: 0 8px 24px rgb(16 24 40 / 22%);
  94. --scrollbar-thumb: #80999f;
  95. --scrollbar-thumb-hover: #4d7778;
  96. --scrollbar-track: transparent;
  97. --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23617783' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  98. }
  99. .dark {
  100. color-scheme: dark;
  101. --background: #111a20;
  102. --foreground: #e5edf1;
  103. --card: #19262e;
  104. --surface-subtle: #1e2d35;
  105. --secondary: #273a44;
  106. --secondary-foreground: #d2e0e7;
  107. --muted: #22333d;
  108. --muted-foreground: #a7bac5;
  109. --text-secondary: #c1d0d9;
  110. --field-label: #a7bac5;
  111. --icon: #9cb2c0;
  112. --field-hint-icon: #75909f;
  113. --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239cb2c0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  114. --border: #364d5a;
  115. --border-subtle: #2c414d;
  116. --border-hover: #7c99a9;
  117. --input: #6c899a;
  118. --primary: #71c6b9;
  119. --primary-hover: #9adbcf;
  120. --primary-bright: #71c6b9;
  121. --ring-glow: rgb(113 198 185 / 18%);
  122. --primary-foreground: #102923;
  123. --primary-soft: #203f3d;
  124. --primary-soft-foreground: #a8ddd3;
  125. --primary-border: #3a6560;
  126. --success: #9ad7b2;
  127. --success-soft: #203c30;
  128. --success-border: #3b6651;
  129. --warning: #e9c27c;
  130. --warning-soft: #3d3220;
  131. --warning-border: #705b34;
  132. --info: #a0c7ed;
  133. --info-soft: #21384c;
  134. --info-border: #42637f;
  135. --destructive: #f3aaa5;
  136. --destructive-hover: #ffc7c2;
  137. --destructive-foreground: #3f1418;
  138. --destructive-soft: #41282c;
  139. --destructive-border: #7e4b50;
  140. --sidebar: #15222a;
  141. --notice: #d4e4ec;
  142. --notice-foreground: #192a34;
  143. --notice-hover: #c1d6e1;
  144. --notice-border: #afc8d5;
  145. --overlay: rgb(4 12 18 / 68%);
  146. --shadow-color: rgb(0 0 0 / 20%);
  147. --shadow-floating-control: 0 3px 12px rgb(0 0 0 / 34%);
  148. --shadow-panel: 0 18px 60px rgb(0 0 0 / 28%);
  149. --shadow-dialog: 0 20px 80px rgb(0 0 0 / 44%);
  150. --shadow-toast: 0 6px 25px rgb(0 0 0 / 32%);
  151. --scrollbar-thumb: #607f85;
  152. --scrollbar-thumb-hover: #91b7b4;
  153. --scrollbar-track: transparent;
  154. }