/* Admin Dashboard Styles */

/* Admin Header */
.admin-header {
  background: #183F36;
  border-bottom: 1px solid #51676e;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 70px;
}

.admin-header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header__logo img {
  height: 32px;
}

.admin-badge {
  background: #f68e1e;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-header__user {
  display: flex;
  align-items: center;
  gap: 16px;
  color: white;
}

.admin-logout-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Admin Main Layout */
.admin-main {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
  background: #f8f9fa;
  color: #333; /* Dark text color */
}

.admin-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 70px);
}

/* Admin Sidebar */
.admin-sidebar {
  width: 250px;
  background: white;
  border-right: 1px solid #e9ecef;
  padding: 24px 0;
}

.admin-nav {
  display: flex;
  flex-direction: column;
}

.admin-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: #6c757d;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.admin-nav__item:hover {
  background: #f8f9fa;
  color: #183F36;
}

.admin-nav__item.active {
  background: #e8f5e8;
  color: #183F36;
  border-left-color: #183F36;
}

.admin-nav__item i {
  width: 20px;
  text-align: center;
}

/* Admin Content */
.admin-content {
  flex: 1;
  padding: 32px;
  background: #f8f9fa;
  color: #333; /* Dark text color */
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-section__header h1 {
  margin: 0;
  color: #183F36;
  font-size: 28px;
  font-weight: 700;
}

.admin-section__header p {
  margin: 8px 0 0 0;
  color: #6c757d;
}

.admin-section__actions {
  display: flex;
  gap: 12px;
}

/* Admin Buttons */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.admin-btn--primary {
  background: #183F36;
  color: white;
}

.admin-btn--primary:hover {
  background: #0f2a24;
}

.admin-btn--secondary {
  background: white;
  color: #183F36;
  border: 1px solid #dee2e6;
}

.admin-btn--secondary:hover {
  background: #f8f9fa;
  border-color: #183F36;
}

.admin-btn--danger {
  background: #dc3545;
  color: white;
}

.admin-btn--danger:hover {
  background: #c82333;
}

/* Dashboard Stats */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #e8f5e8;
  color: #183F36;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card__content h3 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #183F36;
}

.stat-card__content p {
  margin: 4px 0 0 0;
  color: #6c757d;
  font-size: 14px;
}

/* User Management */
.users-filters {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}

.search-box input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  color: #333; /* Dark text color */
}

.search-box input:focus {
  outline: none;
  border-color: #183F36;
}

.filter-options {
  display: flex;
  gap: 12px;
}

.filter-options select {
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #333; /* Dark text color */
}

.filter-options select:focus {
  outline: none;
  border-color: #183F36;
}

/* Users Table */
.users-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 24px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  color: #333; /* Dark text color */
}

.users-table th {
  background: #f8f9fa;
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: #183F36;
  border-bottom: 1px solid #dee2e6;
}

.users-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
  color: #333; /* Dark text color */
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8f5e8;
  color: #183F36;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.user-details h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #183F36;
}

.user-details p {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #6c757d;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge--active {
  background: #d4edda;
  color: #155724;
}

.role-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.role-badge--user {
  background: #eef2f6;
  color: #4a5568;
}

.role-badge--admin {
  background: #e6f0ff;
  color: #1d4ed8;
}

.role-badge--superadmin {
  background: #fff4e5;
  color: #b45309;
}

.status-badge--inactive {
  background: #f8d7da;
  color: #721c24;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.3s ease;
}

.action-btn--view {
  background: #e8f5e8;
  color: #183F36;
}

.action-btn--view:hover {
  background: #d4edda;
}

.action-btn--delete {
  background: #f8d7da;
  color: #721c24;
}

.action-btn--delete:hover {
  background: #f5c6cb;
}

.action-btn--admin {
  background: #e6f0ff;
  color: #1d4ed8;
}

.action-btn--admin:hover {
  background: #d6e4ff;
}

.action-btn--role {
  background: #fff4e5;
  color: #b45309;
}

.action-btn--role:hover {
  background: #ffe8c7;
}

/* Pagination */
.users-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #333; /* Dark text color */
}

.pagination-info {
  color: #6c757d;
  font-size: 14px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #333; /* Dark text color */
}

.pagination-btn:hover:not(:disabled) {
  border-color: #183F36;
  color: #183F36;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#page-info {
  font-size: 14px;
  color: #6c757d;
  min-width: 80px;
  text-align: center;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  color: #333; /* Dark text color */
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #dee2e6;
}

.modal-header h3 {
  margin: 0;
  color: #183F36;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #6c757d;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #f8f9fa;
  color: #183F36;
}

.modal-body {
  padding: 24px;
  color: #333; /* Dark text color */
}

.modal-body p {
  margin: 0 0 16px 0;
  color: #6c757d;
}

.user-info {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
  color: #333; /* Dark text color */
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid #dee2e6;
}

/* Analytics and Settings sections */
.analytics-content,
.settings-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #333; /* Dark text color */
}

.analytics-content p,
.settings-content p {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .admin-sidebar {
    width: 200px;
  }
  
  .admin-content {
    padding: 24px;
  }
  
  .dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }
  
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 16px;
  }
  
  .admin-nav__item {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .admin-nav__item.active {
    border-left: none;
    border-bottom-color: #183F36;
  }
  
  .admin-content {
    padding: 16px;
  }
  
  .admin-section__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .users-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    max-width: none;
  }
  
  .filter-options {
    justify-content: space-between;
  }
  
  .users-table {
    font-size: 12px;
  }
  
  .users-table th,
  .users-table td {
    padding: 12px 8px;
  }
  
  .users-pagination {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .admin-header__content {
    padding: 0 16px;
  }
  
  .admin-logout-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .admin-logout-btn span {
    display: none; /* Hide "Logout" text on mobile, keep icon */
  }
}

@media (max-width: 480px) {
  .admin-logout-btn {
    padding: 6px 8px;
    min-width: 32px;
    justify-content: center;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  text-align: center;
  color: #183F36;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e1e5e9;
  border-top: 4px solid #183F36;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Admin Content Wrapper */
.admin-content-wrapper {
  min-height: 100vh;
  background: #f8f9fa;
} 