/* Four-tab customer editor. Other master-data dialogs retain their layout. */
#editorModal.customer-editor-tabs .modal-card{width:min(1160px,96vw);max-height:calc(100dvh - 30px);display:flex;flex-direction:column;border-radius:14px;background:#fffdf8;color:#1d2939;overflow:hidden}
#editorModal.customer-editor-tabs .modal-card>header{padding:14px 28px;background:linear-gradient(110deg,#f4ead3,#fbf8ef);border-bottom:1px solid #decaa1;flex-shrink:0}#editorModal.customer-editor-tabs header .eyebrow{display:none}#editorModal.customer-editor-tabs #editorTitle{font-size:22px;margin:0;font-weight:700}#ceSubtitle{margin:3px 0 0;color:#576475;font-size:13px}#editorModal.customer-editor-tabs #editorForm{padding:0;display:flex;flex-direction:column;min-height:0;overflow:hidden}#editorModal.customer-editor-tabs #editorFields{display:block;overflow-y:auto;padding:0 16px;min-height:0}#editorModal.customer-editor-tabs svg{width:23px;height:23px;flex:none}#editorModal.customer-editor-tabs button{box-shadow:none;border-radius:6px;border-color:#9f2341;background:#fff;color:#790b2a;padding:8px 16px;font-size:12px}#editorModal.customer-editor-tabs button:focus-visible,#editorModal.customer-editor-tabs input:focus-visible,#editorModal.customer-editor-tabs textarea:focus-visible,#editorModal.customer-editor-tabs select:focus-visible{outline:3px solid #e4bb58;outline-offset:2px}
.ce-tabs{position:sticky;top:0;z-index:3;display:flex;gap:12px;background:#fff;border-bottom:1px solid #ddcdae;margin-bottom:16px;overflow-x:auto}#editorModal.customer-editor-tabs .ce-tabs button{display:flex;align-items:center;justify-content:center;gap:12px;flex:1;white-space:nowrap;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:#667085;padding:16px 10px;font-size:14px;font-weight:600}#editorModal.customer-editor-tabs .ce-tabs button[aria-selected=true]{color:#790b2a;border-bottom-color:#790b2a}.ce-card{padding:14px 22px;border:1px solid #d9bd86;border-radius:9px;background:#fff;margin:0 0 12px}.ce-card h3{display:flex;align-items:center;gap:10px;margin:0 0 12px;font-size:18px;color:#101828;line-height:1.4}.ce-card h3 svg{color:#8c6515}.ce-card h3 small{margin-left:auto;font-size:12px;font-weight:400;color:#667085}.ce-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 18px}.ce-grid.ce-three{grid-template-columns:repeat(3,minmax(0,1fr))}.ce-wide{grid-column:1/-1}#editorModal.customer-editor-tabs label{display:grid;gap:5px;min-width:0;font-size:12px;color:#344054}#editorModal.customer-editor-tabs input:not([type=checkbox]):not([type=radio]):not([type=hidden]),#editorModal.customer-editor-tabs select,#editorModal.customer-editor-tabs textarea{width:100%;min-height:38px;border:1px solid #d9d2c6;border-radius:7px;background:#fff;padding:7px 12px;font-size:13px;line-height:1.4;color:#1d2939;margin:0}#editorModal.customer-editor-tabs textarea{resize:vertical}#editorModal.customer-editor-tabs input::placeholder,#editorModal.customer-editor-tabs textarea::placeholder{color:#8a94a3}#editorModal.customer-editor-tabs em{color:#be123c;font-style:normal}.ce-label{display:block;margin-bottom:5px;font-size:12px}.ce-tax{display:flex;align-items:center;gap:12px}.ce-tax small{font-size:12px;white-space:nowrap;color:#667085}.ce-tax small.ce-valid{color:#15803d}.ce-branch{display:grid;grid-template-columns:1fr 1fr;gap:8px}#editorModal.customer-editor-tabs .ce-branch label{display:flex;align-items:center;gap:10px;border:1px solid #ded7cb;padding:9px 12px;border-radius:7px;white-space:nowrap}#editorModal.customer-editor-tabs .ce-branch label:has(:checked){border-color:#9f2341;background:#fcf5f6;color:#790b2a}#editorModal.customer-editor-tabs input[type=checkbox],#editorModal.customer-editor-tabs input[type=radio]{width:18px;height:18px;accent-color:#790b2a;flex:none;margin:0}#editorModal.customer-editor-tabs .ce-clear-branch{border:0;padding:3px 0;font-size:11px;color:#667085;background:none}.ce-status{display:flex!important;align-items:center;gap:10px!important;height:40px}.ce-status input{position:absolute;opacity:0;width:48px!important;height:26px!important;cursor:pointer}.ce-status i{height:26px;width:48px;border-radius:20px;background:#98a2b3;position:relative;flex-shrink:0}.ce-status i:after{content:'';position:absolute;width:20px;height:20px;border-radius:50%;background:#fff;left:3px;top:3px;transition:left .15s}.ce-status input:checked+i{background:#790b2a}.ce-status input:checked+i:after{left:25px}.ce-status input:focus-visible+i{outline:3px solid #e4bb58;outline-offset:3px}.ce-status b{color:#15803d;font-size:12px}.ce-status small{font-size:12px;color:#667085}.ce-address-summary{display:flex;align-items:center;gap:16px}.ce-address-summary p{flex:1;min-width:0;margin:0;background:#f5f1e8;border-radius:7px;padding:12px;font-size:12px;white-space:pre-line;overflow-wrap:anywhere}#editorModal.customer-editor-tabs .ce-check{display:flex;align-items:center;gap:8px;white-space:normal}.ce-help{font-size:12px;color:#667085}.ce-source{background:#f5f2ec;border:1px solid #e5ddcf;border-radius:6px;padding:12px;font:inherit;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.ce-sourcebar{position:sticky;bottom:0;z-index:2;background:#f1eee7;border-top:1px solid #e5dac7;padding:9px 12px;display:flex;align-items:center;gap:10px;font-size:12px;color:#667085;margin:0 -16px}#editorModal.customer-editor-tabs .ce-sourcebar svg{width:18px;height:18px}#editorModal.customer-editor-tabs .ce-sourcebar button{padding:0;border:0;background:none;font-size:12px;font-weight:700}#editorModal.customer-editor-tabs #editorForm>footer{padding:10px 22px;display:flex;justify-content:flex-end;align-items:center;gap:12px;border-top:1px solid #eadfcf;margin:0;background:#fff;flex-shrink:0}#editorModal.customer-editor-tabs #saveButton{background:#790b2a;color:#fff;padding:10px 20px}.ce-audit-notice{margin-right:auto;font-size:12px;color:#475467}#editorModal.customer-editor-tabs #editorMessage{margin:0;padding:0 22px;min-height:0}#editorModal.customer-editor-tabs #editorMessage:not(:empty){padding:7px 22px}#editorModal.customer-editor-tabs .customer-credit-settings{margin-bottom:12px}#editorModal.customer-editor-tabs .ce-pane[hidden]{display:none}.ce-audit-row{padding:12px 0;border-bottom:1px solid #e9e1d4}.ce-audit-row strong{display:block;font-size:12px}.ce-audit-row time{color:#667085;font-size:12px}.ce-audit-row ul{margin:8px 0;padding-left:20px;font-size:12px;overflow-wrap:anywhere}.ce-audit-row li{margin-bottom:4px}
@media(max-width:700px){#editorModal.customer-editor-tabs .modal-card{width:98vw;max-height:calc(100dvh - 12px)}#editorModal.customer-editor-tabs .modal-card>header{padding:12px 14px}#editorModal.customer-editor-tabs #editorTitle{font-size:18px}#ceSubtitle{font-size:12px}#editorModal.customer-editor-tabs #editorFields{padding:0 10px}.ce-tabs{gap:0;margin-bottom:10px}#editorModal.customer-editor-tabs .ce-tabs button{font-size:12px;gap:5px;padding:12px 8px;flex:none}#editorModal.customer-editor-tabs .ce-tabs svg{width:18px;height:18px}.ce-card{padding:12px;margin-bottom:10px}.ce-card h3{font-size:16px;flex-wrap:wrap}.ce-card h3 small{font-size:11px;margin-left:0}.ce-grid,.ce-grid.ce-three{grid-template-columns:1fr}.ce-address-summary{flex-wrap:wrap;gap:10px}.ce-address-summary p{flex-basis:100%}.ce-status small{font-size:11px}.ce-branch{grid-template-columns:1fr 1fr}.ce-tax{gap:6px}.ce-tax small{font-size:10px}.ce-sourcebar{margin:0 -10px;padding:8px;flex-wrap:wrap;gap:5px;font-size:10px}#editorModal.customer-editor-tabs #editorForm>footer{padding:10px;display:flex;flex-wrap:wrap}.ce-audit-notice{width:100%;font-size:11px}#editorModal.customer-editor-tabs #editorForm>footer button{width:auto;flex:1;min-height:42px}.ce-help{font-size:12px}}
#editorModal.customer-editor-tabs .ce-card{padding:10px 18px}#editorModal.customer-editor-tabs .ce-card h3{font-size:17px;margin:0 0 8px;line-height:1.35}#editorModal.customer-editor-tabs .ce-grid{gap:8px 16px}#editorModal.customer-editor-tabs label{margin:0;line-height:1.35}#editorModal.customer-editor-tabs label>span{margin:0}#editorModal.customer-editor-tabs .modal-card>header{padding:10px 28px}#editorModal.customer-editor-tabs .ce-tabs button{padding:12px 10px}#editorModal.customer-editor-tabs .ce-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]),#editorModal.customer-editor-tabs .ce-card select{height:38px;min-height:38px}#editorModal.customer-editor-tabs .ce-card textarea{min-height:64px}#editorModal.customer-editor-tabs .ce-pane>.ce-card:last-child{margin-bottom:12px}
@media(max-width:700px){#editorModal.customer-editor-tabs .modal-card>header{padding:10px 14px}#editorModal.customer-editor-tabs .ce-card{padding:12px}#editorModal.customer-editor-tabs .ce-card h3{font-size:16px}#editorModal.customer-editor-tabs .ce-tabs button{padding:12px 8px}}
@media(max-width:700px){#editorModal.customer-editor-tabs .ce-branch label{white-space:normal;font-size:12px;padding:8px;gap:6px;min-height:48px}#editorModal.customer-editor-tabs .ce-branch input{width:16px;height:16px}}
.bc-root{display:grid;gap:14px}.bc-summary{display:flex;gap:20px;align-items:flex-start;border:1px solid #cda64b;background:linear-gradient(110deg,#faf4df,#f7f3e8);border-radius:8px;padding:18px 22px}.bc-icon{color:#8b6014;font-size:21px}.bc-summary output{display:block;font-size:19px;font-weight:750;color:#171717;margin:5px 0}.bc-summary small{font-size:12px}.bc-root .bc-card{margin:0;padding:16px 20px}.bc-card h3{display:flex;gap:10px;align-items:center;font-size:17px;margin-bottom:12px}.bc-card h3 button{margin-left:auto;font-size:12px}.bc-four{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.bc-root label>span{display:block;margin-bottom:5px}.bc-root input,.bc-root select{min-width:0;width:100%}.bc-root input[type=checkbox]{width:20px;height:20px;accent-color:#800a2e}.bc-root .ce-check{display:flex;align-items:center;gap:8px}.bc-alert{margin-top:14px;color:#1b7149;font-weight:600}.bc-root .ce-help{font-size:12px;color:#697386;margin:8px 0}.bc-table-wrap{overflow:auto;max-width:100%}.bc-table{border-collapse:collapse;width:100%;font-size:12px}.bc-table th{background:#f1efe7;color:#313744;text-align:left;padding:10px;white-space:nowrap}.bc-table td{padding:9px;border-bottom:1px solid #e5dfd4;vertical-align:top}.bc-table input,.bc-table select{padding:7px 8px;min-height:35px;font-size:12px}.bc-table td:first-child{min-width:118px}.bc-table td:nth-child(2){min-width:120px}.bc-table td:nth-child(3),.bc-table td:nth-child(4){min-width:148px}.bc-table td:nth-child(5){min-width:155px}.bc-table td label{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:11px;margin-bottom:3px;white-space:nowrap}.bc-table td label input{width:64px}.bc-pair{display:flex;align-items:center;gap:4px}.bc-pair input{width:54px}.bc-info{background:#f2f3f5;color:#566374;padding:10px;border-radius:7px;font-size:12px}.bc-root [data-bc-error]{color:#a32131;margin:0;font-size:12px}.bc-weekends,.bc-chips{display:flex;gap:14px;flex-wrap:wrap}.bc-holiday-add{display:flex;gap:8px;margin:12px 0}.bc-holiday-add input{max-width:240px}.bc-chips button{border-radius:20px;font-size:12px;padding:5px 10px}.bc-bottom{display:grid;grid-template-columns:1fr 1fr;gap:14px}.bc-docs{display:flex;flex-wrap:wrap;gap:12px 18px;font-size:12px}.bc-timeline{display:flex;margin:15px 0 10px;justify-content:space-between}.bc-timeline>div{position:relative;flex:1;text-align:center}.bc-timeline>div:before{content:'';position:absolute;left:50%;right:-50%;top:7px;height:2px;background:#810629}.bc-timeline>div:last-child:before{display:none}.bc-timeline i{display:block;width:15px;height:15px;border-radius:50%;background:#810629;margin:0 auto 10px;position:relative}.bc-timeline b,.bc-timeline small{display:block;font-size:12px}.bc-timeline small{color:#677588;margin-top:4px}.bc-result{color:#177146;font-weight:600;margin:14px 0 0}.bc-warning{color:#97293c;background:#fff2df;border:1px solid #dab465;padding:10px;border-radius:6px}.bc-root details{margin-top:15px;font-size:12px}.bc-root details textarea{margin-top:8px;width:100%}@media(max-width:800px){.bc-four{grid-template-columns:repeat(2,minmax(0,1fr))}.bc-bottom{grid-template-columns:1fr}.bc-summary output{font-size:16px}.bc-root .bc-card{padding:13px}.bc-card h3{font-size:16px}}@media(max-width:480px){.bc-four{grid-template-columns:1fr}.bc-summary{padding:13px;gap:10px}.bc-summary output{font-size:16px}.bc-card h3{flex-wrap:wrap}.bc-card h3 button{font-size:12px}.bc-holiday-add{flex-wrap:wrap}.bc-table-wrap{width:100%;max-width:calc(100vw - 72px)}.bc-timeline b{font-size:12px}}
#editorModal.customer-editor-tabs .bc-summary{padding:14px 20px}#editorModal.customer-editor-tabs .bc-summary output{background:none;border:0;border-radius:0;padding:0;margin:4px 0;font-size:19px;line-height:1.4}#editorModal.customer-editor-tabs .bc-table th{font-size:12px;padding:9px}#editorModal.customer-editor-tabs .bc-table td label{display:flex;align-items:center;justify-content:space-between;font-size:11px;gap:4px;margin-bottom:3px}#editorModal.customer-editor-tabs .bc-table td label input{width:58px;min-width:58px;height:32px;min-height:32px;padding:5px 6px;font-size:12px}#editorModal.customer-editor-tabs .bc-table td{padding:7px}#editorModal.customer-editor-tabs .bc-table td:first-child{width:120px}#editorModal.customer-editor-tabs .bc-table td input,#editorModal.customer-editor-tabs .bc-table td select{font-size:12px;padding:6px 8px}#editorModal.customer-editor-tabs .bc-table td:first-child input{max-width:125px}#editorModal.customer-editor-tabs .bc-table .bc-pair input{width:52px}.bc-root .bc-holiday-details{margin:0;border:1px solid #ded4c3;border-radius:8px;background:#f9f6ee}.bc-holiday-details>summary{padding:9px 16px;font-size:12px;cursor:pointer}.bc-root .bc-holiday-details>.bc-card{border:0}.bc-root .bc-holiday-details>.bc-card h3{display:none}@media(max-width:480px){#editorModal.customer-editor-tabs .bc-summary output{font-size:16px}}
/* Guided billing cycles: readable choices, preserving stored month offsets. */
#editorModal.customer-editor-tabs .bc-cycles{display:grid;gap:12px;margin-top:12px}
#editorModal.customer-editor-tabs .bc-cycle-card{border:1px solid #cbb995;border-radius:8px;overflow:hidden;background:#fff}
#editorModal.customer-editor-tabs .bc-cycle-heading{display:flex;align-items:center;gap:10px;padding:9px 14px;background:#faf8f3;border-bottom:1px solid #e7dfd1}
#editorModal.customer-editor-tabs .bc-cycle-heading .bc-cycle-number{display:grid;place-items:center;background:#800a2e;color:#fff;border-radius:50%;width:28px;height:28px;flex:none;font-size:14px}
#editorModal.customer-editor-tabs .bc-cycle-heading input{font-size:15px;font-weight:650;max-width:230px;border-color:transparent;background:transparent;min-width:90px}
#editorModal.customer-editor-tabs .bc-cycle-heading button{padding:5px 9px;font-size:12px;white-space:nowrap}
#editorModal.customer-editor-tabs .bc-cycle-heading button:first-of-type{margin-left:auto;border-color:transparent;background:transparent;color:#475467}
#editorModal.customer-editor-tabs .bc-steps{display:grid;grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr) 22px minmax(0,1fr);gap:10px;align-items:stretch;padding:12px 14px}
#editorModal.customer-editor-tabs .bc-step{background:#faf9f6;border:1px solid #e0d8cb;border-radius:7px;padding:11px;min-width:0}
#editorModal.customer-editor-tabs .bc-step h4{display:flex;align-items:center;gap:9px;font-size:14px;margin:0 0 10px;color:#182033}
#editorModal.customer-editor-tabs .bc-step h4 b{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#eee4cb;flex:none;font-size:13px}
#editorModal.customer-editor-tabs .bc-step-arrow{align-self:center;text-align:center;color:#9b6716;font-size:23px}
#editorModal.customer-editor-tabs .bc-range{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:center;font-size:12px}
#editorModal.customer-editor-tabs .bc-step select{font-size:13px;padding:6px 8px;height:36px;min-height:36px}
#editorModal.customer-editor-tabs .bc-step .ce-check{margin-top:9px;font-size:12px}
#editorModal.customer-editor-tabs .bc-months{display:flex;margin-top:7px;border:1px solid #bda98f;border-radius:6px;overflow:hidden}
#editorModal.customer-editor-tabs .bc-months button{flex:1;min-width:0;border:0;border-radius:0;font-size:11px;padding:7px 4px;line-height:1.35;background:#fff;color:#344054;white-space:normal}
#editorModal.customer-editor-tabs .bc-months button+button{border-left:1px solid #d9c8ae}
#editorModal.customer-editor-tabs .bc-months button[aria-pressed=true]{background:#800a2e;color:#fff}
#editorModal.customer-editor-tabs .bc-cycle-rules{display:flex;align-items:center;gap:20px;padding:0 14px 10px;flex-wrap:wrap}
#editorModal.customer-editor-tabs .bc-cycle-rules>label:first-child{display:flex;align-items:center;gap:12px;flex:1;min-width:230px}
#editorModal.customer-editor-tabs .bc-cycle-rules>label:first-child span{white-space:nowrap;font-size:12px}
#editorModal.customer-editor-tabs .bc-cycle-rules select{max-width:265px;font-size:12px}
#editorModal.customer-editor-tabs .bc-cycle-rules .ce-check{font-size:12px;flex:1;min-width:230px}
#editorModal.customer-editor-tabs .bc-cycle-sentence{margin:0 14px 10px;font-size:12px;color:#544c3e;line-height:1.6}
#editorModal.customer-editor-tabs .bc-cycle-example{display:grid;gap:4px;margin:0 14px 10px;padding:11px 14px;background:#f3f8ee;border:1px solid #d0e3bf;border-radius:7px;font-size:12px;color:#254d32;line-height:1.6}
#editorModal.customer-editor-tabs .bc-cycle-example b{font-size:13px;color:#182033}
#editorModal.customer-editor-tabs .bc-cycle-example small{font-size:11px}
#editorModal.customer-editor-tabs .bc-example-pending{background:#faf6ed;border-color:#e3d3ae;color:#776034}
#editorModal.customer-editor-tabs .bc-cycle-card>.bc-info{margin:0 14px 10px;font-size:11px;padding:8px 10px}
@media(max-width:900px){#editorModal.customer-editor-tabs .bc-steps{grid-template-columns:1fr;gap:8px}#editorModal.customer-editor-tabs .bc-step-arrow{transform:rotate(90deg);font-size:20px;height:16px;line-height:16px}#editorModal.customer-editor-tabs .bc-months button{font-size:12px;padding:9px}#editorModal.customer-editor-tabs .bc-cycle-heading{gap:6px;padding:8px}#editorModal.customer-editor-tabs .bc-cycle-heading input{font-size:13px;width:100%;min-width:0}#editorModal.customer-editor-tabs .bc-cycle-heading button{font-size:11px;padding:5px}#editorModal.customer-editor-tabs .bc-cycle-rules{gap:10px}#editorModal.customer-editor-tabs .bc-cycle-rules>label:first-child{flex-wrap:wrap}#editorModal.customer-editor-tabs .bc-cycle-rules select{max-width:none}#editorModal.customer-editor-tabs .bc-cycle-rules .ce-check{min-width:0;flex-basis:100%}}
