body:has(.delivery-overlay){overflow:hidden}
#app:has(.delivery-overlay){height:100dvh;overflow:hidden}
.delivery-entry{margin:12px 0;padding:12px 16px;border:1px solid #a8bff4;border-radius:8px;background:#edf3ff;color:#245bd6;cursor:pointer;font:inherit}
.delivery-overlay{position:fixed;inset:0;background:#edf1f7;z-index:2000;overflow:auto;padding:24px}.delivery-dialog{max-width:1280px;margin:0 auto;background:white;padding:24px;border-radius:14px;color:#203148}.delivery-dialog header{display:flex;justify-content:space-between;gap:16px;align-items:start}.delivery-dialog h2{margin:0;font-size:22px}.delivery-dialog p,.delivery-dialog small{color:#64748b;line-height:1.6}.delivery-dialog small{display:block}.delivery-dialog button{padding:9px 12px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#245bd6;cursor:pointer;font:inherit}.delivery-dialog button:disabled{opacity:.5;cursor:wait}.delivery-dialog nav{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #e2e8f0;padding:16px 0;margin-bottom:16px}.delivery-dialog nav .active,.delivery-actions button[type=submit]{background:#245bd6;color:#fff}.delivery-order-picker{display:grid;gap:8px;max-width:600px;margin-top:12px}.delivery-dialog input,.delivery-dialog select,.delivery-dialog textarea{font:inherit;width:100%;min-width:0;max-width:100%;padding:9px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#203148}.delivery-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.delivery-table{overflow:auto}.delivery-table table{width:100%;min-width:760px;border-collapse:collapse}.delivery-table th,.delivery-table td{text-align:left;padding:12px;border-bottom:1px solid #e2e8f0;vertical-align:top}.delivery-table th{background:#f5f8fc}.delivery-table td button{display:block;margin-bottom:6px;font-size:12px}.delivery-form{margin:20px 0;padding:20px;border:1px solid #aec6f5;border-radius:10px;background:#f6f9ff}.delivery-form fieldset{border:0;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.delivery-form label{display:grid;gap:6px;min-width:0;font-size:14px}.delivery-form textarea{min-height:80px}.delivery-form .delivery-check{display:flex;align-items:center;grid-column:1/-1}.delivery-check input{width:20px;flex-shrink:0}.delivery-file{grid-column:1/-1}.delivery-error{background:#fff0ec;padding:12px;color:#a93220!important}.delivery-history{margin-top:24px}.delivery-history article{border:1px solid #e2e8f0;padding:15px;border-radius:9px;margin:10px 0;overflow-wrap:anywhere}.delivery-history article div{display:flex;flex-wrap:wrap;gap:8px 24px;margin:12px 0}.delivery-history article b{font-weight:500;color:#64748b}.delivery-history a{display:inline-block;margin:8px 12px 0 0;color:#245bd6}
@media(max-width:700px){.delivery-overlay{padding:0}.delivery-dialog{padding:16px;border-radius:0;min-height:100%}.delivery-dialog h2{font-size:18px}.delivery-dialog header{display:block}.delivery-form{padding:12px}.delivery-form fieldset{grid-template-columns:minmax(0,1fr)}.delivery-dialog input,.delivery-dialog select,.delivery-dialog textarea{font-size:16px}}

/* Separate actual main/supplement visits so one save never appears to close them all. */
[data-sales-installation-followup] [data-followup-id]{border:1px solid #dce5f3;border-radius:10px;padding:16px;margin-top:16px;overflow-wrap:anywhere}
[data-sales-installation-followup] [data-followup-id]>.backend-after-sales-form{margin-top:12px}
[data-sales-installation-followup] select{width:100%;min-width:0;border:1px solid #aec6f5;border-radius:8px;padding:10px;font:inherit;background:#fff;color:inherit}

.focused-action-dialog { max-width:760px; }
.focused-action-dialog .delivery-table table { min-width:0; width:100%; }
.focused-action-dialog header { gap:12px; }
.focused-action-dialog header h2 { font-size:20px; }
.focused-action-dialog header p { overflow-wrap:anywhere; }
