* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.dashboard {
  max-width: 1400px;
  margin: 0 auto;
}

header {
  color: white;
  margin-bottom: 40px;
}

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

.header-content > div {
  text-align: center;
  flex: 1;
}

header h1 {
  font-size: 3em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
  font-size: 1.2em;
  opacity: 0.9;
}

.logout-button {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.logout-button:hover {
  background: white;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
  color: #666;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 3em;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.charts-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.chart-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chart-card h2 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5em;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bar-label {
  font-size: 0.9em;
  color: #666;
  font-weight: 500;
}

.bar-container {
  background: #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
  height: 30px;
}

.bar {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  transition: width 0.3s ease;
  min-width: 40px;
}

.bar-value {
  color: white;
  font-weight: bold;
  font-size: 0.9em;
}

.sessions-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sessions-header {
  margin-bottom: 30px;
}

.sessions-header h2 {
  color: #333;
  font-size: 1.8em;
  margin-bottom: 20px;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-group > label {
  color: #666;
  font-size: 0.9em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.controls-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}

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

.sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.sort-controls label {
  color: #666;
  font-size: 0.9em;
  font-weight: 500;
}

.sort-select {
  padding: 8px 16px;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9em;
  transition: all 0.2s;
  outline: none;
}

.sort-select:hover {
  background: #f3f4f6;
}

.sort-select:focus {
  border-color: #764ba2;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-buttons button {
  padding: 8px 16px;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  font-size: 0.9em;
}

.filter-buttons button:hover {
  background: #f3f4f6;
}

.filter-buttons button.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.sessions-list {
  display: grid;
  gap: 20px;
}

.session-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s;
}

.session-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
  gap: 15px;
}

.session-header h3 {
  color: #333;
  font-size: 1.2em;
  flex: 1;
}

.session-track {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8em;
  white-space: nowrap;
}

.session-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.session-speakers {
  color: #555;
  margin-bottom: 10px;
  font-size: 0.9em;
}

.session-speakers strong {
  color: #333;
}

.session-speakers-list {
  margin-bottom: 15px;
}

.session-speakers-list > strong {
  color: #333;
  display: block;
  margin-bottom: 10px;
  font-size: 0.9em;
}

.speaker-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.speaker-info:hover {
  background: #f3f4f6;
  transform: translateX(5px);
}

.speaker-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #667eea;
}

.speaker-details {
  flex: 1;
}

.speaker-name {
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
  margin-bottom: 3px;
}

.speaker-company {
  color: #666;
  font-size: 0.85em;
  font-style: italic;
}

.session-status {
  display: flex;
  justify-content: flex-end;
}

.status-badge {
  background: #10b981;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 500;
}

.loading,
.error {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  color: white;
  font-size: 1.5em;
}

/* Header actions */
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.back-button {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.back-button:hover {
  background: white;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Pie Chart Styles */
.pie-chart-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pie-chart-container h3 {
  color: #333;
  font-size: 1.3em;
  margin-bottom: 10px;
}

.pie-chart-wrapper {
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
}

.pie-chart-svg {
  width: 240px;
  height: 240px;
  flex-shrink: 0;
}

.pie-chart-legend {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-text {
  display: flex;
  justify-content: space-between;
  flex: 1;
  gap: 15px;
}

.legend-label {
  font-weight: 500;
  color: #333;
  font-size: 0.95em;
}

.legend-value {
  color: #666;
  font-size: 0.9em;
}

.chart-card.full-width {
  grid-column: 1 / -1;
}

/* Attendees Table Styles */
.attendees-table {
  overflow-x: auto;
  margin-top: 20px;
}

.attendees-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.attendees-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.attendees-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85em;
}

.attendees-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e5e7eb;
  color: #333;
}

.attendees-table tbody tr {
  transition: background-color 0.2s;
}

.attendees-table tbody tr:hover {
  background-color: #f9fafb;
}

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

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .header-actions {
    flex-direction: column;
    width: 100%;
  }

  .logout-button,
  .back-button {
    width: 100%;
  }

  header h1 {
    font-size: 2em;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-section {
    grid-template-columns: 1fr;
  }

  .filter-section {
    width: 100%;
  }

  .controls-wrapper {
    flex-direction: column;
    width: 100%;
  }

  .filter-buttons {
    width: 100%;
  }

  .filter-buttons button {
    flex: 1;
    min-width: fit-content;
  }

  .sort-controls {
    width: 100%;
    justify-content: space-between;
  }

  .sort-select {
    flex: 1;
  }

  .pie-chart-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .attendees-table {
    font-size: 0.85em;
  }

  .attendees-table th,
  .attendees-table td {
    padding: 10px 8px;
  }
}
