/* Bizgix universal management component contract. All products, all CPA forms. */
#content {--bgx-ui-border:#d5e2f3;--bgx-ui-ink:#243f64;--bgx-ui-accent:#1663e6;--bgx-ui-radius:12px}
#content .bgx-cpa-standard-page,#content .bgx-standard-page{min-width:0;max-width:100%;box-sizing:border-box}
#content .bgx-page-header,#content>.module-header{margin-bottom:24px}
#content .bgx-page-header h1,#content>.module-header h1{font-size:clamp(1.65rem,2.3vw,2.25rem);line-height:1.2;margin:8px 0 12px}
#content .bgx-page-header p,#content>.module-header p{margin:0;color:#5b6d86}
#content .bgx-cpa-standard-page>.bgx-section-card,#content>.cpa-panel.panel{box-sizing:border-box;min-width:0;width:100%;max-width:100%}
/* A form may use nested .bgx-form-grid or direct label children. */
#content form.bgx-unified-editor,#content form.cpa-form{box-sizing:border-box;min-width:0;width:100%;max-width:100%}
#content form.bgx-unified-editor>.bgx-form-grid,#content form.cpa-form>.bgx-form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:24px!important;row-gap:20px!important;min-width:0;width:100%;margin:0!important}
#content form.bgx-unified-editor>.bgx-form-grid>.bgx-field,#content form.cpa-form>.bgx-form-grid>.bgx-field,#content form.bgx-unified-editor>label,#content form.cpa-form>label{display:flex!important;flex-direction:column!important;gap:8px;min-width:0;max-width:100%;font-weight:600;color:var(--bgx-ui-ink)}
#content form.bgx-unified-editor :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea),#content form.cpa-form :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){box-sizing:border-box;max-width:100%;min-width:0;width:100%;min-height:44px;padding:10px 13px;border:1px solid var(--bgx-ui-border);border-radius:10px;background:#fff;color:#18283e;font:inherit}
#content form.bgx-unified-editor :is(input,select,textarea):focus-visible,#content form.cpa-form :is(input,select,textarea):focus-visible{outline:2px solid #4788e7;outline-offset:1px}
#content form.bgx-unified-editor>.bgx-form-actions,#content form.cpa-form>.bgx-form-actions{grid-column:1/-1!important;display:flex!important;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:12px!important;width:100%;margin-top:26px;padding-top:18px;border-top:1px solid #e7edf5}
#content form.bgx-unified-editor>.bgx-form-actions button,#content form.cpa-form>.bgx-form-actions button{display:inline-flex!important;align-items:center;justify-content:center;min-height:44px;padding:10px 18px!important;border-radius:10px;font:inherit;font-weight:650;line-height:1.3;cursor:pointer;white-space:normal}
#content form.bgx-unified-editor>.bgx-form-actions :is(.primary-btn,button[type=submit]),#content form.cpa-form>.bgx-form-actions :is(.primary-btn,button[type=submit]){background:var(--bgx-ui-accent)!important;color:#fff!important;border:1px solid var(--bgx-ui-accent)!important}
#content form.bgx-unified-editor>.bgx-form-actions .filter-btn:not([type=submit]),#content form.cpa-form>.bgx-form-actions .filter-btn:not([type=submit]){background:#fff!important;color:var(--bgx-ui-ink)!important;border:1px solid #cbd8e8!important}
#content form.bgx-unified-editor button:disabled,#content form.cpa-form button:disabled{opacity:.55;cursor:not-allowed}
/* Transaction tables: horizontal scrolling, never squeeze the editable cells. */
#content .bgx-purchase-scroll,#content .cpa-table-wrap,#content .bgx-table-wrap{max-width:100%;overflow-x:auto;min-width:0}
#content .bgx-purchase-scroll table{min-width:850px;width:100%;border-collapse:separate;border-spacing:0}
#content .bgx-purchase-scroll :is(input,select){min-width:90px}
#content .bgx-purchase-scroll .bgx-line-product{min-width:190px}
#content .bgx-purchase-lines,#content .bgx-purchase-charges,#content .bgx-purchase-totals,#content .bgx-purchase-notice{min-width:0;max-width:100%;grid-column:1/-1}
#content .bgx-purchase-charges{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
#content .bgx-purchase-totals{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px 22px}
@media(max-width:720px){#content form.bgx-unified-editor>.bgx-form-grid,#content form.cpa-form>.bgx-form-grid{grid-template-columns:minmax(0,1fr)!important}#content form.bgx-unified-editor>.bgx-form-actions,#content form.cpa-form>.bgx-form-actions{justify-content:stretch}#content form.bgx-unified-editor>.bgx-form-actions button,#content form.cpa-form>.bgx-form-actions button{flex:1 1 auto}#content .bgx-purchase-charges{grid-template-columns:1fr}}

/* Bizgix Universal UI Core V20: one shared layout contract for all products. */
#content { --bgx-ui-form-gap:24px; --bgx-ui-control-height:48px; }
/* Legacy management-v24 makes the FORM a two-column grid, shrinking its nested grid to column one. */
#content form.bgx-unified-editor:has(> .bgx-form-grid),
#content form.cpa-form:has(> .bgx-form-grid) {
 display:block!important; width:100%!important; max-width:none!important; min-width:0!important;
 box-sizing:border-box!important;
}
#content .bgx-cpa-standard-page, #content .bgx-cpa-standard-page>.cpa-panel,
#content .bgx-cpa-standard-page .bgx-section-card { width:100%;max-width:100%;min-width:0;box-sizing:border-box; }
#content form.bgx-unified-editor>.bgx-form-grid,
#content form.cpa-form>.bgx-form-grid {
 display:grid!important; width:100%!important; max-width:none!important; min-width:0!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:22px var(--bgx-ui-form-gap)!important; align-items:start;
}
#content form.bgx-unified-editor>.bgx-form-grid>.bgx-field,
#content form.cpa-form>.bgx-form-grid>.bgx-field {width:100%;min-width:0;max-width:none;box-sizing:border-box;}
#content form.bgx-unified-editor>.bgx-form-grid :is(input,select,textarea),
#content form.cpa-form>.bgx-form-grid :is(input,select,textarea) {
 width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box;
 min-height:var(--bgx-ui-control-height);
}
#content form.bgx-unified-editor>.bgx-form-actions,
#content form.cpa-form>.bgx-form-actions {display:flex!important;width:100%!important;justify-content:flex-end!important;align-items:center;gap:12px!important;margin-top:28px;padding-top:20px;border-top:1px solid #e3eaf5;}
#content .bgx-form-actions button{min-height:44px;}
#content .bgx-page-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;}
#content .bgx-page-header h1{font-size:clamp(26px,2.3vw,36px);line-height:1.2;}
#content .bgx-purchase-lines{width:100%;min-width:0;margin-top:24px;}
#content .bgx-purchase-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:14px;}
#content .bgx-purchase-scroll{width:100%;max-width:100%;overflow-x:auto;}
#content .bgx-purchase-scroll table{width:100%;min-width:900px;}
#content .bgx-purchase-scroll :is(input,select){box-sizing:border-box;min-width:85px;}
#content .bgx-purchase-scroll .bgx-line-product{min-width:180px;}
#content .bgx-purchase-charges{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:24px;}
#content .bgx-purchase-charges .bgx-field{min-width:0;}
#content .bgx-purchase-charges :is(input,select){width:100%;box-sizing:border-box;}
#content .bgx-purchase-totals{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:14px 24px;margin-top:18px;}
#content .bgx-purchase-notice{margin-top:18px;line-height:1.6;}
@media(max-width:760px){
 #content form.bgx-unified-editor>.bgx-form-grid,#content form.cpa-form>.bgx-form-grid{grid-template-columns:minmax(0,1fr)!important;}
 #content .bgx-purchase-charges{grid-template-columns:1fr;}
 #content .bgx-form-actions{flex-wrap:wrap;}
 #content .bgx-page-header{flex-direction:column;}
}
