.warehouse-correspondence-dialog{width:min(1250px,98vw);height:96dvh;max-width:98vw;max-height:96dvh;margin:auto;padding:18px;border:1px solid #cddfe4;border-radius:16px;background:#f5f8fa;color:#193847;box-sizing:border-box}
.warehouse-correspondence-dialog[open]{display:flex;flex-direction:column;gap:10px}
.warehouse-correspondence-dialog::backdrop{background:#0c263a99}
.warehouse-correspondence-dialog header,.correspondence-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}
.warehouse-correspondence-dialog h2{margin:3px 0;font-size:23px}
.warehouse-correspondence-dialog small{font-size:10px;letter-spacing:1.5px;color:#327786}
.warehouse-correspondence-dialog .correspondence-warning{margin:0;padding:10px 12px;background:#fff3dc;border-left:3px solid #b87922;font-size:12px;line-height:1.5;flex:none}
.warehouse-correspondence-dialog nav,.correspondence-toolbar>div{display:flex;flex-wrap:wrap;gap:8px;align-items:center;flex:none}
.warehouse-correspondence-dialog .btn{min-height:36px;height:auto;padding:8px 12px;font-size:12px;line-height:1.25;white-space:normal}
.warehouse-correspondence-dialog [data-format][aria-pressed=true]{background:#e0f0f2;color:#0a5969;border-color:#218898}
.warehouse-correspondence-dialog [data-sections][hidden]{display:none}
.warehouse-correspondence-dialog [data-section][aria-pressed=true]{background:#e0f0f2;color:#0a5969;border-color:#218898}
.warehouse-correspondence-dialog [data-sections] small{font-size:11px;letter-spacing:0;line-height:1.4}
.warehouse-correspondence-dialog [data-context]{font-size:11px;margin:0;color:#526975;overflow-wrap:anywhere}
.warehouse-correspondence-dialog iframe{width:100%;flex:1 1 auto;min-height:150px;border:1px solid #d8e4e7;background:#eef3f4;border-radius:8px}
.warehouse-correspondence-dialog label{font-size:11px}.warehouse-correspondence-dialog select{max-width:280px;padding:6px;font-size:12px}
@media(max-width:600px){.warehouse-correspondence-dialog{padding:10px;gap:8px;border-radius:8px}.warehouse-correspondence-dialog h2{font-size:19px}.correspondence-toolbar{align-items:stretch;flex-direction:column;gap:6px}.correspondence-toolbar>div{display:grid;grid-template-columns:1fr 1fr}.warehouse-correspondence-dialog nav .btn{flex:1;min-width:90px}.warehouse-correspondence-dialog .correspondence-warning{font-size:10px;padding:7px}.warehouse-correspondence-dialog [data-context]{max-height:42px;overflow:auto}}
/* Dedicated administrative dialog: scoped so it cannot resize other forms. */
.warehouse-template-settings{width:min(1040px,96vw);max-height:94dvh;padding:18px;border:1px solid #bad2e4;border-radius:12px;color:#143b55;overflow:auto}
.warehouse-template-settings::backdrop{background:#102c4f66}
.template-margins,.template-cae{grid-column:1/-1}
.template-margin-channels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.template-margin-channels fieldset{min-width:0;border:1px solid #bfd3df;border-radius:6px;padding:10px}
.template-margin-sides{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
@media(max-width:680px){.template-margin-channels{grid-template-columns:1fr}.template-margin-sides{grid-template-columns:repeat(2,minmax(0,1fr))}}
.warehouse-template-settings header,.warehouse-template-settings footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.warehouse-template-settings h2{font-size:21px;margin:3px 0 12px}.warehouse-template-settings h3{font-size:16px;margin:8px 0}
.template-settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.template-settings-grid section{min-width:0;background:#f4f8fb;border-radius:8px;padding:12px}
.warehouse-template-settings label{display:grid;gap:4px;font-size:12px;margin:9px 0;font-weight:400}.warehouse-template-settings input,.warehouse-template-settings select,.warehouse-template-settings textarea{width:100%;min-width:0;font:400 14px/1.4 Arial;padding:8px;border:1px solid #b7ccdc;border-radius:5px;box-sizing:border-box}
.warehouse-template-settings p{font-size:12px;line-height:1.5}.romar-template-logo{width:156px;height:auto;max-width:100%;margin:8px 0}.template-settings-scope{background:#fff5df;padding:9px;border-radius:6px}
.warehouse-template-settings input[type=checkbox]{width:16px;height:16px;min-height:16px;padding:0;flex:none}
.warehouse-template-settings label:has(>input[type=checkbox]){display:flex;align-items:center;gap:8px}
.warehouse-template-settings .payment-authorizers{min-width:0;border:1px solid #c7d9eb;border-radius:6px;padding:10px}
.warehouse-template-settings .payment-user-transfer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center}
.warehouse-template-settings .payment-user-transfer label{min-width:0;margin:4px 0}
.warehouse-template-settings .payment-user-transfer select{height:190px;padding:4px;font-size:13px;background:white}
.warehouse-template-settings .payment-user-transfer option{padding:7px 5px}
.warehouse-template-settings .payment-user-transfer-actions{display:grid;gap:8px}
@media(max-width:680px){.warehouse-template-settings .payment-user-transfer{grid-template-columns:minmax(0,1fr)}.warehouse-template-settings .payment-user-transfer-actions{grid-template-columns:1fr 1fr}.warehouse-template-settings .payment-user-transfer select{height:145px}}
.warehouse-payment-settings header{position:sticky;top:-18px;background:white;z-index:1;padding-top:8px}
.warehouse-payment-settings section[hidden]{display:none}
.warehouse-payment-settings [data-accounting-destination]{border:1px solid #c7d9eb;border-radius:6px;margin:10px 0;padding:10px}
[data-payment-row] label:has(select[data-payment=mode]){min-width:120px!important}
[data-payment-row] label:has(input[type=checkbox]){display:flex;align-items:center;gap:6px;padding-bottom:8px}
[data-payment-row] input[type=checkbox]{width:16px!important;height:16px!important;min-height:16px!important;padding:0!important}
@media(max-width:680px){.template-settings-grid{grid-template-columns:1fr}.warehouse-template-settings{padding:12px}.warehouse-template-settings footer{flex-wrap:wrap}}
