/* ===== VARIABLES ===== */
:root {
  --primary-color: #4a90e2;
  --primary-dark: #357abd;
  --secondary-color: #2c3e50;
  --error-color: #e74c3c;
  --success-color: #2ecc71;
  --warning-color: #f1c40f;
  --text-color: #0866a8;
  --text-light: #666;
  --background-color: #f5f7fa;
  --card-background: #fff;
  --nav-height: 60px;
  --sidebar-width: 250px;
  --header-height: 60px;
  --border-radius: 8px;
  --box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* ===== LAYOUT ===== */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--secondary-color);
  color: white;
  z-index: 1000;
}

.main-content {
  margin-left: var(--sidebar-width);
  padding: 20px;
  width: calc(100% - var(--sidebar-width));
  min-height: calc(100vh - var(--header-height));
}

/* ===== HEADER & NAVIGATION ===== */
.header {
  background-color: var(--card-background);
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  box-shadow: var(--box-shadow);
  z-index: 101;
}

.header h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.menu {
  list-style: none;
  padding: 0;
}

.menu-item {
  padding: 15px 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.menu-item:hover {
  background-color: var(--primary-color);
}

.menu-item.active {
  background-color: var(--primary-color);
}

/* ===== CARDS ===== */
.card {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 15px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 14px;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* ===== BUTTONS ===== */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn i {
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #357abd 0%, #2868a9 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #495057 0%, #343a40 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2);
}

.btn-success:hover {
  background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(241, 196, 15, 0.2);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(241, 196, 15, 0.3);
}

.btn-info {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.btn-info:hover {
  background: linear-gradient(135deg, #2980b9 0%, #216a9c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid #4a90e2;
  color: #4a90e2;
}

.btn-outline-primary:hover {
  background: #4a90e2;
  color: white;
  transform: translateY(-1px);
}

.btn-outline-danger {
  background: transparent;
  border: 2px solid #e74c3c;
  color: #e74c3c;
}

.btn-outline-danger:hover {
  background: #e74c3c;
  color: white;
  transform: translateY(-1px);
}

.btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 16px;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Action buttons in tables and cards */
.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-buttons .btn {
  padding: 6px 12px;
  font-size: 13px;
}

/* Notebook specific buttons */
.notebook-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.notebook-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 10px;
}

.notebook-actions .btn i {
  margin-right: 6px;
}

/* Status indicator buttons */
.status-btn {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-btn.active {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
}

.status-btn.inactive {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.status-btn.pending {
  background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
  color: white;
}

/* ===== TABLES ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

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

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

.table tr:hover {
  background-color: #f8f9fa;
}

/* ===== STATISTICS ===== */
.stats-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Stats Navigation */
.stats-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  justify-content: center;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.stats-nav-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  background: #f0f2f5;
  color: #495057;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: auto;
}

.stats-nav-btn:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.stats-nav-btn.active {
  background: var(--primary-color);
  color: white;
}

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

.stats-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stats-header {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.stats-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.stat-label {
  color: #666;
  font-size: 0.95rem;
  font-weight: 500;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2196F3;
  transition: color 0.3s ease;
}

.stat-value.positive {
  color: #4CAF50;
}

.stat-value.negative {
  color: #f44336;
}

/* Grafikonok rács */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.chart-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  min-height: 300px;
  position: relative;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  min-height: 250px;
}

/* Reszponzív beállítások */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    min-height: 250px;
  }
  
  .stat-label {
    font-size: 0.9rem;
  }
  
  .stat-value {
    font-size: 1rem;
  }
}

/* ===== CHARTS ===== */
.chart-container {
  position: relative;
  height: 400px;
  margin: 1rem 0;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-container h3 {
  margin: 0 0 15px 0;
  color: #2d3436;
  font-size: 1.2rem;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== NOTIFICATIONS ===== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  background: var(--card-background);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 300px;
  max-width: 400px;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
  border-left: 4px solid var(--primary-color);
}

.notification.error {
  border-left-color: var(--error-color);
}

.notification.success {
  border-left-color: var(--success-color);
}

.notification.info {
  border-left-color: var(--info-color);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification i {
  font-size: 1.2em;
}

.notification.error i {
  color: var(--error-color);
}

.notification.success i {
  color: var(--success-color);
}

.notification.info i {
  color: var(--info-color);
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 4px;
  margin-left: 12px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .notification {
    min-width: auto;
    max-width: 90%;
    margin: 0 10px;
  }
}

/* ===== MODALS ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  padding: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--box-shadow);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }
  
  .main-content {
    margin-left: 60px;
  }
  
  .header {
    left: 60px;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    height: 300px;
  }
}

/* ===== LOADING ===== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Additional card variations */
.stat-card.highlight {
  border: 2px solid #4a90e2;
}

.stat-card.warning {
  border-left: 4px solid #f39c12;
}

.stat-card.success {
  border-left: 4px solid #2ecc71;
}

.stat-card.danger {
  border-left: 4px solid #e74c3c;
}

/* Statistics Page Layout */
.stats-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.stats-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.stats-header h2 {
  font-size: 1.8rem;
  color: #2d3436;
  margin: 0;
}

.stats-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  margin-bottom: 30px;
  overflow: hidden;
}

.stats-section-header {
  background: #4a90e2;
  color: white;
  padding: 15px 25px;
  font-size: 1.2rem;
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
}

.stat-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-label {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 600;
  color: #2d3436;
  margin: 5px 0;
}

.stat-subvalue {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 5px;
}

/* Highlight Cards */
.stat-card.primary {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
}

.stat-card.primary .stat-label,
.stat-card.primary .stat-value,
.stat-card.primary .stat-subvalue {
  color: white;
}

/* Chart Section */
.chart-section {
  padding: 20px;
}

.trend-bar,
.performance-bar,
.distribution-bar {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  background: #f8f9fa;
  padding: 8px;
  border-radius: 6px;
}

.trend-label,
.performance-label,
.distribution-label {
  min-width: 120px;
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
}

.trend-value,
.performance-value,
.distribution-value {
  flex: 1;
  background: #4a90e2;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: right;
  transition: width 0.3s ease;
}

/* Status Colors */
.positive {
  color: #2ecc71;
}

.negative {
  color: #e74c3c;
}

/* Animation for value changes */
@keyframes valueChange {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.stat-value {
  animation: valueChange 0.3s ease-out;
}

/* Empty state styling */
.stat-value:empty::before {
  content: '-';
  color: #ced4da;
}

/* Additional card variations */
.stat-card.highlight {
  border: 2px solid #4a90e2;
}

.stat-card.warning {
  border-left: 4px solid #f39c12;
}

.stat-card.success {
  border-left: 4px solid #2ecc71;
}

.stat-card.danger {
  border-left: 4px solid #e74c3c;
}

/* Responsive Design */
@media (max-width: 1200px) {
.stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .stats-section-header {
    font-size: 1.1rem;
    padding: 12px 20px;
  }
}

/* Animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stats-section {
  animation: slideIn 0.5s ease-out;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.pagination-controls .btn {
  min-width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 8px;
}

.pagination-controls .btn:disabled {
  background: #e9ecef;
  color: #adb5bd;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pagination-controls .page-info {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  padding: 0 10px;
  min-width: 80px;
  text-align: center;
}

@media (max-width: 576px) {
  .pagination-controls {
    gap: 8px;
    padding: 10px;
  }

  .pagination-controls .btn {
    min-width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .pagination-controls .page-info {
    font-size: 12px;
    min-width: 60px;
  }
}

/* Table Improvements */
.table-responsive {
  max-height: 400px;
  overflow-y: auto;
}

.table th {
  position: sticky;
  top: 0;
  background: var(--card-background);
  z-index: 1;
}

/* Date Input */
input[type="datetime-local"] {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* Statistics Navigation */
.stats-navigation {
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
  margin-bottom: 20px;
}

.stats-nav-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: #f0f2f5;
  color: #495057;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  text-align: center;
}

.stats-nav-btn:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.stats-nav-btn.active {
  background: #4a90e2;
  color: white;
  box-shadow: 0 2px 4px rgba(74,144,226,0.2);
}

.stats-pages {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-label {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3436;
  margin: 10px 0;
}

.stat-card.wide {
  grid-column: 1 / -1;
}

.range-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 10px;
}

.range-number {
  font-weight: 600;
  min-width: 120px;
  color: #495057;
}

.range-values {
  flex: 1;
  color: #2d3436;
  font-weight: 500;
  margin: 0 20px;
}

.range-progress {
  color: #6c757d;
  font-size: 0.9rem;
}

.chart-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-top: 20px;
  height: 400px;
}

#numberDistributionChart,
#performanceChart {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 768px) {
  .stats-navigation {
    padding: 10px;
  }
  
  .stats-nav-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .range-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .range-number {
    min-width: auto;
  }
  
  .range-values {
    margin: 0;
  }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #3498db;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

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

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

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

.stat-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  opacity: 0.8;
}

.stat-content {
  flex: 1;
}

.stat-content h3 {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-content .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3436;
  margin-top: 5px;
}

.dashboard-forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
}

.dashboard-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.dashboard-card .card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 20px;
  border-bottom: none;
}

.dashboard-card .card-header h2 {
  font-size: 1.3rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modern-form {
  padding: 25px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group.half {
  margin-bottom: 0;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 8px;
}

.form-group label i {
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-control.invalid {
  border-color: var(--error-color);
  background-color: rgba(231, 76, 60, 0.05);
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  justify-content: center;
}

.recent-activity {
  padding: 20px;
}

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

@media (max-width: 768px) {
  .dashboard-forms-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-content .stat-value {
    font-size: 1.5rem;
  }
}

/* ===== SECTIONS ===== */
.section {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  width: 100%;
  height: 100%;
}

.section.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.3s ease-out;
}

/* ===== NAVIGATION ===== */
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  padding: 15px 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  border-left: 4px solid transparent;
}

.menu-item:hover {
  background-color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.menu-item.active {
  background-color: var(--primary-color);
  border-left-color: white;
}

.menu-item i {
  width: 20px;
  text-align: center;
}

/* ===== STATS NAVIGATION ===== */
.stats-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.stats-nav-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--border-radius);
  background-color: #f0f2f5;
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
}

.stats-nav-btn:hover {
  background-color: #e9ecef;
}

.stats-nav-btn.active {
  background-color: var(--primary-color);
  color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }

  .main-content {
    margin-left: 60px;
  }

  .header {
    left: 60px;
  }
  
  .menu-item span {
    display: none;
  }
  
  .stats-navigation {
  flex-direction: column;
  }
  
  .stats-nav-btn {
    width: 100%;
  }
}

/* ===== STATISTICS STYLES ===== */
.stats-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Stats Navigation */
.stats-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: var(--header-height);
  z-index: 100;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: #f0f2f5;
  color: #495057;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(74,144,226,0.2);
}

/* Stats Content */
.stats-content {
  margin-top: 20px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-panel.active {
  display: block;
}

/* Quick Stats */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-box {
  background: white;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-info {
  flex: 1;
}

.stat-info h3 {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3436;
  margin-top: 5px;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-card h3 {
  font-size: 1.1rem;
  color: #2d3436;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

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

/* Number Stats */
.number-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.number-stat {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.number-stat .label {
  display: block;
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 5px;
}

.number-stat .value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3436;
}

/* Notebooks Progress */
.notebooks-progress {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.notebook-progress-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notebook-info {
  flex: 1;
}

.notebook-number {
  font-weight: 600;
  color: #2d3436;
}

.progress-bar {
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Ranges Container */
.ranges-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}

.range-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.range-info {
  flex: 1;
}

.range-numbers {
  font-weight: 600;
  color: #2d3436;
}

.range-count {
  color: var(--primary-color);
  font-weight: 500;
}

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

.detail-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
}

.detail-label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 5px;
}

.detail-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3436;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stats-tabs {
    flex-wrap: wrap;
  }
  
  .tab-btn {
  flex: 1;
    min-width: 120px;
    text-align: center;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
  }

  .number-stats {
    grid-template-columns: 1fr;
  }
  
  .ranges-container {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    height: 300px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chart-container.full-width {
  grid-column: 1 / -1;
  min-height: 400px;
}

.chart-container.full-width canvas {
  min-height: 350px;
}

.radio-section {
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.radio-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#radioSelect {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-control label {
  min-width: 70px;
  color: #666;
}

#volumeControl {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #ddd;
  border-radius: 2px;
  outline: none;
}

#volumeControl::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #4CAF50;
  border-radius: 50%;
  cursor: pointer;
}

#volumeControl::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #4CAF50;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* ===== DIAGNOSTICS ===== */
.diagnostics-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  min-height: 500px;
  margin: 1rem;
  overflow: auto;
  position: relative;
}

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

.status-card {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
}

.status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.status-card .status-icon {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
}

.status-card .status-content {
  flex: 1;
}

.status-card .status-content h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.status-card .status-content p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.diagnostics-controls {
  display: flex;
  gap: 1rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius);
  flex-wrap: wrap;
}

.diagnostics-controls button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.diagnostics-console {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  border-radius: var(--border-radius);
  overflow: hidden;
  min-height: 300px;
  border: 1px solid #333;
  position: relative;
}

.console-output {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #ffffff;
  max-height: calc(100vh - 20rem);
  background: linear-gradient(to bottom, #1e1e1e, #252525);
}

.console-input-container {
  padding: 0.75rem;
  border-top: 1px solid #333;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.console-input {
  flex: 1;
  padding: 0.5rem;
  background: #ffffff;
  border: 1px solid #333;
  border-radius: 4px;
  color: #f4d4d4;
  font-family: 'Consolas', 'Monaco', monospace;
  transition: all 0.3s ease;
}

.console-input:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.diagnostic-chart-container {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  min-height: 300px;
  height: auto;
}

.diagnostic-chart-container canvas {
  width: 100% !important;
  height: 300px !important;
}

@media (max-width: 768px) {
  .diagnostics-container {
    margin: 0.5rem;
    height: calc(100vh - 4rem);
  }
  
  .diagnostics-controls {
    flex-direction: column;
  }
  
  .diagnostics-controls button {
    width: 100%;
    justify-content: center;
  }
  
  .console-input {
    padding: 0.5rem;
  }
}

.sidebar-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.largest-number {
  margin-top: 10px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  font-size: 0.9rem;
  color: #fff;
}

.largest-number span:first-child {
  margin-right: 5px;
  opacity: 0.8;
}

.largest-number span:last-child {
  font-weight: bold;
  color: #4CAF50;
}

/* Diagnostics Section Styles */
.diagnostics-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.diagnostics-status-container {
    margin-bottom: 1rem;
}

.diagnostic-status {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.diagnostic-status.info {
    background-color: #e3f2fd;
    color: #1976d2;
}

.diagnostic-status.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.diagnostic-status.warning {
    background-color: #fff3e0;
    color: #f57c00;
}

.diagnostic-status.error {
    background-color: #ffebee;
    color: #c62828;
}

.diagnostic-status .status-icon {
    margin-right: 0.5rem;
    font-weight: bold;
}

.diagnostics-console {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    height: 400px;
    overflow-y: auto;
    font-family: monospace;
}

.diagnostic-message {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.diagnostic-message.info {
    background-color: #e3f2fd;
    color: #1976d2;
}

.diagnostic-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.diagnostic-message.warning {
    background-color: #fff3e0;
    color: #f57c00;
}

.diagnostic-message.error {
    background-color: #ffebee;
    color: #c62828;
}

.diagnostic-message .status-icon {
    margin-right: 0.5rem;
    font-weight: bold;
}

.progress {
    height: 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    overflow: hidden;
}

.progress-bar {
    background-color: #4a90e2;
    transition: width 0.3s ease;
}

/* Diagnosztikai Rendszer Stílusok */
.diagnostics-section {
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.diagnostics-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.diagnostic-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
}

.diagnostic-status.info {
  background-color: var(--info-bg);
  color: var(--info-color);
}

.diagnostic-status.success {
  background-color: var(--success-bg);
  color: var(--success-color);
}

.diagnostic-status.warning {
  background-color: var(--warning-bg);
  color: var(--warning-color);
}

.diagnostic-status.error {
  background-color: var(--error-bg);
  color: var(--error-color);
}

.status-icon {
  font-size: 1.2rem;
}

.progress-container {
  width: 100%;
  height: 0.5rem;
  background-color: var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.diagnostics-console {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  height: 300px;
  overflow-y: auto;
  font-family: monospace;
  margin-bottom: 1rem;
}

.console-message {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.console-timestamp {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.console-message.info {
  color: var(--info-color);
}

.console-message.success {
  color: var(--success-color);
}

.console-message.warning {
  color: var(--warning-color);
}

.console-message.error {
  color: var(--error-color);
}

.console-input-container {
  display: flex;
  gap: 0.5rem;
}

.console-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--bg-color);
  color: var(--text-color);
}

.console-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Status Cards */
.status-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.status-card {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
}

.status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.status-card .status-icon {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
}

.status-card .status-content {
  flex: 1;
}

.status-card .status-content h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.status-card .status-content p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.status-card.info {
  border-left: 4px solid var(--info-color);
}

.status-card.success {
  border-left: 4px solid var(--success-color);
}

.status-card.warning {
  border-left: 4px solid var(--warning-color);
}

.status-card.error {
  border-left: 4px solid var(--error-color);
}

.status-card.info .status-icon {
  color: var(--info-color);
}

.status-card.success .status-icon {
  color: var(--success-color);
}

.status-card.warning .status-icon {
  color: var(--warning-color);
}

.status-card.error .status-icon {
  color: var(--error-color);
}

@media (max-width: 768px) {
  .status-cards {
    grid-template-columns: 1fr;
  }
}

.diagnostic-chart-container {
  margin-top: 20px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.diagnostic-chart-container canvas {
  width: 100% !important;
  height: 300px !important;
} 