.commission-payment-page-card {
  padding: 16px;
}

.commission-payment-page-header {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 500px);
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.commission-payment-page-header h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
}

.commission-payment-page-header p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.commission-payment-page-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.commission-payment-page-tools input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  box-sizing: border-box;
}

.commission-payment-tool-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.commission-payment-tool-actions button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 900;
  cursor: pointer;
}

.commission-payment-count-row {
  display: flex;
  justify-content: flex-start;
  margin: 12px 0 14px;
  color: #475569;
  font-size: 13px;
}

.commission-payment-table-wrap {
  overflow-x: auto;
  background: #ffffff;
}

.commission-payment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.commission-payment-table th,
.commission-payment-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 11px 10px;
  vertical-align: top;
  text-align: left;
  line-height: 1.45;
}

.commission-payment-table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
}

.commission-payment-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.commission-payment-actions button {
  border: 0;
  border-radius: 9px;
  padding: 8px 12px;
  font-weight: 900;
  cursor: pointer;
}

.commission-payment-actions .edit {
  background: #86efac;
  color: #065f46;
}

.commission-payment-actions .delete {
  background: #ef4444;
  color: #ffffff;
}

.commission-payment-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.commission-payment-pagination button {
  border: 0;
  border-radius: 9px;
  padding: 8px 12px;
  font-weight: 900;
  cursor: pointer;
  background: #e0f2fe;
  color: #075985;
}

.commission-payment-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.commission-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 28px 14px;
  background: rgba(15, 23, 42, 0.55);
}

.commission-edit-overlay.active {
  display: flex;
}

.commission-edit-box {
  width: min(820px, 100%);
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.commission-edit-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.commission-edit-head h3 {
  margin: 0 0 4px;
  font-size: 22px;
  color: #0f172a;
}

.commission-edit-head p {
  margin: 0;
  color: #64748b;
}

.commission-edit-close {
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.commission-edit-body {
  padding: 18px 20px;
}

.commission-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.commission-edit-grid .full {
  grid-column: 1 / -1;
}

.commission-edit-grid label {
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 5px;
  color: #334155;
}

.commission-edit-grid input,
.commission-edit-grid select,
.commission-edit-grid textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
}

.commission-edit-grid input[readonly] {
  background: #f1f5f9;
  color: #64748b;
  cursor: default;
}

.commission-edit-grid textarea {
  min-height: 86px;
  resize: vertical;
}

.commission-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

.commission-edit-actions button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}

.commission-edit-actions .primary {
  background: #16a34a;
  color: #ffffff;
}

.commission-edit-actions .secondary {
  background: #e5e7eb;
  color: #111827;
}

@media (max-width: 900px) {
  .commission-payment-page-header,
  .commission-edit-grid {
    grid-template-columns: 1fr;
  }
}
