/* Smart actions added 2026-10-28/29: bulk bars on the Jobs and Tasks lists, line grips on estimates and invoices, archived files, document versions, the load list and expiry hints.
   Kept out of compact.css, whose rules must all carry its id prefix. */

/* Jobs list: pick many jobs and add a person to all of them. */
html .app-layout .page-content .jobs-page .jobs-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 32px; padding: 2px 10px; margin-bottom: 6px; font-size: .84rem; }
html .app-layout .page-content .jobs-page .jobs-bulk.on { background: rgba(23, 167, 128, .10); border-radius: 6px; }
html .app-layout .page-content .jobs-page .jobs-selectall { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 6px; background: transparent; border: 0; font-weight: 600; cursor: pointer; }
html .app-layout .page-content .jobs-page .jobs-bulk-assign { width: auto; min-width: 190px; max-width: 260px; height: 30px; padding: 0 8px; font-size: .84rem; }
html .app-layout .page-content .jobs-page .job-pick { width: 15px; height: 15px; margin: 0 8px 0 0; accent-color: #17a780; vertical-align: middle; cursor: pointer; }
html .app-layout .page-content .jobs-page .jobs-bulk .jobs-selectall { background: transparent !important; border: 0 !important; box-shadow: none !important; min-height: 0 !important; width: auto !important; }
html .app-layout .page-content .jobs-page .jobs-bulk .jobs-bulk-assign { width: auto !important; min-width: 190px; max-width: 260px; height: 30px !important; min-height: 0 !important; padding: 0 8px !important; font-size: .84rem !important; }
html .app-layout .page-content .jobs-page .jobs-bulk .jobs-toggle-btn { height: 30px; min-height: 0; padding: 0 12px; background: transparent !important; color: inherit !important; border: 1px solid rgba(127, 140, 150, .4) !important; box-shadow: none !important; }
/* Tasks list: tick several tasks and move them together. */
html .app-layout .page-content .tp-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 30px; padding: 2px 10px; margin-bottom: 6px; font-size: .84rem; }
html .app-layout .page-content .tp-bulk.on { background: rgba(23, 167, 128, .10); border-radius: 6px; }
html .app-layout .page-content .tp-bulk .tp-selectall { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 6px; background: transparent !important; border: 0 !important; box-shadow: none !important; min-height: 0 !important; width: auto !important; font-weight: 600; cursor: pointer; }
html .app-layout .page-content .tp-bulk .tp-bulk-move { width: auto !important; min-width: 150px; max-width: 220px; height: 30px !important; min-height: 0 !important; padding: 0 8px !important; font-size: .84rem !important; }
html .app-layout .page-content .tp-bulk .km-button { height: 30px; min-height: 0; padding: 0 12px; }
html .app-layout .page-content .tp-pick { width: 15px; height: 15px; margin: 0 8px 0 0; accent-color: #17a780; flex: 0 0 auto; cursor: pointer; }
html .app-layout .page-content .tasksprojects-row.picked { background: rgba(23, 167, 128, .12); }
/* Estimate and invoice lines can be dragged into a new order by their grip. */
.estimate-line-editor, .invoice-line-row { position: relative; }
.line-grip { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 14px; text-align: center; cursor: grab; color: #9aa7b0; font-size: .9rem; line-height: 1; user-select: none; z-index: 2; }
.line-grip:active { cursor: grabbing; }
.estimate-line-editor.dragging, .invoice-line-row.dragging { opacity: .45; }
/* Archived files: a small collapsed list under the document explorer. */
.arch-box { margin-top: 10px; font-size: .86rem; }
.arch-box > summary { cursor: pointer; font-weight: 600; opacity: .85; }
.arch-muted { opacity: .7; margin: 6px 0; }
.arch-note { margin: 6px 0; padding: 4px 10px; border-radius: 6px; background: rgba(23, 167, 128, .12); }
.arch-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.arch-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px; border-bottom: 1px solid rgba(127, 140, 150, .18); }
.arch-list li span { display: grid; min-width: 0; }
.arch-list li small { opacity: .7; }
.arch-list .km-button { height: 28px; min-height: 0; padding: 0 12px; }
.quote-expiry { display: block; font-size: .74rem; font-weight: 600; }
.quote-expiry.soon { color: #b7791f; }
.quote-expiry.late { color: #c0392b; }

.estimate-line-editor > .line-grip { width: 16px !important; min-width: 16px !important; max-width: 16px !important; height: 24px; display: flex; align-items: center; justify-content: center; left: 0; }
html .app-layout .page-content .jobs-page .jobs-bulk .jobs-bulk-day { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .84rem; font-weight: 600; }
html .app-layout .page-content .jobs-page .jobs-bulk .jobs-bulk-day input { width: auto !important; height: 30px !important; min-height: 0 !important; padding: 0 8px !important; font-size: .84rem !important; }
/* Upload new version: a button-looking label that opens the file picker. */
.doc-newversion { display: inline-flex; align-items: center; cursor: pointer; }
.doc-newversion input[type=file] { display: none; }
.doc-versions { margin: 0 0 10px; }
/* Load list: compact per-job pick lists with tick boxes, and a totals table that flags shortfalls. */
.load-list .ll-h { margin: 14px 0 6px; font-size: 1rem; }
.load-list .ll-h small { margin-left: 8px; font-weight: 500; opacity: .7; }
.load-list .ll-job { padding: 6px 10px; margin-bottom: 6px; border: 1px solid rgba(127, 140, 150, .25); border-radius: 8px; }
.load-list .ll-job header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: .9rem; }
.load-list .ll-cust { opacity: .75; font-size: .84rem; }
.load-list .ll-none { margin: 4px 0 0; font-size: .82rem; opacity: .7; }
.load-list .ll-items { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.load-list .ll-items label { display: flex; align-items: center; gap: 6px; font-size: .88rem; cursor: pointer; }
.load-list .ll-items small { opacity: .7; }
.load-list .ll-items em { margin-left: auto; font-size: .74rem; opacity: .6; font-style: normal; }
.load-list .ll-tick { accent-color: #17a780; }
.load-list tr.ll-short td { color: #c0392b; font-weight: 600; }
@media print { .load-list .wk-bar, .app-sidebar, .mobile-tab-bar { display: none !important; } }
/* The Upload new version label looks like the other workspace buttons. */
.document-workspace .workspace-actions .doc-newversion { height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid #b9dccd; background: #e6f3ec; color: #176b4b; font-weight: 700; font-size: .92rem; box-shadow: 0 2px 0 #cfe6da; }
.document-workspace .workspace-actions .doc-newversion:hover { background: #d9ece2; }
/* Tech workload: a person on approved time off shows as Off for that day. */
.jobcalendar-workload-item.off .jobcalendar-workload-count { color: #b7791f; font-weight: 700; }
.jobcalendar-workload-item.off .jobcalendar-workload-name { opacity: .75; }
/* Week board: who is off under the day's date; estimate page: the next-steps box after approval. */
.jobcalendar-day-off { margin-top: 2px; font-size: .72rem; font-weight: 600; color: #b7791f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.estimate-next a.estimate-book { display: inline-block; margin-left: 4px; padding: 6px 12px; border-radius: 8px; background: #176b4b; color: #fff; text-decoration: none; font-weight: 600; }
/* Team board: a day someone is off is hatched and marked Off; dropping a job there is refused with a note. */
#app .tsb-cell.tsb-off { background-image: repeating-linear-gradient(135deg, rgba(183, 121, 31, .10) 0 6px, transparent 6px 14px); }
#app .tsb-off-mark { display: inline-block; justify-self: start; padding: 1px 8px; border-radius: 999px; background: rgba(183, 121, 31, .16); color: #b7791f; font-size: .72rem; font-weight: 700; }
/* Customer estimate page: a quiet download line under the dates. */
.estimate-download { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: .9rem; color: #67736c; }
.estimate-download .estimate-pdf { padding: 6px 12px; border-radius: 8px; border: 1px solid #b9dccd; background: #e6f3ec; color: #176b4b; font-weight: 600; cursor: pointer; }
.estimate-download .estimate-pdf:disabled { opacity: .6; cursor: default; }
/* Service package chips on the Jobs page's Add Job form. */
.jobs-package-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jobs-package-chip { padding: 4px 12px; border-radius: 999px; border: 1px solid #b9dccd; background: transparent; color: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.jobs-package-chip:hover { background: #e6f3ec; }
.jobs-package-chip.on { background: #176b4b; border-color: #176b4b; color: #fff; }.job-addcal a { display: inline-block; margin: 4px 6px 0 0; padding: 6px 10px; border: 1px solid rgba(128, 128, 128, 0.5); border-radius: 8px; text-decoration: none; font-weight: 600; }
.cust-mailbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 8px; border: 1px solid rgba(26, 122, 85, 0.5); border-radius: 10px; background: rgba(26, 122, 85, 0.08); }
.cust-pick { width: 34px; text-align: center; }
.cust-row-picked { background: rgba(26, 122, 85, 0.07); }
.bulk-mail-fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bulk-mail-preview { display: grid; gap: 6px; padding: 8px 10px; border: 1px dashed rgba(128, 128, 128, 0.5); border-radius: 10px; }
.bulk-mail-sample pre { white-space: pre-wrap; font: inherit; margin: 4px 0 0; max-height: 180px; overflow: auto; }
.bulk-mail-list { margin: 4px 0; padding-left: 18px; }
.bulk-mail-problem { color: #b91c1c; font-weight: 600; margin: 0; }
.save-toast-host { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100000; pointer-events: none; display: flex; justify-content: center; max-width: calc(100vw - 32px); }
.save-toast { pointer-events: auto; padding: 8px 16px; border-radius: 999px; background: #14532d; color: #fff; font-weight: 600; font-size: 0.92rem; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28); animation: save-toast-in 0.15s ease-out; }
.save-toast-error { background: #991b1b; border-radius: 12px; max-width: 520px; }
@keyframes save-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .save-toast { animation: none; } }
.cust-recurring-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cust-recurring-head p, .cust-recurring-note { margin: 2px 0 0; opacity: 0.8; font-size: 0.9rem; }
.cust-recurring-actions { white-space: nowrap; display: flex; gap: 4px; flex-wrap: wrap; }
.cust-recurring-confirm { background: rgba(185, 28, 28, 0.08); }
.cust-recurring-form { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(128, 128, 128, 0.4); border-radius: 10px; display: grid; gap: 8px; }
.cust-recurring-form h3 { margin: 0; font-size: 1rem; }
.cust-recurring-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cust-recurring-grid .wide { grid-column: 1 / -1; }
.cust-recurring-check { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; }
.inv-mail-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(180, 83, 9, 0.6); color: #b45309; font-size: 0.75rem; font-weight: 700; }
.bulk-mail-sample small { display: block; opacity: 0.7; }
.bulk-mail-fields .compact-action { padding: 3px 8px; font-size: 0.8rem; box-shadow: none; }
.cust-recurring td small { display: block; opacity: 0.7; }
