/* Expanded panel layout lives in AccountAssigner.css */
.account-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 12px;
  font-weight: 500;
}

.account-status-pill--active {
  background: #dcfce7;
  color: #15803d;
}

.account-status-pill--inactive {
  background: #f3f4f6;
  color: #6b7280;
}
.purchase-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.purchase-badge-list__empty {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 400;
}

.purchase-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.purchase-badge--success {
  background: #dcfce7;
  color: #15803d;
}

.purchase-badge--failure {
  background: #fee2e2;
  color: #b91c1c;
}
.add-account-modal .ant-modal-content {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}

.add-account-modal .ant-modal-header {
  margin: 0;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.add-account-modal .ant-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.add-account-modal .ant-modal-close {
  top: 18px;
  inset-inline-end: 20px;
}

.add-account-modal__body {
  padding: 20px 24px 8px;
}

.add-account-modal__row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.add-account-modal__row--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.add-account-modal__row--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.add-account-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.add-account-modal__label {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.add-account-modal__field .ant-input,
.add-account-modal__field .ant-select {
  width: 100%;
  font-size: 14px;
}

.add-account-modal__tags-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-account-modal__tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.add-account-modal__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.add-account-modal__tag--selected {
  border-color: #60a5fa;
  color: #2563eb;
  background: #eff6ff;
  padding-right: 8px;
}

.add-account-modal__tag-remove {
  font-size: 10px;
  color: #2563eb;
}

.add-account-modal__tag-remove--muted {
  color: #9ca3af;
}

.add-account-modal__tag-remove:hover {
  color: #1d4ed8;
}

.add-account-modal__new-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.add-account-modal__new-tag-input.ant-input {
  width: 120px;
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 6px;
  flex-shrink: 0;
}

.add-account-modal__new-tag-add.ant-btn {
  height: 28px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 6px;
  color: #9ca3af;
  border-color: #d1d5db;
  flex-shrink: 0;
}

.add-account-modal__new-tag-add.ant-btn:not(:disabled) {
  color: #374151;
}

.add-account-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
}

.add-account-modal__footer .ant-btn-primary {
  background: #93c5fd;
  border-color: #93c5fd;
  color: #fff;
  font-weight: 500;
  box-shadow: none;
}

.add-account-modal__footer .ant-btn-primary:not(:disabled):hover {
  background: #60a5fa;
  border-color: #60a5fa;
  color: #fff;
}

.add-account-modal__footer .ant-btn-default {
  color: #374151;
  border-color: #d1d5db;
}

@media (max-width: 640px) {
  .add-account-modal__row--two,
  .add-account-modal__row--three {
    grid-template-columns: 1fr;
  }
}
.ml-purchase-manager {
  min-height: 100%;
  padding: 24px;
  background: #f3f4f6;
}

.ml-purchase-manager__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -24px -24px 20px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.ml-purchase-manager__title {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.ml-purchase-manager__filters,
.ml-purchase-manager__onsale-bar,
.ml-purchase-manager__table-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.ml-purchase-manager__filters {
  padding: 20px;
  margin-bottom: 16px;
}

.ml-purchase-manager__filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 20px;
}

.ml-purchase-manager__field,
.ml-purchase-manager__onsale-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ml-purchase-manager__field-label {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ml-purchase-manager__field .ant-input,
.ml-purchase-manager__field .ant-select,
.ml-purchase-manager__field .ant-picker,
.ml-purchase-manager__onsale-field .ant-select {
  width: 100%;
}

.ml-purchase-manager__field .ant-input,
.ml-purchase-manager__field .ant-input::placeholder,
.ml-purchase-manager__field .ant-select-selection-item,
.ml-purchase-manager__field .ant-select-selection-placeholder,
.ml-purchase-manager__field .ant-picker-input > input,
.ml-purchase-manager__onsale-field .ant-select-selection-item,
.ml-purchase-manager__onsale-field .ant-select-selection-placeholder {
  font-size: 14px;
}

.ml-purchase-manager__field .ant-input::placeholder,
.ml-purchase-manager__field .ant-select-selection-placeholder,
.ml-purchase-manager__onsale-field .ant-select-selection-placeholder {
  color: #9ca3af;
}

.ml-purchase-manager__date-picker {
  width: 100%;
}

.ml-purchase-manager__filters-hint {
  margin: 16px 0 0;
  color: #9ca3af;
  font-size: 13px;
}

.ml-purchase-manager__onsale-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.ml-purchase-manager__onsale-field {
  min-width: 280px;
}

.ml-purchase-manager__export-btn {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
  color: #4338ca !important;
}

.ml-purchase-manager__table-card {
  overflow: hidden;
}

.ml-purchase-manager__table .ant-table {
  background: transparent;
}

.ml-purchase-manager__table .ant-table-thead > tr > th {
  background: #fff;
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ml-purchase-manager__table .ant-table-tbody > tr > td {
  vertical-align: top;
  font-size: 13px;
  font-weight: 400;
  color: #111827;
}

.ml-purchase-manager__cell-text {
  font-weight: 400;
  color: #111827;
}

.ml-purchase-manager__cell-text--muted {
  color: #4b5563;
}

.ml-purchase-manager__table .ant-table-tbody .ant-btn.ml-purchase-manager__edit-btn {
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  background: #fff;
  border-color: #d1d5db;
  box-shadow: none;
}

.ml-purchase-manager__table .ant-table-tbody .ant-btn.ml-purchase-manager__edit-btn:hover {
  color: #111827;
  border-color: #9ca3af;
  background: #fff;
}

.ml-purchase-manager__table .ant-table-row {
  cursor: pointer;
}

.ml-purchase-manager__account-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ml-purchase-manager__expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  color: #9ca3af;
  font-size: 11px;
  transition: color 0.15s ease;
}

.ml-purchase-manager__expand-icon--open {
  color: #2563eb;
}

.ml-purchase-manager__account-name {
  font-weight: 400;
  color: #111827;
}

.ml-purchase-manager__table .ml-purchase-manager__row--expanded > td {
  background: #eff6ff !important;
  border-top: 1px solid #bfdbfe;
  border-bottom: none;
}

.ml-purchase-manager__table .ml-purchase-manager__row--expanded > td:first-child {
  box-shadow: inset 3px 0 0 #2563eb;
}

.ml-purchase-manager__table .ml-purchase-manager__row--expanded .ml-purchase-manager__account-name {
  color: #1d4ed8;
  font-weight: 600;
}

.ml-purchase-manager__table tr.ant-table-expanded-row > td {
  background: #f8fafc !important;
  border-bottom: 1px solid #bfdbfe;
  padding: 0 !important;
}

.account-expanded-panel {
  margin: 0;
  padding: 16px 16px 12px 24px;
  background: #f8fafc;
  border-top: none;
}

.account-expanded-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.account-expanded-panel__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111827;
  font-size: 14px;
}

.account-expanded-panel__identity strong {
  font-size: 16px;
}

.account-expanded-panel__transactions-grid {
  --txn-col-date: 140px;
  --txn-col-status: 170px;
  --txn-col-marketplace: 140px;
  --txn-col-venue: minmax(180px, 1fr);
  --txn-col-comments: minmax(220px, 1.2fr);
  --txn-col-actions: auto;

  display: grid;
  grid-template-columns:
    var(--txn-col-date)
    var(--txn-col-status)
    var(--txn-col-marketplace)
    var(--txn-col-venue)
    var(--txn-col-comments)
    var(--txn-col-actions);
  column-gap: 12px;
  row-gap: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.account-expanded-panel__add-row,
.account-expanded-panel__grid-header-row,
.account-expanded-panel__transaction-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
}

.account-expanded-panel__col-head {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-expanded-panel__cell .ant-picker,
.account-expanded-panel__cell .ant-select,
.account-expanded-panel__cell .ant-input {
  width: 100%;
}

.account-expanded-panel__cell .ant-input,
.account-expanded-panel__cell .ant-input::placeholder,
.account-expanded-panel__cell .ant-select-selection-item,
.account-expanded-panel__cell .ant-select-selection-placeholder,
.account-expanded-panel__cell .ant-picker-input > input {
  font-size: 14px;
  text-transform: none;
}

.account-expanded-panel__cell .ant-input::placeholder,
.account-expanded-panel__cell .ant-select-selection-placeholder {
  color: #9ca3af;
}

.account-expanded-panel__grid-header-row {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.account-expanded-panel__col-head {
  padding: 0 2px;
}

.account-expanded-panel__add-row {
  --txn-control-height: 24px;

  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  align-items: center;
}

.account-expanded-panel__add-row .ant-input,
.account-expanded-panel__add-row .ant-input::placeholder,
.account-expanded-panel__add-row .ant-select-selection-item,
.account-expanded-panel__add-row .ant-select-selection-placeholder,
.account-expanded-panel__add-row .ant-picker-input > input {
  font-size: 12px;
  line-height: calc(var(--txn-control-height) - 2px);
}

.account-expanded-panel__add-row .ant-input,
.account-expanded-panel__add-row .ant-select,
.account-expanded-panel__add-row .ant-picker {
  height: var(--txn-control-height);
  box-sizing: border-box;
}

.account-expanded-panel__add-row .ant-input {
  padding-block: 0;
  padding-inline: 8px;
}

.account-expanded-panel__add-row .ant-select .ant-select-selector {
  height: var(--txn-control-height) !important;
  min-height: var(--txn-control-height) !important;
  padding-block: 0 !important;
  display: flex;
  align-items: center;
}

.account-expanded-panel__add-row .ant-picker {
  min-height: var(--txn-control-height) !important;
  height: var(--txn-control-height) !important;
  padding-inline: 8px;
}

.account-expanded-panel__add-row .ant-picker .ant-picker-input {
  height: 100%;
  display: flex;
  align-items: center;
}

.account-expanded-panel__add-row .ant-picker .ant-picker-input > input {
  height: auto;
  padding: 0;
}

.account-expanded-panel__add-row .ant-btn {
  height: var(--txn-control-height);
  padding-inline: 10px;
  font-size: 12px;
  line-height: 1;
}

.account-expanded-panel__transaction-row {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  color: #111827;
}

.account-expanded-panel__transaction-row:last-child {
  border-bottom: none;
}

.account-expanded-panel__transaction-row--success {
  background: #f0fdf4;
}

.account-expanded-panel__transaction-row--failure {
  background: #fff;
}

.account-expanded-panel__cell {
  min-width: 0;
  padding: 0 2px;
}

.account-expanded-panel__outcome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.account-expanded-panel__outcome--success {
  background: #dcfce7;
  color: #166534;
}

.account-expanded-panel__outcome--failure {
  background: #fee2e2;
  color: #991b1b;
}

.account-expanded-panel__actions {
  white-space: nowrap;
}

.account-expanded-panel__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  color: #9ca3af;
  font-size: 13px;
  border-bottom: none;
}

@media (max-width: 1200px) {
  .ml-purchase-manager__filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-expanded-panel__transactions-grid {
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .ml-purchase-manager {
    padding: 16px;
  }

  .ml-purchase-manager__header {
    margin: -16px -16px 16px;
    padding: 12px 16px;
  }

  .ml-purchase-manager__filters-grid {
    grid-template-columns: 1fr;
  }

  .ml-purchase-manager__onsale-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

#root {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background: #f3f4f6;
  overflow-x: hidden;
}
