/* The modal function applies gst409-modal to the full-screen overlay, not the box */
.gst409-modal{position:fixed!important;inset:0!important;left:0!important;top:0!important;right:0!important;bottom:0!important;transform:none!important;width:100%!important;max-width:none!important;max-height:none!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:12px!important;overflow:auto!important;box-sizing:border-box!important;z-index:10001!important}
.gst409-modal .modal-box{position:relative!important;left:auto!important;top:auto!important;transform:none!important;margin:auto!important;width:min(700px,100%)!important;max-width:700px!important;max-height:calc(100dvh - 24px)!important;overflow-y:auto!important;box-sizing:border-box!important}
@media(max-width:600px){.gst409-modal{padding:8px!important}.gst409-modal .modal-box{width:100%!important;max-height:calc(100dvh - 16px)!important}}
/* New & Edit Party: single icon and consistent tabbed form */
.ami398-party-page>header h2:before{display:none!important}
.ami398-party-page #p19-edit{display:block!important}
.ami398-party-page #p19-edit .ami402-layout .ami402-fields>.field{display:flex!important;flex-direction:column!important;gap:5px!important;min-width:0!important;grid-column:auto!important;margin:0!important}
.ami398-party-page #p19-edit .ami402-layout .ami402-fields>.field>span{font-size:12px;font-weight:650}
.ami398-party-page #p19-edit .ami402-layout .ami402-fields>.field input,.ami398-party-page #p19-edit .ami402-layout .ami402-fields>.field select,.ami398-party-page #p19-edit .ami402-layout .ami402-fields>.field textarea{width:100%!important;min-height:36px!important;box-sizing:border-box!important}
.ami398-party-page #p19-edit>.ami19-check{display:inline-flex!important;align-items:center!important;gap:8px!important;width:auto!important;min-height:0!important;margin:8px 0!important;font-size:13px}
.ami398-party-page #p19-edit>.ami19-check input[type=checkbox]{appearance:auto!important;position:static!important;width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important;margin:0!important;flex:none!important}
.ami398-party-page .ami402-save-switch input[type=checkbox]{appearance:auto!important;position:static!important;width:16px!important;height:16px!important;margin:0!important;min-width:16px!important;min-height:16px!important}
.ami398-party-page .ami402-save-switch{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important}
.ami398-party-page .pl304-form>.muted.pl304-wide{font-size:11px!important;line-height:1.4!important;display:none!important}
.ami398-party-page #p19-edit>.ami19-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:10px}
/* Party detail transactions: responsive ledger preview */
.party341-grid .party341-card.transactions{grid-column:1/-1!important;width:100%!important;min-width:0!important}
.party409-transactions{width:100%;margin-top:12px;min-width:0}.party409-table-scroll{overflow-x:auto;max-width:100%}.party409-table-scroll table{min-width:680px;width:100%}
.party409-note-form textarea{width:100%;box-sizing:border-box;min-height:105px}
