/* M9 is deliberately isolated from M8 trading Settings and existing modals. */
.m9-backdrop{position:fixed;inset:0;z-index:12000;background:rgba(9,17,29,.72);display:flex;align-items:center;justify-content:center;padding:14px}
.m9-dialog{background:#fff;color:#192c40;border-radius:14px;box-shadow:0 20px 65px #0007;max-width:980px;width:100%;max-height:94dvh;overflow:auto;padding:22px;outline:0}
.m9-heading,.m9-heading-actions,.m9-actions{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap}
.m9-heading{border-bottom:1px solid #d4dee7;padding-bottom:12px}.m9-heading h2{font-size:22px;margin:0}.m9-heading small{color:#526b82;font-size:13px}
.m9-tabs{display:flex;overflow-x:auto;gap:4px;margin:14px 0;border-bottom:1px solid #d1d9e2}
.m9-tabs button{background:none;border:0;border-bottom:3px solid transparent;border-radius:0;color:#2f526b;cursor:pointer;padding:10px 13px;white-space:nowrap;font-weight:600}
.m9-tabs button[aria-selected=true]{color:#0060a0;border-color:#0077bd}
.m9-content{min-height:180px}.m9-grid{display:grid;grid-template-columns:minmax(0,3fr) minmax(160px,1fr);gap:16px}
.m9-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.m9-form label{font-size:13px;font-weight:600;color:#25445c;display:flex;flex-direction:column;gap:4px;min-width:0}
.m9-form input,.m9-form select{width:100%;min-width:0;box-sizing:border-box;max-width:100%}
.m9-form input[readonly]{background:#edf2f6;color:#486175}
.m9-form label.m9-check{display:flex;flex-direction:row;align-items:center;gap:9px}.m9-check input{width:18px;height:18px;flex-shrink:0}
.m9-photo{display:flex;flex-direction:column;gap:12px;font-size:13px}.m9-photo-preview{display:flex;align-items:center;justify-content:center;min-height:144px;border:1px dashed #b8c9d8;border-radius:8px;background:#f6fafc}.m9-photo-preview img{max-width:160px;max-height:160px;object-fit:contain}
.m9-actions{justify-content:flex-start;margin:14px 0}.m9-help{font-size:13px;line-height:1.5;color:#516b7e}
.m9-scroll{width:100%;overflow:auto;border:1px solid #dae2e9;border-radius:8px}
.m9-table{width:100%;border-collapse:collapse;min-width:620px;font-size:13px;text-align:left}
.m9-table th,.m9-table td{padding:9px 12px;white-space:nowrap;border-bottom:1px solid #e4e9ef}
.m9-table th{background:#edf5fb;color:#24465c;position:sticky;top:0}.m9-table tbody tr:hover{background:#f7fafc}
.m9-month{background:transparent;border:0;text-decoration:underline;cursor:pointer;color:#0567a1}.m9-month.selected{font-weight:bold;color:#15354d}
#m9Notice{min-height:20px;color:#2d7656;font-size:13px;margin:5px 0}#m9Notice.error{color:#a32222}
/* M9's white modal must not inherit the dark dashboard's pale button labels.
   Keep these overrides scoped to Account Management; do not change M8 UI. */
.m9-dialog .ghost-btn,
.m9-dialog .action-btn{
  color:#183c59;
  background:#e4edf5;
  border:1px solid #7894aa;
  opacity:1;
  text-shadow:none;
  box-shadow:none;
}
.m9-dialog .action-btn{
  color:#fff;
  background:#075e94;
  border-color:#075e94;
}
.m9-dialog .ghost-btn:not(:disabled):hover{
  color:#102e45;
  background:#d0e2f0;
  border-color:#527b9a;
}
.m9-dialog .action-btn:not(:disabled):hover{
  color:#fff;
  background:#034b78;
  border-color:#034b78;
}
.m9-dialog button:disabled{
  color:#455b6e;
  background:#e9eff4;
  border:1px solid #c0ccd6;
  opacity:1;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
  text-shadow:none;
}
.m9-dialog button:disabled:hover{
  color:#455b6e;
  background:#e9eff4;
  border-color:#c0ccd6;
  transform:none;
}
.m9-dialog button:focus-visible,.m9-dialog input:focus-visible,.m9-dialog select:focus-visible{outline:3px solid #35a2e8;outline-offset:2px}
@media(max-width:660px){.m9-backdrop{padding:0;align-items:stretch}.m9-dialog{border-radius:0;max-height:100dvh;padding:14px}.m9-grid,.m9-form{grid-template-columns:1fr}.m9-photo{order:-1}.m9-photo-preview{min-height:92px}.m9-heading h2{font-size:18px}.m9-tabs button{padding:9px}.m9-actions{gap:8px}.m9-actions button{max-width:100%}}
