/* General */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
}

#wrapper {
  min-height: 100vh;
}

/* Sidebar */
#sidebar-wrapper {
  min-width: 220px;
  max-width: 220px;
  background-color: #ffffff;
  transition: all 0.3s;
  border-right: 1px solid #dee2e6;
}

#sidebar-wrapper .list-group-item {
  border: none;
  padding: 15px 20px;
  color: #495057;
  font-weight: 500;
  transition: all 0.2s;
}

#sidebar-wrapper .list-group-item:hover {
  background-color: #f1f3f5;
  color: #0d6efd;
  cursor: pointer;
}

#sidebar-wrapper .sidebar-heading {
  border-bottom: 1px solid #dee2e6;
  font-size: 1.2rem;
}

/* Page content */
#page-content-wrapper {
  width: 100%;
}

/* Navbar */
.navbar {
  padding: 0.6rem 1rem;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

/* Cards */
.card {
  border-radius: 0.75rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Buttons */
.btn {
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Tables */
.table {
  border-radius: 0.5rem;
  overflow: hidden;
}

.table thead {
  background-color: #0d6efd;
  color: #fff;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #f1f3f5;
}

/* Form fields */
.form-control, .form-select {
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
  box-shadow: 0 0 5px rgba(13,110,253,0.5);
  border-color: #0d6efd;
}

/* Upload area */
#uploadedFiles li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

#uploadedFiles li:hover {
  background-color: #e9ecef;
}

/* Dark mode */
body.dark-mode {
  background-color: #121212;
  color: #e9ecef;
}

body.dark-mode .card {
  background-color: #1e1e1e;
  color: #e9ecef;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark-mode .list-group-item {
  background-color: #1e1e1e;
  color: #e9ecef;
}

body.dark-mode .list-group-item:hover {
  background-color: #0d6efd;
  color: #fff;
}

body.dark-mode .table thead {
  background-color: #0d6efd;
  color: #fff;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
  background-color: #2a2a2a;
}

/* Sidebar default (desktop visible, mobile hidden off-screen) */
#sidebar-wrapper {
  min-width: 220px;
  max-width: 220px;
  background-color: #ffffff;
  border-right: 1px solid #dee2e6;
  transition: transform 0.3s ease;
}

/* Desktop: sidebar always shown by default */
@media (min-width: 769px) {
  #sidebar-wrapper {
    transform: translateX(0);
  }
  #sidebar-wrapper.hidden {
    display: none; /* allow toggling on desktop */
  }
}

/* Mobile: sidebar off-canvas by default */
@media (max-width: 768px) {
  #sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 220px;
    z-index: 1050;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transform: translateX(-100%);
  }

  #sidebar-wrapper.active {
    transform: translateX(0);
  }

  /* Overlay */
  #sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
  }

  #sidebar-overlay.active {
    display: block;
  }
}

.chart-canvas {
    height: 400px !important;
    max-height: 400px;
}
