index.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  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. html {
  26. font-size: 14.4px;
  27. }
  28. :root {
  29. /* Default accent color (green) */
  30. --accent: #00ae42;
  31. --accent-light: #00c64d;
  32. --accent-dark: #009438;
  33. /* Semantic status colors - these never change with accent theme */
  34. --status-ok: #22c55e; /* green-500 - always green for success/online/ok */
  35. --status-error: #ef4444; /* red-500 - always red for error/offline/failed */
  36. --status-warning: #f59e0b; /* amber-500 - always amber for warnings */
  37. /* Default light mode background (neutral) */
  38. --bg-primary: #f5f5f5;
  39. --bg-secondary: #ffffff;
  40. --bg-tertiary: #e5e5e5;
  41. --text-primary: #1a1a1a;
  42. --text-secondary: #4a4a4a;
  43. --text-muted: #6b6b6b;
  44. --text-tertiary: #808080;
  45. --border-color: #d4d4d4;
  46. /* Default style (classic) */
  47. --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  48. --glow-color: transparent;
  49. font-family: 'Inter', system-ui, sans-serif;
  50. line-height: 1.5;
  51. font-weight: 400;
  52. font-synthesis: none;
  53. text-rendering: optimizeLegibility;
  54. -webkit-font-smoothing: antialiased;
  55. -moz-osx-font-smoothing: grayscale;
  56. }
  57. /* Dark mode base */
  58. .dark {
  59. --bg-primary: #1a1a1a;
  60. --bg-secondary: #2d2d2d;
  61. --bg-tertiary: #3d3d3d;
  62. --text-primary: #ffffff;
  63. --text-secondary: #a0a0a0;
  64. --text-muted: #808080;
  65. --text-tertiary: #4a4a4a;
  66. --border-color: #3d3d3d;
  67. --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  68. }
  69. /* ============================================
  70. LAYER 1: BACKGROUND PALETTES
  71. ============================================ */
  72. /* Light mode backgrounds */
  73. .bg-neutral {
  74. /* Default - already set in :root */
  75. }
  76. .bg-warm {
  77. --bg-primary: #faf8f5;
  78. --bg-secondary: #fffefa;
  79. --bg-tertiary: #e8e4dd;
  80. --text-primary: #2d2a26;
  81. --text-secondary: #5c5750;
  82. --text-muted: #7a756c;
  83. --text-tertiary: #9a9590;
  84. --border-color: #d8d4cc;
  85. }
  86. .bg-cool {
  87. --bg-primary: #f0f4f8;
  88. --bg-secondary: #ffffff;
  89. --bg-tertiary: #dce4ec;
  90. --text-primary: #1a2530;
  91. --text-secondary: #4a5568;
  92. --text-muted: #6b7a8a;
  93. --text-tertiary: #8a9aaa;
  94. --border-color: #c8d4e0;
  95. }
  96. /* Dark mode backgrounds */
  97. .dark.bg-neutral {
  98. --bg-primary: #1a1a1a;
  99. --bg-secondary: #2d2d2d;
  100. --bg-tertiary: #3d3d3d;
  101. --text-primary: #ffffff;
  102. --text-secondary: #a0a0a0;
  103. --text-muted: #808080;
  104. --text-tertiary: #4a4a4a;
  105. --border-color: #3d3d3d;
  106. }
  107. .dark.bg-warm {
  108. --bg-primary: #1c1a18;
  109. --bg-secondary: #2e2a26;
  110. --bg-tertiary: #3e3a36;
  111. --text-primary: #f5f0ea;
  112. --text-secondary: #b0a898;
  113. --text-muted: #8a8278;
  114. --text-tertiary: #5a5248;
  115. --border-color: #3e3a36;
  116. }
  117. .dark.bg-cool {
  118. --bg-primary: #181c20;
  119. --bg-secondary: #262c32;
  120. --bg-tertiary: #363e46;
  121. --text-primary: #f0f4f8;
  122. --text-secondary: #98a8b8;
  123. --text-muted: #788898;
  124. --text-tertiary: #4a5a6a;
  125. --border-color: #363e46;
  126. }
  127. .dark.bg-oled {
  128. --bg-primary: #000000;
  129. --bg-secondary: #141414;
  130. --bg-tertiary: #1f1f1f;
  131. --text-primary: #ffffff;
  132. --text-secondary: #a0a0a0;
  133. --text-muted: #707070;
  134. --text-tertiary: #404040;
  135. --border-color: #2a2a2a;
  136. }
  137. .dark.bg-slate {
  138. --bg-primary: #0f172a;
  139. --bg-secondary: #1e293b;
  140. --bg-tertiary: #334155;
  141. --text-primary: #f1f5f9;
  142. --text-secondary: #94a3b8;
  143. --text-muted: #64748b;
  144. --text-tertiary: #475569;
  145. --border-color: #334155;
  146. }
  147. .dark.bg-forest {
  148. --bg-primary: #121a16;
  149. --bg-secondary: #1c2a22;
  150. --bg-tertiary: #2a3d30;
  151. --text-primary: #e8f5ec;
  152. --text-secondary: #8aa894;
  153. --text-muted: #6a8874;
  154. --text-tertiary: #4a6854;
  155. --border-color: #2a3d30;
  156. }
  157. /* Printer card control buttons: stack only when they clip */
  158. .printer-control-buttons-container {
  159. container-type: inline-size;
  160. }
  161. @container (max-width: 220px) {
  162. .printer-control-buttons {
  163. flex-direction: column;
  164. align-items: stretch;
  165. }
  166. .printer-control-buttons > button {
  167. width: 100%;
  168. }
  169. }
  170. /* ============================================
  171. LAYER 2: STYLE EFFECTS
  172. ============================================ */
  173. /* Classic - default, clean minimal shadows */
  174. .style-classic {
  175. /* Uses default shadows from :root and .dark */
  176. }
  177. /* Glow - accent-colored glow effects on cards */
  178. .style-glow {
  179. --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 25px color-mix(in srgb, var(--accent) 12%, transparent);
  180. }
  181. .dark.style-glow {
  182. --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 40px color-mix(in srgb, var(--accent) 15%, transparent);
  183. }
  184. /* Vibrant - dramatic deep shadows, more contrast */
  185. .style-vibrant {
  186. --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
  187. }
  188. .dark.style-vibrant {
  189. --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  190. }
  191. /* ============================================
  192. LAYER 3: ACCENT COLORS
  193. ============================================ */
  194. .accent-green {
  195. --accent: #00ae42;
  196. --accent-light: #00c64d;
  197. --accent-dark: #009438;
  198. }
  199. .accent-teal {
  200. --accent: #14b8a6;
  201. --accent-light: #2dd4bf;
  202. --accent-dark: #0d9488;
  203. }
  204. .accent-blue {
  205. --accent: #3b82f6;
  206. --accent-light: #60a5fa;
  207. --accent-dark: #2563eb;
  208. }
  209. .accent-orange {
  210. --accent: #f97316;
  211. --accent-light: #fb923c;
  212. --accent-dark: #ea580c;
  213. }
  214. .accent-purple {
  215. --accent: #8b5cf6;
  216. --accent-light: #a78bfa;
  217. --accent-dark: #7c3aed;
  218. }
  219. .accent-red {
  220. --accent: #ef4444;
  221. --accent-light: #f87171;
  222. --accent-dark: #dc2626;
  223. }
  224. body {
  225. background-color: var(--bg-primary);
  226. color: var(--text-primary);
  227. margin: 0;
  228. min-height: 100vh;
  229. transition: background-color 0.2s ease, color 0.2s ease;
  230. }
  231. #root {
  232. min-height: 100vh;
  233. }
  234. /* Override text-white to be theme-aware */
  235. .text-white {
  236. color: var(--text-primary);
  237. }
  238. /* Smooth transitions for theme changes */
  239. .bg-bambu-dark,
  240. .bg-bambu-dark-secondary,
  241. .bg-bambu-dark-tertiary,
  242. .border-bambu-dark-tertiary {
  243. transition: background-color 0.2s ease, border-color 0.2s ease;
  244. }
  245. /* Toast slide-in animation */
  246. @keyframes slide-in {
  247. from {
  248. transform: translateX(100%);
  249. opacity: 0;
  250. }
  251. to {
  252. transform: translateX(0);
  253. opacity: 1;
  254. }
  255. }
  256. .animate-slide-in {
  257. animation: slide-in 0.2s ease-out;
  258. }
  259. /* Theme-aware icon inversion - only invert in dark mode */
  260. .icon-theme {
  261. opacity: 0.5;
  262. }
  263. .dark .icon-theme {
  264. filter: invert(1);
  265. opacity: 0.4;
  266. }
  267. /* Green-colored icon for active status indicators */
  268. .icon-green {
  269. filter: invert(48%) sepia(89%) saturate(459%) hue-rotate(93deg) brightness(95%) contrast(92%);
  270. opacity: 1;
  271. }
  272. /* Orange/red-colored icon for heating indicators */
  273. .icon-heating {
  274. filter: invert(50%) sepia(100%) saturate(1000%) hue-rotate(360deg) brightness(100%) contrast(100%);
  275. opacity: 1;
  276. }
  277. /* Jogpad theme styling - darken background in dark mode */
  278. .jogpad-theme {
  279. /* Light mode - normal */
  280. }
  281. .dark .jogpad-theme {
  282. filter: brightness(0.35) contrast(1.2);
  283. }
  284. /* Empty AMS slot with diagonal stripes */
  285. .ams-empty-slot {
  286. background: repeating-linear-gradient(
  287. 45deg,
  288. #444,
  289. #444 2px,
  290. #222 2px,
  291. #222 4px
  292. );
  293. }
  294. .dark .ams-empty-slot {
  295. background: repeating-linear-gradient(
  296. 45deg,
  297. #555,
  298. #555 2px,
  299. #333 2px,
  300. #333 4px
  301. );
  302. }
  303. /* Touch manipulation to prevent zoom on double-tap */
  304. .touch-manipulation {
  305. touch-action: manipulation;
  306. }
  307. /* Safe area insets for notched devices */
  308. .safe-area-bottom {
  309. padding-bottom: env(safe-area-inset-bottom, 0);
  310. }
  311. .safe-area-top {
  312. padding-top: env(safe-area-inset-top, 0);
  313. }
  314. /* Hide scrollbar but keep functionality */
  315. .scrollbar-hide {
  316. -ms-overflow-style: none;
  317. scrollbar-width: none;
  318. }
  319. .scrollbar-hide::-webkit-scrollbar {
  320. display: none;
  321. }
  322. /* Mobile drawer animation */
  323. @keyframes slide-in-left {
  324. from {
  325. transform: translateX(-100%);
  326. }
  327. to {
  328. transform: translateX(0);
  329. }
  330. }
  331. .animate-slide-in-left {
  332. animation: slide-in-left 0.3s ease-out;
  333. }
  334. /* SpoolBuddy idle scan animation: transform/opacity only for low-power devices */
  335. @keyframes spoolbuddy-optimized-ping {
  336. 0% {
  337. transform: scale(0.8);
  338. opacity: 0.8;
  339. }
  340. 80%,
  341. 100% {
  342. transform: scale(2.2);
  343. opacity: 0;
  344. }
  345. }
  346. .spoolbuddy-optimized-ping {
  347. will-change: auto;
  348. contain: layout;
  349. animation: spoolbuddy-optimized-ping 3.5s cubic-bezier(0, 0, 0.2, 1) infinite;
  350. }
  351. .spoolbuddy-spool-glow {
  352. transform: scale(2.0);
  353. will-change: auto;
  354. }
  355. @media (prefers-reduced-motion: reduce) {
  356. .spoolbuddy-optimized-ping {
  357. animation: none;
  358. opacity: 0.25;
  359. transform: scale(1.2);
  360. }
  361. .spoolbuddy-spool-glow {
  362. transition: none;
  363. }
  364. }
  365. /* SpoolBuddy quick menu slide-down */
  366. @keyframes slide-down {
  367. from {
  368. transform: translateY(-100%);
  369. }
  370. to {
  371. transform: translateY(0);
  372. }
  373. }
  374. .animate-slide-down {
  375. animation: slide-down 0.25s ease-out;
  376. }
  377. /* Card shadows - uses theme-specific shadow */
  378. .card-shadow {
  379. box-shadow: var(--card-shadow);
  380. }
  381. /* ============================================
  382. SPOOLBUDDY KIOSK MODAL CONSTRAINTS
  383. Cap large modals (max-w-2xl) to viewport on the
  384. small SpoolBuddy touchscreen. Excludes smaller
  385. modals like the slot action picker (max-w-sm).
  386. ============================================ */
  387. [data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl {
  388. height: 90vh;
  389. max-height: 90vh;
  390. display: flex;
  391. flex-direction: column;
  392. }
  393. [data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl > div:first-child {
  394. flex-shrink: 0;
  395. }
  396. [data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl > div:last-child {
  397. flex-shrink: 0;
  398. }
  399. [data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl > div:nth-child(2) {
  400. flex: 1 1 auto;
  401. min-height: 0;
  402. overflow-y: auto;
  403. }
  404. /* Remove inner spool grid max-height to avoid nested scrollbars */
  405. [data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl .max-h-96 {
  406. max-height: none;
  407. }
  408. /* Calendar selected-day list scrollbar theming */
  409. .calendar-scroll {
  410. scrollbar-width: thin;
  411. scrollbar-color: color-mix(in srgb, var(--text-muted) 60%, transparent) transparent;
  412. }
  413. .calendar-scroll::-webkit-scrollbar {
  414. width: 8px;
  415. }
  416. .calendar-scroll::-webkit-scrollbar-track {
  417. background: transparent;
  418. }
  419. .calendar-scroll::-webkit-scrollbar-thumb {
  420. background-color: color-mix(in srgb, var(--text-muted) 60%, transparent);
  421. border-radius: 999px;
  422. border: 2px solid color-mix(in srgb, var(--bg-secondary) 70%, transparent);
  423. }
  424. .calendar-scroll::-webkit-scrollbar-thumb:hover {
  425. background-color: color-mix(in srgb, var(--text-muted) 80%, transparent);
  426. }