.insbrok-partner-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Super Admin Affiliate Selector */
.admin-affiliate-selector {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.selector-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.admin-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.viewing-as-indicator {
  font-size: 14px;
}

.viewing-as-indicator strong {
  font-weight: 700;
}

.selector-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.selector-controls label {
  font-weight: 600;
  font-size: 14px;
  margin: 0;
}

.affiliate-selector-dropdown {
  flex: 1;
  min-width: 250px;
  padding: 10px 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.affiliate-selector-dropdown:hover {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.affiliate-selector-dropdown:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.btn-clear-selection {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-clear-selection:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.selector-only-message {
  text-align: center;
  padding: 40px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 20px;
}

.selector-only-message p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

.insbrok-partner-dashboard h2 {
  font-size: 28px;
  margin-bottom: 30px;
}

.insbrok-partner-dashboard h3 {
  font-size: 22px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-top: 30px;
}

.partner-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 30px;
}

.statistics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.statistics-meta {
  display: flex;
  align-items: center;
  gap: 15px;
}

.last-updated {
  color: #666;
  font-size: 13px;
}

.cache-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.cache-status.status-finalized {
  background: #d5f3e3;
  color: #00622e;
}

.cache-status.status-in_progress,
.cache-status.status-in-progress {
  background: #e5f5fa;
  color: #0f4d7c;
}

.cache-status.status-queued {
  background: #fef5e7;
  color: #956c00;
}

.statistics-summary {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-box {
  flex: 1;
  min-width: 150px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin-right: 15px;
  margin-bottom: 15px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-box:last-child {
  margin-right: 0;
}

.stat-title {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  color: #333;
}

.date-filters {
  margin-bottom: 30px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
}

.date-range {
  display: flex;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.date-range label {
  margin-right: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.date-range input[type="date"] {
  margin-left: 10px;
  padding: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

table th {
  background-color: #f8f9fa;
  font-weight: bold;
}

table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.date-range-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.date-range-tab {
  padding: 10px 15px;
  cursor: pointer;
  text-decoration: none;
  color: #333;
  margin-right: 5px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}

.date-range-tab:hover {
  background-color: #f9f9f9;
  border-color: #ddd;
}

.date-range-tab.active {
  background-color: #fff;
  border-color: #ddd;
  border-bottom: 2px solid #fff;
  margin-bottom: -1px;
  font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
  .statistics-summary {
    flex-direction: column;
  }

  .stat-box {
    margin-right: 0;
    margin-bottom: 15px;
    width: 100%;
  }

  .date-range {
    flex-direction: column;
  }

  .date-range label {
    margin-bottom: 10px;
  }

  .date-range-tabs {
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding-bottom: 5px;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  /* Super Admin Selector Responsive */
  .selector-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .affiliate-selector-dropdown {
    width: 100%;
  }

  .btn-clear-selection {
    width: 100%;
    text-align: center;
  }
}
