/* ============================================
   ClassWave — Admin Dashboard Styles
   Design: Soft Purple, White BG, Rounded UI
   ============================================ */

/* ─── CSS Variables ─────────────────────────── */
:root {
  /* Purple palette */
  --purple-50:  #f5f3ff;
  --purple-100: #ede9fe;
  --purple-200: #ddd6fe;
  --purple-300: #c4b5fd;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;

  /* Neutrals */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;

  /* Accent colors */
  --blue-100:   #dbeafe;
  --blue-500:   #3b82f6;
  --green-100:  #d1fae5;
  --green-500:  #10b981;
  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --red-500:    #ef4444;
  --red-600:    #dc2626;

  /* Sidebar */
  --sidebar-w: 250px;
  --sidebar-bg: #ffffff;
  --sidebar-border: var(--gray-200);

  /* Misc */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ───────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Sidebar ────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  border-bottom: none;
}

.brand-icon {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  margin-right: -16px;
}

.brand-icon img {
  filter: brightness(0) saturate(100%) invert(31%) sepia(94%) saturate(4156%) hue-rotate(249deg) brightness(96%) contrast(92%);
}

.brand-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--purple-600);
  letter-spacing: -0.8px;
}

.brand-name span {
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-400);
  padding: 6px 8px 4px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: background var(--transition), color var(--transition);
  position: relative;
  outline: none;
}

.logout-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--purple-50);
  color: var(--purple-600);
}

.nav-item.active {
  background: var(--purple-100);
  color: var(--purple-600);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--purple-500);
  border-radius: 0 4px 4px 0;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--gray-100);
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
}

.admin-avatar {
  width: 34px;
  height: 34px;
  background: var(--purple-500);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.admin-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-role {
  font-size: 11px;
  color: var(--gray-400);
}

/* ─── Main Wrapper ───────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 35c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm60-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM70 88c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm20-45c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zM56 18c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm41 73c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM88 10c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zM24 46c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM10 52c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm44 38c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM5 82c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm21-18c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm53-64c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM33 7c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm60 90c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM44 4c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-26 57c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm71 2c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm1-66c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM82 36c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-57 14c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm67 0c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM14 26c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm66 15c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-70 20c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm58 25c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM71 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-40 21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%237c3aed' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* ─── Topbar ─────────────────────────────────── */
.topbar {
  height: 62px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.menu-toggle:hover {
  background: var(--gray-100);
}

.page-breadcrumb {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-badge {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: 50%;
  color: var(--gray-600);
  cursor: pointer;
  transition: background var(--transition);
}

.topbar-badge:hover {
  background: var(--purple-100);
  color: var(--purple-600);
}

.badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--purple-500);
  border-radius: 50%;
  border: 2px solid #fff;
}

.topbar-user {
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--purple-500);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  transition: box-shadow var(--transition);
}

.user-avatar:hover {
  box-shadow: 0 0 0 3px var(--purple-200);
}

/* ─── Content Area ───────────────────────────── */
.content {
  flex: 1;
  padding: 32px 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ─── Pages ──────────────────────────────────── */
.page {
  display: none;
  animation: fadeIn 0.25s ease;
}

.page.active {
  display: block;
}

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

/* ─── Page Header ────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--gray-500);
  margin-top: 2px;
}

.page-date {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  padding: 6px 12px;
  background: var(--purple-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--purple-100);
  color: var(--purple-600);
  white-space: nowrap;
}

/* ─── Stat Cards ─────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-purple { background: var(--purple-100); color: var(--purple-600); }
.icon-blue   { background: var(--blue-100);   color: var(--blue-500); }
.icon-green  { background: var(--green-100);  color: var(--green-500); }
.icon-orange { background: var(--orange-100); color: var(--orange-500); }

.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  white-space: nowrap;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.stat-change {
  font-size: 11.5px;
  font-weight: 500;
  margin-top: 2px;
}

.stat-change.positive { color: var(--green-500); }
.stat-change.neutral  { color: var(--purple-500); }

/* ─── Dashboard Grid ─────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.dashboard-card.full-width {
  grid-column: 1 / -1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}

.card-tag {
  font-size: 11px;
  font-weight: 600;
  background: var(--purple-100);
  color: var(--purple-600);
  padding: 3px 8px;
  border-radius: 20px;
}

.card-body {
  padding: 20px;
}

/* ─── Quick Actions ──────────────────────────── */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: inherit;
}

.action-btn.primary {
  background: var(--purple-500);
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.action-btn.primary:hover {
  background: var(--purple-600);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.action-btn.secondary {
  background: var(--purple-50);
  color: var(--purple-600);
  border: 1px solid var(--purple-100);
}

.action-btn.secondary:hover {
  background: var(--purple-100);
  transform: translateY(-1px);
}

.action-btn.danger {
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid var(--red-100);
}

.action-btn.danger:hover {
  background: var(--red-100);
  transform: translateY(-1px);
}

.action-btn.outline {
  background: transparent;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
}

.action-btn.outline:hover {
  border-color: var(--purple-400);
  color: var(--purple-600);
  background: var(--purple-50);
  transform: translateY(-1px);
}

.action-btn.secondary:hover {
  background: var(--purple-100);
  transform: translateY(-1px);
}

/* ─── Today's Classes ────────────────────────── */
.today-classes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.class-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.class-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-purple { background: var(--purple-500); }
.dot-blue   { background: var(--blue-500); }
.dot-green  { background: var(--green-500); }
.dot-orange { background: var(--orange-500); }
.dot-gray   { background: var(--gray-400); }

.class-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.class-subject {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-meta {
  font-size: 11.5px;
  color: var(--gray-500);
}

.class-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.status-active   { background: var(--green-100); color: var(--green-500); }
.status-upcoming { background: var(--purple-100); color: var(--purple-600); }

/* ─── Activity List ──────────────────────────── */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--gray-700);
}

.activity-time {
  font-size: 11.5px;
  color: var(--gray-400);
  white-space: nowrap;
}

/* ─── Buttons ────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: var(--purple-500);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.btn-primary:hover {
  background: var(--purple-600);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: transparent;
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--gray-100);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: var(--red-500);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.btn-danger:hover {
  background: var(--red-600);
  transform: translateY(-1px);
}

/* ─── Filter Bar ─────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  background: #fff;
  color: var(--gray-900);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.search-input::placeholder {
  color: var(--gray-400);
}

.filter-select {
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  background: #fff;
  color: var(--gray-700);
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-select:focus {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

/* ─── Data Table ─────────────────────────────── */
.table-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--gray-50);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

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

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: var(--purple-50);
}

/* Table action buttons */
.tbl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.tbl-btn-edit {
  background: var(--purple-50);
  color: var(--purple-600);
  margin-right: 6px;
}

.tbl-btn-edit:hover {
  background: var(--purple-100);
  transform: scale(1.08);
}

.tbl-btn-delete {
  background: #fff0f0;
  color: var(--red-500);
}

.tbl-btn-delete:hover {
  background: #ffe4e4;
  transform: scale(1.08);
}

/* Subject badge in table */
.subject-badge {
  font-weight: 600;
  color: var(--gray-900);
}

.day-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--purple-100);
  color: var(--purple-600);
}

.student-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
}

.s-active   { background: var(--green-100); color: var(--green-500); }
.s-inactive { background: var(--gray-100);  color: var(--gray-500); }

/* Table empty state */
.table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--gray-400);
  gap: 10px;
}

.table-empty p {
  font-size: 14px;
  font-weight: 500;
}

/* ─── Modal ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-sm {
  max-width: 400px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  width: 32px;
  height: 32px;
  background: var(--gray-100);
  border: none;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-600);
  transition: background var(--transition);
}

.modal-close:hover {
  background: var(--gray-200);
}

.modal-body {
  padding: 20px 24px 24px;
}

/* ─── Form ───────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}

/* ── Time Picker Dropdowns ───────────────────── */
.time-picker-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hour and Minute selects get equal flex space */
.time-picker-group .time-select {
  flex: 1;
  min-width: 0;
  text-align: center;
}

/* AM/PM select is narrower */
.time-picker-group .time-select-ampm {
  flex: 0 0 68px;
}

.time-picker-group .time-colon {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-400);
  flex-shrink: 0;
  margin-bottom: 0;
  line-height: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.required {
  color: var(--red-500);
}

.form-input {
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.form-input.invalid {
  border-color: var(--red-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.day-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.day-chip {
  cursor: pointer;
}

.day-chip input {
  display: none;
}

.day-chip span {
  display: inline-block;
  padding: 6px 12px;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  user-select: none;
}

.day-chip:hover span {
  background: var(--purple-50);
  color: var(--purple-600);
}

.day-chip input:checked + span {
  background: var(--purple-100);
  color: var(--purple-600);
  border-color: var(--purple-400);
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.15);
}

.form-error {
  font-size: 11.5px;
  color: var(--red-500);
  font-weight: 500;
  min-height: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

/* ─── Confirm Modal ──────────────────────────── */
.confirm-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--red-500);
  opacity: 0.85;
}

.confirm-text {
  text-align: center;
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ─── Toast ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gray-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
}

.toast.hidden {
  display: none;
}

.toast-icon {
  font-size: 16px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Utilities ──────────────────────────────── */
.hidden { display: none !important; }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .content {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 16px;
  }

  .modal {
    border-radius: var(--radius-lg);
  }
}

/* ─── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ─── Selection ──────────────────────────────── */
::selection {
  background: var(--purple-200);
  color: var(--purple-700);
}

/* ─── Enrollment Feature ─────────────────────── */

/* Enrollment count badge in the schedule table */
.enrolled-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--green-100);
  color: var(--green-500);
  white-space: nowrap;
}

.enrolled-count.empty {
  background: var(--gray-100);
  color: var(--gray-400);
}

/* Enroll (people) button in the table actions */
.tbl-btn-enroll {
  background: var(--green-100);
  color: var(--green-500);
  margin-right: 6px;
}

.tbl-btn-enroll:hover {
  background: #a7f3d0;
  transform: scale(1.08);
}

/* Larger modal variant */
.modal-lg {
  max-width: 640px;
}

/* Small button variant */
.btn-sm {
  padding: 7px 13px;
  font-size: 12.5px;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

/* Enrollment modal header info block */
.enrollment-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.enrollment-schedule-meta {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

/* Schedule strip inside enrollment modal */
.enrollment-schedule-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--purple-50);
  border: 1px solid var(--purple-100);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--purple-600);
  font-weight: 500;
}

.strip-divider {
  width: 1px;
  height: 14px;
  background: var(--purple-200);
}

/* Enrollment section header */
.enrollment-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.enrollment-section-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.enrollment-section-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-900);
}

.enrollment-count-chip {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--purple-100);
  color: var(--purple-600);
  padding: 2px 10px;
  border-radius: 20px;
}

/* Enrolled student list */
.enrolled-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.enrolled-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  transition: background var(--transition);
}

.enrolled-item:hover {
  background: var(--purple-50);
  border-color: var(--purple-100);
}

.enrolled-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--purple-100);
  color: var(--purple-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.enrolled-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.enrolled-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enrolled-meta {
  font-size: 11.5px;
  color: var(--gray-500);
}

/* Enrollment empty state */
.enrollment-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  color: var(--gray-400);
  gap: 10px;
  text-align: center;
  line-height: 1.6;
}

.enrollment-empty p {
  font-size: 13.5px;
}

/* Student Picker list */
.picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  background: #fff;
}

.picker-item:hover {
  background: var(--purple-50);
  border-color: var(--purple-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-enroll-pick {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--purple-500);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition);
  pointer-events: none; /* parent handles click */
}

.picker-item:hover .btn-enroll-pick {
  background: var(--purple-600);
}

/* ─── Registry Notice (Student Modal) ───────── */
.registry-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  background: var(--purple-50);
  border: 1px solid var(--purple-200);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--purple-700);
  line-height: 1.6;
}

.registry-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--purple-500);
}

.registry-notice.hidden {
  display: none;
}

/* Student ID readonly indicator */
input[readonly] {
  background: var(--gray-50);
  color: var(--gray-500);
  cursor: not-allowed;
  border-color: var(--gray-200) !important;
}

input[readonly]:focus {
  box-shadow: none !important;
}

/* ─── Student-Centric Schedule Checklist ─────── */

/* Instructions bar */
.se-instructions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 14px;
}

.se-instructions svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--gray-400);
}

/* Scrollable checklist container */
.se-checklist {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 16px;
}

/* Day group label */
.se-day-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--gray-400);
  padding: 10px 4px 4px;
}

.se-day-label:first-child {
  padding-top: 2px;
}

/* Each schedule row */
.se-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  background: #fff;
  user-select: none;
}

.se-check-item:hover {
  border-color: var(--purple-200);
  background: var(--purple-50);
}

.se-check-item.checked {
  border-color: var(--purple-300);
  background: var(--purple-50);
}

/* Custom checkbox box */
.se-checkbox {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
  background: #fff;
}

.se-check-item:hover .se-checkbox {
  border-color: var(--purple-400);
}

.se-check-item.checked .se-checkbox {
  background: var(--purple-500);
  border-color: var(--purple-500);
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.35);
}

/* Checkmark SVG inside the box */
.se-checkbox svg {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.12s ease;
}

.se-check-item.checked .se-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

/* Schedule info text inside the row */
.se-schedule-info {
  flex: 1;
  min-width: 0;
}

.se-subject {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
}

.se-check-item.checked .se-subject {
  color: var(--purple-700);
}

.se-schedule-details {
  font-size: 11.5px;
  color: var(--gray-500);
  margin-top: 1px;
}

/* Enrolled badge shown on the right when already checked */
.se-enrolled-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--purple-100);
  color: var(--purple-600);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Notification Side Panel (Option 2) ─────── */
.notif-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.notif-panel.active {
  right: 0;
}

.notif-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.notif-overlay.active {
  opacity: 1;
  visibility: visible;
}

.notif-header {
  padding: 30px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
}

.notif-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.notif-subtitle {
  font-size: 13px;
  color: var(--gray-400);
}

.notif-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  background: var(--gray-50);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.notif-close:hover {
  background: var(--purple-50);
  color: var(--purple-600);
  transform: rotate(90deg);
}

.notif-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 25px;
}

.notif-section {
  margin-bottom: 30px;
}

.notif-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  margin-bottom: 15px;
  display: block;
}

.notif-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all var(--transition);
  cursor: pointer;
}

.notif-item:hover {
  background: white;
  box-shadow: var(--shadow-sm);
}

.notif-item.unread {
  background: var(--purple-50);
}

.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-content {
  flex: 1;
}

.notif-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.notif-text strong {
  color: var(--gray-900);
  font-weight: 600;
}

.notif-time {
  font-size: 11.5px;
  color: var(--gray-400);
}

.notif-footer {
  padding: 20px 25px;
  border-top: 1px solid var(--gray-100);
}

.notif-clear-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.notif-clear-btn:hover {
  background: var(--gray-50);
  color: var(--red-500);
  border-color: var(--red-500);
}

.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--gray-100);
  margin: 0 15px;
}

/* ─── Profile Page Styles ────────────────────── */
.profile-container {
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-header-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 30px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  background: var(--purple-100);
  color: var(--purple-600);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 0 0 4px var(--purple-50);
}

.profile-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}

.profile-info p {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 2px;
}

.strength-meter {
  margin-top: 12px;
}

.strength-bar-bg {
  height: 5px;
  width: 100%;
  background: var(--gray-100);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}

.strength-bar-fill {
  height: 100%;
  width: 0;
  transition: all 0.3s ease;
}

.security-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.security-item:not(:last-child) {
  border-bottom: 1px solid var(--gray-50);
}

.security-item-label h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.security-item-label p {
  font-size: 12px;
  color: var(--gray-400);
}

.activity-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success { background: var(--green-100); color: var(--green-500); }
.badge-warning { background: var(--orange-100); color: var(--orange-500); }

/* Switch Toggle Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-200);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--purple-600);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--purple-600);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
/* ─── PROFILE MODAL: Floating Glassmorphism Panel ─────── */

/* Backdrop: full-screen blur overlay */
.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 15, 35, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: backdropFadeIn 0.25s ease;
}

.profile-modal-backdrop.hidden {
  display: none;
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* The floating panel itself */
.profile-modal-panel {
  display: flex;
  width: min(1000px, 100%);
  height: min(680px, 90vh);
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
  animation: panelSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes panelSlideUp {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Close button */
.profile-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.07);
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.profile-modal-close:hover {
  background: rgba(0,0,0,0.14);
  color: var(--gray-900);
  transform: rotate(90deg);
}

/* Sidebar nav inside modal */
.profile-shell {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.profile-shell-nav {
  width: 250px;
  flex-shrink: 0;
  background: var(--gray-50);
  border-right: 1px solid var(--gray-100);
  padding: 28px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
}

.profile-nav-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.profile-nav-item.active {
  background: #fff;
  color: var(--purple-600);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-color: var(--gray-100);
}

.profile-nav-item svg {
  color: var(--gray-400);
  flex-shrink: 0;
}

.profile-nav-item.active svg {
  color: var(--purple-500);
}

/* Content pane */
.profile-shell-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

/* Hero banner inside modal */
.profile-hero {
  height: 160px;
  background: linear-gradient(135deg, var(--purple-500) 0%, var(--blue-500) 100%);
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}

.profile-hero-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.profile-avatar-floating {
  position: absolute;
  bottom: -42px;
  left: 36px;
  width: 100px;
  height: 100px;
  border-radius: 26px;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: var(--purple-600);
  overflow: hidden; /* clip the overlay */
}

/* Upload-enabled avatar */
.profile-avatar-upload {
  cursor: pointer;
}

.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none; /* let clicks pass through to the container */
}

.profile-avatar-upload:hover .avatar-upload-overlay {
  opacity: 1;
}

/* Section tabs */
.settings-section {
  display: none;
  animation: sectionFadeIn 0.3s ease;
  padding: 32px 36px;
}

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

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

.section-header { margin-bottom: 28px; }

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.section-desc {
  font-size: 13px;
  color: var(--gray-500);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .profile-modal-panel {
    flex-direction: column;
    height: 90vh;
    width: 100%;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
    margin: 0 -24px;
  }
  .profile-shell-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--gray-100);
    padding: 12px;
  }
  .profile-nav-item { white-space: nowrap; width: auto; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================
   Hierarchical Schedule Management Styles
   ============================================ */

.schedule-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
}

.schedule-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
}

.schedule-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-400);
  background: var(--purple-50);
}

.schedule-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.schedule-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

.schedule-card-subtitle {
  font-size: 12.5px;
  color: var(--gray-500);
}

.schedule-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  z-index: 2;
}

.schedule-card-stat {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-600);
  background: var(--purple-100);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.schedule-card-giant {
  position: absolute;
  right: -10px;
  bottom: -24px;
  font-size: 96px;
  font-weight: 900;
  color: var(--purple-200);
  opacity: 0.15;
  user-select: none;
  pointer-events: none;
  line-height: 1;
  font-family: inherit;
  transition: transform 0.3s ease, color 0.3s ease;
}

.schedule-card:hover .schedule-card-giant {
  transform: scale(1.08) rotate(-5deg);
  color: var(--purple-300);
  opacity: 0.25;
}

/* Breadcrumbs Navigation */
.schedule-breadcrumbs {
  margin: 10px 0 16px;
  padding: 8px 16px;
  background: var(--purple-50);
  border: 1px solid var(--purple-100);
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  flex-wrap: wrap;
}

.breadcrumb-item {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item:hover {
  color: var(--purple-600);
  font-weight: 600;
}

.breadcrumb-item.active {
  color: var(--purple-600);
  font-weight: 600;
  cursor: default;
  pointer-events: none;
}

.breadcrumb-separator {
  color: var(--gray-400);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
}

/* ─── Dashboard Filter Dropdowns ──────────────── */
.dash-filter-select {
  padding: 8px 36px 8px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--purple-100);
  background-color: var(--purple-50);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--purple-600);
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.dash-filter-select:hover {
  border-color: var(--purple-200);
  background-color: #ffffff;
  color: var(--purple-700);
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.08);
}

.dash-filter-select:focus {
  border-color: var(--purple-500);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* ─── Dashboard Year Cards ────────────────────── */
.years-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.year-card {
  background: #ffffff;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: 160px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.year-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-300);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.08);
}

.year-card:hover .year-text {
  color: var(--purple-400);
}

.year-card:hover .year-num {
  color: var(--purple-100);
  transform: scale(1.05);
}

.year-text {
  font-size: 28px;
  font-weight: 900;
  color: var(--gray-300);
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color var(--transition);
  user-select: none;
}

.year-num {
  font-size: 110px;
  font-weight: 900;
  color: var(--gray-100);
  line-height: 0.8;
  position: absolute;
  bottom: 12px;
  right: 20px;
  transition: all 0.3s ease;
  user-select: none;
}

/* ─── Dashboard Section Cards ─────────────────── */
.sections-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.section-card {
  background: #ffffff;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 20px;
  height: 120px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.section-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-300);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.08);
}

.section-card:hover .section-text {
  color: var(--purple-400);
}

.section-card:hover .section-letter {
  color: var(--purple-100);
  transform: scale(1.05);
}

.section-text {
  font-size: 20px;
  font-weight: 900;
  color: var(--gray-300);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color var(--transition);
  user-select: none;
}

.section-letter {
  font-size: 70px;
  font-weight: 900;
  color: var(--gray-100);
  line-height: 0.8;
  position: absolute;
  bottom: 10px;
  right: 15px;
  transition: all 0.3s ease;
  user-select: none;
}

/* Responsiveness */
@media (max-width: 1024px) {
  .years-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .years-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Active / Selected Card State Styling */
.year-card.active {
  border-color: var(--purple-600);
  background: var(--purple-50);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.12);
}

.year-card.active .year-text {
  color: var(--purple-600);
}

.year-card.active .year-num {
  color: var(--purple-200);
}

/* Skeleton Pulse Loaders */
.year-card.skeleton {
  cursor: default;
  background: #ffffff;
}

.skeleton-pulse {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.5s infinite linear;
}

@keyframes loading-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}




