.mbn-operator-catalog-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid #29415b;
  border-radius: 12px;
  background: #081522;
  color: #c6d4e3;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.mbn-operator-catalog-dialog::backdrop { background: rgba(2, 8, 14, .72); }
.mbn-operator-catalog-shell { display: grid; gap: 10px; padding: 14px; }
.mbn-operator-catalog-header { display: flex; align-items: center; gap: 10px; }
.mbn-operator-catalog-header h2 { flex: 1; margin: 0; font-size: 16px; }
.mbn-operator-catalog-status { color: #8bdcc4; font: 11px Consolas, monospace; }
.mbn-operator-catalog-dialog button,
.mbn-operator-catalog-dialog input,
.mbn-operator-catalog-dialog select {
  min-height: 32px;
  border: 1px solid #29415b;
  border-radius: 6px;
  background: #0c1f31;
  color: #c6d4e3;
}
.mbn-operator-catalog-dialog button { padding: 0 10px; cursor: pointer; }
.mbn-operator-catalog-dialog button:disabled { cursor: not-allowed; opacity: .38; }
.mbn-operator-catalog-dialog input,
.mbn-operator-catalog-dialog select { min-width: 0; padding: 0 8px; }
.mbn-operator-catalog-tabs,
.mbn-operator-catalog-toolbar,
.mbn-operator-catalog-actions,
.mbn-operator-catalog-item-form,
.mbn-operator-catalog-stock-search { display: flex; flex-wrap: wrap; gap: 6px; }
.mbn-operator-catalog-tabs button[aria-pressed="true"] { border-color: #32d5a4; color: #68e2bd; }
.mbn-operator-catalog-toolbar [data-role="query"] { flex: 1 1 240px; }
.mbn-operator-catalog-body { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(360px, 1.2fr); gap: 10px; min-height: 360px; }
.mbn-operator-catalog-list,
.mbn-operator-catalog-draft { min-height: 0; max-height: 52vh; margin: 0; padding: 6px; overflow: auto; border: 1px solid #1c334a; border-radius: 8px; list-style: none; }
.mbn-operator-catalog-row button { width: 100%; margin-bottom: 4px; text-align: left; }
.mbn-operator-catalog-row button.selected { border-color: #32d5a4; background: rgba(50, 213, 164, .12); }
.mbn-operator-catalog-editor { display: grid; align-content: start; gap: 10px; }
.mbn-operator-catalog-identity { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; }
.mbn-operator-catalog-identity output { color: #8bdcc4; font: 12px Consolas, monospace; }
.mbn-operator-catalog-stock-search [data-role="stock-query"] { flex: 1 1 260px; }
.mbn-operator-catalog-stock-status { color: #8aa0b5; font: 11px Consolas, monospace; }
.mbn-operator-catalog-stock-results { max-height: 150px; margin: 0; padding: 5px; overflow: auto; border: 1px solid #1c334a; border-radius: 8px; list-style: none; }
.mbn-operator-catalog-stock-row button { width: 100%; margin-bottom: 4px; text-align: left; }
.mbn-operator-catalog-stock-row button.selected { border-color: #32d5a4; background: rgba(50, 213, 164, .12); }
.mbn-operator-catalog-selected-stock { flex: 1 1 260px; align-self: center; color: #8bdcc4; font: 11px Consolas, monospace; }
.mbn-operator-catalog-item-form [data-role="buy-amount"] { width: 130px; }
.mbn-operator-catalog-draft-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 5px; align-items: center; padding: 5px; border-bottom: 1px solid #172b3e; }
.mbn-operator-catalog-draft-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbn-operator-catalog-dialog .mbn-danger { border-color: rgba(255, 102, 128, .45); color: #ff9aad; }
.mbn-operator-catalog-error { margin: 0; padding: 8px; border: 1px solid rgba(255, 102, 128, .35); border-radius: 6px; color: #ff9aad; }

@media (max-width: 720px) {
  .mbn-operator-catalog-body { grid-template-columns: 1fr; }
  .mbn-operator-catalog-list,
  .mbn-operator-catalog-draft { max-height: 30vh; }
}
