/* Rhapsody Affiliate System Styles */

.rhapsody-affiliate-widget {
  color: #333;
  background: #fff;
}

/* Loading States */
.rhapsody-loading {
  text-align: center;
  padding: 40px 20px;
}

.rhapsody-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007cba;
  border-radius: 50%;
  -webkit-animation: rhapsody-spin 1s linear infinite;
  animation: rhapsody-spin 1s linear infinite;
  margin: 0 auto 20px;
}

@-webkit-keyframes rhapsody-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes rhapsody-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error States */
.rhapsody-error {
  text-align: center;
  padding: 40px 20px;
  color: #dc3545;
}

.rhapsody-error-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

/* Pending Withdrawal */
.rhapsody-pending-withdrawal {
  text-align: center;
  padding: 30px 20px;
  background: #e3f2fd;
  border: 1px solid #2196f3;
  border-radius: 8px;
  margin: 20px 0;
}

.rhapsody-info-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.rhapsody-pending-withdrawal h4 {
  color: #1976d2;
  margin: 0 0 15px 0;
  font-size: 18px;
}

.rhapsody-pending-withdrawal p {
  color: #424242;
  margin: 0 0 20px 0;
  font-size: 14px;
}

.rhapsody-pending-details {
  background: #fff;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.rhapsody-pending-details p {
  margin: 8px 0;
  font-size: 13px;
}

.rhapsody-pending-details strong {
  color: #1976d2;
}

/* Commissions Pagination */
.rhapsody-commissions-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.rhapsody-pagination-btn {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

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

.rhapsody-pagination-info {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

.rhapsody-commissions-loading {
  text-align: center;
  padding: 30px 20px;
}

.rhapsody-no-commissions {
  text-align: center;
  padding: 30px 20px;
  color: #6c757d;
  font-style: italic;
}

/* Login Required */
.rhapsody-login-required {
  padding: 40px 20px;
  margin: 0 auto;
}

.rhapsody-login-required h3 {
  text-align: center;
  font-size: 24px;
  color: #1a1a1a;
  margin-bottom: 10px;
  font-weight: 600;
}

.rhapsody-login-required > p {
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 30px;
}

.rhapsody-login-icon {
  font-size: 48px;
  margin-bottom: 20px;
  text-align: center;
}

/* Login Form */
.rhapsody-login-form {
  margin-top: 30px;
}

.rhapsody-login-form .rhapsody-form-group {
  margin-bottom: 24px;
}

.rhapsody-login-form .rhapsody-form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #1a1a1a;
  font-size: 16px;
}

.rhapsody-login-form .rhapsody-form-group input[type='text'],
.rhapsody-login-form .rhapsody-form-group input[type='password'] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  background-color: #f9fafb;
  transition: all 0.2s;
  box-sizing: border-box;
}

.rhapsody-login-form
  .rhapsody-form-group
  input[type='text']::-webkit-input-placeholder,
.rhapsody-login-form
  .rhapsody-form-group
  input[type='password']::-webkit-input-placeholder {
  color: #9ca3af;
}

.rhapsody-login-form .rhapsody-form-group input[type='text']::-moz-placeholder,
.rhapsody-login-form
  .rhapsody-form-group
  input[type='password']::-moz-placeholder {
  color: #9ca3af;
}

.rhapsody-login-form
  .rhapsody-form-group
  input[type='text']:-ms-input-placeholder,
.rhapsody-login-form
  .rhapsody-form-group
  input[type='password']:-ms-input-placeholder {
  color: #9ca3af;
}

.rhapsody-login-form
  .rhapsody-form-group
  input[type='text']::-ms-input-placeholder,
.rhapsody-login-form
  .rhapsody-form-group
  input[type='password']::-ms-input-placeholder {
  color: #9ca3af;
}

.rhapsody-login-form .rhapsody-form-group input[type='text']::-webkit-input-placeholder, .rhapsody-login-form .rhapsody-form-group input[type='password']::-webkit-input-placeholder {
  color: #9ca3af;
}

.rhapsody-login-form .rhapsody-form-group input[type='text']::-moz-placeholder, .rhapsody-login-form .rhapsody-form-group input[type='password']::-moz-placeholder {
  color: #9ca3af;
}

.rhapsody-login-form .rhapsody-form-group input[type='text']:-ms-input-placeholder, .rhapsody-login-form .rhapsody-form-group input[type='password']:-ms-input-placeholder {
  color: #9ca3af;
}

.rhapsody-login-form .rhapsody-form-group input[type='text']::-ms-input-placeholder, .rhapsody-login-form .rhapsody-form-group input[type='password']::-ms-input-placeholder {
  color: #9ca3af;
}

.rhapsody-login-form .rhapsody-form-group input[type='text']::placeholder,
.rhapsody-login-form .rhapsody-form-group input[type='password']::placeholder {
  color: #9ca3af;
}

.rhapsody-login-form .rhapsody-form-group input[type='text']:focus,
.rhapsody-login-form .rhapsody-form-group input[type='password']:focus {
  outline: none;
  border-color: #5b5fed;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(91, 95, 237, 0.1);
}

.rhapsody-login-form .rhapsody-remember-group {
  margin-bottom: 24px;
}

.rhapsody-login-form .rhapsody-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.rhapsody-login-form .rhapsody-checkbox-label input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: #5b5fed;
}

.rhapsody-login-form .rhapsody-checkbox-text {
  color: #4b5563;
  font-size: 14px;
}

.rhapsody-login-button {
  width: 100%;
  background: #5b5fed;
  color: #ffffff;
  padding: 14px 24px;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  box-sizing: border-box;
}

.rhapsody-login-button:hover {
  background: #4a4ed9;
  color: #ffffff;
}

.rhapsody-login-button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Application Form */
.rhapsody-application-form .rhapsody-form-header {
  text-align: center;
  margin-bottom: 30px;
}

.rhapsody-application-form .rhapsody-form-header h3 {
  margin: 0 0 10px;
  color: #333;
}

.rhapsody-application-form .rhapsody-form-header p {
  margin: 0;
  color: #666;
}

.rhapsody-form-group {
  margin-bottom: 20px;
}

.rhapsody-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.rhapsody-form-group input,
.rhapsody-form-group textarea,
.rhapsody-form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.rhapsody-form-group input:focus,
.rhapsody-form-group textarea:focus,
.rhapsody-form-group select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.rhapsody-form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
}

.rhapsody-checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
}

.rhapsody-checkbox-label input[type='checkbox'] {
  width: auto;
  margin-right: 10px;
  margin-top: 2px;
}

.rhapsody-checkbox-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

.rhapsody-form-actions {
  text-align: center;
  margin-top: 30px;
}

.rhapsody-apply-button,
.rhapsody-submit-button {
  background: linear-gradient(84deg, #0217d4 0%, #0a28ff 101.33%), #0217d4 !important;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  border-radius: 12px;
}

.rhapsody-form-messages {
  margin-top: 20px;
}

.rhapsody-success {
  background: #ecfdf5;
  color: #047857;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #d1fae5;
  font-size: 14px;
  font-weight: 500;
}

.rhapsody-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  font-size: 14px;
  font-weight: 500;
}

/* Affiliate Status */
.rhapsody-affiliate-status {
  text-align: center;
}

.rhapsody-status-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.rhapsody-status-info {
  text-align: left;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 4px;
  margin: 20px 0;
}

.rhapsody-status-info p {
  margin: 10px 0;
}

.rhapsody-status-info code {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
}

.rhapsody-affiliate-actions {
  margin-top: 20px;
}

.rhapsody-dashboard-button {
  display: inline-block;
  background: #28a745;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}

.rhapsody-dashboard-button:hover {
  background: #218838;
  color: #fff;
}

/* Modern Affiliate Status Design */

.rhapsody-top-icon {
  width: 80px;
  height: 80px;
  background: #22c55e;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
}

.rhapsody-top-icon .lucide-icon {
  width: 48px;
  height: 48px;
  color: #ffffff;
  stroke-width: 3;
}

.rhapsody-affiliate-title {
  text-align: center;
  margin-bottom: 40px;
}

.rhapsody-affiliate-title h3 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  letter-spacing: -0.5px;
}

/* Status and Code Cards Row */
.rhapsody-status-code-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.rhapsody-status-card,
.rhapsody-code-card {
  background: #ffffff;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.rhapsody-status-label,
.rhapsody-code-label {
  font-size: 14px;
  font-weight: 500;
  color: #666666;
  text-transform: none;
}

.rhapsody-status-value-container,
.rhapsody-code-value-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rhapsody-status-value {
  font-size: 24px;
  font-weight: 700;
  color: #0046d5;
}

.rhapsody-status-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rhapsody-status-icon-badge .lucide-icon {
  width: 44px;
  height: 44px;
  color: #22c55e;
  stroke-width: 1;
}

.rhapsody-code-value {
  font-size: 24px;
  font-weight: 700;
  color: #0046d5;
  letter-spacing: 1px;
}

.rhapsody-copy-code-btn {
  background: #ffffff;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.rhapsody-copy-code-btn:hover {
  background: #f8f8f8;
  border-color: #d0d0d0;
}

.rhapsody-copy-code-btn:active {
  transform: scale(0.98);
}

/* Rejection Notice */
.rhapsody-rejection-notice {
  background: #fef3c7;
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 40px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.rhapsody-rejection-notice .lucide-icon {
  width: 24px;
  height: 24px;
  color: #f59e0b;
  flex-shrink: 0;
}

.rhapsody-rejection-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #92400e;
}

.rhapsody-rejection-notice p {
  margin: 0;
  color: #78350f;
}

/* Modern Stats Grid */
.rhapsody-stats-grid-modern {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
  padding: 24px;
  background: #f5f9ff;
  border-radius: 12px;
}

.rhapsody-stat-card {
  background: #f8f9ff;
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.rhapsody-stat-blue,
.rhapsody-stat-orange,
.rhapsody-stat-purple {
  background: linear-gradient(0deg, #fff 0%, #fff 100%), var(--blue-50, #eff6ff);
  box-shadow: 0 12px 24px -12px rgba(0, 14, 135, 0.1);
}

.rhapsody-stat-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rhapsody-stat-amount {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: #1a1a1a;
}

.rhapsody-stat-blue .rhapsody-stat-amount {
  color: #2563eb;
}

.rhapsody-stat-orange .rhapsody-stat-amount {
  color: #ea580c;
}

.rhapsody-stat-purple .rhapsody-stat-amount {
  color: #9333ea;
}

.rhapsody-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rhapsody-stat-icon-container {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rhapsody-stat-blue .rhapsody-stat-icon-container {
  background: rgba(37, 99, 235, 0.1);
}

.rhapsody-stat-orange .rhapsody-stat-icon-container {
  background: rgba(234, 88, 12, 0.1);
}

.rhapsody-stat-purple .rhapsody-stat-icon-container {
  background: rgba(147, 51, 234, 0.1);
}

.rhapsody-stat-icon-container .lucide-icon {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.rhapsody-stat-blue .rhapsody-stat-icon-container .lucide-icon {
  color: #2563eb;
}

.rhapsody-stat-orange .rhapsody-stat-icon-container .lucide-icon {
  color: #ea580c;
}

.rhapsody-stat-purple .rhapsody-stat-icon-container .lucide-icon {
  color: #9333ea;
}

/* Dashboard Action */
.rhapsody-dashboard-action {
  text-align: center;
}

.rhapsody-dashboard-button-modern {
  display: inline-block;
  background: linear-gradient(278deg, #0a28ff -2.34%, #0217d4 100%);
  color: #ffffff;
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 70, 213, 0.2);
}

.rhapsody-dashboard-button-modern:hover {
  background: linear-gradient(278deg, #051dc8 -2.34%, #010e9b 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 70, 213, 0.3);
}

.rhapsody-dashboard-button-modern:active {
  transform: translateY(0);
}

/* Lucide Icons */
.lucide-icon {
  display: inline-block;
  vertical-align: middle;
}

/* Dashboard */
.rhapsody-dashboard .rhapsody-dashboard-header {
  text-align: center;
  margin-bottom: 30px;
}

.rhapsody-dashboard .rhapsody-dashboard-header h3 {
  margin: 0 0 10px;
  color: #333;
}

.rhapsody-dashboard .rhapsody-dashboard-header p {
  margin: 0;
  color: #666;
}

/* Stats Grid */
.rhapsody-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.rhapsody-stat-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #dee2e6;
  transition: transform 0.2s;
}

.rhapsody-stat-item:hover {
  transform: translateY(-2px);
}

.rhapsody-stat-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.rhapsody-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.rhapsody-stat-label {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Affiliate Link */
.rhapsody-affiliate-link-section {
  margin-bottom: 30px;
}

.rhapsody-affiliate-link-section h4 {
  margin: 0 0 15px;
  color: #333;
}

.rhapsody-link-container {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.rhapsody-affiliate-link {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f8f9fa;
  font-family: monospace;
  font-size: 14px;
}

.rhapsody-copy-button {
  background: #6c757d;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.rhapsody-copy-button:hover {
  background: #5a6268;
}

.rhapsody-link-help {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* Commissions */
.rhapsody-commissions-section {
  margin-bottom: 30px;
}

.rhapsody-commissions-section h4 {
  margin: 0 0 15px;
  color: #333;
}

.rhapsody-commissions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rhapsody-commission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
}

.rhapsody-commission-amount {
  font-size: 18px;
  font-weight: 700;
  color: #28a745;
}

.rhapsody-commission-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rhapsody-commission-order {
  font-weight: 600;
  color: #333;
}

.rhapsody-commission-date {
  font-size: 14px;
  color: #666;
}

.rhapsody-status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.rhapsody-status-pending {
  background: #FF6900;
  color: white;
}

.rhapsody-status-approved {
  background: #22c55e;
  color: white;
}

.rhapsody-status-paid {
  background: #007cba;
  color: white;
}

.rhapsody-status-cancelled {
  background: #ef4444;
  color: white;
}

/* Dashboard Actions */
.rhapsody-dashboard-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.rhapsody-action-button {
  display: inline-block;
  background: #007cba;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}

.rhapsody-action-button:hover {
  background: #005a87;
  color: #fff;
}

/* Withdrawal Form */
.rhapsody-withdrawal-widget .rhapsody-withdrawal-header {
  text-align: center;
  margin-bottom: 30px;
}

.rhapsody-withdrawal-widget .rhapsody-withdrawal-header h3 {
  margin: 0 0 15px;
  color: #333;
}

.rhapsody-balance-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.rhapsody-balance-info p {
  margin: 5px 0;
  font-weight: 600;
}

.rhapsody-insufficient-balance {
  text-align: center;
  padding: 30px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  color: #856404;
}

.rhapsody-warning-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.rhapsody-amount-input {
  position: relative;
  display: flex;
  align-items: center;
}

.rhapsody-currency {
  position: absolute;
  left: 10px;
  font-weight: 600;
  color: #666;
  z-index: 1;
}

.rhapsody-amount-input input {
  padding-left: 25px;
}

/* Withdrawal History */
.rhapsody-withdrawal-history {
  margin-top: 30px;
}

.rhapsody-withdrawal-history h4 {
  margin: 0 0 15px;
  color: #333;
}

.rhapsody-history-list {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  overflow: hidden;
}

.rhapsody-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #dee2e6;
  background: #fff;
}

.rhapsody-history-item:last-child {
  border-bottom: none;
}

.rhapsody-history-item:hover {
  background: #f8f9fa;
}

.rhapsody-history-amount {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.rhapsody-history-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rhapsody-history-method {
  font-weight: 600;
  color: #333;
}

.rhapsody-history-date {
  font-size: 14px;
  color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
  .rhapsody-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }

  .rhapsody-link-container {
    flex-direction: column;
  }

  .rhapsody-dashboard-actions {
    flex-direction: column;
    align-items: center;
  }

  .rhapsody-commission-item,
  .rhapsody-history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .rhapsody-commission-info,
  .rhapsody-history-info {
    width: 100%;
  }

  /* Modern Status Responsive */
  .rhapsody-affiliate-status-modern {
    padding: 24px;
  }

  .rhapsody-top-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
  }

  .rhapsody-top-icon .lucide-icon {
    width: 36px;
    height: 36px;
  }

  .rhapsody-affiliate-title h3 {
    font-size: 24px;
  }

  .rhapsody-status-code-row {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .rhapsody-stats-grid-modern {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .rhapsody-stat-card {
    padding: 20px;
  }

  .rhapsody-stat-amount {
    font-size: 28px;
  }

  .rhapsody-stat-icon-container {
    width: 48px;
    height: 48px;
  }

  .rhapsody-stat-icon-container .lucide-icon {
    width: 24px;
    height: 24px;
  }

  .rhapsody-status-value,
  .rhapsody-code-value {
    font-size: 20px;
  }

  .rhapsody-status-icon-badge {
    width: 40px;
    height: 40px;
  }

  .rhapsody-status-icon-badge .lucide-icon {
    width: 20px;
    height: 20px;
  }

  .rhapsody-copy-code-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .rhapsody-dashboard-button-modern {
    padding: 14px 36px;
    font-size: 15px;
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .rhapsody-affiliate-status-modern {
    padding: 20px;
    border-radius: 12px;
  }

  .rhapsody-top-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
  }

  .rhapsody-top-icon .lucide-icon {
    width: 32px;
    height: 32px;
  }

  .rhapsody-affiliate-title h3 {
    font-size: 20px;
  }

  .rhapsody-status-card,
  .rhapsody-code-card {
    padding: 20px;
  }

  .rhapsody-code-value-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .rhapsody-copy-code-btn {
    width: 100%;
  }
}

/* ==================== MERGED DASHBOARD STYLES ==================== */

/* Dashboard Container */
.rhapsody-dashboard-merged {
  background: #ffffff;
  border-radius: 12px;
  padding: 0;
  margin: 20px 0;
}

/* Header */
.rhapsody-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-items: flex-start;
  padding: 24px 32px;
  border-bottom: 1px solid #99adff;
  margin-bottom: 32px;
}

.rhapsody-header-content {
  flex: 1;
}

.rhapsody-dashboard-badge {
  display: inline-block;
  padding: 4px 12px;
  background: white;
  border: 1px solid #00e0ff;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.rhapsody-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: right;
}

.rhapsody-user-details h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px 0;
}

.rhapsody-user-details p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.rhapsody-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.rhapsody-user-avatar img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
}

/* Tab Navigation */
.rhapsody-tab-navigation {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: white;
  border: 1px solid #ccd6ff;
  border-radius: 12px;
}

.rhapsody-tab-button {
  padding: 12px 24px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px;
}

.rhapsody-tab-button:hover {
  color: #0046d5;
  background: #dde8ff;
}

.rhapsody-tab-button.active {
  color: #0046d5;
  background: #dde8ff;
}

/* Tab Content */
.rhapsody-tab-content {
  padding: 32px 0;
}

.rhapsody-tab-pane {
  display: none;
}

.rhapsody-tab-pane.active {
  display: block;
}

/* Affiliate Link Section */
.rhapsody-affiliate-link-section {
  margin-bottom: 32px;
}

.rhapsody-affiliate-link-section h4,
.rhapsody-analytics-section h4,
.rhapsody-history-section h4,
.rhapsody-withdrawal-section h4 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 16px 0;
}

.rhapsody-link-selector {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
}

.rhapsody-link-controls {
  margin-bottom: 16px;
}

.rhapsody-product-dropdown {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  color: #1a1a1a;
}

.rhapsody-current-link {
  display: flex;
  gap: 12px;
  align-items: center;
}

.rhapsody-link-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  font-family: monospace;
}

.rhapsody-link-buttons {
  display: flex;
  gap: 8px;
}

.rhapsody-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.rhapsody-btn-primary {
  background: #0046d5;
  color: #ffffff;
}

.rhapsody-btn-primary:hover {
  background: #003bb3;
}

.rhapsody-btn-secondary {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid #d1d5db;
}

.rhapsody-btn-secondary:hover {
  background: #f9fafb;
}

.rhapsody-btn-icon {
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s;
}

.rhapsody-btn-icon:hover {
  color: #0046d5;
}

.rhapsody-create-link-form {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.rhapsody-edit-link-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.rhapsody-edit-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rhapsody-edit-form-row label {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}

.rhapsody-edit-form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rhapsody-new-code-input,
.rhapsody-create-code-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.rhapsody-code-status,
.rhapsody-create-status {
  font-size: 13px;
  font-weight: 500;
}

/* All Links */
.rhapsody-all-links {
  margin-top: 24px;
}

.rhapsody-all-links h5 {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rhapsody-link-card {
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 12px;
}

.rhapsody-link-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rhapsody-link-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.rhapsody-link-header strong {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.rhapsody-link-stats {
  font-size: 12px;
  color: #9ca3af;
}

.rhapsody-link-url-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rhapsody-link-url-section .rhapsody-link-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #4b5563;
  background: #f9fafb;
}

.rhapsody-link-actions {
  display: flex;
  gap: 8px;
}

.rhapsody-link-actions .rhapsody-btn {
  flex: 1;
}

/* Analytics Section */
.rhapsody-analytics-section {
  margin-bottom: 32px;
}

.rhapsody-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-radius: 12px;
  background: #f5f9ff;
  padding: 32px;
}

.rhapsody-analytics-card {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px;
  background: linear-gradient(0deg, #fff 0%, #fff 100%),
    var(--green-50, #f0fdf4);
  box-shadow: 0 12px 24px -12px rgba(0, 14, 135, 0.1);
}

.rhapsody-card-content {
  flex: 1;
}

.rhapsody-card-value {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -0.64px;
}

.rhapsody-card-label {
  font-size: 20px;
  font-style: normal;
  font-weight: var(--font-weight-font-normal, 400);
  line-height: 130%;
  letter-spacing: -0.4px;
  text-transform: uppercase;
}

.rhapsody-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rhapsody-card-icon .lucide-icon {
  width: 24px;
  height: 24px;
}

/* Card Colors */

.rhapsody-card-green .rhapsody-card-value {
  color: #22c55e;
}

.rhapsody-card-green .rhapsody-card-icon {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.rhapsody-card-blue .rhapsody-card-value {
  color: #0046d5;
}

.rhapsody-card-blue .rhapsody-card-icon {
  background: rgba(0, 70, 213, 0.1);
  color: #0046d5;
}

.rhapsody-card-orange .rhapsody-card-value {
  color: #ea580c;
}

.rhapsody-card-orange .rhapsody-card-icon {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
}

.rhapsody-card-cyan .rhapsody-card-value {
  color: #06b6d4;
}

.rhapsody-card-cyan .rhapsody-card-icon {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}

.rhapsody-card-red .rhapsody-card-value {
  color: #ef4444;
}

.rhapsody-card-red .rhapsody-card-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.rhapsody-card-purple .rhapsody-card-value {
  color: #9333ea;
}

.rhapsody-card-purple .rhapsody-card-icon {
  background: rgba(147, 51, 234, 0.1);
  color: #9333ea;
}

/* History Section */
.rhapsody-history-section {
  margin-bottom: 32px;
}

.rhapsody-commission-item,
.rhapsody-withdrawal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: #ffffff;
  border-radius: 16px;
}

/* Commission item background colors based on status */
.rhapsody-commission-item.rhapsody-commission-paid {
  background: #F0FDF4;
}

.rhapsody-commission-item.rhapsody-commission-pending {
  background: #FFF7ED;
}

.rhapsody-commission-item.rhapsody-commission-approved {
  background: #F0FDF4;
}

.rhapsody-commission-item.rhapsody-commission-cancelled,
.rhapsody-commission-item.rhapsody-commission-rejected {
  background: #FEE2E2;
}

/* Withdrawal list layout */
.rhapsody-withdrawal-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Withdrawal item background colors based on status */
.rhapsody-withdrawal-item.rhapsody-withdrawal-paid {
  background: #F0FDF4;
}

.rhapsody-withdrawal-item.rhapsody-withdrawal-pending {
  background: #FFF7ED;
}

.rhapsody-withdrawal-item.rhapsody-withdrawal-approved {
  background: #F0FDF4;
}

.rhapsody-withdrawal-item.rhapsody-withdrawal-cancelled,
.rhapsody-withdrawal-item.rhapsody-withdrawal-rejected {
  background: #FEE2E2;
}

.rhapsody-commission-info,
.rhapsody-withdrawal-info {
  flex: 1;
}

.rhapsody-commission-amount,
.rhapsody-withdrawal-amount {
  font-size: 24px;
  font-weight: 600;
  line-height: 130%;
  letter-spacing: -0.64px;
  margin-bottom: 4px;
}

.rhapsody-commission-amount.rhapsody-amount-paid {
  color: #22c55e;
}

.rhapsody-commission-amount.rhapsody-amount-pending {
  color: #ea580c;
}

.rhapsody-commission-details,
.rhapsody-withdrawal-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rhapsody-commission-product,
.rhapsody-withdrawal-method {
  font-size: 14px;
  color: #6b7280;
}

.rhapsody-commission-details .rhapsody-commission-date,
.rhapsody-withdrawal-details .rhapsody-withdrawal-date {
  font-size: 12px;
  color: #9ca3af;
}

.rhapsody-commission-status,
.rhapsody-withdrawal-status {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.rhapsody-commission-status .rhapsody-commission-date,
.rhapsody-withdrawal-status .rhapsody-withdrawal-date {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.rhapsody-status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.rhapsody-status-paid {
  background: #007cba;
  color: white;
}

.rhapsody-status-pending {
  background: #ea580c;
  color: white;
}

.rhapsody-status-approved {
  background: #22c55e;
  color: white;
}

.rhapsody-status-cancelled,
.rhapsody-status-rejected {
  background: #ef4444;
  color: white;
}

.rhapsody-no-commissions,
.rhapsody-no-withdrawals {
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
}

/* Pagination */
.rhapsody-pagination,
.rhapsody-withdrawal-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.rhapsody-pagination-info {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* Withdrawal Section */
.rhapsody-withdrawal-section {
  margin-bottom: 32px;
}

.rhapsody-balance-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
}

.rhapsody-balance-label {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}

.rhapsody-balance-amount {
  font-size: 32px;
  font-weight: 700;
  color: #0046d5;
}

.rhapsody-minimum-notice {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 24px;
}

.rhapsody-pending-notice,
.rhapsody-insufficient-notice {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.rhapsody-pending-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.rhapsody-insufficient-notice {
  background: #fef3c7;
  border: 1px solid #fde68a;
}

.rhapsody-pending-notice .lucide-icon {
  color: #0046d5;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.rhapsody-insufficient-notice .lucide-icon {
  color: #f59e0b;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.rhapsody-pending-notice strong,
.rhapsody-insufficient-notice strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.rhapsody-pending-notice p,
.rhapsody-insufficient-notice p {
  font-size: 14px;
  margin: 0;
  color: #6b7280;
}

/* Withdrawal Form */
.rhapsody-withdrawal-form {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
}

.rhapsody-form-row {
  margin-bottom: 20px;
}

.rhapsody-form-row label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.rhapsody-form-row input[type='number'],
.rhapsody-form-row select,
.rhapsody-form-row textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  font-family: inherit;
}

.rhapsody-form-row input[type='number']:focus,
.rhapsody-form-row select:focus,
.rhapsody-form-row textarea:focus {
  outline: none;
  border-color: #0046d5;
  box-shadow: 0 0 0 3px rgba(0, 70, 213, 0.1);
}

.rhapsody-form-actions {
  margin-top: 24px;
}

.rhapsody-withdraw-btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
}

.rhapsody-form-messages {
  margin-top: 16px;
}

/* Withdrawal History */
.rhapsody-withdrawal-history {
  margin-top: 32px;
}

.rhapsody-withdrawal-history h5 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 16px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .rhapsody-dashboard-header {
    padding: 20px;
  }

  .rhapsody-tab-navigation {
    padding: 0 20px;
    overflow-x: auto;
  }

  .rhapsody-tab-button {
    padding: 12px 16px;
    font-size: 13px;
  }

  .rhapsody-tab-content {
    padding: 20px;
  }

  .rhapsody-analytics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rhapsody-current-link {
    flex-direction: column;
  }

  .rhapsody-link-buttons {
    width: 100%;
  }

  .rhapsody-link-buttons .rhapsody-btn {
    flex: 1;
  }

  .rhapsody-commission-item,
  .rhapsody-withdrawal-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .rhapsody-commission-status,
  .rhapsody-withdrawal-status {
    align-self: flex-start;
  }

  .rhapsody-link-actions {
    flex-direction: column;
  }

  .rhapsody-link-actions .rhapsody-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .rhapsody-dashboard-header {
    padding: 16px;
  }

  .rhapsody-tab-content {
    padding: 16px;
  }

  .rhapsody-analytics-card {
    padding: 20px;
  }

  .rhapsody-card-value {
    font-size: 24px;
  }

  .rhapsody-card-icon {
    width: 40px;
    height: 40px;
  }

  .rhapsody-card-icon .lucide-icon {
    width: 20px;
    height: 20px;
  }
}
