/* Account editor: section rhythm matches the trade editor, with a persistent action footer. */
:root #modalRoot .modal:has(#recordForm[data-collection="account"]){width:min(1180px,calc(100vw - 40px));max-height:calc(100dvh - 40px);display:flex;flex-direction:column;overflow:hidden}
:root #modalRoot .modal:has(#recordForm[data-collection="account"])>.modal-header{flex:none;padding:18px 24px}
:root #modalRoot #recordForm[data-collection="account"]{display:flex;flex-direction:column;min-height:0}
:root #modalRoot #recordForm[data-collection="account"]>.modal-body{display:flex;flex-direction:column;padding:0;min-height:0;overflow:hidden}
:root #modalRoot #recordForm[data-collection="account"]>.modal-body>.form-grid{display:block;min-height:0;overflow-y:auto;padding:0 24px 24px;scroll-padding-top:110px}
:root #modalRoot #recordForm[data-collection="account"] .modal-footer{flex:none;display:flex;justify-content:flex-end;gap:10px;padding:14px 24px;border-top:1px solid var(--line);background:var(--surface)}
.account-editor-nav{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;gap:6px;padding:12px 0;background:var(--surface);border-bottom:1px solid var(--line);margin-bottom:20px}
.account-editor-nav button{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:9px;padding:9px 11px;background:var(--surface-soft);color:var(--text);font-size:11px;cursor:pointer;min-height:36px}
.account-editor-nav button [data-account-step-number]{color:var(--brand);font-size:10px;font-weight:700}
.account-editor-nav button:hover{background:var(--brand-soft);border-color:var(--brand)}
.account-editor-block{border:1px solid var(--line);border-radius:17px;background:var(--surface);padding:20px;margin-bottom:20px;scroll-margin-top:110px;min-width:0}
.account-editor-scoped{display:contents}
/* The mode wrapper does not generate a box, but it still breaks direct-child selectors. */
:root #modalRoot :is(#account-step-identity .account-editor-scoped,#account-step-status .account-editor-scoped[data-account-mode="personal"]) > .field {
 display:flex;flex-direction:column;gap:7px;min-width:0;margin:0
}
:root #modalRoot :is(#account-step-identity .account-editor-scoped,#account-step-status .account-editor-scoped[data-account-mode="personal"]) > .field > label {
 margin:0;min-height:32px;display:flex;align-items:center;line-height:1.4
}
#recordForm[data-collection="account"] [hidden]{display:none!important}
.account-editor-reference{padding:12px 14px;border:1px dashed var(--line);border-radius:10px;color:var(--muted);font-size:12px}
.account-editor-reference summary{cursor:pointer;color:var(--brand);font-weight:600}
.account-editor-reference[open]>div{margin-top:12px}
:root #modalRoot .account-editor-block .field:has(input[type="checkbox"]){align-self:stretch;padding:12px;background:var(--surface-soft);border:1px solid var(--line);border-radius:10px;justify-content:center}
:root #modalRoot .account-editor-block .field:has(input[type="checkbox"])>label{min-height:44px}
:root #modalRoot .account-editor-block .field input[type="checkbox"]{width:16px;height:16px;flex-shrink:0}
@media(max-width:700px){
 :root #modalRoot .modal:has(#recordForm[data-collection="account"]){width:calc(100vw - 16px);max-height:calc(100dvh - 20px)}
 :root #modalRoot .modal:has(#recordForm[data-collection="account"])>.modal-header{padding:14px 16px}
 :root #modalRoot #recordForm[data-collection="account"]>.modal-body>.form-grid{padding:0 12px 16px;scroll-padding-top:160px}
 .account-editor-block{padding:14px;margin-bottom:14px;scroll-margin-top:160px}
 .account-editor-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:9px 0;margin-bottom:14px}
 .account-editor-nav button{font-size:10px;padding:7px;justify-content:flex-start;text-align:left}
 :root #modalRoot #recordForm[data-collection="account"] .modal-footer{padding:12px 16px}
}
.account-risk-paused{display:flex!important;align-items:center;gap:10px;grid-column:span 2;padding:12px;background:var(--surface-soft);border:1px solid var(--line);border-radius:10px;color:var(--text)!important}
.account-risk-paused input[type="checkbox"]{width:16px;height:16px;accent-color:var(--brand)}
.account-risk-reference-note{margin:0;color:var(--muted);font-size:11px;line-height:1.6}
.account-risk-reference-actions{display:flex;justify-content:flex-end}
@media(max-width:700px){.account-risk-paused{grid-column:auto}}
