/* ==========================================================================
   ENGLORAY LEARNING LMS - WHITE AND BLUE THEME UI
   Full Multi-Device Responsive Styling System (Optimized for 320px to 4K)
   ========================================================================== */

:root {
  /* Color Palette - Premium White & Blue Theme */
  --bg-main: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-blue-light: #EFF6FF;
  --bg-blue-subtle: #DBEAFE;
  
  --primary-blue: #2563EB;
  --primary-blue-hover: #1D4ED8;
  --dark-navy: #1E3A8A;
  --accent-blue: #3B82F6;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --border-light: #E2E8F0;
  --border-blue: #BFDBFE;
  
  --success-green: #10B981;
  --success-bg: #D1FAE5;
  --warning-amber: #F59E0B;
  --warning-bg: #FEF3C7;
  --error-red: #EF4444;
  --error-bg: #FEE2E2;

  /* Typography */
  --font-family-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-heading: 'Outfit', sans-serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(30, 58, 138, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(30, 58, 138, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Base Styles - Strict Zero Horizontal Overflow */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

body {
  font-family: var(--font-family-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  position: relative;
}

div, section, article, header, main, aside, nav, p, h1, h2, h3, h4, h5, h6, span, a, button, iframe, img, svg {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

img, iframe, video, svg {
  max-width: 100% !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  color: var(--dark-navy);
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: break-word;
}

p, span, li, a {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Header Component */
.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100% !important;
  max-width: 100% !important;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  max-width: 100%;
}

.logo-image {
  height: 44px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 4px rgba(30, 58, 138, 0.1));
}

.brand-title {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--dark-navy);
  letter-spacing: -0.5px;
  display: block;
}

.brand-subtitle {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Breadcrumb Navigation */
.course-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  max-width: 100%;
  flex-wrap: wrap;
}

.grade-select-dropdown {
  background: var(--bg-blue-light);
  color: var(--primary-blue);
  border: 1px solid var(--border-blue);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 0.825rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}

.grade-select-dropdown:hover {
  background: var(--bg-blue-subtle);
}

.grade-display-badge {
  background: var(--bg-blue-light);
  color: var(--primary-blue);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-blue);
  display: inline-flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.breadcrumb-separator {
  color: var(--text-light);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.breadcrumb-item {
  color: var(--text-muted);
  font-weight: 500;
}

.breadcrumb-item.active {
  color: var(--primary-blue);
  font-weight: 600;
}

/* User Profile Badge */
.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem 0.35rem 1rem;
  background: var(--bg-blue-light);
  border: 1px solid var(--border-blue);
  border-radius: 9999px;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.user-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark-navy);
  white-space: nowrap;
}

.user-role {
  font-size: 0.75rem;
  color: var(--primary-blue);
  font-weight: 500;
  white-space: nowrap;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  background: var(--primary-blue);
  color: white;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.badge-primary {
  background: var(--bg-blue-light);
  color: var(--primary-blue);
  border: 1px solid var(--border-blue);
}

.badge-accent {
  background: var(--dark-navy);
  color: white;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-neutral {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.badge-info {
  background: var(--bg-blue-light);
  color: var(--primary-blue);
}

/* Main Container Layout */
.app-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  width: 100% !important;
  max-width: 100% !important;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 2rem;
  align-items: start;
  width: 100% !important;
  max-width: 100% !important;
}

/* Left Main Content Column */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Course Overview Dashboard View */
.course-overview-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100% !important;
  max-width: 100% !important;
}

.overview-hero-card {
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  width: 100% !important;
  max-width: 100% !important;
}

.overview-hero-card h1 {
  color: white;
  font-size: 1.85rem;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.overview-hero-card p {
  color: #DBEAFE;
  font-size: 1rem;
}

.classes-grid-header {
  margin-top: 0.5rem;
  width: 100% !important;
}

.classes-grid-header h2 {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.classes-grid-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100% !important;
  max-width: 100% !important;
}

.class-overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: var(--transition-normal);
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
}

.class-overview-card:hover:not(.locked) {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-blue);
}

.class-overview-card.locked {
  opacity: 0.75;
  background: #F8FAFC;
}

.class-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.class-card-number {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary-blue);
}

.class-card-body h3 {
  font-size: 1.1rem;
  color: var(--dark-navy);
  margin-bottom: 0.5rem;
}

.class-card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.class-card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

/* Class Hero Title Card */
.class-hero-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
}

.class-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-blue), var(--dark-navy));
}

.hero-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  width: 100%;
}

.class-title {
  font-size: 1.55rem;
  color: var(--dark-navy);
  margin-bottom: 0.75rem;
  width: 100%;
}

.class-description {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.6;
  width: 100%;
}

/* 5 Steps Wrapper */
.steps-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100% !important;
  max-width: 100% !important;
}

/* Step Card Component */
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
}

.step-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-blue);
}

.step-header {
  padding: 1.25rem 1.75rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100% !important;
  max-width: 100% !important;
}

.step-number-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  text-transform: lowercase;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.step-1 { background: linear-gradient(135deg, #2563EB, #1D4ED8); }
.step-2 { background: linear-gradient(135deg, #0284C7, #0369A1); }
.step-3 { background: linear-gradient(135deg, #0D9488, #0F766E); }
.step-4 { background: linear-gradient(135deg, #7C3AED, #6D28D9); }
.step-5 { background: linear-gradient(135deg, #10B981, #047857); }

.step-header-text {
  flex: 1;
  min-width: 0;
}

.step-header-text h3 {
  font-size: 1.1rem;
  color: var(--dark-navy);
  margin-bottom: 0.15rem;
}

.step-header-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.step-status {
  flex-shrink: 0;
}

.step-body {
  padding: 1.75rem;
  width: 100% !important;
  max-width: 100% !important;
}

/* Step 1: Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #000;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  width: 100% !important;
  max-width: 100% !important;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

/* Step 2: Document Preview Box */
.doc-preview-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-blue-light);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100% !important;
  max-width: 100% !important;
}

.doc-icon {
  width: 50px;
  height: 50px;
  background: white;
  color: #EF4444;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.doc-details {
  flex: 1;
  min-width: 0;
}

.doc-details h4 {
  font-size: 1rem;
  color: var(--dark-navy);
  margin-bottom: 0.25rem;
}

.doc-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.topics-bullet-list {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100% !important;
  max-width: 100% !important;
}

.topics-bullet-list h4 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--dark-navy);
}

.topics-bullet-list ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.topics-bullet-list li {
  font-size: 0.875rem;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.text-blue { color: var(--primary-blue); }
.text-green { color: var(--success-green); }
.text-red { color: var(--error-red); }

/* Step 3: Website Card */
.website-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100% !important;
  max-width: 100% !important;
}

.web-preview-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-blue);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.web-info {
  flex: 1;
  min-width: 0;
}

.web-info h4 {
  font-size: 1rem;
  color: var(--dark-navy);
  margin-bottom: 0.25rem;
}

.web-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
  margin-bottom: 0.5rem;
}

/* Step 4: Quiz Container */
.quiz-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  width: 100% !important;
  max-width: 100% !important;
}

.quiz-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  width: 100% !important;
}

.quiz-question-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition-fast);
  width: 100% !important;
}

.quiz-question-card.unanswered-warning {
  border-color: var(--error-red) !important;
  background: #FEF2F2 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.question-num {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.question-text {
  font-size: 1.05rem;
  color: var(--dark-navy);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.quiz-options-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100% !important;
  max-width: 100% !important;
}

.option-pill {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 2px solid var(--border-light);
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100% !important;
  max-width: 100% !important;
  min-height: 48px;
}

.option-pill:hover {
  border-color: var(--accent-blue);
  background: var(--bg-blue-light);
}

.option-pill input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 22px;
  height: 22px;
  border: 2px solid var(--text-light);
  border-radius: 50%;
  position: relative;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.option-pill input[type="radio"]:checked + .radio-custom {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
}

.option-pill input[type="radio"]:checked + .radio-custom::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.option-pill.selected {
  border-color: var(--primary-blue);
  background: var(--bg-blue-light);
}

.quiz-result-message {
  margin-bottom: 1.25rem;
}

.result-alert {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  border: 1px solid var(--success-green);
  color: var(--success-green);
  width: 100% !important;
}

.result-alert.result-danger {
  background: #FEF2F2 !important;
  border-color: var(--error-red) !important;
  color: var(--error-red) !important;
}

.result-alert i {
  font-size: 2rem;
  flex-shrink: 0;
}

/* Step 5: Compact Inline Email Input & Task Upload */
.submission-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  width: 100% !important;
  flex-wrap: wrap;
}

.email-input-inline-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 360px;
  min-width: 240px;
}

.input-email-icon {
  position: absolute;
  left: 14px;
  color: var(--primary-blue);
  font-size: 0.95rem;
  pointer-events: none;
}

.compact-email-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.4rem;
  font-size: 0.9rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: white;
  color: var(--dark-navy);
  outline: none;
  font-family: inherit;
  transition: var(--transition-fast);
}

.compact-email-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.compact-email-input.input-error {
  border-color: var(--error-red);
  background: #FEF2F2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.task-instructions-card {
  display: flex;
  gap: 1.25rem;
  background: var(--bg-blue-light);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  width: 100% !important;
  max-width: 100% !important;
}

.task-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-blue);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.task-details {
  flex: 1;
  min-width: 0;
}

.task-details h4 {
  font-size: 1rem;
  color: var(--dark-navy);
  margin-bottom: 0.35rem;
}

.task-details p {
  font-size: 0.875rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.upload-dropzone {
  border: 2px dashed var(--accent-blue);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: var(--transition-normal);
  margin-bottom: 1.25rem;
  width: 100% !important;
  max-width: 100% !important;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  background: var(--bg-blue-light);
  border-color: var(--primary-blue);
}

.upload-icon {
  font-size: 2.5rem;
  color: var(--primary-blue);
}

.upload-text h4 {
  font-size: 1.05rem;
  color: var(--dark-navy);
  margin-bottom: 0.25rem;
}

.upload-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-input-hidden {
  display: none;
}

.selected-file-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-blue);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-navy);
  max-width: 100%;
  overflow: hidden;
}

.btn-clear-file {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
}

.btn-clear-file:hover {
  color: var(--error-red);
}

.submission-status-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--success-bg);
  border: 1px solid var(--success-green);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100% !important;
}

.sub-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

/* Action Buttons */
.step-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  width: 100% !important;
}

.course-navigation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
  width: 100% !important;
  max-width: 100% !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  text-decoration: none;
  min-height: 44px;
  max-width: 100%;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.825rem;
  min-height: 36px;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
  min-height: 50px;
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-blue-hover);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-accent {
  background: var(--dark-navy);
  color: white;
}

.btn-accent:hover {
  background: #111827;
}

.btn-success {
  background: var(--success-green);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: #059669;
}

.btn-outline {
  background: transparent;
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
}

.btn-outline:hover {
  background: var(--bg-blue-light);
}

.btn:disabled,
.btn[disabled],
.btn.disabled {
  background-color: #CBD5E1 !important;
  color: #64748B !important;
  border-color: #CBD5E1 !important;
  box-shadow: none !important;
  opacity: 0.65;
  cursor: not-allowed !important;
  transform: none !important;
}

.btn:disabled:hover,
.btn[disabled]:hover {
  background-color: #CBD5E1 !important;
  color: #64748B !important;
}

/* Right Sidebar Styling */
.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100% !important;
  max-width: 100% !important;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  width: 100% !important;
  max-width: 100% !important;
}

.sidebar-card-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-card-header h3 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Progression Circular Ring */
.progression-summary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

.progress-ring-container {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  stroke: var(--bg-subtle);
  stroke-width: 8;
  fill: transparent;
}

.progress-ring-fill {
  stroke: var(--primary-blue);
  stroke-width: 8;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2; /* 0% */
  stroke-linecap: round;
  fill: transparent;
  transition: stroke-dashoffset 0.6s ease;
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 1rem;
  color: var(--dark-navy);
}

.progression-info {
  flex: 1;
  min-width: 0;
}

.progression-info h4 {
  font-size: 0.95rem;
  color: var(--dark-navy);
  margin-bottom: 0.25rem;
}

.progression-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Class Navigation List */
.class-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.class-nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  width: 100%;
}

.class-nav-item:hover:not(.locked) {
  background: var(--bg-blue-light);
  border-color: var(--border-blue);
}

.class-nav-item.active {
  background: var(--bg-blue-light);
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 1px var(--primary-blue);
}

.nav-item-status {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.class-nav-item.active .nav-item-status {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
}

.nav-item-info {
  flex: 1;
  min-width: 0;
}

.nav-item-info h4 {
  font-size: 0.875rem;
  color: var(--dark-navy);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.status-unlocked {
  background: var(--bg-blue-subtle);
  color: var(--primary-blue);
}

.status-locked {
  background: #E2E8F0;
  color: #64748B;
}

.status-completed {
  background: var(--success-bg);
  color: var(--success-green);
}

.nav-arrow {
  font-size: 0.8rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.nav-lock-icon {
  font-size: 0.85rem;
  color: var(--text-light);
  flex-shrink: 0;
}

/* Locked Item Styling */
.class-nav-item.locked {
  opacity: 0.7;
  cursor: not-allowed;
  background: #F8FAFC;
}

/* Assets List */
.assets-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.asset-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  width: 100%;
}

.asset-link:hover {
  background: var(--bg-blue-light);
  border-color: var(--border-blue);
  color: var(--primary-blue);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--primary-blue);
  color: var(--dark-navy);
  font-weight: 600;
  font-size: 0.9rem;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.toast-success {
  border-left-color: var(--success-green);
}

.toast.toast-error {
  border-left-color: var(--error-red);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE BREAKPOINTS (320px to 4K Displays)
   ========================================================================== */

/* 1. Ultra Large Screens & TVs (>= 1600px) */
@media (min-width: 1600px) {
  .header-container, .app-container {
    max-width: 1540px;
  }
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}

/* 2. Standard Laptops / Desktops (1024px - 1280px) */
@media (max-width: 1280px) {
  .header-container {
    padding: 1rem 1.5rem;
  }
  .app-container {
    padding: 0 1.5rem;
    margin: 1.5rem auto;
  }
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
  }
}

/* 3. Tablets & iPad Screens (768px - 1023px) */
@media (max-width: 1023px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
  }

  .header-top-row {
    width: 100%;
  }

  .course-breadcrumb {
    width: 100%;
    justify-content: flex-start;
  }

  .content-grid {
    display: block !important;
    width: 100% !important;
  }

  .sidebar-content {
    order: 2;
    margin-top: 1.75rem;
  }

  .overview-hero-card {
    padding: 2rem 1.5rem;
  }

  .overview-hero-card h1 {
    font-size: 1.65rem;
  }

  .classes-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* 4. ALL SMARTPHONES & MOBILE SCREENS (320px - 767px) - ABSOLUTE CONTAINER CONSTRAINTS */
@media (max-width: 767px) {
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Force display block to eliminate CSS Grid Track Expansion */
  .content-grid, .classes-grid {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .main-content, .sidebar-content, .course-overview-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .app-container {
    padding: 0 0.5rem !important;
    margin: 0.5rem auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .header-container {
    padding: 0.5rem !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .header-top-row {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .brand-logo {
    gap: 0.4rem !important;
    max-width: 75% !important;
  }

  .logo-image {
    height: 32px !important;
    max-width: 110px !important;
  }

  .brand-title {
    font-size: 0.95rem !important;
  }

  .brand-subtitle {
    display: none !important;
  }

  .user-info {
    display: none !important;
  }

  .user-profile-menu {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  .avatar-circle {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.75rem !important;
  }

  .course-breadcrumb {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.75rem !important;
    gap: 0.35rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .overview-hero-card, .class-hero-card, .step-card, .sidebar-card, .class-overview-card {
    padding: 1rem 0.75rem !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1rem !important;
    box-sizing: border-box !important;
  }

  .hero-badge {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .hero-badge .badge {
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 100% !important;
  }

  .class-title {
    font-size: 1.15rem !important;
    width: 100% !important;
  }

  .class-description {
    font-size: 0.85rem !important;
    width: 100% !important;
  }

  /* Step Header Vertical Stacking */
  .step-header {
    padding: 0.75rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .step-header-text {
    width: 100% !important;
    min-width: 0 !important;
  }

  .step-header-text h3 {
    font-size: 1.05rem !important;
  }

  .step-header-text p {
    font-size: 0.8rem !important;
  }

  .step-status {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-start !important;
  }

  .step-body {
    padding: 0.75rem !important;
    width: 100% !important;
  }

  /* Inner Card Stacking for Step 2, 3, 4, 5 */
  .doc-preview-box, .website-card, .task-instructions-card, .quiz-box, .topics-bullet-list, .submission-status-card {
    padding: 0.75rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .doc-details, .web-info, .task-details {
    width: 100% !important;
    min-width: 0 !important;
  }

  .doc-actions, .doc-actions a, .website-card a, .task-instructions-card a {
    width: 100% !important;
  }

  /* Strict Block Buttons for Mobile */
  .step-actions, .course-navigation-footer {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 0.5rem !important;
    box-sizing: border-box !important;
  }

  .btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0.75rem 0.5rem !important;
    white-space: normal !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    font-size: 0.9rem !important;
    min-height: 42px !important;
  }

  .video-container {
    width: 100% !important;
    margin-bottom: 1rem !important;
  }

  .upload-dropzone {
    padding: 1.25rem 0.75rem !important;
    width: 100% !important;
  }

  .toast-container {
    left: 0.5rem !important;
    right: 0.5rem !important;
    bottom: 0.5rem !important;
    max-width: none !important;
  }

  .toast {
    font-size: 0.8rem !important;
    padding: 0.75rem !important;
  }

  .progression-summary {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .option-pill {
    padding: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .option-label {
    white-space: normal !important;
    word-break: break-word !important;
    font-size: 0.85rem !important;
  }
}

/* 5. ULTRA-SMALL 320px MOBILE SCREENS (<= 340px) */
@media (max-width: 340px) {
  .logo-image {
    height: 28px !important;
    max-width: 90px !important;
  }

  .brand-title {
    font-size: 0.85rem !important;
  }

  .class-title {
    font-size: 1.05rem !important;
  }

  .btn {
    font-size: 0.825rem !important;
    padding: 0.6rem 0.4rem !important;
  }
}

/* ==========================================================================
   BASE44 LOGIN, MENTOR FLOW, STUDENT PORTAL & MODALS STYLING SYSTEM
   ========================================================================== */

/* Auth Page Wrapper & Role Selection */
/* Auth Page Wrapper & Role Selection Page */
.auth-page-wrapper {
  min-height: 100vh;
  width: 100vw;
  background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

/* ==========================================================================
   RECREATED MOBILE-FIRST WELCOME SCREEN STYLES
   ========================================================================== */
.welcome-screen-wrapper {
  min-height: 100vh;
  width: 100vw;
  background: linear-gradient(180deg, #F0F7FF 0%, #E6F0FA 50%, #F8FAFC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-x: hidden;
}

/* Desktop Mobile Preview Frame / Responsive Canvas */
.welcome-mobile-canvas {
  width: 100%;
  max-width: 430px;
  height: 920px;
  max-height: 94vh;
  background: #FFFFFF;
  border-radius: 40px;
  box-shadow: 0 25px 60px -15px rgba(30, 58, 138, 0.2), 0 0 0 10px #1E293B, 0 0 0 12px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* Status Bar */
.welcome-status-bar {
  display: none !important;
}

/* Scroll Container */
.welcome-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for clean app feel */
.welcome-scroll-container::-webkit-scrollbar {
  display: none;
}
.welcome-scroll-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Brand Header */
.welcome-brand-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.2rem;
  filter: drop-shadow(0 3px 6px rgba(37, 99, 235, 0.15));
}

.welcome-title {
  font-family: var(--font-family-heading);
  text-align: center;
}

.welcome-title .title-sub {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.1;
}

.welcome-title .title-main {
  display: inline-block;
  font-size: 1.7rem;
  font-weight: 800;
  color: #0F172A;
  position: relative;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.title-underline-svg {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 155px;
  height: 10px;
  pointer-events: none;
}

.welcome-subtitle {
  font-size: 0.85rem;
  color: #64748B;
  line-height: 1.4;
  margin-top: 0.4rem;
  font-weight: 500;
  text-align: center;
}

/* 3D Abstract Education Illustration Area */
.welcome-illustration-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.25rem 0;
  animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.ambient-blue-glow {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(147, 197, 253, 0.12) 50%, rgba(255, 255, 255, 0) 70%);
  filter: blur(18px);
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

/* Floating Orbiting Nodes */
.floating-node {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15), 0 2px 4px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  z-index: 3;
  transition: transform 0.3s ease;
}

.node-atom {
  top: 15px;
  right: 25px;
  color: #2563EB;
  animation: floatNode1 3.8s ease-in-out infinite alternate;
}

.node-lightbulb {
  top: 20px;
  left: 25px;
  color: #F59E0B;
  animation: floatNode2 4.2s ease-in-out infinite alternate;
}

.node-chart {
  top: 105px;
  left: 18px;
  color: #06B6D4;
  animation: floatNode3 3.5s ease-in-out infinite alternate;
}

.node-book {
  top: 110px;
  right: 20px;
  color: #8B5CF6;
  animation: floatNode4 4s ease-in-out infinite alternate;
}

/* Sparkles & Geometry */
.floating-sparkle {
  position: absolute;
  color: #F59E0B;
  font-size: 14px;
  z-index: 2;
  animation: pulseSparkle 2.5s ease-in-out infinite alternate;
}
.sparkle-1 { top: 55px; left: 75px; }
.sparkle-2 { top: 40px; right: 75px; animation-delay: 1s; }

.floating-shape {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
}
.shape-circle {
  width: 12px;
  height: 12px;
  background: #93C5FD;
  opacity: 0.5;
  top: 145px;
  left: 80px;
  animation: floatNode2 5s ease-in-out infinite alternate;
}
.shape-ring {
  width: 18px;
  height: 18px;
  border: 2px solid #A5B4FC;
  opacity: 0.6;
  top: 135px;
  right: 75px;
  animation: floatNode1 4.5s ease-in-out infinite alternate;
}

/* Central Hero Ecosystem Illustration */
.central-hero-illustration {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  margin: 0 auto;
  animation: floatEcosystem 4.5s ease-in-out infinite alternate;
}

.central-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.22);
  mix-blend-mode: multiply;
  filter: contrast(1.04);
  transition: transform 0.3s ease;
}

/* Glassmorphic Role Selection Card Container */
.welcome-role-card-wrapper {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 1.15rem 1rem 0.9rem;
  box-shadow: 0 -8px 32px rgba(30, 58, 138, 0.05), 0 12px 28px rgba(15, 23, 42, 0.08);
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Role Selection Header */
.role-selection-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.role-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #CBD5E1, transparent);
}

.role-selection-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: -0.2px;
  text-transform: none;
}

/* Role Cards Grid */
.role-cards-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.role-selection-card {
  position: relative;
  border-radius: 18px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  user-select: none;
  overflow: hidden;
}

.role-selection-card:focus-visible {
  box-shadow: 0 0 0 3px #3B82F6 !important;
}

/* Card Illustration Header Area */
.role-card-illustration-area {
  position: relative;
  width: 100%;
  height: 110px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Floating Icon Badges */
.student-icon-wrap,
.mentor-icon-wrap {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
}

.student-icon-wrap {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
}

.mentor-icon-wrap {
  background: linear-gradient(135deg, #EA580C, #C2410C);
}

/* Image Wrapper & Character Images */
.role-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  overflow: hidden;
}

.role-character-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.1));
}

.student-character-img {
  object-position: center 38%;
}

.mentor-character-img {
  object-position: center 32%;
}

/* Student Card */
.role-student-card {
  background: linear-gradient(135deg, #E0F2FE 0%, #F0F9FF 100%);
  border: 1px solid #BAE6FD;
}

.role-student-card .role-card-illustration-area {
  background: #81b1f8;
}

.role-student-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -4px rgba(14, 165, 233, 0.25);
  border-color: #38BDF8;
}

/* Mentor Card */
.role-mentor-card {
  background: linear-gradient(135deg, #FFEDD5 0%, #FFF7ED 100%);
  border: 1px solid #FED7AA;
}

.role-mentor-card .role-card-illustration-area {
  background: #fcd6b5;
}

.role-mentor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -4px rgba(249, 115, 22, 0.25);
  border-color: #FB923C;
}

/* Hover Character Animation */
.role-selection-card:hover .student-character-img,
.role-selection-card:hover .mentor-character-img {
  transform: scale(1.05);
}

/* Fixed Text Sizes Across All Displays */
.role-card-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.15rem 0.1rem 0;
}

.role-card-content {
  flex: 1;
  text-align: left;
}

.role-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0F172A;
  line-height: 1.25;
  margin: 0;
}

.role-description {
  font-size: 11.5px !important;
  color: #475569;
  line-height: 1.35;
  font-weight: 400;
  margin-top: 3px;
}

/* Prominent CTA Interactive Buttons */
.role-cta-btn {
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  align-self: flex-end;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.student-cta-btn {
  background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
}

.mentor-cta-btn {
  background: linear-gradient(135deg, #EA580C 0%, #F59E0B 100%);
}

/* Hover & Press Animations for Cards & Buttons */
.role-selection-card:hover .role-cta-btn,
.role-cta-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.role-selection-card:hover .role-cta-btn i,
.role-cta-btn:hover i {
  transform: translateX(3px);
}

.role-selection-card:active,
.role-cta-btn:active {
  transform: scale(0.96) !important;
}

.role-cta-btn i {
  transition: transform 0.2s ease;
}

/* Footer Tagline */
.welcome-footer-tagline {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.5px;
  margin-top: 0.15rem;
}

/* Keyframes Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes floatEcosystem {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.1); opacity: 1; }
}

@keyframes floatNode1 {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-8px) rotate(6deg); }
}

@keyframes floatNode2 {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-10px) rotate(-8deg); }
}

@keyframes floatNode3 {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-7px); }
}

@keyframes floatNode4 {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-9px); }
}

@keyframes pulseSparkle {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* ==========================================================================
   RESPONSIVE OVERRIDES (Mobile Devices 320px - 480px, Tablet & Desktop)
   ========================================================================== */
@media (max-width: 480px) {
  .welcome-screen-wrapper {
    padding: 0;
    background: #FFFFFF;
  }

  .welcome-mobile-canvas {
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  .welcome-scroll-container {
    padding: 1rem 1rem 1.25rem;
  }

  .welcome-illustration-wrapper {
    height: 200px;
  }

  .central-3d-ecosystem {
    transform: scale(0.92);
  }
}

@media (max-width: 340px) {
  .role-cards-container {
    grid-template-columns: 1fr;
  }
  .welcome-illustration-wrapper {
    height: 180px;
  }
  .central-3d-ecosystem {
    transform: scale(0.85);
  }
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .central-3d-ecosystem,
  .floating-node,
  .ambient-blue-glow,
  .floating-sparkle,
  .welcome-brand-header,
  .welcome-illustration-wrapper,
  .welcome-role-card-wrapper {
    animation: none !important;
    transition: none !important;
  }
}

/* Role Selection Cards (Legacy fallback class compatibility) */
.role-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  width: 100%;
  max-width: 780px;
}

.role-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 2.25rem 2rem;
  box-shadow: 0 4px 20px -2px rgba(30, 58, 138, 0.06);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.role-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -8px rgba(37, 99, 235, 0.15);
  border-color: #BFDBFE;
}

.role-icon-box.blue-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #2563EB;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.role-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.5rem;
}

.role-card-desc {
  font-size: 0.9rem;
  color: #64748B;
  line-height: 1.55;
  margin-bottom: 1.75rem;
  flex: 1;
}

.role-card-action {
  font-size: 0.925rem;
  font-weight: 600;
  color: #2563EB;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s ease;
}

.role-card:hover .role-card-action {
  gap: 0.75rem;
}

/* ==========================================================================
   ENGLORAY MOBILE AUTHENTICATION SCREENS (STUDENT & MENTOR)
   ========================================================================== */

.student-canvas {
  background: linear-gradient(180deg, #F0F7FF 0%, #E6F0FA 55%, #F8FAFC 100%) !important;
}

.mentor-canvas {
  background: linear-gradient(180deg, #FFF7ED 0%, #FFEDD5 55%, #FFF7ED 100%) !important;
}

/* Top Navigation Bar with Floating Circular Back Button */
.auth-top-bar {
  width: 100%;
  padding: 0.75rem 1.25rem 0.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 10;
}

.btn-back-circle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.student-back-circle {
  color: #2563EB;
}

.mentor-back-circle {
  color: #EA580C;
}

.btn-back-circle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.btn-back-circle:active {
  transform: scale(0.94);
}

/* Scrollable Container Inside Canvas */
.auth-scroll-container {
  width: 100%;
  height: calc(100% - 80px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  -webkit-overflow-scrolling: touch;
}

/* Brand Header */
.auth-brand-header {
  text-align: center;
  padding: 0.15rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-brand-logo {
  height: 38px;
  max-height: 38px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

.auth-hero-title {
  font-family: var(--font-family-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.auth-hero-subtitle {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
  line-height: 1.3;
}

/* Hero Illustration Area */
.auth-hero-illustration-wrapper {
  position: relative;
  width: 100%;
  height: 125px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.2rem 0;
  user-select: none;
  flex-shrink: 0;
}

.auth-hero-img {
  max-height: 100%;
  max-width: 85%;
  height: 100%;
  width: auto;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.08));
}

/* Soft Decorative Line Art Outline Icons */
.line-deco {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  font-size: 0.95rem;
}

.cap-deco {
  top: 10px;
  left: 24px;
  color: #3B82F6;
  font-size: 1.1rem;
}

.book-deco {
  top: 15px;
  right: 24px;
  color: #60A5FA;
}

.sparkle-1 {
  top: 60px;
  left: 18px;
  color: #F59E0B;
  font-size: 11px;
}

.sparkle-2 {
  top: 45px;
  right: 18px;
  color: #38BDF8;
  font-size: 13px;
}

.cap-deco-peach {
  top: 10px;
  left: 24px;
  color: #F97316;
  font-size: 1.1rem;
}

.book-deco-peach {
  top: 15px;
  right: 24px;
  color: #FDBA74;
}

.sparkle-peach-1 {
  top: 50px;
  right: 18px;
  color: #EA580C;
  font-size: 12px;
}

/* Floating White Bottom Card */
.auth-floating-card {
  background: #FFFFFF;
  border-radius: 28px 28px 0 0;
  padding: 1.1rem 1.2rem 1.25rem;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.06), 0 -2px 10px rgba(0, 0, 0, 0.02);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-grow: 1;
}

/* Student & Mentor Submit Button Styling */
.student-btn-submit {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35) !important;
  height: 46px !important;
  border-radius: 12px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  margin-top: 0.25rem !important;
}

.student-btn-submit:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.45) !important;
}

.mentor-btn-submit {
  background: linear-gradient(135deg, #6B21A8 0%, #7C3AED 100%) !important;
  box-shadow: 0 6px 18px rgba(107, 33, 168, 0.35) !important;
  height: 46px !important;
  border-radius: 12px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  margin-top: 0.25rem !important;
}

.mentor-btn-submit:hover {
  background: linear-gradient(135deg, #581C87 0%, #6B21A8 100%) !important;
  box-shadow: 0 8px 22px rgba(107, 33, 168, 0.45) !important;
}

.student-forgot-link {
  color: #2563EB !important;
  font-weight: 600;
}

.mentor-forgot-link {
  color: #6B21A8 !important;
  font-weight: 600;
}

.student-link {
  color: #2563EB !important;
  font-weight: 700 !important;
}

.mentor-link {
  color: #6B21A8 !important;
  font-weight: 700 !important;
}

.footer-muted-text {
  color: #64748B;
  font-size: 0.85rem;
}

.form-card-subtitle {
  font-size: 0.85rem;
  color: #64748B;
  margin-bottom: 1.5rem;
}

.btn-google-auth {
  width: 100%;
  height: 44px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.btn-google-auth:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #E2E8F0;
}

.auth-divider span {
  padding: 0 0.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.label-row label {
  margin-bottom: 0;
}

.forgot-link {
  font-size: 0.8rem;
  color: #2563EB;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.input-with-icon {
  position: relative;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 0.95rem;
}

.input-with-icon input {
  width: 100%;
  height: 44px;
  padding-left: 42px;
  padding-right: 14px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  font-family: var(--font-family-body);
  font-size: 0.925rem;
  color: #0F172A;
  outline: none;
  transition: all 0.2s ease;
}

.input-with-icon input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-submit-primary {
  width: 100%;
  height: 44px;
  background: #2563EB;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  margin-top: 0.75rem;
  transition: background 0.2s ease;
}

.btn-submit-primary:hover {
  background: #1D4ED8;
}

/* Portal Layout (Mentor & Student) */
.portal-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: #F8FAFC;
  overflow: hidden;
}

.portal-sidebar {
  width: 250px;
  background: #FFFFFF;
  border-right: 1px solid #E2E8F0;
  flex-shrink: 0;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 100;
  overflow-y: auto;
}

/* Main Content Wrapper */
.portal-main {
  flex: 1;
  margin-left: 250px;
  width: calc(100vw - 250px);
  height: 100vh;
  background: #F8FAFC;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  padding: 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #F1F5F9;
}

.sidebar-logo {
  height: 32px;
  width: auto;
}

.sidebar-title-group {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: #0F172A;
  line-height: 1.1;
}

.sidebar-brand-sub {
  font-size: 0.65rem;
  font-weight: 700;
  color: #2563EB;
  letter-spacing: 1px;
}

.sidebar-nav {
  padding: 0.85rem 0.75rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-nav .nav-link i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
  color: #64748B;
}

.sidebar-nav .nav-link:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.sidebar-nav .nav-link.active {
  background: #EFF6FF;
  color: #2563EB;
  font-weight: 600;
}

.sidebar-nav .nav-link.active i {
  color: #2563EB;
}

.sidebar-user-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #F8FAFC;
}

.user-avatar-blue {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2563EB;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info-text {
  flex: 1;
  min-width: 0;
}

.user-display-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0F172A;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-display-role {
  font-size: 0.75rem;
  color: #64748B;
  display: block;
}

.btn-logout {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.btn-logout:hover {
  color: #EF4444;
}

/* Top Bar */

.portal-top-bar {
  padding: 1rem 2rem;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
}

.portal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #2563EB;
  font-size: 0.85rem;
  font-weight: 500;
}

.portal-breadcrumb i {
  font-size: 0.65rem;
  color: #94A3B8;
}

.portal-breadcrumb .active {
  color: #475569;
  font-weight: 400;
}

.portal-content-body {
  padding: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.page-title-section {
  margin-bottom: 1.75rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: 0.9rem;
  color: #64748B;
}

/* Metric Cards Grid */
.metric-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.metric-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.metric-label-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.metric-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: #64748B;
  letter-spacing: 0.5px;
}

.metric-icon-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EFF6FF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
}

.metric-subtext {
  font-size: 0.775rem;
  color: #64748B;
  margin-top: 0.4rem;
}

/* Content Panels */
.content-panel-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.panel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.panel-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0F172A;
}

.panel-header-link {
  font-size: 0.85rem;
  color: #2563EB;
  font-weight: 600;
  text-decoration: none;
}

.panel-header-link:hover {
  text-decoration: underline;
}

.empty-state-text {
  font-size: 0.875rem;
  color: #64748B;
  padding: 0.5rem 0;
}

.margin-top-lg {
  margin-top: 1.75rem;
}

.portal-two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Student Welcome Banner */
.student-welcome-banner {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
  color: white;
  border-radius: 18px;
  padding: 2.5rem 2.25rem;
  box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.25);
}

.banner-welcome-tag {
  font-size: 0.875rem;
  color: #93C5FD;
  font-weight: 500;
  display: block;
}

.banner-student-name {
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  margin: 0.25rem 0 0.35rem 0;
  letter-spacing: -0.5px;
}

.banner-student-meta {
  font-size: 0.85rem;
  color: #DBEAFE;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Subject Cards Grid (Student View) */
.subject-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.subject-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.12);
  border-color: #BFDBFE;
}

.subject-card-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #EFF6FF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.subject-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F172A;
}

/* Modal Popup Overlay (Image 4 Design) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: #FFFFFF;
  width: 100%;
  max-width: 540px;
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modalPopIn 0.25s ease-out forwards;
}

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

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

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0F172A;
}

.btn-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94A3B8;
  cursor: pointer;
  padding: 0.2rem;
  transition: color 0.15s ease;
}

.btn-modal-close:hover {
  color: #0F172A;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lesson-item-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  transition: all 0.2s ease;
}

.lesson-item-card:hover {
  border-color: #BFDBFE;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.lesson-label {
  color: #2563EB;
  font-weight: 600;
  font-size: 0.8rem;
  display: block;
}

.lesson-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0.25rem 0 0.35rem 0;
}

.lesson-desc {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 1rem;
}

.btn-watch-video {
  color: #2563EB;
  background: transparent;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  transition: color 0.15s ease;
}

.btn-watch-video:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

/* Responsive Overrides for Portals and Auth */
@media (max-width: 900px) {
  .metric-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .portal-two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .role-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .portal-sidebar {
    width: 200px;
  }
  
  .portal-main {
    margin-left: 200px;
    width: calc(100vw - 200px);
  }
  
  .portal-content-body {
    padding: 1.25rem;
  }
}

@media (max-width: 600px) {
  .portal-layout {
    flex-direction: column;
    height: auto;
    overflow: auto;
  }

  .portal-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    left: auto;
    top: auto;
  }

  .portal-main {
    margin-left: 0;
    width: 100%;
    height: auto;
    overflow-y: visible;
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
  }

  .metric-cards-grid {
    grid-template-columns: 1fr;
  }

  .banner-student-name {
    font-size: 1.6rem;
  }
}

/* Glassmorphism & Registration Styles */
.register-wide-card {
  max-width: 560px !important;
  width: 100% !important;
}

.role-tab-selector {
  display: flex;
  gap: 0.4rem;
  background: #F1F5F9;
  padding: 0.3rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.role-tab-pill {
  flex: 1;
  padding: 0.65rem 1rem;
  text-align: center;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.875rem;
  color: #64748B;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-tab-pill.active {
  background: #FFFFFF;
  border-color: #BFDBFE;
  color: #2563EB;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-input-clean {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  font-family: var(--font-family-body);
  font-size: 0.9rem;
  color: #0F172A;
  background: #FFFFFF;
  outline: none;
  transition: all 0.2s ease;
}

.form-input-clean:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-card-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748B;
}

.auth-link {
  color: #2563EB;
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.margin-top-md {
  margin-top: 1.25rem;
}

@media (max-width: 600px) {
  .form-grid-two {
    grid-template-columns: 1fr;
  }
}

/* Subview Components (Dashed Empty Cards, Attendance Graph, Node Cards) */
.dashed-empty-card {
  border: 2px dashed #E2E8F0;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 3.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  .margin-top-sm & {
    padding: 2.5rem 2rem;
  }
}

.empty-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #EFF6FF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.empty-card-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.3rem;
}

.empty-card-subtext {
  font-size: 0.9rem;
  color: #64748B;
}

.empty-card-heading-simple {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  margin-top: 0.25rem;
}

.section-label-header {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #2563EB;
  margin-bottom: 0.5rem;
}

/* Attendance Visual Graph & Table */
.chart-visual-container {
  display: flex;
  gap: 1rem;
  height: 180px;
  position: relative;
  margin-top: 1rem;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748B;
  width: 45px;
  text-align: right;
  padding-right: 0.5rem;
}

.chart-graph-area {
  flex: 1;
  position: relative;
  border-bottom: 1px dashed #E2E8F0;
}

.chart-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  border-bottom: 1px dashed #F1F5F9;
}
.chart-grid-line.line-100 { top: 0%; }
.chart-grid-line.line-75 { top: 25%; }
.chart-grid-line.line-50 { top: 50%; }
.chart-grid-line.line-25 { top: 75%; }
.chart-grid-line.line-0 { top: 100%; }

.chart-point-container {
  position: absolute;
  cursor: pointer;
}

.chart-point-dot {
  width: 10px;
  height: 10px;
  background: #2563EB;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.chart-tooltip-popup {
  position: absolute;
  bottom: 18px;
  left: -50px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  white-space: nowrap;
  pointer-events: none;
}

.tooltip-date {
  font-weight: 600;
  color: #0F172A;
}

.tooltip-val {
  color: #2563EB;
}

.chart-x-axis {
  display: flex;
  justify-content: center;
  padding-left: 45px;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #64748B;
}

/* Universal Table Responsive Container & Horizontal Scroll Wrapper */
.panel-card-body,
.panel-card-body.no-padding,
.table-responsive-container {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
  scroll-behavior: smooth !important;
}

/* Mobile Table Horizontal Scroll Tip Bar */
@media (max-width: 767px) {
  .panel-card-body.no-padding::before,
  .table-responsive-container::before {
    content: '👈 Swipe table horizontally to view all columns 👉';
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 5px 12px;
    text-align: center;
    border-bottom: 1px solid #dbeafe;
    letter-spacing: 0.2px;
  }
}

.attendance-data-table,
.mentor-students-table {
  width: 100% !important;
  min-width: 680px !important;
  border-collapse: collapse !important;
  font-size: 0.875rem !important;
  margin: 0 !important;
}

.attendance-data-table th,
.mentor-students-table th {
  background: #F8FAFC;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748B;
  border-bottom: 1px solid #E2E8F0;
  white-space: nowrap !important;
}

.attendance-data-table td,
.mentor-students-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9;
  color: #1E293B;
  white-space: nowrap !important;
  word-break: keep-all !important;
}

/* ==========================================================================
   OFFICIAL DIPLOMA / CERTIFICATE RESPONSIVE VISUAL SYSTEM
   ========================================================================== */
.certificate-modal-card {
  max-width: 860px !important;
  width: 95% !important;
  max-height: 92vh !important;
  border-radius: 20px !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.certificate-modal-body {
  padding: 20px 18px !important;
  background: #f8fafc !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  max-height: calc(92vh - 60px) !important;
}

.certificate-visual-frame {
  width: 100% !important;
  background: #ffffff !important;
  border: 8px solid #1e3a8a !important;
  outline: 2px solid #fbbf24 !important;
  outline-offset: -5px !important;
  border-radius: 16px !important;
  padding: 32px 28px !important;
  text-align: center !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.cert-portal-subtitle {
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 2px !important;
  color: #2563eb !important;
  text-transform: uppercase !important;
}

.cert-main-heading {
  font-size: 2rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 8px 0 4px 0 !important;
  font-family: 'Outfit', serif, sans-serif !important;
  letter-spacing: -0.5px !important;
}

.cert-award-subtext {
  font-size: 0.875rem !important;
  color: #64748b !important;
  font-style: italic !important;
  margin-bottom: 16px !important;
}

.cert-student-name {
  font-size: 2.1rem !important;
  font-weight: 800 !important;
  color: #1e40af !important;
  border-bottom: 2px solid #e2e8f0 !important;
  display: inline-block !important;
  padding-bottom: 6px !important;
  margin-bottom: 16px !important;
  word-break: break-word !important;
  max-width: 100% !important;
}

.cert-description-text {
  font-size: 0.925rem !important;
  color: #334155 !important;
  max-width: 580px !important;
  margin: 0 auto 20px auto !important;
  line-height: 1.55 !important;
}

.cert-course-pill {
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  background: #f1f5f9 !important;
  padding: 10px 20px !important;
  border-radius: 10px !important;
  display: inline-block !important;
  margin-bottom: 24px !important;
  word-break: break-word !important;
  max-width: 100% !important;
}

.cert-footer-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: 16px !important;
  padding-top: 16px !important;
  border-top: 1px solid #f1f5f9 !important;
  gap: 12px !important;
}

.cert-footer-col {
  flex: 1 1 0% !important;
  min-width: 0 !important;
}

/* Mobile Responsive Overrides (< 640px) */
@media (max-width: 639px) {
  .certificate-modal-body {
    padding: 12px 10px !important;
  }

  .certificate-visual-frame {
    border-width: 4px !important;
    outline-width: 1.5px !important;
    padding: 18px 12px !important;
  }

  .cert-portal-subtitle {
    font-size: 0.65rem !important;
    letter-spacing: 1px !important;
  }

  .cert-main-heading {
    font-size: 1.25rem !important;
  }

  .cert-award-subtext {
    font-size: 0.75rem !important;
    margin-bottom: 8px !important;
  }

  .cert-student-name {
    font-size: 1.35rem !important;
    margin-bottom: 10px !important;
  }

  .cert-description-text {
    font-size: 0.775rem !important;
    margin-bottom: 12px !important;
    line-height: 1.45 !important;
  }

  .cert-course-pill {
    font-size: 0.8rem !important;
    padding: 6px 10px !important;
    margin-bottom: 14px !important;
  }

  .cert-footer-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
  }

  .cert-footer-col {
    font-size: 0.7rem !important;
  }
  
  .cert-footer-col:nth-child(1) {
    text-align: left !important;
  }
  .cert-footer-col:nth-child(2) {
    text-align: center !important;
  }
  .cert-footer-col:nth-child(3) {
    text-align: right !important;
  }
}

.badge-status-present {
  display: inline-block;
  background: #DCFCE7;
  color: #15803D;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
}

/* Page Title Header Flex & Nodes */
.page-title-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-primary-action {
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  background: #1D4ED8;
}

.filter-pills-row {
  display: flex;
  gap: 0.5rem;
}

.pill-btn {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pill-btn.active {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

.node-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 440px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.node-title {
  font-weight: 700;
  color: #0F172A;
  font-size: 0.95rem;
}

.node-actions-group {
  display: flex;
  gap: 0.6rem;
}

.btn-node-icon {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.btn-node-icon:hover {
  background: #F1F5F9;
}

.btn-node-icon.text-danger {
  color: #EF4444;
}

/* AI Chat UI */
.ai-chat-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 480px;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.5rem;
  margin-bottom: 1rem;
}

.chat-message {
  display: flex;
  gap: 0.75rem;
  max-width: 80%;
}

.assistant-msg {
  align-self: flex-start;
}

.user-msg {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.assistant-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #EFF6FF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-bubble {
  background: #F1F5F9;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  color: #0F172A;
  line-height: 1.5;
}

.user-msg .msg-bubble {
  background: #2563EB;
  color: #FFFFFF;
}

.chat-input-row {
  display: flex;
  gap: 0.75rem;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.profile-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 0.25rem;
}

/* Mentor Portal Table & Component Styles (Images 1-5) */
.filter-search-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.inline-selector {
  margin-bottom: 0 !important;
  background: #F1F5F9;
  padding: 0.25rem;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #94A3B8;
  font-size: 0.85rem;
}

.search-input-pill {
  padding: 0.45rem 1rem 0.45rem 2.2rem;
  border: 1px solid #CBD5E1;
  border-radius: 20px;
  font-size: 0.875rem;
  color: #0F172A;
  outline: none;
  width: 240px;
  transition: all 0.2s ease;
}

.search-input-pill:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.mentor-students-table td {
  vertical-align: middle;
}

.user-table-name {
  font-weight: 700;
  color: #0F172A;
  font-size: 0.9rem;
}

.user-table-email {
  font-size: 0.78rem;
  color: #64748B;
}

.table-select-clean, .table-input-clean {
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.85rem;
  color: #0F172A;
  background: #FFFFFF;
  outline: none;
}

.status-select-badge {
  border: 1px solid #BBF7D0;
  background: #DCFCE7;
  color: #15803D;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 12px;
  outline: none;
  cursor: pointer;
}

.add-class-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.span-two {
  grid-column: span 2;
}

.span-btn {
  grid-column: span 1;
}

.blue-button-full {
  height: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.class-item-card {
  max-width: 500px !important;
  padding: 1.25rem 1.5rem !important;
}

.node-subtext {
  font-size: 0.8rem;
  color: #64748B;
  margin-top: 0.2rem;
}

@media (max-width: 768px) {
  .add-class-form-grid {
    grid-template-columns: 1fr;
  }
  .span-two, .span-btn {
    grid-column: span 1;
  }
}

/* ==========================================================================
   ACTIVITIES & INTERACTIVE LABS - PREMIUM DASHBOARD STATS & CARD STYLES
   ========================================================================== */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-widget-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-widget-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.08);
}

.stat-widget-card.border-blue {
  border-left: 5px solid #2563eb;
}

.stat-widget-card.border-emerald {
  border-left: 5px solid #10b981;
}

.stat-widget-card.border-purple {
  border-left: 5px solid #8b5cf6;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  width: 100%;
}

.stat-label {
  font-size: 0.825rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-icon {
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.text-blue {
  color: #2563eb;
  background: #eff6ff;
}

.stat-icon.text-emerald {
  color: #10b981;
  background: #dcfce7;
}

.stat-icon.text-purple {
  color: #8b5cf6;
  background: #f3e8ff;
}

.stat-value-big {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.stat-footer-text {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.stat-footer-text .text-success {
  color: #16a34a;
  font-weight: 700;
}

/* ==========================================================================
   GOOGLE OAUTH UI — Keyframe Animations
   Used by the sign-in loading overlay and role-mismatch modal.
   ========================================================================== */

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

/* ==========================================================================
   FRIENDLY EDUCATIONAL MOBILE STUDENT DASHBOARD STYLES (IMAGE 2 UI)
   ========================================================================== */

/* Top Mobile Header */
.student-mobile-app-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #F1F5F9;
  position: sticky;
  top: 0;
  z-index: 120;
}

.btn-mobile-nav-toggle {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mobile-nav-toggle:active {
  transform: scale(0.95);
  background: #F1F5F9;
}

.mobile-header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-header-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-app-icon-circle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #475569;
  cursor: pointer;
}

.notification-badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #EF4444;
  border: 2px solid #FFFFFF;
}

.app-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #E0F2FE;
  background: #E0F2FE;
}

.avatar-img-fit {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

/* Mobile Slide-Out Drawer Navigation Overlay */
.student-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  transition: opacity 0.3s ease;
}

.student-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: #FFFFFF;
  z-index: 210;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 30px rgba(15, 23, 42, 0.15);
  transition: transform 0.3s ease;
}

.student-mobile-drawer.hidden {
  transform: translateX(-100%);
  display: flex !important;
  pointer-events: none;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #F1F5F9;
}

.btn-drawer-close {
  background: #F1F5F9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  cursor: pointer;
}

.drawer-user-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Welcome Section */
.student-app-welcome-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px 12px 4px;
}

.welcome-text-block {
  flex: 1;
}

.welcome-hand-wave {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  display: block;
  margin-bottom: 2px;
}

.welcome-student-name {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.welcome-student-meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563EB;
  margin-top: 4px;
}

.welcome-character-art {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.character-cloud-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #E0E7FF 0%, #DDD6FE 100%);
  border-radius: 50%;
  opacity: 0.85;
}

.welcome-character-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50%;
}

.character-sparkle {
  position: absolute;
  color: #F59E0B;
  font-size: 11px;
}
.sparkle-top { top: -4px; right: 4px; animation: pulseSparkle 2s ease-in-out infinite; }
.sparkle-side { bottom: 2px; left: -6px; color: #8B5CF6; }

/* Motivational Hero Card */
.student-hero-banner-card {
  position: relative;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border-radius: 24px;
  padding: 22px 20px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  margin: 12px 0 20px 0;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.35);
}

.hero-card-content {
  position: relative;
  z-index: 2;
  max-width: 62%;
}

.hero-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.3;
}

.hero-card-subtitle {
  font-size: 0.82rem;
  color: #E0E7FF;
  margin: 6px 0 14px 0;
  line-height: 1.35;
}

.btn-hero-cta {
  background: #FFFFFF;
  color: #4F46E5;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.btn-hero-cta:hover {
  transform: translateY(-2px);
}

.hero-card-illustration {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-glow-circle {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  filter: blur(10px);
}

.hero-3d-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
}

/* 2x2 Statistics Grid */
.student-stats-2x2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.app-stat-card {
  border-radius: 20px;
  padding: 16px 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -4px rgba(15, 23, 42, 0.08);
}

.card-subjects {
  background: #F5F3FF;
  border: 1px solid #EDE9FE;
}

.card-assignments {
  background: #FFFBEB;
  border: 1px solid #FEF3C7;
}

.card-attendance {
  background: #F0FDF4;
  border: 1px solid #DCFCE7;
}

.card-awards {
  background: #F0F9FF;
  border: 1px solid #E0F2FE;
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.purple-circle { background: #8B5CF6; color: #FFFFFF; }
.amber-circle { background: #F59E0B; color: #FFFFFF; }
.green-circle { background: #10B981; color: #FFFFFF; }
.blue-circle { background: #3B82F6; color: #FFFFFF; }

.stat-title-group {
  display: flex;
  flex-direction: column;
}

.stat-category-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #64748B;
  text-transform: uppercase;
}

.stat-big-number {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0F172A;
  margin: 2px 0 0 0;
  line-height: 1.1;
}

.stat-subtext-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748B;
  margin-top: 4px;
}

.stat-chevron {
  font-size: 0.85rem;
  margin-top: 4px;
}
.text-purple { color: #8B5CF6; }
.text-amber { color: #F59E0B; }
.text-emerald { color: #10B981; }
.text-blue { color: #3B82F6; }

/* Section Blocks */
.app-section-block {
  margin-bottom: 22px;
}

.app-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.purple-badge { background: #F3E8FF; color: #9333EA; }
.green-badge { background: #DCFCE7; color: #16A34A; }

.app-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

.app-section-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: #7C3AED;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-card-box {
  background: #FFFFFF;
  border-radius: 22px;
  padding: 20px;
  border: 1px solid #F1F5F9;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

.upcoming-work-card {
  border: 1px dashed #DDD6FE;
  background: #FAF5FF;
}

.announcements-card {
  border: 1px solid #DCFCE7;
  background: #F0FDF4;
}

.empty-state-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.empty-illustration-wrap {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.empty-state-3d-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.empty-text-wrap {
  flex: 1;
}

.empty-title-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1E293B;
  margin: 0 0 4px 0;
}

.empty-sub-text {
  font-size: 0.8rem;
  color: #64748B;
  margin: 0;
  line-height: 1.35;
}

/* Fixed Mobile Bottom Navigation Bar */
.student-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid #F1F5F9;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 25px rgba(15, 23, 42, 0.08);
  padding: 8px 12px 12px 12px;
  z-index: 150;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 14px;
  transition: all 0.2s ease;
  color: #64748B;
  font-family: inherit;
  min-width: 0;
}

.bottom-nav-item .nav-icon-wrap {
  font-size: 1.15rem;
}

.bottom-nav-item .nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap !important;
  text-align: center;
  letter-spacing: -0.2px;
}

.bottom-nav-item.active {
  background: #F3E8FF;
  color: #7C3AED;
}

.bottom-nav-item.active .nav-label {
  font-weight: 800;
}

/* Mobile Responsive Breakpoints (< 768px) */
@media (max-width: 767px) {
  .student-mobile-app-header {
    display: flex;
  }
  .desktop-only-topbar {
    display: none !important;
  }
  .portal-sidebar {
    display: none !important;
  }
  .student-app-main {
    margin-left: 0 !important;
    padding-bottom: 80px !important;
  }
  .student-bottom-nav {
    display: flex;
  }
  .student-app-content-body {
    padding: 12px 16px 85px 16px !important;
  }
}

/* Friendly Educational Mobile App Pill Tabs & Action Buttons */
.app-pill-tabs-row {
  display: flex;
  gap: 8px;
  background: #F8FAFC;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.app-pill-tabs-row::-webkit-scrollbar {
  display: none;
}

.app-pill-tab {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap !important;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.app-pill-tab:hover {
  color: #334155;
  background: rgba(255, 255, 255, 0.6);
}

.app-pill-tab.active {
  background: #7C3AED;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-app-secondary {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.btn-app-secondary:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
}

.section-badge-icon.blue-badge {
  background: #E0F2FE;
  color: #0284C7;
}

.section-badge-icon.amber-badge {
  background: #FEF3C7;
  color: #D97706;
}

/* ==========================================================================
   ENGLORAY SIDEBAR SYSTEM — STUDENT (BLUE) & MENTOR (PURPLE)
   ========================================================================== */

.portal-layout {
  display: flex !important;
  min-height: 100vh;
  background-color: #FAFAFF;
}

.engloray-sidebar-container {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  background: #FFFFFF;
  border-radius: 24px;
  border: 1px solid #F1F5F9;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 32px);
  position: sticky;
  top: 16px;
  margin: 16px 0 16px 16px;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 100;
}

/* Header Brand */
.sidebar-header-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 14px 4px;
  border-bottom: 1px solid #F8FAFC;
  margin-bottom: 14px;
}

.sidebar-brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sidebar-brand-text .brand-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.2px;
}

.sidebar-brand-text .brand-sub {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.brand-sub.student-blue {
  color: #2563EB;
}

.brand-sub.mentor-purple {
  color: #7C3AED;
}

.sidebar-portal-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  display: inline-block;
  vertical-align: middle;
}

.sidebar-portal-tag.mentor-tag {
  background: #F3E8FF;
  color: #7C3AED;
  border: 1px solid #E9D5FF;
}

.sidebar-portal-tag.student-tag {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #DBEAFE;
}

.btn-sidebar-close {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #64748B;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-sidebar-close:hover {
  background: #F1F5F9;
  color: #0F172A;
}

/* Desktop Sidebar hides close button */
@media (min-width: 768px) {
  .portal-sidebar .btn-sidebar-close {
    display: none !important;
  }
}

/* Profile Card */
.sidebar-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-profile-card.student-card {
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
}

.sidebar-profile-card.student-card:hover {
  background: #E0F2FE;
}

.sidebar-profile-card.mentor-card {
  background: #F5F3FF;
  border: 1px solid #EDE9FE;
}

.sidebar-profile-card.mentor-card:hover {
  background: #DDD6FE;
}

.profile-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.profile-avatar-circle {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-circle.blue-avatar {
  background: #DBEAFE;
}

.profile-avatar-circle.purple-avatar {
  background: #DDD6FE;
}

.avatar-img-fit {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.2;
}

.profile-card-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748B;
  margin: 2px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-chevron {
  font-size: 0.75rem;
}

.text-blue {
  color: #2563EB;
}

.text-purple {
  color: #7C3AED;
}

/* Scrollable Navigation Items */
.sidebar-nav-scrollable {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.sidebar-nav-scrollable::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav-scrollable::-webkit-scrollbar-thumb {
  background: #E2E8F0;
  border-radius: 4px;
}

/* Nav Item Base */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-nav-item .nav-icon {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  color: #64748B;
  transition: all 0.2s ease;
}

.sidebar-nav-item:hover {
  background: #F8FAFC;
  color: #0F172A;
}

.sidebar-nav-item:hover .nav-icon {
  color: #334155;
}

/* Student Theme Active Nav Link */
.sidebar-nav-item.student-item.active {
  background: #EFF6FF !important;
  color: #2563EB !important;
  font-weight: 700 !important;
}

.sidebar-nav-item.student-item.active .nav-icon {
  color: #2563EB !important;
}

/* Mentor Theme Active Nav Link */
.sidebar-nav-item.mentor-item.active {
  background: #F5F3FF !important;
  color: #7C3AED !important;
  font-weight: 700 !important;
}

.sidebar-nav-item.mentor-item.active .nav-icon {
  color: #7C3AED !important;
}

/* Footer & Motivation Cards */
.sidebar-footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #F8FAFC;
}

.sidebar-motivation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
}

.sidebar-motivation-card.student-motivation {
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
}

.sidebar-motivation-card.mentor-motivation {
  background: #F5F3FF;
  border: 1px solid #EDE9FE;
}

.motivation-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.3;
  margin: 0;
}

.motivation-3d-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.06));
}

.btn-sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 12px;
  color: #EF4444;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-sidebar-logout:hover {
  background: #FEF2F2;
  color: #DC2626;
}

/* Mentor Mobile App Header */
/* Responsive Mobile Drawer Overrides */
@media (max-width: 767px) {

  .portal-sidebar {
    display: none !important;
  }

  .student-mobile-drawer,
  .mentor-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 86% !important;
    max-width: 320px !important;
    height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 24px 24px 0 !important;
    z-index: 9999 !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .student-mobile-drawer.hidden,
  .mentor-mobile-drawer.hidden {
    transform: translateX(-100%) !important;
    display: flex !important;
    pointer-events: none !important;
  }

  .student-drawer-overlay,
  .mentor-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 9998;
    transition: opacity 0.25s ease;
  }
}

/* ==========================================================================
   STRICT VIEW ISOLATION & HIDDEN OVERRIDE PREVENTER
   Ensures hidden top-level pages, portal layouts, and subviews are never 
   rendered in single-page scroll view.
   ========================================================================== */
.hidden,
.portal-layout.hidden,
.auth-page-wrapper.hidden,
.mentor-subview.hidden,
.student-subview.hidden,
.course-overview-container.hidden,
.content-grid.hidden {
  display: none !important;
}

/* Ensure inner mobile drawers keep slide behavior only inside active portal layout */
.portal-layout:not(.hidden) .student-mobile-drawer.hidden,
.portal-layout:not(.hidden) .mentor-mobile-drawer.hidden {
  display: flex !important;
  transform: translateX(-100%) !important;
}

/* ==========================================================================
   COMMUNITY VIEW FIT & PAGE INTEGRATION RULES
   Integrates Community module seamlessly inside Student & Mentor portals.
   ========================================================================== */
#mentorCommunityView:not(.hidden),
#studentCommunityView:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  height: calc(100vh - 90px);
  max-height: calc(100vh - 90px);
  min-height: 0;
  box-sizing: border-box;
}

.portal-content-body:has(#mentorCommunityView:not(.hidden)),
.portal-content-body:has(#studentCommunityView:not(.hidden)) {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

#mentorCommunityView .page-title-section,
#studentCommunityView .page-title-section {
  margin-bottom: 6px !important;
  flex-shrink: 0;
}

#mentorCommunityView .page-title-section .page-title,
#studentCommunityView .page-title-section .page-title {
  font-size: 1.35rem !important;
}

#mentorCommunityView .page-title-section .page-subtitle,
#studentCommunityView .page-title-section .page-subtitle {
  font-size: 0.825rem !important;
}

#mentorCommunityView .community-layout-container,
#studentCommunityView .community-layout-container {
  flex: 1 1 0%;
  height: 100% !important;
  max-height: 100% !important;
  margin-top: 4px;
}

/* ==========================================================================
   MENTOR DASHBOARD MOBILE TRANSFORMATION DESIGN SYSTEM (TARGET IMAGE 1)
   ========================================================================== */

/* 1. Top Mobile Header */
.mentor-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 40;
}

.btn-mentor-hamburger {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #1e293b;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-brand-logo {
  height: 28px;
  width: auto;
}

.mobile-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.mobile-brand-text .brand-title {
  font-weight: 800;
  font-size: 1rem;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.mobile-brand-text .brand-sub {
  font-weight: 800;
  font-size: 0.65rem;
  color: #7c3aed;
  letter-spacing: 1px;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-header-icon {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #475569;
  font-size: 1rem;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
}

.mobile-header-profile {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #7c3aed;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.avatar-initials-small {
  font-weight: 700;
}

.status-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

/* 2. Hero Banner Card */
.mentor-hero-card {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
  border-radius: 20px;
  padding: 22px 24px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.22);
}

.hero-greeting-text {
  font-size: 0.925rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  display: block;
  margin-bottom: 4px;
}

.hero-main-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0 0 6px 0 !important;
  letter-spacing: -0.3px;
}

.hero-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  margin: 0 !important;
}

.hero-art-side {
  width: 150px;
  height: 115px;
  flex-shrink: 0;
}

.hero-mentor-svg {
  width: 100%;
  height: 100%;
}

/* 3. 2x2 Soft Pastel Metric Statistics Grid */
.mentor-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.mentor-stat-card {
  border-radius: 20px;
  padding: 16px 18px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.03);
}

.mentor-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stat-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.stat-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.mentor-stat-card:hover .stat-arrow-btn {
  transform: translateX(3px);
}

.stat-card-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-card-subtext {
  font-size: 0.775rem;
  font-weight: 600;
  color: #64748b;
}

/* Card Color Systems (Soft Pastel) */
.card-purple { background: #f5f3ff; }
.circle-purple { background: #e9d5ff; color: #8b5cf6; }
.circle-purple-btn { background: #8b5cf6; color: #ffffff; }

.card-blue { background: #eff6ff; }
.circle-blue { background: #dbeafe; color: #3b82f6; }
.circle-blue-btn { background: #3b82f6; color: #ffffff; }

.card-green { background: #f0fdf4; }
.circle-green { background: #dcfce7; color: #10b981; }
.circle-green-btn { background: #10b981; color: #ffffff; }

.card-orange { background: #fffbeb; }
.circle-orange { background: #fef3c7; color: #f59e0b; }
.circle-orange-btn { background: #f59e0b; color: #ffffff; }

/* 4. Approval Queue Card */
.mentor-card-section {
  width: 100%;
}

.mentor-card-wrapper {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #f1f5f9;
  padding: 18px 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.03);
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.header-icon-box.purple-box { background: #f3e8ff; color: #8b5cf6; }
.header-icon-box.blue-box { background: #eff6ff; color: #3b82f6; }

.section-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.count-pill-purple {
  background: #f3e8ff;
  color: #8b5cf6;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 12px;
}

.btn-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.btn-card-link:hover { gap: 9px; }

.approval-card-body {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #faf5ff;
  border-radius: 16px;
  padding: 14px 18px;
  border: 1px dashed #e9d5ff;
}

.approval-illustration-box {
  width: 110px;
  height: 80px;
  flex-shrink: 0;
}

.approval-art-svg {
  width: 100%;
  height: 100%;
}

.approval-status-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 3px 0;
}

.approval-status-subtext {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

/* 5. Quick Actions Section */
.mentor-section-container {
  width: 100%;
}

.section-group-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}

.quick-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  min-width: 62px;
  flex-shrink: 0;
}

.action-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.quick-action-item:hover .action-circle {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.bg-purple { background: #f3e8ff; color: #8b5cf6; }
.bg-blue { background: #eff6ff; color: #3b82f6; }
.bg-emerald { background: #f0fdf4; color: #10b981; }
.bg-amber { background: #fffbeb; color: #f59e0b; }
.bg-violet { background: #f5f3ff; color: #7c3aed; }

.action-label {
  font-size: 0.725rem;
  font-weight: 600;
  color: #475569;
}

/* 6. Recent Activity Section */
.activity-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
  border-radius: 16px;
  padding: 14px 18px;
  border: 1px solid #e2e8f0;
}

.activity-status-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 3px 0;
}

.activity-status-subtext {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.activity-art-side {
  width: 90px;
  height: 65px;
  flex-shrink: 0;
}

.activity-art-svg {
  width: 100%;
  height: 100%;
}

/* 7. Fixed Mobile Bottom Navigation Bar */
.mentor-mobile-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  z-index: 990;
  padding: 0 10px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #64748b;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  flex: 1 1 0%;
  min-width: 0;
  max-width: 76px;
  width: auto;
  height: 100%;
  position: relative;
  transition: color 0.2s ease;
  padding: 4px 2px;
}

.bottom-nav-item i {
  font-size: 1.15rem;
}

.bottom-nav-item .nav-label,
.bottom-nav-item span {
  white-space: nowrap !important;
  font-size: 0.68rem !important;
  line-height: 1.1 !important;
  text-align: center !important;
  letter-spacing: -0.2px;
}

.bottom-nav-item.active {
  color: #2563eb;
  font-weight: 700;
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 24px;
  height: 3px;
  background: #2563eb;
  border-radius: 3px 3px 0 0;
}

.bottom-nav-center-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  border: 4px solid #ffffff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bottom-nav-center-btn:hover {
  transform: translateY(-14px) scale(1.05);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.45);
}

/* Responsive Media Queries */
@media (min-width: 1025px) {
  .mentor-mobile-header,
  .mentor-mobile-bottom-nav {
    display: none !important;
  }
  .desktop-only-topbar {
    display: flex !important;
  }
  .mentor-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .mentor-hero-card {
    padding: 28px 36px;
  }
  .hero-art-side {
    width: 200px;
    height: 140px;
  }
}

@media (max-width: 1024px) {
  .desktop-only-topbar {
    display: none !important;
  }

  .portal-content-body {
    padding-bottom: 80px !important;
  }

  /* Backdrop Overlay for Mobile Drawer */
  .mentor-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    z-index: 9998;
    transition: opacity 0.25s ease;
  }

  .mentor-drawer-overlay.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Mobile Slide-Out Drawer Sidebar */
  #mentorSidebarDrawer.portal-sidebar {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 290px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.18) !important;
    border-radius: 0 24px 24px 0 !important;
    margin: 0 !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease !important;
  }

  #mentorSidebarDrawer.portal-sidebar.hidden {
    transform: translateX(-110%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  #mentorSidebarDrawer.portal-sidebar:not(.hidden) {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: all !important;
  }

  /* Mobile Drawer Header Close Button */
  #mentorSidebarDrawer .btn-sidebar-close.mentor-close {
    display: flex !important;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #F5F3FF;
    border: 1px solid #EDE9FE;
    color: #7C3AED;
    font-size: 16px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .portal-main {
    margin-left: 0 !important;
    width: 100vw !important;
  }
}

/* ==========================================================================
   USER APPROVALS QUEUE — RESPONSIVE CARD & ACTION BUTTON STYLES
   Fixes mobile overflow, button alignment, and text wrapping across all screens.
   ========================================================================== */
.user-approval-card {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 16px 20px !important;
  border-radius: 16px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.user-approval-info {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
  flex: 1 1 240px !important;
}

.user-approval-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
}

.user-approval-details {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.user-approval-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.user-approval-name {
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  color: #0f172a !important;
  word-break: break-word !important;
}

.user-approval-subtext {
  font-size: 0.825rem !important;
  color: #64748b !important;
  margin-top: 2px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.user-approval-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
}

.btn-approve-user,
.btn-reject-user {
  border-radius: 14px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 0.85rem !important;
  border: none !important;
  padding: 10px 16px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

.btn-approve-user {
  background: #10b981 !important;
  color: #ffffff !important;
}

.btn-approve-user:hover {
  background: #059669 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
}

.btn-reject-user {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.btn-reject-user:hover {
  background: #dc2626 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25) !important;
}

/* Mobile Screens (up to 576px) — Full Responsive Fit without Overflow */
@media (max-width: 576px) {
  .user-approval-card {
    padding: 12px 14px !important;
    gap: 10px !important;
  }

  .user-approval-info {
    flex: 1 1 100% !important;
    gap: 10px !important;
  }

  .user-approval-avatar {
    width: 38px !important;
    height: 38px !important;
    font-size: 1rem !important;
  }

  .user-approval-name {
    font-size: 0.95rem !important;
  }

  .user-approval-subtext {
    font-size: 0.775rem !important;
  }

  .user-approval-actions {
    width: 100% !important;
    flex: 1 1 100% !important;
    display: flex !important;
    gap: 8px !important;
    margin-top: 4px !important;
  }

  .btn-approve-user,
  .btn-reject-user {
    flex: 1 1 auto !important;
    min-width: fit-content !important;
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
  }
}


