/* Modern Color Scheme - Contemporary palette that works with any logo */
:root {
  --primary: #8B5CF6;
  --primary-hover: #A78BFA;
  --primary-gradient: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  --text-primary: #020617;
  --text-secondary: #334155;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --bg-hover: #F1F5FF;
  --border: #CBD5E1;
  --border-light: #E2E8F0;
  --shadow: rgba(2, 6, 23, 0.1);
  --shadow-lg: rgba(2, 6, 23, 0.15);
  --shadow-xl: rgba(139, 92, 246, 0.2);
  --error: #ef4444;
  --error-bg: #fee2e2;
  --success: #10b981;
  --success-bg: #d1fae5;
}

/* Base Styles */
body { 
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; 
  margin: 0; 
  padding: 24px; 
  background: var(--bg-tertiary);
  color: var(--text-primary);
  line-height: 1.6;
  animation: fadeIn 0.3s ease-in;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Loading Spinner */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 16px;
}

.loading-overlay .loading-spinner {
  width: 40px;
  height: 40px;
  border-width: 4px;
  margin: 0;
}

.loading-text {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1em;
  margin: 8px 0;
}

.skeleton-table-row {
  height: 48px;
  margin: 4px 0;
}

/* Error Banner */
.error-banner {
  background: var(--error-bg);
  color: var(--error);
  padding: 16px;
  margin: 16px 0;
  border-radius: 8px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border: 2px solid var(--error);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.error-banner strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-banner .retry-btn {
  padding: 6px 12px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.error-banner .retry-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.error-banner .close-btn {
  background: none;
  border: none;
  color: var(--error);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.error-banner .close-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Navigation */
.nav { 
  background: var(--bg-primary); 
  padding: 16px 24px; 
  margin: -24px -24px 24px -24px; 
  box-shadow: 0 2px 4px var(--shadow); 
  display: flex; 
  gap: 20px; 
  align-items: center;
  border-bottom: 2px solid var(--border);
}

.nav-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.nav-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  display: none; /* Hidden by default, shown when logo loads */
}

.nav-logo.visible {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

.nav h1 { 
  margin: 0; 
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.nav button { 
  padding: 10px 20px; 
  border: 2px solid var(--border); 
  background: var(--bg-primary); 
  cursor: pointer; 
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.nav button:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px var(--shadow);
}

.nav button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav button.active { 
  background: var(--primary-gradient); 
  color: #fff; 
  border-color: transparent;
  box-shadow: 0 4px 12px var(--shadow-xl);
}

/* Pages */
.page { 
  display: none; 
  background: var(--bg-primary); 
  padding: 32px; 
  border-radius: 16px; 
  box-shadow: 0 4px 12px var(--shadow-lg);
  border: 2px solid var(--border);
  animation: fadeIn 0.3s ease-in;
}

.page.active { 
  display: block; 
}

/* Typography */
h1, h2 { 
  margin: 24px 0 12px;
  font-weight: 700;
  color: var(--text-primary);
}

h1 { 
  margin-top: 0;
  font-size: 28px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
}

h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 16px 0 8px;
}

h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 12px 0 6px;
}

/* Mobile/Desktop Visibility */
.mobile-only {
  display: none !important;
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block !important;
  }
  .desktop-only,
  section.desktop-only,
  .filters.desktop-only,
  section.filters.desktop-only {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }
}

/* Active Filters Container (outside modal) */
.active-filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  min-height: 32px;
  padding: 0 12px;
}

.active-filters-desktop {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 32px;
}

/* Filter Icon Button (Mobile) */
.filter-icon-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--shadow-xl);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.filter-icon-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px var(--shadow-xl);
}

.filter-icon-btn:active {
  transform: translateY(0) scale(0.98);
}

.filter-icon-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.filter-icon-btn[aria-expanded="true"] {
  background: var(--primary-hover);
}

.filter-icon-btn svg {
  width: 24px;
  height: 24px;
}

.filter-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--error);
  color: white;
  border-radius: 10px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.filter-badge:empty {
  display: none;
}

/* Bottom Sheet Modal */
.filter-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-modal[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.filter-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.filter-modal-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-radius: 20px 20px 0 0;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 24px rgba(2, 6, 23, 0.2);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
}

.filter-modal[aria-hidden="false"] .filter-modal-content {
  transform: translateY(0);
  visibility: visible;
}

.filter-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}

.filter-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.filter-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.filter-modal-close:hover {
  background: var(--bg-hover);
  transform: rotate(90deg);
}

.filter-modal-close:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.filter-modal-close svg {
  width: 24px;
  height: 24px;
}

.filter-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
}

.filter-modal-body .filters {
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

/* Filters */
.filters { 
  background: var(--bg-secondary); 
  padding: 24px; 
  margin-bottom: 24px; 
  border-radius: 12px; 
  border: 2px solid var(--border);
  box-shadow: 0 2px 6px var(--shadow);
}

/* Ensure desktop filters are hidden on mobile */
@media (max-width: 768px) {
  .filters.desktop-only,
  section.filters.desktop-only {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
}

.filter-controls-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.filter-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-btn {
  padding: 6px 12px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.preset-btn:active {
  transform: translateY(0);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 32px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.filter-chip button {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  transition: background 0.2s ease;
}

.filter-chip button:hover {
  background: rgba(255, 255, 255, 0.5);
}

.filter-inputs-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: end;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  align-items: end;
}

.filters .filter-inputs-row label { 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.filters input, .filters select { 
  padding: 8px 12px; 
  border: 2px solid var(--border); 
  border-radius: 6px; 
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.filters input:focus, .filters select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: var(--bg-primary);
}

.filters select[multiple] { 
  min-height: 100px; 
  min-width: 200px;
}

/* Images */
img { 
  max-width: 980px; 
  width: 100%; 
  height: auto; 
  display: block; 
  margin: 8px 0 16px;
}

/* Tables */
.data-table { 
  border-collapse: collapse; 
  width: 100%; 
  margin: 24px 0;
  background: var(--bg-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow-lg);
  border: 2px solid var(--border);
}

.data-table th, .data-table td { 
  border: 1px solid var(--border); 
  padding: 12px 16px; 
  text-align: left;
  transition: background-color 0.2s ease;
}

.data-table th { 
  background: var(--bg-secondary); 
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
  border-bottom: 2px solid var(--border);
}

.data-table tbody tr {
  background: var(--bg-primary);
}

.data-table tbody tr:nth-child(even) {
  background: var(--bg-secondary);
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
  cursor: pointer;
}

.small { 
  color: var(--text-secondary); 
  font-size: 12px;
}

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

.stat-card { 
  background: var(--bg-primary); 
  padding: 24px; 
  border-radius: 12px; 
  border: 2px solid var(--border);
  box-shadow: 0 2px 6px var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-lg);
  border-color: var(--border);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card h3 { 
  margin: 0 0 12px 0; 
  font-size: 13px; 
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .value { 
  font-size: 32px; 
  font-weight: 800; 
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Player Card */
.player-card { 
  display: flex; 
  gap: 20px; 
  align-items: center; 
  padding: 20px; 
  background: var(--bg-secondary); 
  border-radius: 12px; 
  margin: 12px 0;
  border: 2px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-card:hover {
  box-shadow: 0 4px 12px var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--border);
  background: var(--bg-primary);
}

.player-card img { 
  width: 80px; 
  height: 80px; 
  object-fit: cover; 
  border-radius: 50%; 
  border: 3px solid var(--border); 
  margin: 0;
  box-shadow: 0 2px 4px var(--shadow);
}

/* Top List */
.top-list { 
  list-style: none; 
  padding: 0; 
  margin: 16px 0;
}

.top-list li { 
  padding: 10px 12px; 
  background: var(--bg-secondary); 
  margin: 6px 0; 
  border-radius: 6px; 
  display: flex; 
  justify-content: space-between;
  border: 2px solid var(--border);
  transition: all 0.2s ease;
  font-weight: 500;
}

.top-list li:hover {
  background: var(--bg-hover);
  transform: translateX(4px);
  border-color: var(--primary);
}

/* Buttons */
button {
  transition: all 0.2s ease;
  cursor: pointer;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

#applyFiltersBtn, #clearFiltersBtn {
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid var(--border);
}

#applyFiltersBtn {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px var(--shadow-xl);
}

#applyFiltersBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-xl);
}

#applyFiltersBtn:active {
  transform: translateY(0);
}

#applyFiltersBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#clearFiltersBtn {
  background: var(--bg-primary);
  color: var(--text-primary);
}

#clearFiltersBtn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

#clearFiltersBtn:active {
  transform: translateY(0);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }
  
  .nav {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .nav-logo-container {
    flex: 1 1 100%;
    margin-bottom: 8px;
  }
  
  .nav-logo {
    height: 40px;
  }
  
  .nav h1 {
    font-size: 20px;
  }
  
  .nav button {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-size: 13px;
  }
  
  .page {
    padding: 20px;
    border-radius: 12px;
  }
  
  .filters {
    padding: 16px;
  }
  
  .filter-icon-btn {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
  
  .filter-modal-header {
    padding: 16px 20px;
  }
  
  .filter-modal-header h2 {
    font-size: 18px;
  }
  
  .filter-modal-body {
    padding: 20px;
  }
  
  .filter-controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .filter-presets {
    width: 100%;
    flex-direction: column;
  }
  
  .preset-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .filter-inputs-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters .filter-inputs-row label {
    width: 100%;
  }
  
  .filters input,
  .filters select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .filters select[multiple] {
    min-width: 0;
    width: 100%;
    min-height: 120px;
  }
  
  .filter-buttons {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }
  
  #applyFiltersBtn, #clearFiltersBtn,
  #applyFiltersBtnMobile, #clearFiltersBtnMobile {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    min-height: 44px;
  }
  
  .toggle-label {
    font-size: 16px;
    min-height: 44px;
    align-items: center;
  }
  
  .toggle-label input[type="checkbox"] {
    width: 24px;
    height: 24px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  h3 {
    font-size: 16px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-card .value {
    font-size: 28px;
  }
  
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }
  
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  
  .player-card {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
  
  .player-card img {
    width: 100px;
    height: 100px;
  }
  
  .top-list li {
    padding: 12px;
    font-size: 14px;
  }
  
  /* Make tables horizontally scrollable on mobile */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px -12px;
    padding: 0 12px;
  }
  
  .table-wrapper .data-table {
    margin: 0;
    min-width: 600px;
  }
  
  /* Card-based layout for tables on mobile */
  .table-cards {
    display: block;
  }
  
  .table-card {
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px var(--shadow);
  }
  
  .table-card-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
  }
  
  .table-card-row:last-child {
    border-bottom: none;
  }
  
  .table-card-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
  }
  
  .table-card-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
  }
  
  /* Show cards, hide table on mobile when cards exist */
  .table-wrapper:has(.table-cards) .data-table {
    display: none;
  }
  
  .table-wrapper:has(.table-cards) .table-cards {
    display: block;
  }
  
  /* Stack performance charts vertically on mobile */
  .performance-charts-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 769px) {
  /* Hide cards on desktop */
  .table-cards {
    display: none;
  }
  
  .data-table {
    display: table;
  }
}

@media (max-width: 480px) {
  body {
    padding: 8px;
  }
  
  .nav {
    padding: 10px 12px;
  }
  
  .nav h1 {
    font-size: 18px;
  }
  
  .nav button {
    padding: 12px 14px;
    font-size: 13px;
    min-height: 44px;
  }
  
  .page {
    padding: 16px;
  }
  
  .filters {
    padding: 12px;
  }
  
  .preset-btn {
    min-height: 44px;
  }
  
  #applyFiltersBtn, #clearFiltersBtn {
    min-height: 44px;
  }
  
  h1 {
    font-size: 20px;
  }
  
  h2 {
    font-size: 18px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-card .value {
    font-size: 24px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* Chart Containers */
.chart-container {
  position: relative;
  height: 300px;
  margin: 24px 0;
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  box-shadow: 0 2px 6px var(--shadow);
}

.chart-container canvas {
  max-height: 100%;
}

@media (max-width: 768px) {
  .chart-container {
    height: 250px;
    padding: 16px;
    margin: 16px 0;
  }
}

@media (max-width: 480px) {
  .chart-container {
    height: 200px;
    padding: 12px;
  }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

