/* Small windows: stack work areas and confine scrolling to tables. */
.mobile-menu-toggle,.mobile-nav-backdrop{display:none}
@media(max-width:1100px){
#review .review-workspace{grid-template-columns:minmax(0,1fr)!important}
#review .list{position:static!important;max-height:none!important;min-width:0!important}
#review #drafts{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:2px!important;max-height:230px!important;overflow-y:auto!important;overflow-x:hidden!important;width:100%!important}
#review #drafts .draft-choice{display:flex!important;flex:0 0 auto!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:38px!important}
#review #drafts .draft-choice .item{grid-template-columns:minmax(70px,1fr) 14px repeat(3,40px)!important;flex:1!important;min-width:0!important;width:auto!important}
#review #drafts .mail-list-brand{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
#review .list-filters{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(95px,130px)!important;gap:6px!important}
#review .list-filters>*{width:100%!important;min-width:0!important}
#editor .review-sender label{white-space:normal!important;min-width:0!important}
#editor .review-sender select{min-width:0!important;max-width:100%!important}
#editor .mail-unified-toolbar>*{max-width:100%}
#editor .mail-unified-toolbar .review-history-notice{white-space:normal!important;overflow-wrap:anywhere}
#editor .mail-unified-toolbar #editImageColumns{margin-left:0!important}
#editor .review-meta summary{overflow-wrap:anywhere}
#review .batchbar{position:static!important;inset:auto!important;width:100%!important;max-width:100%!important;margin:10px 0 0!important;flex-wrap:wrap!important;box-sizing:border-box}
#review .batch-info,#review .batch-sender-control{min-width:0!important;max-width:100%!important;flex-wrap:wrap!important}
#review #batchSender{max-width:100%!important;min-width:0!important}
#dealerWorkspace .du-top.ux-top,#dealerWorkspace .ux-directory-actions{grid-template-columns:132px 125px minmax(0,1fr)!important}
#dealerWorkspace #duAddDealer{grid-column:1!important;grid-row:2!important}
#dealerWorkspace #duSave{grid-column:2!important;grid-row:2!important}
#dealerWorkspace #duMore{grid-column:3!important;grid-row:2!important;justify-self:end}
#dealerWorkspace #duStatus,#dealerWorkspace .du-spacer{display:none!important}
#dealerWorkspace .ux-viewbar{flex-wrap:wrap!important}
#dealerWorkspace .du-reference-split{grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:760px){
body{min-width:320px!important}
body.ux-actual-type.du-reference-mode:has(#workspace) main{margin-left:0!important;width:100%!important;min-width:0!important;padding:5px 10px 18px!important;box-sizing:border-box}
body.ux-actual-type.du-reference-mode>aside{position:fixed!important;top:0!important;bottom:0!important;left:0!important;width:225px!important;height:100dvh!important;z-index:1002!important;transform:translateX(-100%);overflow-y:auto!important;background:#fff!important;box-shadow:4px 0 20px #17243d22}
body.ux-actual-type.du-reference-mode.mobile-nav-open>aside{transform:translateX(0)}
body:has(#workspace:not([hidden])) .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;min-width:36px;min-height:32px;padding:4px;font-size:19px}
body:has(#workspace:not([hidden])).mobile-nav-open .mobile-nav-backdrop{display:block;position:fixed;inset:0;z-index:1001;background:#17243d66;border:0;border-radius:0;padding:0;width:100%;height:100%;cursor:pointer}
body main>header{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:8px!important}
body main>header>div{flex:1;min-width:0}
#workspace,.tab,#review,#editor,#brandGroups,#dealerWorkspace{min-width:0!important;max-width:100%!important;box-sizing:border-box}
#review .review-toolbar{display:flex;flex-wrap:wrap;gap:6px}
#editor .review-identity>div{min-width:0!important;gap:6px!important}
#editor .review-identity p{overflow-wrap:anywhere}
#editor .review-sender{display:block!important}
#editor .review-sender label{display:grid!important;gap:4px!important}
#editor .review-sender select{width:100%!important}
#editor .mail-meta-fields .grid{grid-template-columns:minmax(0,1fr)!important}
#editor .mail-body-preview{overflow-wrap:anywhere}
#editor .preview-shell,#editor #duMailTable,#dealerWorkspace .du-sheet-scroll,#dealerWorkspace .ux-directory-scroll{min-width:0!important;max-width:100%!important;overflow-x:auto!important}
#editor .mail-unified-toolbar .review-counts,#editor .mail-unified-toolbar .review-legend{flex-wrap:wrap!important}
#review .batch-sender-control{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%}
#review #batchSender,#review #batchSend{width:100%!important}
#dealerWorkspace .ux-detail{display:block!important}
#dealerWorkspace .ux-brand-list{width:100%!important;min-width:0!important;border-right:0}
#dealerWorkspace #uxBrands{display:flex!important;overflow-x:auto!important;max-height:110px!important}
#dealerWorkspace #uxBrands .ux-brand-item{flex:0 0 155px!important;width:155px!important}
#dealerWorkspace .ux-route-fields,#dealerWorkspace .du-address-row{display:grid!important;grid-template-columns:minmax(0,1fr)!important}
#dealerWorkspace .ux-brand-heading{flex-wrap:wrap!important}
#dealerWorkspace #duBody{min-width:0!important}
.policy-pickers,.policy-heading{flex-wrap:wrap}
dialog.mail-table-dialog{inset:4px!important;width:calc(100vw - 8px)!important;height:calc(100dvh - 8px)!important}
#mailTableEditor>header,#mailTableEditor>footer{padding:9px!important;gap:7px!important;flex-wrap:wrap!important}
#mailTableEditor .mail-table-content{padding:8px!important}
#mailTableEditor .mail-column-inspector{gap:7px!important;padding:8px!important}
#mailTableEditor .mail-column-inspector select{width:145px!important;max-width:100%}
#mailTableEditor .table-edit-tools{gap:5px}
#mailTableEditor .table-edit-tools span{flex-basis:100%}
#mailTableEditor .table-edit-tools #mailRestoreDefaults{margin-left:0!important}
}

/* Keep desktop navigation and mail list compact; return the space to the sheet. */
@media(min-width:1101px){
body.ux-actual-type.du-reference-mode{--sidebar:128px}
body.ux-actual-type.du-reference-mode>aside{width:128px!important;padding:14px 6px!important;box-sizing:border-box}
body.ux-actual-type.du-reference-mode main{margin-left:128px!important;width:calc(100% - 128px)!important;padding-left:10px!important;padding-right:10px!important;box-sizing:border-box}
body.ux-actual-type.du-reference-mode>aside nav button{padding:9px 7px!important;gap:7px!important;font-size:12px!important}
body.ux-actual-type.du-reference-mode>aside .nav-icon{width:17px!important;height:17px!important;flex-basis:17px!important}
body.ux-actual-type.du-reference-mode>aside .app-logo{padding-left:5px!important;padding-right:0!important}
body.ux-actual-type.du-reference-mode>aside .app-logo strong{font-size:15px!important}
body.ux-actual-type.du-reference-mode>aside .asidefoot{padding-left:2px!important;padding-right:2px!important}
body #review .review-workspace{grid-template-columns:250px minmax(0,1fr)!important;gap:10px!important}
body #review .list{padding:8px!important}
body #review #drafts .draft-choice{gap:4px!important;padding:2px 3px!important}
body #review #drafts .draft-choice .item{grid-template-columns:minmax(86px,1fr) 0 repeat(3,35px)!important;gap:2px!important}
body #review #drafts .draft-choice .item:has(.has-memo){grid-template-columns:minmax(86px,1fr) 14px repeat(3,33px)!important}
body #review .mail-list-memo:not(.has-memo){width:0!important;min-width:0!important;overflow:hidden}
body #review .mail-list-memo.has-memo{width:14px!important;min-width:14px!important}
body #review .mail-list-number{font-size:11px!important;font-weight:500;color:#43516a!important}
body #review .mail-list-number b{font-size:12px!important;min-width:9px!important;color:#26364c!important}
body #review .mail-list-brand{font-size:11px!important}
}

@media(min-width:1101px){
body #review .mail-list-number{text-align:center!important;line-height:13px!important}
body #review .mail-list-number b{display:block!important;line-height:14px!important;font-weight:700!important}
body #review .mail-list-duplicate.has-duplicate,body #review .mail-list-duplicate.has-duplicate b{color:#b72d44!important}
}

body #review{padding-bottom:var(--batch-clearance,100px)!important}
body #review .batchbar{position:fixed!important;inset:auto var(--batch-right,12px) 8px var(--batch-left,140px)!important;width:auto!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;z-index:50;max-height:45dvh;overflow-y:auto}

.batch-sender-summary{display:flex;gap:14px;align-items:center;flex-wrap:wrap;font-size:12px;color:#40526b}
.batch-country-sender{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.batch-country-sender strong{font-weight:600;overflow-wrap:anywhere}.batch-country-sender .ux-flag{width:22px;height:15px}
.batch-country-sender small{color:#aa6428}

#draftSenderStatus.is-applied{color:#237344!important;font-weight:600}

#editor #applyDraftSender{min-height:30px;padding:4px 12px;font-size:12px;border:1px solid #8fb99f;background:#eaf5ee;color:#286742;border-radius:4px;flex-shrink:0}
/* Sender input and Apply stay together; status text uses a separate column. */
#review #editor .review-sender{display:grid!important;grid-template-columns:minmax(0,min(620px,65%)) 48px minmax(0,1fr)!important;align-items:center!important;gap:10px!important}
#review #editor .review-sender>label{display:grid!important;grid-template-columns:max-content minmax(0,1fr)!important;align-items:center!important;gap:10px!important;min-width:0!important;width:auto!important}
#review #editor .review-sender select{width:100%!important;min-width:0!important;max-width:100%!important}
#review #editor #applyDraftSender{box-sizing:border-box!important;width:48px!important;min-width:48px!important;margin:0!important;justify-self:start!important;padding:4px 8px!important}
#review #editor #draftSenderStatus{max-width:none!important;min-width:0!important;padding:0!important;margin:0!important;overflow-wrap:anywhere}
@media(max-width:1100px){#review #editor .review-sender{grid-template-columns:minmax(0,1fr) 48px!important}#review #editor #draftSenderStatus{grid-column:1/-1}}
@media(max-width:500px){#review #editor .review-sender>label{grid-template-columns:minmax(0,1fr)!important}}

.mail-sending-control{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px;margin:12px 0 18px;border:1px solid #d9e1eb;border-radius:6px;background:#f7f9fc}.mail-sending-control button{margin-left:auto}.mail-sending-off{color:#9a4450;background:#fff0f1;border:1px solid #edc8ce;padding:3px 8px;border-radius:4px;font-weight:600}

#review #editor .review-order-total{display:inline-flex!important;flex-direction:row!important;align-items:center!important;align-self:center;gap:8px!important;margin:0 0 0 16px!important;padding:0!important;border:0;border-radius:0;background:transparent;min-height:30px;font-family:inherit!important;font-size:14px!important;font-weight:600;line-height:20px!important;white-space:nowrap;font-variant-numeric:tabular-nums;color:inherit}
#review #editor .review-order-total .order-total-caption{font-family:inherit!important;font-size:inherit!important;font-weight:600;line-height:inherit;color:inherit}
#review #editor .review-order-total .order-total-amount{font-family:inherit!important;font-size:inherit!important;font-weight:700;line-height:inherit;color:#183f60}
#review #editor .review-order-total small{font-size:11px;font-weight:400;color:#8a6226}

#review .mail-kind-group+.mail-kind-group{margin-top:14px}
#review .mail-kind-heading{display:flex;align-items:center;gap:7px;min-height:30px;margin:0 0 3px;padding:3px 5px;font-size:12px;line-height:20px;cursor:pointer;border-bottom:1px solid #e1dcea;color:#604080}
#review .mail-kind-group.order .mail-kind-heading{color:#993c4c;border-bottom-color:#ecd9dd}
#review .mail-kind-heading input{margin:0;accent-color:#765491}
#review .mail-kind-group.order .mail-kind-heading input{accent-color:#a33c4d}
#review .mail-kind-heading strong{font-size:12px;font-weight:600}
#review .mail-kind-heading small{margin-left:auto;font-size:11px;font-weight:400;color:#7a8595}
#review .select-all:has(#allDrafts[hidden]){justify-content:flex-end;min-height:28px}
#review #allDrafts[hidden]{display:none!important}

#review .select-all:has(#allDrafts[hidden]){display:none!important}
#review .list .section-heading{display:flex;align-items:center;gap:6px}
#review .list .section-heading h2{flex:1;min-width:0}
#review .list .section-heading #reviewDeleteSelected{order:1;flex:none;width:auto!important;min-width:0!important;height:22px!important;min-height:22px!important;padding:1px 5px!important;margin:0!important;font-size:10px!important;line-height:18px!important}
#review .list .section-heading #draftListCount{order:2;flex:none}

#review #editor .review-combined-meta>summary{cursor:default}
#review #editor .review-combined-meta>summary::before{content:none}
#review #editor .review-fold-label{cursor:pointer;height:28px!important;min-height:28px!important;padding:3px 9px!important;font:inherit;font-size:12px!important;line-height:20px!important}
#review #editor .mail-meta-fields textarea[data-field="body"]{height:340px!important;min-height:300px!important;max-height:none!important;resize:vertical!important;line-height:1.65!important;overflow:auto}
#review #editor .review-combined-meta .mail-meta-fields{max-height:none!important;overflow:visible}

#review #editor button.review-fold-label,#review #editor button#editImageColumns{box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 136px!important;width:136px!important;min-width:136px!important;max-width:136px!important;height:30px!important;min-height:30px!important;max-height:30px!important;padding:4px 8px!important;border-width:1px!important;border-style:solid!important;border-radius:5px!important;font-family:inherit!important;font-size:12px!important;font-weight:600!important;line-height:20px!important;white-space:nowrap}

.ux-country-sender-grid .mail-sending-control{grid-column:1/-1;margin:0;padding:8px 10px;min-height:40px}.mail-sending-on{color:#237047;background:#edf8f1;border:1px solid #bcdcc8;padding:3px 8px;border-radius:4px;font-weight:600}.ux-country-sender-grid .mail-sending-control button{min-width:88px;min-height:30px;font-size:13px}
