/* Tab Navigation */
.payment-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(16, 16, 20, 0.08);
  padding-bottom: 0;
}

.payment-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: rgba(16, 16, 20, 0.5);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}

.payment-tab:hover {
  color: rgba(16, 16, 20, 0.7);
}

.payment-tab.active {
  color: var(--sea);
  border-bottom-color: var(--sea);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Summary Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(16, 16, 20, 0.08);
}

.stat-card .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(16, 16, 20, 0.5);
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--sea);
}

.stat-card .stat-sub {
  font-size: 12px;
  color: rgba(16, 16, 20, 0.5);
  margin-top: 4px;
}

.stat-card.highlight {
  background: rgba(59, 126, 140, 0.08);
  border-color: rgba(59, 126, 140, 0.15);
}

.stat-card.warning .stat-value {
  color: #c87830;
}

.stat-card.success .stat-value {
  color: #4a8a4a;
}

/* Filters */
.filters-section {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(16, 16, 20, 0.08);
  margin-bottom: 16px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(16, 16, 20, 0.6);
}

.filter-field input,
.filter-field select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(16, 16, 20, 0.15);
  font-size: 13px;
  background: white;
  min-width: 140px;
}

.filter-field input[type="text"] {
  min-width: 160px;
}

.filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.filter-btn.primary {
  background: var(--sea);
  color: white;
}

.filter-btn.primary:hover {
  background: #3a7a8a;
}

.filter-btn.secondary {
  background: rgba(16, 16, 20, 0.06);
  color: rgba(16, 16, 20, 0.7);
  border-color: rgba(16, 16, 20, 0.1);
}

.filter-btn.secondary:hover {
  background: rgba(16, 16, 20, 0.1);
}

/* Action Bar */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.table-info {
  font-size: 13px;
  color: rgba(16, 16, 20, 0.5);
}

.action-buttons {
  display: flex;
  gap: 10px;
}

/* Table */
.payment-table-wrapper {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  border: 1px solid rgba(16, 16, 20, 0.08);
  overflow: hidden;
}

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

.payment-table th,
.payment-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(16, 16, 20, 0.06);
}

.payment-table th {
  background: rgba(16, 16, 20, 0.02);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(16, 16, 20, 0.5);
  font-weight: 600;
}

.payment-table tbody tr {
  cursor: pointer;
  transition: background 0.1s ease;
}

.payment-table tbody tr:hover {
  background: rgba(59, 126, 140, 0.04);
}

.payment-table tbody tr:last-child td {
  border-bottom: none;
}

/* Cell Styles */
.client-cell {
  font-weight: 500;
}

.client-cell a {
  color: inherit;
}

.amount-cell {
  font-weight: 600;
  font-family: monospace;
  font-size: 13px;
}

.type-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.type-badge.deposit {
  background: rgba(100, 100, 180, 0.12);
  color: #4a4a8a;
}

.type-badge.session {
  background: rgba(59, 126, 140, 0.12);
  color: #2a6a7a;
}

.type-badge.copay {
  background: rgba(140, 100, 60, 0.12);
  color: #6a5030;
}

.type-badge.refund {
  background: rgba(200, 80, 80, 0.12);
  color: #8a3030;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.paid {
  background: rgba(80, 160, 80, 0.12);
  color: #3a7a3a;
}

.status-badge.paid .dot {
  background: #4a8a4a;
}

.status-badge.pending {
  background: rgba(200, 160, 60, 0.12);
  color: #8a6a20;
}

.status-badge.pending .dot {
  background: #c8a03c;
}

.status-badge.held {
  background: rgba(100, 100, 180, 0.12);
  color: #4a4a8a;
}

.status-badge.held .dot {
  background: #6a6aaa;
}

.status-badge.submitted {
  background: rgba(73, 127, 163, 0.12);
  color: #2a5d7a;
}

.status-badge.submitted .dot {
  background: #497fa3;
}

.status-badge.approved {
  background: rgba(59, 126, 140, 0.12);
  color: #2a6a7a;
}

.status-badge.approved .dot {
  background: #3b7e8c;
}

.status-badge.denied {
  background: rgba(200, 80, 80, 0.12);
  color: #8a3030;
}

.status-badge.denied .dot {
  background: #c85050;
}

.status-badge.refunded {
  background: rgba(16, 16, 20, 0.08);
  color: rgba(16, 16, 20, 0.6);
}

.status-badge.refunded .dot {
  background: rgba(16, 16, 20, 0.4);
}

.method-cell {
  color: rgba(16, 16, 20, 0.6);
  font-size: 13px;
}

.provider-cell {
  font-weight: 500;
}

.sessions-cell {
  color: rgba(16, 16, 20, 0.6);
}

/* Action Icons */
.row-actions {
  display: flex;
  gap: 6px;
}

.action-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(16, 16, 20, 0.12);
  background: white;
  font-size: 11px;
  font-weight: 600;
  color: rgba(16, 16, 20, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-icon:hover {
  border-color: rgba(59, 126, 140, 0.4);
  color: var(--sea);
}

/* Pagination */
.pagination-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(16, 16, 20, 0.02);
  border-top: 1px solid rgba(16, 16, 20, 0.06);
}

.pagination-info {
  font-size: 12px;
  color: rgba(16, 16, 20, 0.5);
}

.pagination-buttons {
  display: flex;
  gap: 6px;
}

.pagination-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(16, 16, 20, 0.12);
  background: white;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
  border-color: rgba(59, 126, 140, 0.4);
  color: var(--sea);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Payment Dialog Styles */
.payment-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(90vw, 480px);
  box-shadow: 0 24px 48px rgba(15, 24, 40, 0.2);
}

.payment-dialog::backdrop {
  background: rgba(20, 24, 30, 0.45);
}

.payment-dialog .dialog-content {
  padding: 24px;
}

.payment-dialog .dialog-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  color: rgba(16, 16, 20, 0.9);
}

.payment-dialog .dialog-description {
  font-size: 14px;
  color: rgba(16, 16, 20, 0.6);
  margin: -8px 0 16px;
}

.payment-dialog .dialog-form {
  display: grid;
  gap: 16px;
}

.payment-dialog .dialog-field {
  display: grid;
  gap: 6px;
}

.payment-dialog .dialog-field label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(16, 16, 20, 0.7);
}

.payment-dialog .dialog-field input,
.payment-dialog .dialog-field select,
.payment-dialog .dialog-field textarea {
  border-radius: 8px;
  border: 1px solid rgba(16, 16, 20, 0.15);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: white;
}

.payment-dialog .dialog-field input:focus,
.payment-dialog .dialog-field select:focus,
.payment-dialog .dialog-field textarea:focus {
  outline: none;
  border-color: rgba(59, 126, 140, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 126, 140, 0.1);
}

.payment-dialog .dialog-field textarea {
  min-height: 80px;
  resize: vertical;
}

.payment-dialog .readonly-input {
  background: rgba(16, 16, 20, 0.04);
  color: rgba(16, 16, 20, 0.6);
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sea);
}

/* Session Checklist */
.session-checklist,
.claim-checklist {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
}

.session-checklist .checkbox-label,
.claim-checklist .checkbox-label {
  padding: 10px 12px;
  background: rgba(16, 16, 20, 0.02);
  border: 1px solid rgba(16, 16, 20, 0.08);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.session-checklist .checkbox-label:hover,
.claim-checklist .checkbox-label:hover {
  background: rgba(59, 126, 140, 0.04);
  border-color: rgba(59, 126, 140, 0.2);
}

.session-checklist .checkbox-label span {
  font-size: 13px;
  color: rgba(16, 16, 20, 0.8);
}

/* Claim Item in Checklist */
.claim-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.claim-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.claim-client {
  font-size: 14px;
  font-weight: 500;
  color: rgba(16, 16, 20, 0.85);
}

.claim-detail {
  font-size: 12px;
  color: rgba(16, 16, 20, 0.5);
}

/* Dialog Summary */
.dialog-summary {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(59, 126, 140, 0.06);
  border-radius: 10px;
  margin-top: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.summary-row span:first-child {
  color: rgba(16, 16, 20, 0.6);
}

.summary-row span:last-child {
  font-weight: 600;
  color: rgba(16, 16, 20, 0.9);
}

/* File Upload Area */
.file-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  border: 2px dashed rgba(16, 16, 20, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.file-upload-area:hover {
  border-color: rgba(59, 126, 140, 0.4);
  background: rgba(59, 126, 140, 0.02);
}

.file-upload-icon {
  font-size: 24px;
}

.file-upload-text {
  font-size: 13px;
  color: rgba(16, 16, 20, 0.5);
}

/* Dialog Actions */
.payment-dialog .dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.payment-dialog .dialog-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.payment-dialog .dialog-btn.primary {
  background: var(--sea);
  color: white;
}

.payment-dialog .dialog-btn.primary:hover {
  background: #2a6a7a;
}

.payment-dialog .dialog-btn.secondary {
  background: rgba(16, 16, 20, 0.08);
  color: rgba(16, 16, 20, 0.7);
}

.payment-dialog .dialog-btn.secondary:hover {
  background: rgba(16, 16, 20, 0.12);
}

.payment-dialog .dialog-btn.danger {
  background: rgba(200, 80, 80, 0.1);
  color: #a03030;
}

.payment-dialog .dialog-btn.danger:hover {
  background: rgba(200, 80, 80, 0.15);
}
