body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; 
  background: #f5f7fa; 
  margin: 0; 
  padding: 0;
  min-height: 100vh;
}

header {
  background: #2c3e50;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 { 
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

nav {
  display: flex;
  gap: 1rem;
}

nav button {
  background: transparent;
  border: 2px solid transparent;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

nav button:hover {
  background: rgba(255,255,255,0.1);
}

.logout-btn {
  background: #e74c3c !important;
  border-color: #e74c3c !important;
  margin-left: 1rem;
}

.logout-btn:hover {
  background: #c0392b !important;
  border-color: #c0392b !important;
}

nav button.active {
  background: #3498db;
  border-color: #3498db;
}

main { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 2rem 1rem;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

h2 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-left: 4px solid #3498db;
}

.stat-card h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 600;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.stat-detail {
  font-size: 0.9rem;
  color: #7f8c8d;
  line-height: 1.4;
}

.chart-section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.chart-container {
  position: relative;
  height: 300px;
  margin: 1rem 0;
}

.chart-container.small {
  height: 200px;
}

.chart-container.medium {
  height: 250px;
}

.sub-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.sub-stat {
  text-align: center;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.sub-stat-label {
  font-size: 0.8rem;
  color: #7f8c8d;
  margin-bottom: 0.25rem;
}

.sub-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
}

.loading {
  text-align: center;
  color: #7f8c8d;
  padding: 2rem;
}

.error {
  background: #fee;
  color: #c33;
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
}

/* Tabuľka a graf vedľa seba */
.chart-table-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

.data-table {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  background: #3498db;
  color: white;
  padding: 0.5rem;
  text-align: left;
  font-weight: 600;
}

.data-table th:last-child {
  text-align: right;
}

.data-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #e9ecef;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table td:first-child {
  font-weight: 500;
  color: #2c3e50;
  text-align: left;
  width: 30%;
}

.data-table td:nth-child(2) {
  text-align: center;
  font-weight: 500;
  color: #2c3e50;
  width: 25%;
}

.data-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: #27ae60;
  width: 45%;
}

/* Kolačné grafy */
.pie-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Mobilná responzívnosť */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  h1 {
    font-size: 1.3rem;
  }
  
  nav {
    width: 100%;
    justify-content: center;
  }
  
  nav button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  main {
    padding: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .chart-container {
    height: 250px;
  }
  
  .chart-container.small {
    height: 180px;
  }
  
  .sub-stats {
    grid-template-columns: 1fr;
  }
  
  .chart-table-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .data-table {
    order: 2;
  }
  
  .chart-container.small {
    order: 1;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.2rem;
  }
  
  nav button {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .stat-card {
    padding: 0.8rem;
  }
  
  .stat-value {
    font-size: 1.3rem;
  }
  
  .chart-container {
    height: 200px;
  }
  
  .chart-container.small {
    height: 150px;
  }
}
