app.css 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. :root {
  2. --c-bg: #fafafa;
  3. --c-fg: #222;
  4. --c-muted: #777;
  5. --c-accent: rgba(49, 13, 84, 0.08);
  6. --c-accent-strong: #310d54;
  7. --c-warn: #ffc107;
  8. --c-ok: #4caf50;
  9. --c-info: #2196f3;
  10. --c-danger: #e53935;
  11. --c-edit: #fff8c4;
  12. }
  13. * { box-sizing: border-box; }
  14. body {
  15. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  16. background: var(--c-bg);
  17. color: var(--c-fg);
  18. margin: 0;
  19. padding: 1rem 2rem;
  20. }
  21. h1, h2 { margin: 0.25rem 0; }
  22. .topbar {
  23. display: flex;
  24. justify-content: space-between;
  25. align-items: baseline;
  26. border-bottom: 2px solid var(--c-accent-strong);
  27. padding-bottom: 0.5rem;
  28. margin-bottom: 1rem;
  29. }
  30. .topbar .who { color: var(--c-muted); font-size: 0.9rem; }
  31. .sync-time { color: var(--c-muted); font-size: 0.85rem; }
  32. /* ----- jobs table ----- */
  33. .jobs-wrap { overflow-x: auto; margin-bottom: 2rem; }
  34. table.jobs {
  35. width: 100%;
  36. border-collapse: collapse;
  37. font-size: 1.3rem;
  38. }
  39. table.jobs th, table.jobs td {
  40. padding: 0.5rem 0.75rem;
  41. border-bottom: 1px solid #eee;
  42. text-align: left;
  43. }
  44. table.jobs th {
  45. background: var(--c-accent-strong);
  46. color: #fff;
  47. font-weight: 600;
  48. font-size: 1rem;
  49. text-transform: uppercase;
  50. letter-spacing: 0.05em;
  51. }
  52. table.jobs tbody tr:hover { background: var(--c-accent); }
  53. .center { text-align: center; }
  54. .right { text-align: right; }
  55. .smaller { font-size: 0.9rem; }
  56. .empty { text-align: center; color: var(--c-muted); padding: 2rem !important; }
  57. tr.status-finished { background: rgba(76, 175, 80, 0.08); }
  58. tr.status-shipped { background: rgba(33, 150, 243, 0.08); }
  59. tr.status-received { background: rgba(0, 0, 0, 0.04); color: var(--c-muted); }
  60. .status-date {
  61. font-size: 0.75rem;
  62. color: var(--c-muted);
  63. margin-top: 0.1rem;
  64. }
  65. .ack-new {
  66. background: var(--c-warn);
  67. color: #000;
  68. font-weight: 700;
  69. border-radius: 4px;
  70. }
  71. .ack-changed {
  72. background: #ff9800;
  73. color: #000;
  74. font-weight: 700;
  75. border-radius: 4px;
  76. }
  77. .editable {
  78. display: inline-block;
  79. min-width: 2rem;
  80. padding: 0.1rem 0.35rem;
  81. border-radius: 3px;
  82. cursor: pointer;
  83. }
  84. .editable:hover { background: var(--c-edit); }
  85. .editable:focus { outline: 2px solid var(--c-info); background: var(--c-edit); }
  86. .editable.saving { background: orange; }
  87. .editable.error { background: var(--c-danger); color: #fff; }
  88. input.inline-edit {
  89. font-size: inherit;
  90. padding: 0.15rem 0.35rem;
  91. border: 1px solid var(--c-info);
  92. border-radius: 3px;
  93. width: 100%;
  94. min-width: 4rem;
  95. }
  96. .actions { white-space: nowrap; }
  97. .btn {
  98. font-size: 0.9rem;
  99. padding: 0.35rem 0.7rem;
  100. border: 0;
  101. border-radius: 4px;
  102. cursor: pointer;
  103. color: #fff;
  104. font-weight: 600;
  105. margin: 0 0.15rem;
  106. }
  107. .btn-ack { background: var(--c-warn); color: #000; }
  108. .btn-finish { background: var(--c-ok); padding: 0.25rem 0.55rem; font-size: 0.8rem; }
  109. .btn-ship { background: var(--c-info); }
  110. .btn-partial{ background: #ff9800; padding: 0.25rem 0.55rem; font-size: 0.8rem; }
  111. .btn-undo { background: #757575; padding: 0.25rem 0.55rem; font-size: 0.8rem; }
  112. .btn-delete { background: transparent; color: var(--c-danger); border: 1px solid transparent; padding: 0.1rem 0.45rem; font-size: 1.1rem; line-height: 1; }
  113. .btn-delete:hover { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
  114. .btn-receive{ background: var(--c-accent-strong); }
  115. .btn-add { background: var(--c-accent-strong); padding: 0.5rem 1.25rem; font-size: 1rem; }
  116. .btn-post { background: var(--c-accent-strong); padding: 0.5rem 1rem; font-size: 1rem; }
  117. .btn:hover { opacity: 0.9; }
  118. .received { color: var(--c-muted); font-style: italic; }
  119. /* ----- vendor view: jobs left, messages sidebar right ----- */
  120. .vendor-layout {
  121. display: flex;
  122. align-items: flex-start;
  123. gap: 1.5rem;
  124. }
  125. .vendor-layout .jobs-wrap {
  126. flex: 1 1 auto;
  127. min-width: 0;
  128. margin-bottom: 0;
  129. }
  130. .vendor-layout .thread {
  131. flex: 0 0 360px;
  132. width: 360px;
  133. margin-bottom: 0;
  134. position: sticky;
  135. top: 1rem;
  136. max-height: calc(100vh - 2rem);
  137. display: flex;
  138. flex-direction: column;
  139. }
  140. .vendor-layout .thread-list {
  141. flex: 1 1 auto;
  142. max-height: none;
  143. }
  144. @media (max-width: 900px) {
  145. .vendor-layout {
  146. flex-direction: column;
  147. }
  148. .vendor-layout .thread {
  149. width: 100%;
  150. position: static;
  151. max-height: none;
  152. }
  153. .vendor-layout .thread-list {
  154. max-height: 280px;
  155. }
  156. }
  157. /* ----- messages ----- */
  158. .threads-container {
  159. display: flex;
  160. flex-wrap: wrap;
  161. gap: 1rem;
  162. align-items: flex-start;
  163. }
  164. .thread {
  165. border: 1px solid #ddd;
  166. border-radius: 6px;
  167. margin-bottom: 1.5rem;
  168. background: #fff;
  169. width: 100%;
  170. max-width: 720px;
  171. }
  172. /* Inside the flex row on PDQ.php, gap handles spacing. */
  173. .threads-container > .thread { margin-bottom: 0; }
  174. .thread h2 {
  175. margin: 0;
  176. padding: 0.5rem 0.75rem;
  177. background: var(--c-accent);
  178. border-bottom: 1px solid #ddd;
  179. font-size: 1rem;
  180. display: flex;
  181. align-items: center;
  182. gap: 0.5rem;
  183. }
  184. .thread-unread {
  185. border-color: var(--c-warn);
  186. box-shadow: 0 0 0 1px var(--c-warn);
  187. }
  188. .unread-badge {
  189. background: var(--c-warn);
  190. color: #000;
  191. font-weight: 700;
  192. font-size: 0.75rem;
  193. border-radius: 999px;
  194. padding: 0.1rem 0.5rem;
  195. }
  196. .thread-list {
  197. max-height: 280px;
  198. overflow-y: auto;
  199. padding: 0.5rem 0.75rem;
  200. display: flex;
  201. flex-direction: column;
  202. gap: 0.5rem;
  203. }
  204. .msg {
  205. padding: 0.4rem 0.6rem;
  206. border-radius: 5px;
  207. max-width: 75%;
  208. background: #f1f1f1;
  209. align-self: flex-start;
  210. }
  211. .msg-icg {
  212. background: var(--c-accent);
  213. align-self: flex-end;
  214. }
  215. .msg-author {
  216. font-weight: 700;
  217. margin-right: 0.5rem;
  218. }
  219. .msg-time {
  220. color: var(--c-muted);
  221. font-size: 0.75rem;
  222. }
  223. .msg-body {
  224. margin-top: 0.15rem;
  225. white-space: pre-wrap;
  226. word-wrap: break-word;
  227. }
  228. .msg-empty {
  229. color: var(--c-muted);
  230. font-style: italic;
  231. padding: 0.5rem;
  232. }
  233. .thread-compose {
  234. display: flex;
  235. gap: 0.5rem;
  236. padding: 0.5rem 0.75rem;
  237. border-top: 1px solid #ddd;
  238. background: #fafafa;
  239. }
  240. .thread-compose input[type="text"] {
  241. flex: 1;
  242. font-size: 1rem;
  243. padding: 0.5rem 0.75rem;
  244. border: 1px solid #ccc;
  245. border-radius: 4px;
  246. }
  247. .thread-compose input[type="text"]:focus {
  248. outline: 2px solid var(--c-info);
  249. }
  250. .add-row {
  251. margin: 0.5rem 0 1rem;
  252. display: flex;
  253. gap: 0.5rem;
  254. align-items: center;
  255. }
  256. /* ---------- print layout (vendor schedule on Letter) ---------- */
  257. @media print {
  258. @page { size: letter portrait; margin: 0.5in; }
  259. body { padding: 0; margin: 0; background: #fff; color: #000; }
  260. /* Drop chat, action controls, sync chrome. Keep the H1 so the printed
  261. sheet says "Bill's Schedule" or similar at the top. */
  262. .threads-container,
  263. .thread,
  264. .add-row,
  265. .topbar .who,
  266. #sync-time {
  267. display: none !important;
  268. }
  269. .topbar {
  270. border-bottom: 1pt solid #000;
  271. padding-bottom: 0.2rem;
  272. margin-bottom: 0.4rem;
  273. }
  274. .topbar h1 { font-size: 14pt; }
  275. /* Hide jobs that are out the door — print is for what still needs doing. */
  276. tr.status-finished,
  277. tr.status-shipped,
  278. tr.status-received {
  279. display: none !important;
  280. }
  281. /* Trim to the working columns. Ack/Status/Action are always the last 3
  282. columns on both ICG and vendor views, so :nth-last-child covers both. */
  283. table.jobs th:nth-last-child(-n+3),
  284. table.jobs td:nth-last-child(-n+3) {
  285. display: none !important;
  286. }
  287. /* Print-friendly table: monochrome, compact, no row stripes. */
  288. .jobs-wrap { overflow: visible; }
  289. table.jobs { font-size: 11pt; width: 100%; }
  290. table.jobs th, table.jobs td {
  291. padding: 0.2em 0.5em;
  292. border-bottom: 0.5pt solid #000;
  293. }
  294. table.jobs th {
  295. background: #fff;
  296. color: #000;
  297. font-size: 10pt;
  298. border-bottom: 1pt solid #000;
  299. }
  300. tr { page-break-inside: avoid; }
  301. thead { display: table-header-group; } /* repeat header on each page */
  302. }