.delivery-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0}.delivery-metric{background:var(--hub-surface);border:1px solid var(--line);border-radius:14px;padding:20px;text-align:left;color:var(--hub-ink);min-width:0;cursor:pointer;transition:border-color .16s,background .16s}.delivery-metric:hover,.delivery-metric.is-active{border-color:var(--hub-accent);background:var(--hub-accent-soft)}.delivery-metric>span,.delivery-metric>small{display:block;font-size:.875rem;line-height:1.5;color:var(--muted)}.delivery-metric>strong{display:block;font-size:1.8rem;margin:12px 0;font-family:var(--font-heading);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.delivery-list-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:24px 0 18px;font-size:.95rem}.delivery-list-toolbar label{min-width:210px;font-size:.9rem}.delivery-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.delivery-card{background:var(--hub-surface);border:1px solid var(--line);border-radius:16px;padding:24px;min-width:0;box-shadow:0 4px 18px #153d5510;animation:delivery-arrive .2s ease-out}.delivery-card.status-collected{border-top:3px solid var(--hub-accent)}.delivery-card.status-failed{border-top:3px solid var(--hub-alert)}.delivery-card-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.delivery-branch{font-size:.95rem;font-weight:650;color:var(--hub-accent)}.delivery-card h2{font-size:1.25rem;margin:20px 0 10px;line-height:1.5;overflow-wrap:anywhere}.delivery-address{font-size:1rem;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.delivery-location{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin:14px 0}.delivery-location strong{font-size:1rem;letter-spacing:.025em}.delivery-location a{font-size:.9rem}.delivery-instructions{padding:12px 16px;border-radius:8px;background:var(--hub-soft);font-size:.95rem;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.delivery-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px 0;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.delivery-details span,.delivery-details small{display:block;font-size:.875rem;line-height:1.5;color:var(--muted)}.delivery-details strong{display:block;font-size:1rem;line-height:1.5;margin:6px 0;overflow-wrap:anywhere}.delivery-details .delivery-alert{color:var(--hub-alert)}.delivery-card-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.delivery-recorded{display:block;font-size:.8rem;color:var(--muted);line-height:1.6;margin-top:20px}.delivery-footnote,.delivery-price-preview{font-size:.9rem;line-height:1.7;color:var(--muted);margin:22px 0}.delivery-price-preview{color:var(--hub-accent);font-weight:600}.delivery-empty{grid-column:1/-1;padding:36px;text-align:center}.delivery-empty h2{font-size:1.2rem}.delivery-empty p{font-size:1rem;line-height:1.7;color:var(--muted)}.delivery-loading{padding:24px;font-size:1rem}.delivery-shell{max-width:1440px;margin:auto;padding:24px 32px;min-height:100vh}.delivery-topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding:8px 0 24px;margin-bottom:30px}.delivery-topbar .brand{min-width:0}.delivery-topbar-actions{display:flex;align-items:center;gap:14px}.delivery-topbar time{font-size:.9rem;color:var(--muted)}.delivery-shell #main{padding:0;max-width:none}.delivery-shell .footer{margin-top:36px}.signed-out .delivery-shell{display:none}.delivery-shell+.login-screen{display:none}body:not(.signed-out) #deliveryLogin{display:none}.delivery-scope{align-items:end;flex-wrap:wrap}.delivery-scope input,.delivery-scope select{font-size:1rem}.hub-record-form label{display:block;margin-bottom:16px}.hub-record-form label small{display:block;margin-top:6px;color:var(--muted);font-size:.875rem;line-height:1.6}.delivery-metric:focus-visible{outline:3px solid var(--hub-accent);outline-offset:3px}@keyframes delivery-arrive{from{opacity:.6;transform:translateY(4px)}to{opacity:1;transform:none}}@media(max-width:1100px){.delivery-cards{grid-template-columns:1fr}.delivery-metrics{grid-template-columns:1fr 1fr}}@media(max-width:600px){.delivery-shell{padding:18px}.delivery-topbar{align-items:start;flex-direction:column}.delivery-topbar-actions{justify-content:space-between;width:100%;flex-wrap:wrap}.delivery-card{padding:20px}.delivery-details{grid-template-columns:1fr 1fr}.delivery-metric{padding:16px}.delivery-metric>strong{font-size:1.5rem}.delivery-list-toolbar{align-items:start;flex-direction:column}.delivery-scope>label{flex:1 1 150px;min-width:0}.delivery-list-toolbar label{min-width:0;width:100%}.delivery-card-actions .btn{min-height:44px}.delivery-location{gap:10px}}@media(max-width:380px){.delivery-metrics,.delivery-details{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){.delivery-card{animation:none}.delivery-metric{transition:none}}body[data-motion=reduced] .delivery-card{animation:none}

/* Deliveries keep the same controls and contrast as the pharmacy workspaces. */
.delivery-payment-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.2rem;margin:0;padding:1.25rem 1.5rem}.delivery-payment-totals dt{font-size:.9375rem;line-height:1.6;color:var(--muted)}.delivery-payment-totals dd{font-size:1.55rem;line-height:1.5;font-weight:650;margin:.4rem 0 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.delivery-manager-finance{margin-bottom:1.3rem}.delivery-manager-finance .panel-head p{font-size:.9375rem;color:var(--muted);line-height:1.6}.delivery-management-branches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-bottom:1.5rem}.delivery-management-branch{display:flex;flex-direction:column;text-align:left;gap:.6rem;padding:1.25rem;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:.8rem;cursor:pointer;min-width:0}.delivery-management-branch strong{font-size:1.1rem;line-height:1.5}.delivery-management-branch span{font-size:.9375rem;line-height:1.6;color:var(--muted)}.delivery-management-branch:hover{border-color:var(--accent)}.delivery-management-branch:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.delivery-owner-records{border:1px solid var(--line);border-radius:.8rem;overflow:hidden;background:var(--surface)}.delivery-owner-record{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1rem;padding:1.2rem;border-bottom:1px solid var(--line);min-width:0}.delivery-owner-record:last-child{border-bottom:0}.delivery-owner-record>div{display:flex;flex-direction:column;gap:.45rem}.delivery-owner-record strong{font-size:1.0625rem;line-height:1.5}.delivery-owner-record span,.delivery-owner-record small{font-size:.9375rem;line-height:1.6;color:var(--muted)}.delivery-owner-record .row-buttons{align-items:flex-start;justify-content:center}.delivery-owner-record .row-action{min-height:2.75rem}
.hub-group-delivery-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;padding:1.2rem 1.5rem}.hub-group-delivery-totals span{display:block;color:var(--muted);font-size:.9375rem;line-height:1.6}.hub-group-delivery-totals strong{display:block;font-size:1.3rem;line-height:1.6;margin-top:.3rem}
@media(max-width:1050px){.delivery-payment-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.delivery-owner-record{grid-template-columns:1fr 1fr}.delivery-owner-record>.row-buttons{grid-column:1/-1;flex-direction:row;justify-content:flex-start;flex-wrap:wrap}}
@media(max-width:600px){.delivery-management-branches,.hub-group-delivery-totals{grid-template-columns:1fr}.delivery-payment-totals{padding:1rem;gap:1rem}.delivery-payment-totals dd{font-size:1.25rem}.delivery-owner-record{grid-template-columns:1fr}.delivery-owner-record>.row-buttons{grid-column:auto}.delivery-management-branch{padding:1.1rem}}
.delivery-shell{padding:1.5rem 2rem;min-width:0}
.delivery-topbar .brand{color:var(--ink);font-family:var(--font-heading);font-size:1.7rem}
.delivery-topbar .brand-sub{color:var(--muted);font-size:.75rem}
.delivery-topbar{padding:.5rem 0 1.5rem;margin-bottom:1.75rem}
.delivery-metric{border-radius:.9rem;padding:1.25rem;box-shadow:var(--shadow-sm)}
.delivery-metric>strong{font-size:1.8rem;line-height:1.35;letter-spacing:-.035em}
.delivery-card{padding:1.5rem;border-radius:.95rem;background:var(--surface);box-shadow:var(--shadow-sm)}
.delivery-card h2{font-family:var(--font-heading);font-size:1.25rem;line-height:1.5;margin-top:1.25rem}
.delivery-card-head .tag{font-size:.875rem;white-space:normal}
.delivery-recorded{font-size:.8125rem;line-height:1.6}
.delivery-card-actions .btn{min-height:2.75rem;white-space:normal}
.delivery-topbar-actions{flex-wrap:wrap;min-width:0}
.delivery-details{gap:1rem}
@media(max-width:750px){.delivery-shell{padding:1.25rem 1rem}.delivery-card{padding:1.15rem}.delivery-topbar{align-items:flex-start;flex-wrap:wrap}.delivery-topbar-actions{width:100%;justify-content:space-between}.delivery-metrics{gap:.7rem}.delivery-metric{padding:1rem}}
:root[data-motion=reduced] .delivery-card{animation:none}
:root[data-motion=reduced] .delivery-metric{transition:none}

/* Daily collection queue: short rows, visible next actions, secondary detail on demand. */
.delivery-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin:1rem 0}
.delivery-metric{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1.1rem;border-radius:.75rem;min-height:4rem}
.delivery-metric>span{font-size:.9375rem;color:var(--ink);line-height:1.5}
.delivery-metric>strong{font-size:1.65rem;margin:0;font-variant-numeric:tabular-nums}
.delivery-metric>small:empty{display:none}
.delivery-list-toolbar{margin:1rem 0 .8rem;gap:.8rem;font-size:.9375rem}
.delivery-list-toolbar label{display:flex;gap:.75rem;align-items:center;min-width:0;font-size:.9375rem}
.delivery-list-toolbar select{min-width:13rem;width:auto}
.delivery-list-columns,.delivery-row{display:grid;grid-template-columns:minmax(8rem,.8fr) minmax(0,2fr) minmax(8rem,.85fr) minmax(11rem,1.25fr);column-gap:1.2rem}
.delivery-list-columns{padding:.65rem 1.15rem;font-size:.875rem;font-weight:600;color:var(--muted)}
.delivery-cards{display:block;border:1px solid var(--line);border-radius:.85rem;overflow:hidden;background:var(--surface)}
.delivery-row{padding:1rem 1.15rem;box-shadow:none;border:0;border-radius:0;border-bottom:1px solid var(--line);row-gap:.5rem;animation:none}
.delivery-row:last-child{border-bottom:0}
.delivery-row.status-collected{border-top:0;border-left:.25rem solid var(--accent);padding-left:.9rem}
.delivery-row.status-failed{border-top:0;border-left:.25rem solid var(--warning);padding-left:.9rem}
.delivery-row .delivery-collection{display:flex;flex-direction:column;gap:.25rem;align-self:start;font-size:.9375rem;line-height:1.6}
.delivery-row .delivery-branch{font-size:.9375rem;line-height:1.5}
.delivery-row .delivery-collection time{color:var(--muted);font-variant-numeric:tabular-nums}
.delivery-row .delivery-alert{font-size:.875rem;color:var(--danger)}
.delivery-row h2{font-family:var(--font-heading);font-size:1.0625rem;line-height:1.5;margin:0 0 .2rem;overflow-wrap:anywhere}
.delivery-row .delivery-address{font-size:1rem;line-height:1.6;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.delivery-patient-payment{display:flex;gap:.35rem .7rem;align-items:center;flex-wrap:wrap;margin:.5rem 0 0;font-size:.9375rem;line-height:1.6}
.delivery-patient-payment>span:first-child{color:var(--muted)}
.delivery-patient-payment strong{color:var(--ink);font-variant-numeric:tabular-nums;margin-left:.25rem;white-space:nowrap}
.patient-payment-state{padding:.12rem .5rem;border-radius:.4rem;background:var(--warning-soft);color:var(--warning);font-size:.875rem;font-weight:600}
.delivery-patient-payment.is-paid .patient-payment-state{color:var(--accent);background:var(--accent-soft)}
.delivery-patient-payment .row-action{font-size:.875rem;min-height:2.5rem;padding:.3rem .6rem}
.patient-amount-confirm{font-size:1rem;display:flex;gap:.75rem;align-items:center}
.patient-amount-confirm strong{font-size:1.3rem;font-variant-numeric:tabular-nums}
.delivery-row .delivery-instructions{margin:.4rem 0 0;padding:.4rem .65rem;font-size:.9375rem;line-height:1.5;border-radius:.45rem}
.delivery-row .delivery-location{display:flex;flex-direction:column;align-items:start;gap:.25rem;margin:0;align-self:start}
.delivery-row .delivery-location strong{font-size:1rem;line-height:1.65;letter-spacing:.02em;white-space:nowrap;font-variant-numeric:tabular-nums}
.delivery-row .delivery-location .row-action{font-size:.875rem;padding:.35rem .6rem;white-space:normal}
.delivery-progress{display:flex;flex-direction:column;align-items:start;gap:.6rem}
.delivery-progress>.badge{font-size:.875rem;line-height:1.5;white-space:normal}
.delivery-row .delivery-card-actions{gap:.45rem;align-items:start}
.delivery-row .delivery-card-actions .btn{font-size:.875rem;line-height:1.45;min-height:2.6rem;padding:.5rem .75rem;border-radius:.6rem}
.delivery-extra{grid-column:1/-1;min-width:0}
.delivery-extra>summary{cursor:pointer;color:var(--muted);font-size:.875rem;line-height:1.5;width:max-content;max-width:100%;padding:.2rem 0;overflow-wrap:anywhere}
.delivery-extra[open]{margin-top:.3rem;padding-top:.5rem;border-top:1px solid var(--line)}
.delivery-row .delivery-details{margin:.55rem 0;padding:.5rem 0;border:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.delivery-row .delivery-details strong{font-size:.9375rem;margin:.25rem 0}
.delivery-group{margin-bottom:1rem}
.delivery-group-head{font-family:var(--font-heading);display:flex;align-items:baseline;gap:.7rem;flex-wrap:wrap;font-size:1.0625rem;line-height:1.5;margin:1rem 0 .6rem;color:var(--ink)}
.delivery-group-head>span{font-family:var(--font-body);font-size:.875rem;font-weight:400;color:var(--muted)}
.delivery-financial-summary{padding:.85rem 1.1rem;border:1px solid var(--line);border-radius:.75rem;background:var(--surface);font-size:.9375rem;line-height:1.6;margin:1rem 0}
.delivery-financial-summary summary{cursor:pointer;color:var(--muted)}
.delivery-financial-summary summary strong{font-size:1.05rem;color:var(--ink);font-variant-numeric:tabular-nums;margin-left:.7rem}
.delivery-financial-summary p{margin:.7rem 0 .2rem;color:var(--muted)}
.delivery-period>summary{cursor:pointer;font-size:.9375rem;font-weight:600;padding:.65rem .3rem;color:var(--accent)}
.delivery-period[open]{padding:.75rem;background:var(--surface);border:1px solid var(--line);border-radius:.75rem}
.delivery-period label{margin:.4rem 0 .7rem;display:grid;gap:.4rem}
.delivery-scope{gap:.8rem}
.delivery-scope>.btn{min-height:2.75rem}
.delivery-shell{display:flex;flex-direction:column;min-height:100svh;box-sizing:border-box}
.delivery-shell>main{flex:1;width:100%}
.delivery-shell>.footer{padding-top:2rem}
.delivery-topbar{border-bottom:1px solid var(--line);gap:1rem}
.delivery-topbar .brand{color:var(--ink)}
.delivery-topbar .brand-sub{color:var(--muted)}
.delivery-topbar-actions .ghost{border:1px solid var(--line);background:var(--surface)}
.delivery-metric{box-shadow:var(--shadow-sm)}
.delivery-list-columns{background:var(--header-surface);border-bottom:1px solid var(--line)}
.delivery-row:focus-within,.delivery-row:hover{background:var(--surface-raised)}
.delivery-row .delivery-collection>strong{font-size:.9375rem}
.delivery-row .delivery-address{font-size:.9375rem;color:var(--muted)}
.delivery-extra>summary{padding:.45rem 0;min-height:2.5rem}
.delivery-extra>summary:hover{color:var(--accent)}
.delivery-row .delivery-instructions{border-left:2px solid var(--accent);background:var(--accent-soft);color:var(--ink)}
.delivery-financial-summary[open]{background:var(--surface-raised)}
.delivery-row .badge{border-radius:.45rem;font-weight:550}
@media(pointer:coarse){.delivery-extra>summary{min-height:2.75rem}}
@media(prefers-reduced-motion:no-preference){:root:not([data-motion=reduced]) .delivery-row{transition:background-color .18s var(--ease)}}
@media(max-width:1150px){.delivery-list-columns,.delivery-row{grid-template-columns:minmax(7rem,.8fr) minmax(0,1.5fr) minmax(7rem,.85fr) minmax(9rem,1.1fr);column-gap:.85rem}}
@media(max-width:850px){.delivery-list-columns{display:none}.delivery-row{grid-template-columns:minmax(0,1fr) minmax(9rem,.65fr);gap:.6rem 1rem}.delivery-collection{grid-column:1/-1}.delivery-row .delivery-collection{flex-direction:row;gap:.7rem;flex-wrap:wrap}.delivery-recipient{grid-column:1}.delivery-location{grid-column:2}.delivery-progress{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:center;flex-wrap:wrap}.delivery-row .delivery-details{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.delivery-metrics{gap:.5rem;grid-template-columns:repeat(3,minmax(0,1fr))}.delivery-metric{padding:.75rem;min-height:0;display:block}.delivery-metric>span{font-size:.875rem;line-height:1.45}.delivery-metric>strong{font-size:1.45rem;display:block;margin-top:.25rem}.delivery-list-toolbar{align-items:stretch;flex-direction:column}.delivery-list-toolbar label{display:grid;gap:.35rem}.delivery-list-toolbar select{width:100%;min-width:0}.delivery-row{padding:.85rem;gap:.7rem;grid-template-columns:minmax(0,1fr) minmax(6rem,.5fr)}.delivery-row.status-collected,.delivery-row.status-failed{padding-left:.6rem}.delivery-row h2{font-size:1.0625rem}.delivery-row .delivery-location strong{font-size:.9375rem}.delivery-row .delivery-card-actions .btn{min-height:2.75rem}.delivery-progress{align-items:start}.delivery-extra{padding-top:.3rem}.delivery-footnote{margin:1rem 0}.delivery-scope>.btn{flex:0 0 auto}.delivery-period{margin-left:auto}}
@media(max-width:390px){.delivery-row{grid-template-columns:minmax(0,1fr)}.delivery-location{grid-column:1}.delivery-row .delivery-location{flex-direction:row;align-items:center;gap:.6rem}.delivery-progress{display:block}.delivery-progress .delivery-card-actions{margin-top:.6rem}.delivery-row .delivery-details{grid-template-columns:1fr}}
