.ma-panel { min-width: 0; padding: 22px; }
.ma-toolbar, .ma-toolbar > div:last-child, .ma-operations, .ma-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ma-toolbar { justify-content: space-between; margin-bottom: 18px; }
.ma-toolbar > .el-autocomplete { width: min(310px, 100%); }
.ma-form .el-autocomplete { width:100%; }
.ma-name-source { margin-left:10px; color:#586778; }
.ma-toolbar a { color: var(--brand, #21539b); text-decoration: underline; text-underline-offset: .2em; }
.ma-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ma-table th, .ma-table td { padding: 14px 10px; text-align: left; border-bottom: 1px solid #dce3ec; overflow-wrap: anywhere; }
.ma-table thead th { font-weight: 600; color: #3f5067; background: #f3f6fa; }
.ma-table th:first-child { width: 26%; }
.ma-table small { display: block; margin-top: 4px; font-size: 13px; color: #52647a; font-weight: 400; }
.ma-table .el-button { min-height: 42px; white-space: normal; }
.ma-panel .el-pagination { margin-top: 16px; justify-content: flex-end; }
.ma-paid { color: #22634a; }
.ma-pending, .ma-unpriced, .ma-partial { color: #81531a; }
.ma-amount, .ma-facts dd { font-variant-numeric: tabular-nums; }
.ma-dialog.el-dialog { max-width: calc(100vw - 24px); }
.ma-dialog .el-dialog__body { max-height: 65vh; max-height: 65dvh; overflow-y: auto; }
.ma-facts { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 10px 18px; margin: 0 0 18px; }
.ma-facts dt { color: #52647a; }
.ma-facts dd { margin: 0; overflow-wrap: anywhere; }
.ma-form label { display: block; margin: 16px 0 6px; color: #28394d; font-weight: 600; }
.ma-form label.ma-confirm { display:flex; align-items:center; gap:9px; min-height:44px; margin:4px 0 0; font-weight:400; cursor:pointer; }
.ma-confirm input { width:16px; height:16px; margin:0; }
.ma-presets { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; }
.ma-presets button { min-height:34px; padding:4px 10px; font:inherit; font-size:13px; font-variant-numeric:tabular-nums; color:#385573; background:#fff; border:1px solid #cbd5e1; border-radius:6px; cursor:pointer; }
.ma-presets button[aria-pressed="true"], .ma-presets button:hover:enabled { color:#214f8f; background:#edf3fb; border-color:#88a5cc; }
.ma-presets button:focus-visible { outline:2px solid #537ba8; outline-offset:2px; }
.ma-presets button:disabled { color:#687687; background:#f4f5f7; border-color:#e0e4e8; cursor:default; }
.ma-preview { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:12px 0; margin-top:8px; border-bottom:1px solid #dce3ec; color:#31465c; }
.ma-preview strong { font-size:16px; font-variant-numeric:tabular-nums; }
.ma-form p { margin: 12px 0; color: #4d5c70; line-height: 1.65; }
.ma-panel .ma-error, .ma-dialog .ma-error { color: #a02529; overflow-wrap: anywhere; }
.ma-footer { border-top: 1px solid #dce3ec; justify-content: flex-end; padding-top: 16px; margin-top: 18px; }
.ma-footer .el-button, .ma-operations .el-button { margin: 0; }
.ma-history { border-top: 1px solid #dce3ec; margin-top: 20px; padding-top: 14px; }
.ma-history h3 { font-size: 15px; margin: 0; }
.ma-history ul { list-style: none; padding: 0; margin: 0; }
.ma-history li { margin: 12px 0; line-height: 1.55; overflow-wrap: anywhere; }
.ma-history span { display: block; color: #52647a; font-size: 13px; }
@media(max-width: 760px) {
  .ma-presets button { min-height:44px; }
  .ma-panel { padding: 16px; }
  .ma-toolbar > .el-autocomplete { flex-basis: 100%; }
  .ma-table, .ma-table tbody, .ma-table tr { display: block; width: 100%; }
  .ma-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .ma-table tbody tr { padding: 12px 0; border-top: 1px solid #dce3ec; }
  .ma-table tbody th, .ma-table tbody td { display: flex; justify-content: space-between; gap: 12px; width: auto; padding: 5px 0; border: 0; }
  .ma-table tbody th:first-child { display: block; width: auto; padding-bottom: 10px; }
  .ma-table tbody td[data-label]::before { content: attr(data-label); color: #52647a; }
  .ma-table td:last-child { justify-content: flex-end; }
  .ma-toolbar a, .ma-toolbar .el-button, .ma-footer .el-button, .ma-operations .el-button { display:inline-flex; align-items:center; min-height:44px; }
}
