* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1117;
  color: #e4e4e7;
  line-height: 1.6;
}

/* Header */
.header {
  background: #1a1d27;
  color: white;
  padding: 32px 40px;
  border-bottom: 1px solid #2a2d3a;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.header p {
  color: #71717a;
  font-size: 14px;
}

/* Dashboard Layout */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Filters */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid #2a2d3a;
  background: #1a1d27;
  color: #a1a1aa;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}

.filter-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.filter-btn.active {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border-color: #3b82f6;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.card {
  background: #1a1d27;
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid #2a2d3a;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #71717a;
}

.card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #71717a;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-value {
  font-size: 32px;
  font-weight: 700;
  color: #e4e4e7;
}

.card-sub {
  font-size: 13px;
  color: #71717a;
  margin-top: 4px;
}

/* Section Headings */
.dashboard h2 {
  font-size: 18px;
  font-weight: 600;
  color: #e4e4e7;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2d3a;
}

/* Top Events */
.top-events {
  background: #1a1d27;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 32px;
  border: 1px solid #2a2d3a;
}

.top-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-name {
  font-size: 13px;
  font-weight: 500;
  color: #a1a1aa;
  font-family: 'Courier New', monospace;
  min-width: 200px;
}

.top-bar-bg {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  overflow: hidden;
}

.top-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.top-count {
  font-size: 14px;
  font-weight: 700;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 12px;
  border-radius: 20px;
  min-width: 48px;
  text-align: center;
}

/* Tables */
.recent-events,
.daily-stats {
  background: #1a1d27;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 32px;
  border: 1px solid #2a2d3a;
  overflow-x: auto;
}

.events-table {
  width: 100%;
  border-collapse: collapse;
}

.events-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #71717a;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2d3a;
  font-weight: 600;
}

.events-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(42, 45, 58, 0.5);
  color: #a1a1aa;
}

.events-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.events-table tr:last-child td {
  border-bottom: none;
}

/* Source Badges */
.source-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.source-badge.photolabs {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.source-badge.shortstop {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

/* Endpoint Info */
.endpoint-info {
  background: #1a1d27;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 32px;
  border: 1px solid #2a2d3a;
}

.endpoint-info p {
  color: #71717a;
  font-size: 14px;
}

.endpoint-url {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 12px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #a1a1aa;
}

.method-badge {
  background: #22c55e;
  color: #0f1117;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .header {
    padding: 24px 20px;
  }

  .dashboard {
    padding: 20px 12px;
  }

  .card-value {
    font-size: 24px;
  }

  .top-name {
    min-width: 120px;
    font-size: 11px;
  }

  .filters {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .summary-cards {
    grid-template-columns: 1fr;
  }
}
