/* ==========================================
   Teacher Dashboard Premium SaaS CSS System
   ========================================== */

/* Typography & Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Premium Palette */
  --ed-soft-white: #FAF9F6;
  --ed-warm-beige: #FAF6F0;
  --ed-slate-50: #F8FAFC;
  --ed-charcoal: #1E293B;
  --ed-muted-gray: #64748B;
  --ed-border: #E2E8F0;
  
  /* Primary Interactive Color (Soft Premium Purple/Blue) */
  --ed-primary: #6B47DC;
  --ed-primary-hover: #5833C7;
  --ed-primary-light: #F3F0FF;
  --ed-primary-rgb: 107, 71, 220;
  
  /* Soft Blue Accents */
  --ed-blue-bg: #E0F2FE;
  --ed-blue-text: #0369A1;
  --ed-blue-border: #0284C7;
  
  /* Semantic Statuses */
  --ed-success: #10B981;
  --ed-success-bg: #D1FAE5;
  --ed-success-text: #065F46;
  --ed-success-border: #A7F3D0;
  
  /* Warnings */
  --ed-warning: #F59E0B;
  --ed-warning-bg: #FEF3C7;
  --ed-warning-text: #92400E;
  --ed-warning-border: #FDE68A;
  
  /* Danger */
  --ed-danger: #EF4444;
  --ed-danger-bg: #FEE2E2;
  --ed-danger-text: #991B1B;
  --ed-danger-border: #FCA5A5;

  /* Card Layout Properties */
  --ed-radius-sm: 8px;
  --ed-radius-md: 14px;
  --ed-radius-lg: 20px;
  --ed-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --ed-shadow-md: 0 4px 18px rgba(107, 71, 220, 0.03);
  --ed-shadow-lg: 0 10px 30px rgba(107, 71, 220, 0.06);
  --ed-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.bg-color-light, body {
  background-color: var(--ed-slate-50) !important;
  color: var(--ed-charcoal) !important;
  font-family: 'Inter', 'Outfit', sans-serif !important;
  letter-spacing: -0.011em;
}

/* Glassmorphism Accents */
.glass-panel {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(226, 232, 240, 0.7) !important;
}

/* Unified Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif !important;
  font-weight: 700;
  color: var(--ed-charcoal);
  letter-spacing: -0.02em;
}

/* Sidebar Redesign Styling */
#sidebar {
  background-color: #ffffff;
  border-right: 1px solid var(--ed-border);
  padding: 1.5rem 1rem !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--ed-shadow-sm);
  z-index: 1010;
}

#sidebar .bg-gradient {
  background: transparent !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#sidebar .nav-link {
  color: var(--ed-muted-gray) !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.65rem 1rem !important;
  border-radius: var(--ed-radius-sm);
  margin-bottom: 0.25rem;
  transition: var(--ed-transition);
  border: 1px solid transparent;
}

#sidebar .nav-link i {
  font-size: 1.1rem;
  transition: var(--ed-transition);
  color: var(--ed-muted-gray);
}

#sidebar .nav-link:hover {
  background-color: var(--ed-slate-50) !important;
  color: var(--ed-charcoal) !important;
  transform: translateX(2px);
}

#sidebar .nav-link:hover i {
  color: var(--ed-primary);
}

#sidebar .nav-link.active {
  background-color: var(--ed-primary-light) !important;
  color: var(--ed-primary) !important;
  font-weight: 600;
  border: 1px solid rgba(107, 71, 220, 0.08);
  position: relative;
}

#sidebar .nav-link.active i {
  color: var(--ed-primary);
}

#sidebar .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background-color: var(--ed-primary);
  border-radius: 0 4px 4px 0;
}

/* Sidebar Section Headers */
.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ed-muted-gray);
  margin: 1.5rem 0 0.5rem 1rem;
}

/* Sidebar Profile Card */
.sidebar-profile-card {
  background-color: var(--ed-slate-50);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-md);
  padding: 0.85rem;
  margin-top: auto;
  transition: var(--ed-transition);
}

.sidebar-profile-card:hover {
  border-color: rgba(107, 71, 220, 0.2);
  background-color: #ffffff;
  box-shadow: var(--ed-shadow-md);
}

.sidebar-avatar-wrapper {
  position: relative;
  display: inline-block;
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--ed-primary-light);
  color: var(--ed-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid #ffffff;
  box-shadow: var(--ed-shadow-sm);
}

.sidebar-pulse-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background-color: var(--ed-success);
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Top Navbar Redesign styling */
.top-navbar-saas {
  background-color: #ffffff;
  border-bottom: 1px solid var(--ed-border);
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.timezone-badge {
  background-color: var(--ed-slate-50);
  border: 1px solid var(--ed-border);
  color: var(--ed-muted-gray);
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-logout-saas {
  background-color: transparent;
  border: 1px solid var(--ed-border);
  color: var(--ed-muted-gray);
  padding: 0.45rem 1rem;
  border-radius: var(--ed-radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--ed-transition);
}

.btn-logout-saas:hover {
  background-color: var(--ed-danger-bg);
  border-color: var(--ed-danger-border);
  color: var(--ed-danger-text);
}

/* Premium Card Design System */
.card-saas {
  background-color: #ffffff;
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-md);
  box-shadow: var(--ed-shadow-sm);
  transition: var(--ed-transition);
  overflow: hidden;
}

.card-saas:hover {
  box-shadow: var(--ed-shadow-lg);
  border-color: rgba(107, 71, 220, 0.12);
  transform: translateY(-2px);
}

.card-saas-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--ed-border);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-saas-body {
  padding: 1.5rem;
}

/* Premium Welcome Section / Hero Area */
.hero-card-saas {
  background: linear-gradient(135deg, #ffffff 0%, var(--ed-warm-beige) 100%);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-lg);
  padding: 2.2rem 2rem;
  box-shadow: var(--ed-shadow-md);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-card-saas::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(107, 71, 220, 0.06) 0%, rgba(107, 71, 220, 0) 70%);
  pointer-events: none;
}

.hero-stat-pill {
  background-color: #ffffff;
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-md);
  padding: 0.75rem 1.2rem;
  box-shadow: var(--ed-shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 120px;
  transition: var(--ed-transition);
}

.hero-stat-pill:hover {
  border-color: var(--ed-primary);
  transform: translateY(-2px);
}

/* Buttons Redesign */
.btn {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 600;
  border-radius: var(--ed-radius-sm) !important;
  padding: 0.55rem 1.25rem;
  transition: var(--ed-transition) !important;
  font-size: 0.88rem;
  border: 1px solid transparent;
}

.btn-primary, .btn-primary-saas {
  background-color: var(--ed-primary) !important;
  border-color: var(--ed-primary) !important;
  color: #ffffff !important;
}

.btn-primary:hover, .btn-primary-saas:hover {
  background-color: var(--ed-primary-hover) !important;
  border-color: var(--ed-primary-hover) !important;
  box-shadow: 0 4px 12px rgba(107, 71, 220, 0.2);
}

.btn-outline-primary {
  color: var(--ed-primary) !important;
  border-color: var(--ed-primary) !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover {
  background-color: var(--ed-primary-light) !important;
  color: var(--ed-primary) !important;
}

.btn-outline-secondary {
  color: var(--ed-muted-gray) !important;
  border-color: var(--ed-border) !important;
  background-color: #ffffff !important;
}

.btn-outline-secondary:hover {
  background-color: var(--ed-slate-50) !important;
  color: var(--ed-charcoal) !important;
}

.btn-success {
  background-color: var(--ed-success) !important;
  border-color: var(--ed-success) !important;
  color: #ffffff !important;
}

.btn-success:hover {
  background-color: #0d9488 !important;
  border-color: #0d9488 !important;
}

.btn-danger {
  background-color: var(--ed-danger) !important;
  border-color: var(--ed-danger) !important;
  color: #ffffff !important;
}

.btn-danger:hover {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
}

/* Forms & Inputs Redesign */
.form-control, .form-select, select, textarea, input[type="file"] {
  border: 1px solid var(--ed-border) !important;
  border-radius: var(--ed-radius-sm) !important;
  padding: 0.6rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ed-charcoal);
  background-color: #ffffff;
  outline: none;
  transition: var(--ed-transition);
}

.form-control:focus, .form-select:focus, select:focus, textarea:focus {
  border-color: var(--ed-primary) !important;
  box-shadow: 0 0 0 3px rgba(107, 71, 220, 0.12) !important;
}

.form-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ed-charcoal);
  margin-bottom: 0.4rem;
}

/* Drag-and-drop CSV styling */
.csv-upload-box {
  border: 2px dashed var(--ed-border);
  border-radius: var(--ed-radius-md);
  padding: 1.5rem;
  background-color: #ffffff;
  text-align: center;
  transition: var(--ed-transition);
}

.csv-upload-box:hover {
  border-color: var(--ed-primary);
  background-color: var(--ed-primary-light);
}

/* Tabs Segmented styling */
.nav-tabs {
  border-bottom: 1px solid var(--ed-border) !important;
  gap: 0.5rem;
}

.nav-tabs .nav-link {
  border: none !important;
  background: transparent !important;
  color: var(--ed-muted-gray) !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.2rem !important;
  border-radius: 99px !important;
  transition: var(--ed-transition) !important;
}

.nav-tabs .nav-link:hover {
  color: var(--ed-charcoal) !important;
  background-color: var(--ed-slate-50) !important;
}

.nav-tabs .nav-link.active {
  background-color: var(--ed-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(107, 71, 220, 0.15) !important;
}

/* Tables Redesign */
.table-responsive {
  border-radius: var(--ed-radius-md);
  border: 1px solid var(--ed-border);
  overflow: hidden;
  background-color: #ffffff;
}

.table {
  margin-bottom: 0 !important;
  width: 100%;
}

.table th {
  background-color: var(--ed-slate-50) !important;
  color: var(--ed-muted-gray) !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid var(--ed-border) !important;
}

.table td {
  padding: 1rem 1.25rem !important;
  color: var(--ed-charcoal) !important;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--ed-border) !important;
  vertical-align: middle !important;
}

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

.table tbody tr:hover {
  background-color: rgba(107, 71, 220, 0.01) !important;
}

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

/* Status Badges */
.badge {
  font-family: 'Outfit', sans-serif;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 99px !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.bg-success, .badge-success {
  background-color: var(--ed-success-bg) !important;
  color: var(--ed-success-text) !important;
  border-color: var(--ed-success-border) !important;
}

.bg-warning, .badge-warning {
  background-color: var(--ed-warning-bg) !important;
  color: var(--ed-warning-text) !important;
  border-color: var(--ed-warning-border) !important;
}

.bg-danger, .badge-danger {
  background-color: var(--ed-danger-bg) !important;
  color: var(--ed-danger-text) !important;
  border-color: var(--ed-danger-border) !important;
}

.bg-info, .badge-info {
  background-color: var(--ed-blue-bg) !important;
  color: var(--ed-blue-text) !important;
  border-color: rgba(2, 132, 199, 0.15) !important;
}

.bg-secondary, .badge-secondary {
  background-color: var(--ed-slate-50) !important;
  color: var(--ed-muted-gray) !important;
  border-color: var(--ed-border) !important;
}

/* Custom progress styling */
.progress {
  height: 8px !important;
  background-color: var(--ed-border) !important;
  border-radius: 99px !important;
  overflow: hidden;
}

.progress-bar {
  border-radius: 99px !important;
}

/* Modal and layout custom adjustments */
.custom-scroll {
  height: 100vh;
  overflow-y: auto;
}

/* List group elements redesigned */
.list-group-item {
  border: 1px solid var(--ed-border) !important;
  border-radius: var(--ed-radius-md) !important;
  margin-bottom: 0.65rem;
  padding: 1.1rem !important;
  background-color: #ffffff !important;
  transition: var(--ed-transition);
  box-shadow: var(--ed-shadow-sm);
}

.list-group-item:hover {
  border-color: rgba(107, 71, 220, 0.2) !important;
  box-shadow: var(--ed-shadow-md);
  transform: translateY(-1px);
}

/* Active module details selector indicator */
.completed-topic {
  background-color: var(--ed-success-bg) !important;
  color: var(--ed-success-text) !important;
  font-weight: bold;
}
