/* Global styles */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Sidebar Styles */
.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

#sidebar {
  min-width: 250px;
  max-width: 250px;
  min-height: 100vh;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
  background-color: white;
}

#sidebar.active {
  margin-left: -250px;
}

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

#sidebar ul.components {
  padding: 20px 0;
}

#sidebar ul p {
  color: #fff;
  padding: 10px;
}

#sidebar ul li a {
  padding: 10px 20px;
  font-size: 1.1em;
  display: block;
  color: #555;
  text-decoration: none;
}

#sidebar ul li a:hover {
  color: var(--primary-color);
  background: #f8f9fa;
}

#sidebar ul li.active > a, 
#sidebar a[aria-expanded="true"] {
  color: var(--primary-color);
  background: #f8f9fa;
  font-weight: 500;
}

#sidebar ul ul a {
  font-size: 0.9em !important;
  padding-left: 40px !important;
}

/* Content Styles */
#content {
  width: 100%;
  min-height: 100vh;
  transition: all 0.3s;
  padding: 20px;
  max-width: 100%;
  overflow-x: hidden;
}

/* User Profile */
.profile-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.user-icon {
  color: #555;
  margin-left: 10px;
  cursor: pointer;
}

/* Card Styles */
.card {
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  border: none;
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 15px 20px;
}

.card-body {
  padding: 20px;
}

/* Table Styles */
.table {
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  border-top: none;
}

/* Responsive */
@media (max-width: 768px) {
  #sidebar {
    margin-left: -250px;
  }
  #sidebar.active {
    margin-left: 0;
  }
  #content {
    width: 100%;
  }
}

/* Custom Styles for Dashboard Blocks */
.metric-card {
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.metric-icon {
  font-size: 1.5rem;
  margin-right: 10px;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 600;
}

.metric-label {
  font-size: 0.9rem;
  color: #6c757d;
}

.trend-up {
  color: var(--success-color);
}

.trend-down {
  color: var(--danger-color);
}

/* Daily Results Table */
.daily-results-table th {
  font-size: 0.85rem;
  text-align: center;
  vertical-align: middle;
}

.daily-results-table td {
  font-size: 0.85rem;
  text-align: center;
  vertical-align: middle;
}

/* Custom Block Colors */
.block-blue {
  background-color: #4a86e8;
  color: white;
}

.block-green {
  background-color: #28a745;
  color: white;
}

.block-yellow {
  background-color: #ffc107;
  color: black;
}

/* Sidebar Toggle Button */
#sidebarCollapse {
  background: transparent;
  border: none;
}

#sidebarCollapse:focus {
  box-shadow: none;
}

/* Chart container */
.chart-container {
  width: 100%;
  height: 400px;
  max-width: 100%;
  overflow: hidden;
}

/* Container adjustments */
.container-fluid {
  padding-right: 15px;
  padding-left: 15px;
  width: 100%;
  max-width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .metric-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .metric-card {
    margin-bottom: 15px;
  }
}

/* Fix for horizontal scrolling */
.row {
  margin-right: 0;
  margin-left: 0;
}

/* Ensure sidebar is visible by default on desktop */
@media (min-width: 769px) {
  #sidebar {
    margin-left: 0 !important;
  }
}
