/* ==========================================================================
   ExamPathway — Dashboard & Admin Console Stylesheet
   ========================================================================== */

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 4.25rem);
}

@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Sidebar */
.dash-sidebar {
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .dash-sidebar {
    display: none;
  }
}

.dash-user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.dash-user-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  border: 1.5px solid var(--border-ornate);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  list-style: none;
}

.dash-nav-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--muted-foreground);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dash-nav-item a:hover {
  background: var(--muted);
  color: var(--foreground);
}

.dash-nav-item.active a {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.dash-nav-item svg {
  width: 1.2rem;
  height: 1.2rem;
}

/* Dashboard Main Content */
.dash-main {
  padding: 2.5rem 2rem;
  background: var(--background);
  overflow-y: auto;
}

.dash-header {
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dash-title {
  font-size: 1.85rem;
  font-weight: 800;
}

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.dash-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-stat-val {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
}

.dash-stat-label {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  font-weight: 600;
}

/* Data Tables */
.data-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 2rem;
}

.data-table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  background: var(--muted);
  font-weight: 700;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--muted);
}

/* Admin Specific Elements */
.admin-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Admin Tabs Navigation */
.admin-tabs-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  color: var(--foreground);
  background: var(--muted);
}

.admin-tab-btn.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: var(--primary);
  font-weight: 700;
}

.admin-tab-pane {
  display: none;
  animation: adminFadeIn 0.25s ease forwards;
}

.admin-tab-pane.active {
  display: block;
}

@keyframes adminFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Admin Settings Grid & Cards */
.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-settings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
}

.admin-settings-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.admin-switch-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--foreground);
}

.admin-switch-sub {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-top: 0.15rem;
}

/* Styled Switch */
.admin-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.admin-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  transition: 0.25s;
  border-radius: 24px;
}

.admin-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.admin-switch input:checked + .admin-slider {
  background-color: var(--primary);
}

.admin-switch input:checked + .admin-slider:before {
  transform: translateX(20px);
}

/* Admin Filters & Explorer Toolbar */
.admin-filter-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.admin-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 140px;
  flex: 1;
}

.admin-filter-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
}

.admin-preview-box {
  background: var(--background-subtle);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.875rem;
}

/* Admin Pagination */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--background-subtle);
}

