index.css 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. @import "tailwindcss";
  2. @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
  3. /* Enable class-based dark mode for Tailwind v4 */
  4. @custom-variant dark (&:where(.dark, .dark *));
  5. @theme {
  6. /* Accent colors - use CSS variables for theming */
  7. --color-bambu-green: var(--accent);
  8. --color-bambu-green-light: var(--accent-light);
  9. --color-bambu-green-dark: var(--accent-dark);
  10. /* Semantic status colors - fixed, don't change with accent */
  11. --color-status-ok: var(--status-ok);
  12. --color-status-error: var(--status-error);
  13. --color-status-warning: var(--status-warning);
  14. /* Theme-aware colors via CSS variables */
  15. --color-bambu-dark: var(--bg-primary);
  16. --color-bambu-dark-secondary: var(--bg-secondary);
  17. --color-bambu-dark-tertiary: var(--bg-tertiary);
  18. --color-bambu-gray: var(--text-muted);
  19. --color-bambu-gray-light: var(--text-secondary);
  20. --color-bambu-gray-dark: var(--text-tertiary);
  21. }
  22. /* ============================================
  23. BASE DEFAULTS
  24. ============================================ */
  25. :root {
  26. /* Default accent color (green) */
  27. --accent: #00ae42;
  28. --accent-light: #00c64d;
  29. --accent-dark: #009438;
  30. /* Semantic status colors - these never change with accent theme */
  31. --status-ok: #22c55e; /* green-500 - always green for success/online/ok */
  32. --status-error: #ef4444; /* red-500 - always red for error/offline/failed */
  33. --status-warning: #f59e0b; /* amber-500 - always amber for warnings */
  34. /* Default light mode background (neutral) */
  35. --bg-primary: #f5f5f5;
  36. --bg-secondary: #ffffff;
  37. --bg-tertiary: #e5e5e5;
  38. --text-primary: #1a1a1a;
  39. --text-secondary: #4a4a4a;
  40. --text-muted: #6b6b6b;
  41. --text-tertiary: #808080;
  42. --border-color: #d4d4d4;
  43. /* Default style (classic) */
  44. --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  45. --glow-color: transparent;
  46. font-family: 'Inter', system-ui, sans-serif;
  47. line-height: 1.5;
  48. font-weight: 400;
  49. font-synthesis: none;
  50. text-rendering: optimizeLegibility;
  51. -webkit-font-smoothing: antialiased;
  52. -moz-osx-font-smoothing: grayscale;
  53. }
  54. /* Dark mode base */
  55. .dark {
  56. --bg-primary: #1a1a1a;
  57. --bg-secondary: #2d2d2d;
  58. --bg-tertiary: #3d3d3d;
  59. --text-primary: #ffffff;
  60. --text-secondary: #a0a0a0;
  61. --text-muted: #808080;
  62. --text-tertiary: #4a4a4a;
  63. --border-color: #3d3d3d;
  64. --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  65. }
  66. /* ============================================
  67. LAYER 1: BACKGROUND PALETTES
  68. ============================================ */
  69. /* Light mode backgrounds */
  70. .bg-neutral {
  71. /* Default - already set in :root */
  72. }
  73. .bg-warm {
  74. --bg-primary: #faf8f5;
  75. --bg-secondary: #fffefa;
  76. --bg-tertiary: #e8e4dd;
  77. --text-primary: #2d2a26;
  78. --text-secondary: #5c5750;
  79. --text-muted: #7a756c;
  80. --text-tertiary: #9a9590;
  81. --border-color: #d8d4cc;
  82. }
  83. .bg-cool {
  84. --bg-primary: #f0f4f8;
  85. --bg-secondary: #ffffff;
  86. --bg-tertiary: #dce4ec;
  87. --text-primary: #1a2530;
  88. --text-secondary: #4a5568;
  89. --text-muted: #6b7a8a;
  90. --text-tertiary: #8a9aaa;
  91. --border-color: #c8d4e0;
  92. }
  93. /* Dark mode backgrounds */
  94. .dark.bg-neutral {
  95. --bg-primary: #1a1a1a;
  96. --bg-secondary: #2d2d2d;
  97. --bg-tertiary: #3d3d3d;
  98. --text-primary: #ffffff;
  99. --text-secondary: #a0a0a0;
  100. --text-muted: #808080;
  101. --text-tertiary: #4a4a4a;
  102. --border-color: #3d3d3d;
  103. }
  104. .dark.bg-warm {
  105. --bg-primary: #1c1a18;
  106. --bg-secondary: #2e2a26;
  107. --bg-tertiary: #3e3a36;
  108. --text-primary: #f5f0ea;
  109. --text-secondary: #b0a898;
  110. --text-muted: #8a8278;
  111. --text-tertiary: #5a5248;
  112. --border-color: #3e3a36;
  113. }
  114. .dark.bg-cool {
  115. --bg-primary: #181c20;
  116. --bg-secondary: #262c32;
  117. --bg-tertiary: #363e46;
  118. --text-primary: #f0f4f8;
  119. --text-secondary: #98a8b8;
  120. --text-muted: #788898;
  121. --text-tertiary: #4a5a6a;
  122. --border-color: #363e46;
  123. }
  124. .dark.bg-oled {
  125. --bg-primary: #000000;
  126. --bg-secondary: #141414;
  127. --bg-tertiary: #1f1f1f;
  128. --text-primary: #ffffff;
  129. --text-secondary: #a0a0a0;
  130. --text-muted: #707070;
  131. --text-tertiary: #404040;
  132. --border-color: #2a2a2a;
  133. }
  134. .dark.bg-slate {
  135. --bg-primary: #0f172a;
  136. --bg-secondary: #1e293b;
  137. --bg-tertiary: #334155;
  138. --text-primary: #f1f5f9;
  139. --text-secondary: #94a3b8;
  140. --text-muted: #64748b;
  141. --text-tertiary: #475569;
  142. --border-color: #334155;
  143. }
  144. .dark.bg-forest {
  145. --bg-primary: #121a16;
  146. --bg-secondary: #1c2a22;
  147. --bg-tertiary: #2a3d30;
  148. --text-primary: #e8f5ec;
  149. --text-secondary: #8aa894;
  150. --text-muted: #6a8874;
  151. --text-tertiary: #4a6854;
  152. --border-color: #2a3d30;
  153. }
  154. /* ============================================
  155. LAYER 2: STYLE EFFECTS
  156. ============================================ */
  157. /* Classic - default, clean minimal shadows */
  158. .style-classic {
  159. /* Uses default shadows from :root and .dark */
  160. }
  161. /* Glow - accent-colored glow effects on cards */
  162. .style-glow {
  163. --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 25px color-mix(in srgb, var(--accent) 12%, transparent);
  164. }
  165. .dark.style-glow {
  166. --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 40px color-mix(in srgb, var(--accent) 15%, transparent);
  167. }
  168. /* Vibrant - dramatic deep shadows, more contrast */
  169. .style-vibrant {
  170. --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
  171. }
  172. .dark.style-vibrant {
  173. --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  174. }
  175. /* ============================================
  176. LAYER 3: ACCENT COLORS
  177. ============================================ */
  178. .accent-green {
  179. --accent: #00ae42;
  180. --accent-light: #00c64d;
  181. --accent-dark: #009438;
  182. }
  183. .accent-teal {
  184. --accent: #14b8a6;
  185. --accent-light: #2dd4bf;
  186. --accent-dark: #0d9488;
  187. }
  188. .accent-blue {
  189. --accent: #3b82f6;
  190. --accent-light: #60a5fa;
  191. --accent-dark: #2563eb;
  192. }
  193. .accent-orange {
  194. --accent: #f97316;
  195. --accent-light: #fb923c;
  196. --accent-dark: #ea580c;
  197. }
  198. .accent-purple {
  199. --accent: #8b5cf6;
  200. --accent-light: #a78bfa;
  201. --accent-dark: #7c3aed;
  202. }
  203. .accent-red {
  204. --accent: #ef4444;
  205. --accent-light: #f87171;
  206. --accent-dark: #dc2626;
  207. }
  208. body {
  209. background-color: var(--bg-primary);
  210. color: var(--text-primary);
  211. margin: 0;
  212. min-height: 100vh;
  213. transition: background-color 0.2s ease, color 0.2s ease;
  214. }
  215. #root {
  216. min-height: 100vh;
  217. }
  218. /* Override text-white to be theme-aware */
  219. .text-white {
  220. color: var(--text-primary);
  221. }
  222. /* Smooth transitions for theme changes */
  223. .bg-bambu-dark,
  224. .bg-bambu-dark-secondary,
  225. .bg-bambu-dark-tertiary,
  226. .border-bambu-dark-tertiary {
  227. transition: background-color 0.2s ease, border-color 0.2s ease;
  228. }
  229. /* Toast slide-in animation */
  230. @keyframes slide-in {
  231. from {
  232. transform: translateX(100%);
  233. opacity: 0;
  234. }
  235. to {
  236. transform: translateX(0);
  237. opacity: 1;
  238. }
  239. }
  240. .animate-slide-in {
  241. animation: slide-in 0.2s ease-out;
  242. }
  243. /* Theme-aware icon inversion - only invert in dark mode */
  244. .icon-theme {
  245. opacity: 0.5;
  246. }
  247. .dark .icon-theme {
  248. filter: invert(1);
  249. opacity: 0.4;
  250. }
  251. /* Green-colored icon for active status indicators */
  252. .icon-green {
  253. filter: invert(48%) sepia(89%) saturate(459%) hue-rotate(93deg) brightness(95%) contrast(92%);
  254. opacity: 1;
  255. }
  256. /* Orange/red-colored icon for heating indicators */
  257. .icon-heating {
  258. filter: invert(50%) sepia(100%) saturate(1000%) hue-rotate(360deg) brightness(100%) contrast(100%);
  259. opacity: 1;
  260. }
  261. /* Jogpad theme styling - darken background in dark mode */
  262. .jogpad-theme {
  263. /* Light mode - normal */
  264. }
  265. .dark .jogpad-theme {
  266. filter: brightness(0.35) contrast(1.2);
  267. }
  268. /* Empty AMS slot with diagonal stripes */
  269. .ams-empty-slot {
  270. background: repeating-linear-gradient(
  271. 45deg,
  272. #444,
  273. #444 2px,
  274. #222 2px,
  275. #222 4px
  276. );
  277. }
  278. .dark .ams-empty-slot {
  279. background: repeating-linear-gradient(
  280. 45deg,
  281. #555,
  282. #555 2px,
  283. #333 2px,
  284. #333 4px
  285. );
  286. }
  287. /* Touch manipulation to prevent zoom on double-tap */
  288. .touch-manipulation {
  289. touch-action: manipulation;
  290. }
  291. /* Safe area insets for notched devices */
  292. .safe-area-bottom {
  293. padding-bottom: env(safe-area-inset-bottom, 0);
  294. }
  295. .safe-area-top {
  296. padding-top: env(safe-area-inset-top, 0);
  297. }
  298. /* Hide scrollbar but keep functionality */
  299. .scrollbar-hide {
  300. -ms-overflow-style: none;
  301. scrollbar-width: none;
  302. }
  303. .scrollbar-hide::-webkit-scrollbar {
  304. display: none;
  305. }
  306. /* Mobile drawer animation */
  307. @keyframes slide-in-left {
  308. from {
  309. transform: translateX(-100%);
  310. }
  311. to {
  312. transform: translateX(0);
  313. }
  314. }
  315. .animate-slide-in-left {
  316. animation: slide-in-left 0.3s ease-out;
  317. }
  318. /* Card shadows - uses theme-specific shadow */
  319. .card-shadow {
  320. box-shadow: var(--card-shadow);
  321. }