index.css 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  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. /* Printer card control buttons: stack only when they clip */
  155. .printer-control-buttons-container {
  156. container-type: inline-size;
  157. }
  158. @container (max-width: 220px) {
  159. .printer-control-buttons {
  160. flex-direction: column;
  161. align-items: stretch;
  162. }
  163. .printer-control-buttons > button {
  164. width: 100%;
  165. }
  166. }
  167. /* ============================================
  168. LAYER 2: STYLE EFFECTS
  169. ============================================ */
  170. /* Classic - default, clean minimal shadows */
  171. .style-classic {
  172. /* Uses default shadows from :root and .dark */
  173. }
  174. /* Glow - accent-colored glow effects on cards */
  175. .style-glow {
  176. --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 25px color-mix(in srgb, var(--accent) 12%, transparent);
  177. }
  178. .dark.style-glow {
  179. --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 40px color-mix(in srgb, var(--accent) 15%, transparent);
  180. }
  181. /* Vibrant - dramatic deep shadows, more contrast */
  182. .style-vibrant {
  183. --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
  184. }
  185. .dark.style-vibrant {
  186. --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  187. }
  188. /* ============================================
  189. LAYER 3: ACCENT COLORS
  190. ============================================ */
  191. .accent-green {
  192. --accent: #00ae42;
  193. --accent-light: #00c64d;
  194. --accent-dark: #009438;
  195. }
  196. .accent-teal {
  197. --accent: #14b8a6;
  198. --accent-light: #2dd4bf;
  199. --accent-dark: #0d9488;
  200. }
  201. .accent-blue {
  202. --accent: #3b82f6;
  203. --accent-light: #60a5fa;
  204. --accent-dark: #2563eb;
  205. }
  206. .accent-orange {
  207. --accent: #f97316;
  208. --accent-light: #fb923c;
  209. --accent-dark: #ea580c;
  210. }
  211. .accent-purple {
  212. --accent: #8b5cf6;
  213. --accent-light: #a78bfa;
  214. --accent-dark: #7c3aed;
  215. }
  216. .accent-red {
  217. --accent: #ef4444;
  218. --accent-light: #f87171;
  219. --accent-dark: #dc2626;
  220. }
  221. body {
  222. background-color: var(--bg-primary);
  223. color: var(--text-primary);
  224. margin: 0;
  225. min-height: 100vh;
  226. transition: background-color 0.2s ease, color 0.2s ease;
  227. }
  228. #root {
  229. min-height: 100vh;
  230. }
  231. /* Override text-white to be theme-aware */
  232. .text-white {
  233. color: var(--text-primary);
  234. }
  235. /* Smooth transitions for theme changes */
  236. .bg-bambu-dark,
  237. .bg-bambu-dark-secondary,
  238. .bg-bambu-dark-tertiary,
  239. .border-bambu-dark-tertiary {
  240. transition: background-color 0.2s ease, border-color 0.2s ease;
  241. }
  242. /* Toast slide-in animation */
  243. @keyframes slide-in {
  244. from {
  245. transform: translateX(100%);
  246. opacity: 0;
  247. }
  248. to {
  249. transform: translateX(0);
  250. opacity: 1;
  251. }
  252. }
  253. .animate-slide-in {
  254. animation: slide-in 0.2s ease-out;
  255. }
  256. /* Theme-aware icon inversion - only invert in dark mode */
  257. .icon-theme {
  258. opacity: 0.5;
  259. }
  260. .dark .icon-theme {
  261. filter: invert(1);
  262. opacity: 0.4;
  263. }
  264. /* Green-colored icon for active status indicators */
  265. .icon-green {
  266. filter: invert(48%) sepia(89%) saturate(459%) hue-rotate(93deg) brightness(95%) contrast(92%);
  267. opacity: 1;
  268. }
  269. /* Orange/red-colored icon for heating indicators */
  270. .icon-heating {
  271. filter: invert(50%) sepia(100%) saturate(1000%) hue-rotate(360deg) brightness(100%) contrast(100%);
  272. opacity: 1;
  273. }
  274. /* Jogpad theme styling - darken background in dark mode */
  275. .jogpad-theme {
  276. /* Light mode - normal */
  277. }
  278. .dark .jogpad-theme {
  279. filter: brightness(0.35) contrast(1.2);
  280. }
  281. /* Empty AMS slot with diagonal stripes */
  282. .ams-empty-slot {
  283. background: repeating-linear-gradient(
  284. 45deg,
  285. #444,
  286. #444 2px,
  287. #222 2px,
  288. #222 4px
  289. );
  290. }
  291. .dark .ams-empty-slot {
  292. background: repeating-linear-gradient(
  293. 45deg,
  294. #555,
  295. #555 2px,
  296. #333 2px,
  297. #333 4px
  298. );
  299. }
  300. /* Touch manipulation to prevent zoom on double-tap */
  301. .touch-manipulation {
  302. touch-action: manipulation;
  303. }
  304. /* Safe area insets for notched devices */
  305. .safe-area-bottom {
  306. padding-bottom: env(safe-area-inset-bottom, 0);
  307. }
  308. .safe-area-top {
  309. padding-top: env(safe-area-inset-top, 0);
  310. }
  311. /* Hide scrollbar but keep functionality */
  312. .scrollbar-hide {
  313. -ms-overflow-style: none;
  314. scrollbar-width: none;
  315. }
  316. .scrollbar-hide::-webkit-scrollbar {
  317. display: none;
  318. }
  319. /* Mobile drawer animation */
  320. @keyframes slide-in-left {
  321. from {
  322. transform: translateX(-100%);
  323. }
  324. to {
  325. transform: translateX(0);
  326. }
  327. }
  328. .animate-slide-in-left {
  329. animation: slide-in-left 0.3s ease-out;
  330. }
  331. /* Card shadows - uses theme-specific shadow */
  332. .card-shadow {
  333. box-shadow: var(--card-shadow);
  334. }
  335. /* Calendar selected-day list scrollbar theming */
  336. .calendar-scroll {
  337. scrollbar-width: thin;
  338. scrollbar-color: color-mix(in srgb, var(--text-muted) 60%, transparent) transparent;
  339. }
  340. .calendar-scroll::-webkit-scrollbar {
  341. width: 8px;
  342. }
  343. .calendar-scroll::-webkit-scrollbar-track {
  344. background: transparent;
  345. }
  346. .calendar-scroll::-webkit-scrollbar-thumb {
  347. background-color: color-mix(in srgb, var(--text-muted) 60%, transparent);
  348. border-radius: 999px;
  349. border: 2px solid color-mix(in srgb, var(--bg-secondary) 70%, transparent);
  350. }
  351. .calendar-scroll::-webkit-scrollbar-thumb:hover {
  352. background-color: color-mix(in srgb, var(--text-muted) 80%, transparent);
  353. }