/* ===== Commissions Page ===== */

/* Summary Grid */
.comm-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.comm-summary-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 20px;
}
.comm-summary-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.comm-summary-icon.blue { background: rgba(92, 184, 230, 0.12); color: #5cb8e6; }
.comm-summary-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.comm-summary-icon.green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.comm-summary-icon.amber { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.comm-summary-label {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.comm-summary-value {
  font-size: 24px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 4px;
}
.comm-summary-change {
  font-size: 12px;
  font-weight: 500;
}
.comm-summary-change.positive { color: #10b981; }
.comm-summary-change.neutral { color: #64748b; }
.comm-summary-change.pending { color: #f59e0b; }

/* Section & Panel */
.comm-section {
  margin-bottom: 24px;
}
.comm-panel {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  overflow: hidden;
}
.comm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #1e293b;
}
.comm-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

/* Chart */
.comm-chart-range {
  display: flex;
  gap: 4px;
}
.comm-range-btn {
  background: transparent;
  border: 1px solid #1e293b;
  color: #64748b;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.comm-range-btn.active,
.comm-range-btn:hover {
  background: rgba(92, 184, 230, 0.1);
  border-color: #5cb8e6;
  color: #5cb8e6;
}

.comm-chart-placeholder {
  padding: 24px 20px;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
}
.comm-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  width: 100%;
  height: 180px;
}
.comm-chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 8px;
}
.comm-chart-bar-group span {
  font-size: 11px;
  color: #64748b;
}
.comm-chart-bar {
  width: 100%;
  max-width: 48px;
  background: rgba(92, 184, 230, 0.2);
  border-radius: 4px 4px 0 0;
  transition: background 0.2s;
}
.comm-chart-bar.highlight {
  background: #5cb8e6;
}
.comm-chart-bar-group:hover .comm-chart-bar {
  background: rgba(92, 184, 230, 0.4);
}
.comm-chart-bar-group:hover .comm-chart-bar.highlight {
  background: #7dcbf0;
}

/* Payout Settings */
.comm-payout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
}
.comm-payout-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comm-field-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.comm-select {
  background: #0a0e17;
  border: 1px solid #1e293b;
  color: #e2e8f0;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}
.comm-select:focus {
  border-color: #5cb8e6;
}
.comm-input-group {
  display: flex;
  align-items: center;
  background: #0a0e17;
  border: 1px solid #1e293b;
  border-radius: 6px;
  overflow: hidden;
}
.comm-input-group:focus-within {
  border-color: #5cb8e6;
}
.comm-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e2e8f0;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
}
.comm-input-suffix {
  padding: 0 12px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* Toggle */
.comm-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.comm-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.comm-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.comm-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #1e293b;
  border-radius: 24px;
  transition: background 0.2s;
}
.comm-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #94a3b8;
  border-radius: 50%;
  transition: all 0.2s;
}
.comm-toggle input:checked + .comm-toggle-slider {
  background: #5cb8e6;
}
.comm-toggle input:checked + .comm-toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}
.comm-toggle-label {
  font-size: 13px;
  color: #94a3b8;
}

.comm-payout-actions {
  padding: 0 20px 20px;
}
.comm-payout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #5cb8e6;
  color: #0a0e17;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.comm-payout-btn:hover {
  background: #7dcbf0;
}

/* Export button */
.comm-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #1e293b;
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.comm-export-btn:hover {
  border-color: #5cb8e6;
  color: #5cb8e6;
}

/* Table */
.comm-table-wrap {
  overflow-x: auto;
}
.comm-table {
  width: 100%;
  border-collapse: collapse;
}
.comm-table thead th {
  background: #0d1320;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 1px solid #1e293b;
}
.comm-table tbody td {
  padding: 12px 16px;
  font-size: 13px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}
.comm-table tbody tr:last-child td {
  border-bottom: none;
}
.comm-table tbody tr:hover {
  background: rgba(92, 184, 230, 0.03);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-badge.paid {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* Responsive */
@media (max-width: 1024px) {
  .comm-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .comm-payout-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .comm-summary-grid {
    grid-template-columns: 1fr;
  }
  .comm-table {
    min-width: 700px;
  }
}
