.customer-choice { flex-wrap:nowrap; }
.upload-template-actions { justify-content:space-between; margin-bottom:18px; }
.customer-choice input { flex:1; width:0; min-width:120px; }
.customer-selector .customer-lookup { margin-top:10px; padding:12px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.customer-lookup[hidden], .schedule-time[hidden] { display:none !important; }
.customer-lookup [data-customer-results] { max-height:260px; overflow:auto; margin-top:10px; }
.customer-lookup input { width:100%; }
.customer-lookup table { table-layout:fixed; }
.customer-lookup th:last-child, .customer-lookup td:last-child { width:88px; }
.customer-lookup td:first-child { white-space:normal; overflow-wrap:anywhere; }
.upload-review-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.upload-review-heading h3 { margin:0; }
#upload-preview .upload-product-review .table-scroll { max-height:none; overflow-x:hidden; }
.upload-product-review table { table-layout:fixed; }
.upload-product-review th:first-child { width:40%; }
.upload-product-review th:nth-child(2) { width:64px; }
.upload-product-review td { white-space:normal; overflow-wrap:anywhere; vertical-align:middle; }
.upload-product-review select { display:block; width:100%; min-width:0; max-width:100%; }
.inline-product { flex-wrap:nowrap; min-width:300px; }
.inline-product input { flex:1; min-width:130px; width:180px; }
.inline-product .product-autocomplete { flex:1; min-width:180px; }
.inline-product .product-autocomplete input { width:100%; }
.inline-product .product-suggestion { white-space:normal; }
.server-error { max-width:600px; margin:15vh auto; padding:28px; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:8px; }
.entry-product { display:flex; align-items:center; justify-content:space-between; gap:16px; min-width:220px; }
.entry-product > .entry-product-name { flex:1; min-width:0; white-space:normal; overflow-wrap:anywhere; }
#entry-form.order-entry .input-section:first-of-type .form-grid { grid-template-columns:2fr 1fr 1fr; }
#entry-form.order-entry .input-section:first-of-type .field:has(#f-date),
#entry-form.order-entry .input-section:first-of-type .field:has(#f-taxInvoiceDate) { grid-column:1 / -1; }
.schedule-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 20px; }
.schedule-toolbar h2 { font-size:18px; margin:0; }
.schedule-legend { display:flex; gap:14px; color:var(--ink); font-size:12px; }
:root { --schedule-personal:#5279bf; --schedule-personal-bg:#edf2fc; --schedule-shared:#278979; --schedule-shared-bg:#e5f4ef; }
[data-theme="dark"] { --schedule-personal:#8bb1f3; --schedule-personal-bg:#24344f; --schedule-shared:#6bc5b0; --schedule-shared-bg:#203e38; }
.schedule-legend .personal, .schedule-event.personal { --schedule-color:var(--schedule-personal); }
.schedule-legend .shared, .schedule-event.shared { --schedule-color:var(--schedule-shared); }
.schedule-legend span::before, .schedule-event::before { content:''; display:inline-block; width:7px; height:7px; margin-right:6px; border-radius:50%; background:var(--schedule-color); vertical-align:middle; }
.schedule-scroll { overflow-x:auto; }
.schedule-calendar { min-width:720px; }
.schedule-week,.schedule-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.schedule-week { background:var(--bg); border-block:1px solid var(--line); text-align:center; }
.schedule-week > div { padding:10px; }
.schedule-day { position:relative; min-height:130px; padding:7px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.schedule-day:nth-child(7n) { border-right:0; }
.schedule-day.outside { background:var(--bg); }
.schedule-day.outside .schedule-date { opacity:.5; }
.schedule-day.today { box-shadow:inset 0 0 0 2px var(--primary); }
.schedule-date { display:flex; justify-content:space-between; width:100%; padding:3px 5px; background:transparent; border:0; color:var(--ink); font-size:13px; }
.schedule-date span { color:var(--muted); }
.schedule-date:hover { background:var(--primary-soft); border-radius:4px; }
.schedule-event { position:relative; display:block; width:100%; padding:5px 12px; margin-top:5px; border:0; border-radius:4px; background:var(--primary-soft); color:var(--ink); font-size:12px; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; user-select:none; }
.schedule-event.personal { background:var(--schedule-personal-bg); }
.schedule-event.shared { background:var(--schedule-shared-bg); }
.schedule-event[data-schedule-movable="true"] { cursor:grab; }
.schedule-day.drag-over { background:var(--primary-soft); outline:2px dashed var(--primary); outline-offset:-3px; }
.schedule-day.drag-invalid { outline:2px dashed var(--danger); outline-offset:-3px; }
.schedule-event.is-moving { opacity:.3; }
.schedule-event.schedule-drag-ghost { position:fixed; z-index:9000; margin:0; pointer-events:none; box-shadow:0 5px 18px #17233830; outline:1px solid var(--schedule-color); cursor:grabbing; }
.schedule-drag-ghost .schedule-drag-dates { display:block; margin:4px 0 0; font-size:10px; }
.schedule-event.schedule-preview { position:absolute; inset:auto 7px 7px; width:auto; margin:0; pointer-events:none; outline:1px dashed var(--schedule-color); opacity:.85; }
.schedule-resize-handle { position:absolute; top:0; bottom:0; width:9px; cursor:ew-resize; }
.schedule-resize-handle.start { left:0; }
.schedule-resize-handle.end { right:0; }
.schedule-resize-handle::after { content:''; position:absolute; top:50%; left:3px; width:2px; height:10px; transform:translateY(-50%); border-radius:2px; background:var(--schedule-color); opacity:.35; }
.schedule-event:hover .schedule-resize-handle::after { opacity:.8; }
body.schedule-dragging, body.schedule-dragging * { cursor:grabbing !important; }
body.schedule-resizing, body.schedule-resizing * { cursor:ew-resize !important; }
.schedule-event:hover { outline:1px solid var(--primary); }
.schedule-event small { margin-right:5px; font-size:10px; color:var(--muted); }
.schedule-calendar .sunday { color:var(--danger); }
.schedule-calendar .saturday { color:var(--primary-ink); }
.schedule-all-day { justify-content:center; }
.schedule-all-day input { width:17px; min-height:17px; vertical-align:middle; }
.schedule-description { white-space:pre-wrap; line-height:1.8; }
.inventory-tabs { padding:14px 20px; border-bottom:1px solid var(--line); }
.inventory-stock-note { margin:0 0 0 auto; text-align:right; }
.warehouse-filter { display:flex; align-items:center; gap:8px; }
.warehouse-filter input { width:140px; }
.warehouse-filter select { min-width:160px; }
.warehouse-picker [data-warehouse-results], .customer-picker [data-customer-results] { margin-top:14px; max-height:360px; overflow-y:auto; }
.warehouse-picker table, .customer-picker table { table-layout:fixed; }
.warehouse-picker th:last-child, .warehouse-picker td:last-child, .customer-picker th:last-child, .customer-picker td:last-child { width:88px; }
.warehouse-picker td:first-child, .customer-picker td:first-child { white-space:normal; overflow-wrap:anywhere; }
@media(max-width:760px) {
    #entry-form.order-entry .input-section:first-of-type .form-grid { grid-template-columns:1fr; }
    .schedule-toolbar { flex-wrap:wrap; padding:14px; }
    .schedule-legend { width:100%; justify-content:flex-end; }
    .warehouse-filter { flex-wrap:wrap; width:100%; }
}
