/* Main Layout */
:root {
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;
  --header-height: 60px;
  --primary-color: #5a67d8;
  --primary-hover: #4c51bf;
  --sidebar-bg: #1a202c;
  --sidebar-text: #e2e8f0;
  --sidebar-hover: #2d3748;
  --sidebar-active: #4a5568;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f7fafc;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  transition: width 0.3s ease;
  position: fixed;
  height: 100vh;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-toggle {
  cursor: pointer;
  font-size: 1.5rem;
}

.sidebar-menu {
  padding: 1rem 0;
}

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

.sidebar-menu li {
  margin-bottom: 0.25rem;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.sidebar-menu a:hover {
  background-color: var(--sidebar-hover);
}

.sidebar-menu li.active a {
  background-color: var(--sidebar-active);
  border-left: 3px solid var(--primary-color);
}

.sidebar-menu i {
  margin-right: 0.75rem;
  font-size: 1.25rem;
  min-width: 1.25rem;
}

.sidebar-collapsed .sidebar-menu span {
  display: none;
}

/* Content Area */
.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s ease;
}

.sidebar-collapsed .content {
  margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.header {
  height: var(--header-height);
  background-color: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 900;
}

.header-left h4 {
  margin: 0;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
}

.user-name {
  margin-right: 0.5rem;
}

/* Main Content */
.main-content {
  padding: 1.5rem;
}

/* Login Page */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #f7fafc;
  width: 100%;
}

.login-form {
  width: 100%;
  max-width: 400px;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h2 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* Dashboard */
.dashboard .stat-card {
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.dashboard .stat-card .card-body {
  display: flex;
  align-items: center;
  padding: 1.5rem;
}

.dashboard .stat-icon {
  font-size: 2.5rem;
  margin-right: 1rem;
  color: var(--primary-color);
}

.dashboard .stat-details {
  flex: 1;
}

.dashboard .stat-title {
  margin: 0;
  font-size: 0.875rem;
  color: #718096;
}

.dashboard .stat-value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
}

.dashboard .quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* Users & Admins Tables */
.table-responsive {
  overflow-x: auto;
}

.table th {
  white-space: nowrap;
  background-color: #f8fafc;
}

.table td {
  vertical-align: middle;
}

/* User Selection */
.user-selection-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.selected-users-list,
.search-results-list {
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

.selected-user-item,
.search-result-item {
  padding: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.selected-user-item:last-child,
.search-result-item:last-child {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 0;
    overflow: hidden;
  }

  .sidebar.show {
    width: var(--sidebar-width);
  }

  .content {
    margin-left: 0;
  }

  .user-selection-container {
    grid-template-columns: 1fr;
  }
}
