/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* Dashboard layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar styles */
.sidebar {
  width: 250px;
  background-color: white;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.sidebar-header {
  height: 150px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.sidebar-header img {
  max-width: 100%;
  height: auto;
}
.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 5px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #4b5563;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 5px;
  margin: 0 10px;
}

.sidebar-nav a:hover {
  background-color: #f3f4f6;
}

.sidebar-nav li.active a {
  background-color: #ecfdf5;
  color: #10b981;
}

.sidebar-nav i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 15px 20px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Main content styles */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header styles */
.header {
  height: 60px;
  background-color: white;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 20px;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-info span {
  margin-right: 15px;
  font-size: 0.875rem;
  color: #4b5563;
}

.user-avatar {
  position: relative;
  cursor: pointer;
}

.user-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 150px;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 100;
}

.user-avatar:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #4b5563;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
  background-color: #f3f4f6;
}

/* Dashboard content styles */
.dashboard-content {
  flex: 1;
  padding: 20px;
}

.page-title {
  margin-bottom: 20px;
}

.page-title h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 5px;
  color: #10b981;
}

.page-title p {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Stats cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.bg-emerald {
  background-color: #10b981;
  color: white;
}

.stat-icon i {
  font-size: 1.25rem;
}

.stat-info h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.stat-info p {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Chart containers */
.chart-container {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.chart-container h2 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 15px;
}

.chart {
  height: 300px;
  position: relative;
}

/* Responsive styles */
@media (max-width: 768px) {
  .dashboard-container {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 220px;
    height: 100vh;
    background: white;
    z-index: 200;
    transition: left 0.3s;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    max-height: 100vh;
  }
  .sidebar.open {
    left: 0;
  }
  .main-content {
    margin-left: 0 !important;
  }
  .stats-cards {
    grid-template-columns: 1fr;
  }

  .header {
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px;
  }
  .user-info {
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: 8px;
  }
  .user-info span {
    margin-right: 0;
    margin-bottom: 5px;
  }
  .user-avatar {
    margin-top: 5px;
  }
  .menu-toggle {
    display: block;
    margin-top: 16px;
  }
  #user-name {
    display: none;
  }
  .user-info {
    display: none !important;
  }
  .menu-toggle {
    display: block !important;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 9999;
    background: #10b981;
    color: #fff;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 2rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  .close-sidebar {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  .sidebar.open .close-sidebar {
    display: block;
  }
  .sidebar.open ~ .main-content .menu-toggle {
    display: none !important;
  }
}

/* Login page styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.login-form {
  width: 100%;
  max-width: 400px;
  background-color: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-form h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: #111827;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.875rem;
  color: #4b5563;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.login-button {
  width: 100%;
  padding: 10px;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.login-button:hover {
  background-color: #059669;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 5px;
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  margin-right: 16px;
  cursor: pointer;
  color: #4b5563;
  transition: color 0.2s;
}
.menu-toggle:hover {
  color: #10b981;
}
