/* Hamasat operations additions — scoped, uses the existing palette. */
.dues-print-choice{width:min(540px,94vw);border:1px solid #eee;border-radius:14px;padding:24px;color:#29282b;background:white}
.dues-print-choice::backdrop{background:#0008}
.dues-print-choice button{padding:12px;border-radius:8px;border:1px solid #b42028;color:#b42028;background:white;font:inherit;cursor:pointer}
/* Restore the original saved-report detail panel without restyling the app. */
body #employeeHistoryDetail.notice{background:#fff;border:0;border-radius:10px;padding:12px;margin:10px 0;color:#29282b}
body #employeeHistoryDetail table{width:100%;border-collapse:collapse;margin-top:12px}
body #employeeHistoryDetail th,body #employeeHistoryDetail td{padding:10px;text-align:right;border-bottom:1px solid #eee}
body #employeeHistoryDetail th{background:#fafafa}
body #employeeHistoryDetail h3{font-size:18px;margin:12px 0}
#adminView[data-role="supervisor"] [data-admin-tab="products"],
#adminView[data-role="supervisor"] [data-admin-tab="employees"],
#adminView[data-role="supervisor"] [data-admin-tab="settings"],
#adminView[data-role="supervisor"] [data-manager-only]{display:none!important}
#reportsTablePanel{margin:12px 0;border:1px solid #e8e8e8;border-radius:10px;background:#fff}
#reportsTablePanel>summary{padding:14px;cursor:pointer;font-weight:600}
.point-list-fold{margin:14px 0;border:1px solid #e8e8e8;border-radius:10px;background:#fff}
.point-list-fold>summary{padding:14px;cursor:pointer;font-weight:600;color:#b42028}
.point-list-fold>p{padding:0 14px}
.point-list-fold>.table-wrap{margin:0 10px 10px}
#printPreviewDialog{width:min(960px,96vw);height:94dvh;max-height:94dvh;padding:0;border:1px solid #eee;border-radius:14px;background:#fff;color:#29282b}
#printPreviewDialog::backdrop{background:#0008}
#printPreviewDialog[open]{display:flex;flex-direction:column}
.print-preview-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:12px;border-bottom:2px solid #b42028;flex-shrink:0}
.print-preview-tools strong{flex:1}
.print-preview-tools button{border:1px solid #b42028;background:#fff;color:#b42028;border-radius:8px;padding:10px;cursor:pointer;font:inherit}
.print-preview-tools [data-print]{background:#b42028;color:white}
#printPreviewDialog iframe{border:0;width:100%;flex:1;min-height:0;background:#fff}
.ops-align-end{align-items:flex-end;align-self:end}
.ops-skeleton{height:64px;border-radius:10px;background:linear-gradient(90deg,#f3f1f1 25%,#e9e5e5 37%,#f3f1f1 63%);background-size:400% 100%;animation:opsShimmer 1.3s ease infinite}
@keyframes opsShimmer{0%{background-position:100% 0}100%{background-position:0 0}}
@media (prefers-reduced-motion:reduce){.ops-skeleton{animation:none}}
[aria-busy="true"]{cursor:progress}

/* Product ranking controls */
.product-rank-controls{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.product-rank-controls label{flex:1 1 120px;margin:0;font-size:11px}
.product-rank-controls input{margin-top:4px;padding:7px 9px;font-size:13px;min-height:36px}
#admin-dashboard .product-rank-title{font-size:12px;margin:14px 0 4px;color:#29282b}
#admin-dashboard .product-rank-title:first-child{margin-top:0}

/* Pre-send review */
.report-review-dialog{max-width:720px}
.review-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.review-facts div{border:1px solid #e5e5e5;border-radius:10px;padding:10px;background:#fafafa}
.review-facts dt{font-size:12px;color:#666}
.review-facts dd{margin:4px 0 0;font-weight:700;overflow-wrap:anywhere}
.review-facts small,.review-cat{display:block;font-weight:400;color:#777;font-size:11px}
.review-notes{background:#f6f3f3;border-radius:10px;padding:10px}
.review-table td.review-qty{font-weight:700;font-size:17px;color:#b42028}
.review-totals{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}
.review-totals div{background:#84151e;color:#fff;border-radius:12px;padding:12px}
.review-totals strong{display:block;font-size:22px;margin-top:4px}
.report-review-actions{position:sticky;bottom:-18px;display:grid;grid-template-columns:1fr 1.4fr;gap:10px;padding:12px 0 4px;background:#fff}
@media (max-width:520px){.review-facts{grid-template-columns:1fr}.report-review-actions{grid-template-columns:1fr}}

/* Reports: collapsible rows + sticky filters */
body:has(#adminView:not(.hidden)) #adminView > #admin-reports{overflow:visible}
.reports-filter-sticky{position:sticky;top:0;z-index:4;background:var(--hm-canvas,#faf9f7);padding:8px 0;border-bottom:1px solid var(--hm-line,#e8e4de);margin-bottom:8px}
.reports-filter-sticky .grid3{margin:0}
.reports-filter-sticky .toolbar{margin:8px 0 0}
@media (max-width:850px){.reports-filter-sticky{position:static}}
.report-row-actions{display:flex;gap:6px;flex-wrap:wrap}
.report-row-actions .small{min-height:36px}
.report-inline-row > td{background:#fbfafa;padding:12px 14px}
.report-inline-meta{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;color:#555}
.report-inline-notes{margin:8px 0;font-size:13px;white-space:pre-wrap}
.report-inline-items table{margin-top:4px;background:#fff}
.report-inline-photo{width:72px;height:72px;object-fit:cover;border-radius:7px}

/* Visit plans */
.plan-status{display:inline-block;padding:3px 8px;border-radius:6px;font-size:12px}
.plan-status.is-approved{background:#e7f1ec;color:#2e6b4c}
.plan-status.is-draft{background:#fff8ed;color:#7b5b3f}
.visit-editor{margin-top:18px;padding-top:16px;border-top:1px solid var(--hm-line,#e8e4de)}
.visit-choice{border:1px solid var(--hm-line,#e8e4de);border-radius:10px;padding:10px;min-width:0}
.visit-choice legend{padding:0 6px;font-weight:700}
.visit-choice-list{max-height:220px;overflow:auto;display:grid;gap:2px}
.visit-check{display:flex;align-items:center;gap:8px;margin:0;font-weight:400;padding:6px;border-radius:6px;cursor:pointer}
.visit-check:hover{background:#f6f3f3}
.visit-check[hidden]{display:none!important}
.visit-search{width:100%;min-width:150px;margin:8px 0;font:inherit}
.visit-choice small[role="status"]{display:block;margin-top:8px;color:#666}
#visitEntriesTable select{min-width:170px}
.visit-check input{width:auto;min-height:0}
#visitEntriesTable small{display:block;color:#777;font-size:11px;margin-top:2px}
#visitEntriesTable tr.is-friday td{background:#fff6f6}
.visit-editor-actions{margin-top:14px}
.visit-list{list-style:none;margin:10px 0;padding:0;display:grid;gap:8px}
.visit-list li{display:grid;grid-template-columns:130px 1fr auto;gap:10px;align-items:center;border:1px solid #e5e5e5;border-radius:10px;padding:10px 12px;background:#fff}
.visit-list li.is-today{border-color:#bf242c;border-inline-start-width:4px}
.visit-date small{display:block;color:#777;font-size:12px}
.visit-point{font-weight:700}
.visit-plan{color:#777}
@media (max-width:520px){.visit-list li{grid-template-columns:1fr}}

/* Dues */
.employee-sales-summary{background:#fff;min-width:0}
.employee-sales-summary .dues-report{min-width:0;overflow-wrap:anywhere}
.employee-sales-summary .table-wrap{max-width:100%;overflow-x:auto}
.employee-sales-summary .table-wrap table{min-width:620px;overflow-wrap:normal}
.employee-sales-summary .table-wrap th,.employee-sales-summary .table-wrap td{white-space:nowrap}
.employee-sales-summary input[type="month"]{max-width:230px}
.employee-sales-summary #employeeMonthSummary{margin-top:16px}
.employee-sales-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.employee-sales-metrics>div{border:1px solid #e8e4de;border-radius:10px;padding:14px;background:#fff}
.employee-sales-metrics span{display:block;color:#666;font-size:13px}
.employee-sales-metrics strong{display:block;margin-top:8px;font-size:22px;color:#242424;overflow-wrap:anywhere}
.employee-sales-summary progress{display:block;width:100%;height:14px;margin-top:16px;accent-color:#e52950}
.employee-sales-summary .employee-sales-note{color:#666;font-size:13px}
@media(max-width:650px){.employee-sales-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.employee-sales-metrics strong{font-size:19px}}
.dues-warn{display:block;color:#9c5a1c;font-size:11px}
.dues-detail{margin-top:18px;padding-top:16px;border-top:1px solid var(--hm-line,#e8e4de)}
.dues-detail-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.dues-breakdown{max-width:520px}
.dues-breakdown th{background:transparent!important;font-weight:500}
.dues-breakdown td{text-align:left;direction:ltr;font-variant-numeric:tabular-nums}
.dues-breakdown .dues-sub th,.dues-breakdown .dues-sub td{font-weight:700;border-top:2px solid #ddd}
.dues-breakdown .dues-total th,.dues-breakdown .dues-total td{font-weight:700;font-size:17px;color:#b42028;border-top:2px solid #b42028}
.dues-report{border:1px solid #e5e5e5;border-radius:10px;margin:8px 0;padding:0 10px}
.dues-report summary{cursor:pointer;padding:10px 0;font-size:13px}
.dues-adjust{border:1px solid var(--hm-line,#e8e4de);border-radius:10px;margin-top:16px;padding:12px}
.dues-adjust legend{padding:0 6px;font-weight:700}
