/* Dashboard & Portal System Styles for Quran Light House Academy */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background-color: #f1f5f9;
}

/* Portal Sidebar */
.portal-sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--primary-dark) 0%, #022019 100%);
  color: #ffffff;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding-bottom: 25px;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: #94a3b8;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-nav li a.active {
  background: linear-gradient(90deg, var(--accent-gold), #b45309);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.user-profile-widget {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-sm {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-details h5 {
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 2px;
}

.user-details span {
  color: #94a3b8;
  font-size: 12px;
}

/* Main Content Area */
.portal-content {
  margin-left: 280px;
  flex-grow: 1;
  padding: 40px;
  width: calc(100% - 280px);
}

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

.portal-title h1 {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 5px;
}

.portal-title p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Stat Cards Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-subtle);
  border: 1px solid #e2e8f0;
}

.stat-info h4 {
  font-size: 28px;
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 14px;

}

.stat-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon-emerald { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon-gold { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon-teal { background: rgba(20, 184, 166, 0.1); color: #14b8a6; }
.stat-icon-purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

/* Data Tables */
.data-table-container {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 30px;
}

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

.table-header h3 {
  font-size: 18px;
  color: var(--primary-dark);
}

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

.data-table th,
.data-table td {
  padding: 16px 25px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.data-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

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

.data-table tbody tr:hover {
  background: #f8fafc;
}

/* Status Tags */
.status-tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
}

.status-completed { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-scheduled { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

/* Admin Modal Dialog System */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg);
  padding: 35px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.3);
  animation: fadeInModal 0.25s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive Admin Panel */
@media (max-width: 768px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .portal-sidebar {
    position: relative;
    width: 100%;
    padding: 20px;
    height: auto;
  }

  .portal-content {
    margin-left: 0;
    width: 100%;
    padding: 20px 15px;
  }

  .portal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .data-table-container {
    overflow-x: auto;
  }

  .data-table th, .data-table td {
    padding: 12px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* ==========================================================================
   FLAGSHIP QURAN JOURNEY & QURAN PASSPORT STYLES
   ========================================================================== */

/* Quran Journey Top Banner Card */
.quran-journey-card {
  background: linear-gradient(135deg, #022019 0%, #044e3a 60%, #065f46 100%);
  border-radius: var(--radius-lg, 16px);
  padding: 32px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(4, 78, 58, 0.25);
  border: 1px solid rgba(217, 119, 6, 0.4);
  margin-bottom: 35px;
  position: relative;
  overflow: hidden;
}

.quran-journey-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.journey-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.journey-title {
  font-family: 'Amiri', serif, var(--font-heading);
  font-size: clamp(24px, 3vw, 32px);
  color: #fbbf24;
  margin-bottom: 4px;
}

.journey-subtitle {
  color: #cbd5e1;
  font-size: 15px;
}

.journey-progress-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.4);
  backdrop-filter: blur(8px);
  padding: 12px 20px;
  border-radius: 12px;
  text-align: center;
  min-width: 120px;
}

.journey-progress-badge .progress-pct {
  font-size: 26px;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1;
  margin-bottom: 2px;
}

.journey-progress-badge .progress-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #cbd5e1;
  font-weight: 700;
}

/* Progress Bar Track */
.journey-progress-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 28px;
}

.journey-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 20px;
  transition: width 0.6s ease;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Metrics Grid */
.journey-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.journey-metric-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.journey-metric-box .metric-icon {
  font-size: 24px;
}

.journey-metric-box .metric-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.journey-metric-box .metric-value {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

/* Stages Roadmap Timeline */
.journey-stages-wrapper {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stages-header-label {
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.journey-stages-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.journey-stages-timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 1;
}

.journey-stage-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 100px;
  text-align: center;
}

.stage-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #64748b;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.journey-stage-step.completed .stage-step-icon {
  background: #10b981;
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.journey-stage-step.active .stage-step-icon {
  background: #f59e0b;
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
  transform: scale(1.15);
}

.stage-step-label {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
  line-height: 1.3;
}

.journey-stage-step.active .stage-step-label {
  color: #fbbf24;
  font-weight: 700;
}

/* ==========================================================================
   QURAN PASSPORT STYLES
   ========================================================================== */

.quran-passport-section {
  margin-bottom: 35px;
}

.section-header-row {
  margin-bottom: 20px;
}

.section-title-sm {
  font-size: 20px;
  color: var(--primary-dark);
  font-weight: 800;
}

.section-subtitle-sm {
  font-size: 14px;
  color: var(--text-muted);
}

.passport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.passport-card {
  background: #ffffff;
  border-radius: var(--radius-md, 12px);
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-subtle);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.passport-completed {
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.passport-in-progress {
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.passport-locked {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  opacity: 0.75;
}

.passport-icon {
  font-size: 32px;
  line-height: 1;
}

.passport-info h5 {
  font-size: 15px;
  color: var(--primary-dark);
  font-weight: 700;
  margin: 6px 0 4px;
}

.passport-date {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.passport-mini-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}

.passport-mini-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 10px;
}

.passport-locked-tag {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 640px) {
  .journey-metrics-grid {
    grid-template-columns: 1fr;
  }
  .passport-grid {
    grid-template-columns: 1fr;
  }
  .quran-journey-card {
    padding: 20px;
  }
}

/* ==========================================================================
   PARENT INTELLIGENCE & FAMILY HUB STYLES
   ========================================================================== */

.family-hub-header {
  background: #ffffff;
  border-radius: var(--radius-lg, 16px);
  padding: 24px 28px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid #e2e8f0;
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.family-title-group h2 {
  font-size: 24px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.family-title-group p {
  color: var(--text-muted);
  font-size: 14px;
}

.family-child-switcher {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.switcher-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.switcher-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.family-child-tab {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.family-child-tab:hover {
  background: #f1f5f9;
  border-color: var(--primary-light);
}

.family-child-tab.active {
  background: linear-gradient(135deg, #022019 0%, #044e3a 100%);
  border-color: var(--accent-gold);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(4, 78, 58, 0.25);
}

.child-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.family-child-tab.active .child-avatar {
  background: #fbbf24;
  color: #022019;
}

.child-tab-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.child-tab-name {
  font-weight: 700;
  font-size: 14px;
}

.child-tab-course {
  font-size: 11px;
  opacity: 0.8;
}

/* Parent Journey Summary Card */
.parent-journey-summary-card {
  background: #ffffff;
  border-radius: var(--radius-lg, 16px);
  padding: 24px 28px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 20px;
  flex-wrap: wrap;
}

.p-journey-metrics {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.p-metric {
  display: flex;
  flex-direction: column;
}

.p-metric .lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.p-metric .val {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
}

.p-overall-circle {
  background: linear-gradient(135deg, #022019, #044e3a);
  color: #ffffff;
  padding: 20px 30px;
  border-radius: 16px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  text-align: center;
}

.p-overall-circle .circle-val {
  font-size: 32px;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1;
}

.p-overall-circle .circle-lbl {
  font-size: 11px;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-top: 4px;
}

/* Parent Intel Grid */
.parent-intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 35px;
}

.intel-card {
  background: #ffffff;
  border-radius: var(--radius-md, 14px);
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
}

.intel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.intel-card-header h3 {
  font-size: 17px;
  color: var(--primary-dark);
  font-weight: 700;
}

/* Evaluation Status List */
.eval-indicators-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eval-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
}

.eval-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.eval-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.status-excellent { background: rgba(16, 185, 129, 0.15); color: #047857; }
.status-good { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.status-improving { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.status-warning { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }

/* Weekly Metrics */
.weekly-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.weekly-box {
  background: #f8fafc;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.weekly-box .w-val {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.weekly-box .w-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

/* 5-Minute Practice Card */
.practice-tasks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;

}

.practice-tasks-list li {
  font-size: 14px;
  color: var(--text-main);
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.practice-tasks-list li span {
  color: #10b981;
  font-weight: 800;
}

.practice-completed-banner {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid #34d399;
  color: #047857;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* 90-Day Roadmap */
.parent-roadmap-section {
  margin-bottom: 35px;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.roadmap-month-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-subtle);
  position: relative;
}

.roadmap-month-card.current-month {
  border: 2px solid var(--accent-gold);
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.roadmap-month-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: rgba(4, 78, 58, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}

.roadmap-month-card.current-month .roadmap-month-badge {
  background: #f59e0b;
  color: #ffffff;
}

.roadmap-month-card h4 {
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.roadmap-month-card ul {
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roadmap-month-card ul li::before {
  content: '• ';
  color: var(--accent-gold);
  font-weight: bold;
}

@media (max-width: 768px) {
  .family-hub-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .family-child-switcher {
    align-items: flex-start;
    width: 100%;
  }
  .switcher-tabs {
    width: 100%;
    overflow-x: auto;
  }
  .parent-intel-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   TEACHER PORTAL & LONGITUDINAL MISTAKE MEMORY STYLES
   ========================================================================== */

.teacher-portal-header {
  background: #ffffff;
  border-radius: var(--radius-lg, 16px);
  padding: 24px 28px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid #e2e8f0;
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.teacher-info-group h2 {
  font-size: 24px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.teacher-info-group p {
  color: var(--text-muted);
  font-size: 14px;
}

.student-select-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 280px;
}

.teacher-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 35px;
}

.feedback-form-card,
.longitudinal-memory-section {
  background: #ffffff;
  border-radius: var(--radius-md, 14px);
  padding: 28px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-subtle);
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.card-title-row h3 {
  font-size: 18px;
  color: var(--primary-dark);
  font-weight: 700;
}

.rating-radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rating-pill {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  background: #f8fafc;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.checkbox-grid label {
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* Longitudinal Mistake Cards */
.mistakes-cards-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.longitudinal-mistake-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.mistake-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.mistake-skill-title {
  font-size: 16px;
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 2px;
}

.mistake-occurrences-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.m-status-current {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}

.status-needs-practice { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }
.status-improving { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.status-mastered { background: rgba(16, 185, 129, 0.15); color: #047857; }

.status-action-btns {
  display: flex;
  gap: 6px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 6px;
}

.btn-gold {
  background: #f59e0b;
  color: #ffffff;
  border: none;
}

.btn-emerald {
  background: #10b981;
  color: #ffffff;
  border: none;
}

.mistake-timeline-history {
  background: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
}

.timeline-header-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.mistake-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #f1f5f9;
  font-size: 13px;
}

.mistake-history-row:last-child {
  border-bottom: none;
}

.m-date {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 12px;
  min-width: 80px;
}

.m-status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 90px;
  text-align: center;
}

.m-note {
  color: var(--text-main);
  font-style: italic;
}

@media (max-width: 992px) {
  .teacher-workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   FREE ASSESSMENT & ALGORITHMIC TEACHER MATCHING STYLES
   ========================================================================== */

.assessment-flow-card {
  background: #ffffff;
  border-radius: var(--radius-lg, 16px);
  padding: 35px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid #e2e8f0;
}

.flow-header {
  text-align: center;
  margin-bottom: 25px;
}

.flow-header h2 {
  font-size: 26px;
  color: var(--primary-dark);
  margin-top: 6px;
}

.flow-header p {
  color: var(--text-muted);
  font-size: 15px;
}

.assessment-steps-bar {
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid #e2e8f0;
}

.assessment-steps-bar .step-item {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 8px;
}

.assessment-steps-bar .step-item.active {
  background: var(--primary);
  color: #ffffff;
}

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

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}

/* Matched Teacher Conversion Card */
.funnel-matched-teacher-card {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
  border: 2px solid var(--accent-gold);
  border-radius: 14px;
  padding: 24px;
  margin-top: 20px;
}

.teacher-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.teacher-card-top .t-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-dark);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.match-reasons-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.match-reasons-list li {
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-reasons-list li span {
  color: #10b981;
  font-weight: 800;
}

/* Standalone Matcher Tool */
.teacher-matcher-tool-card {
  background: #ffffff;
  border-radius: var(--radius-lg, 16px);
  padding: 30px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-subtle);
}

.matcher-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.matched-teacher-mini-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.match-score-pill {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}

.matched-teacher-mini-card h4 {
  font-size: 17px;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.match-reasons-mini {
  list-style: none;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 768px) {
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PARENT NOTIFICATION CENTER, ATTENDANCE ALERTS & PRINTABLE WEEKLY REPORT
   ========================================================================== */

.notif-badge-pill {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parent-notif-panel {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
}

.notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.notif-panel-header h4 {
  font-size: 16px;
  color: var(--primary-dark);
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.notif-item.unread {
  background: #fffbeb;
  border-color: var(--accent-gold);
}

.notif-icon {
  font-size: 20px;
}

.notif-content {
  flex: 1;
}

.notif-title-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.notif-date {
  font-size: 11px;
  color: var(--text-muted);
}

.notif-content p {
  font-size: 12px;
  color: var(--text-main);
  margin: 0;
}

/* Smart Attendance Warning Banner */
.smart-attendance-alert-banner {
  background: linear-gradient(90deg, #fef2f2 0%, #fffbeb 100%);
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.alert-icon {
  font-size: 32px;
}

.alert-content h4 {
  font-size: 16px;
  color: #b91c1c;
  margin-bottom: 4px;
}

.alert-content p {
  font-size: 13px;
  color: #78350f;
  margin: 0;
}

/* Printable Weekly Report Modal */
.printable-report-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.report-modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 25px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.printable-report-card {
  background: #ffffff;
  border: 2px solid #022019;
  border-radius: 12px;
  padding: 30px;
}

.report-brand-header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--accent-gold);
}

.report-brand-header h2 {
  color: #022019;
  font-family: 'Amiri', serif;
  font-size: 26px;
}

.report-brand-header span {
  font-size: 13px;
  font-weight: 700;
  color: #d97706;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.report-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #f8fafc;
  padding: 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.report-section {
  margin-bottom: 20px;
}

.report-section h4 {
  font-size: 15px;
  color: #022019;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.report-section ul {
  list-style: none;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.improved-skills-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-note-box {
  background: #f8fafc;
  padding: 12px 16px;
  border-left: 4px solid var(--accent-gold);
  font-style: italic;
  font-size: 13px;
  border-radius: 4px;
}

.report-footer {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px dashed #cbd5e1;
}

@media print {
  body * {
    visibility: hidden;
  }
  .printable-report-modal,
  .printable-report-modal * {
    visibility: visible;
  }
  .printable-report-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: #ffffff;
    padding: 0;
  }
  .no-print {
    display: none !important;
  }
  .report-modal-content {
    box-shadow: none;
    max-width: 100%;
  }
}

/* ==========================================================================
   UI ENHANCEMENTS: API BADGE, AUDIO PRACTICE WIDGET, & CLASSROOM TOOLBAR
   ========================================================================== */

/* API Status Indicator Badge */
.api-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(3, 46, 37, 0.85);
  border: 1px solid var(--accent-gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.api-status-badge .status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10b981;
}

.api-status-badge .status-dot.pulsing {
  animation: pulseDot 1.8s infinite ease-in-out;
}

.api-status-badge.offline {
  border-color: #f59e0b;
}
.api-status-badge.offline .status-dot {
  background-color: #f59e0b;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Interactive Audio Practice Widget */
.audio-practice-widget {
  background: linear-gradient(135deg, #022019 0%, #033a2e 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.audio-practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.audio-practice-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-controls-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-audio-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #022019;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-audio-play:hover {
  transform: scale(1.08);
  background: #f59e0b;
}

.audio-waveform-container {
  flex: 1;
  min-width: 180px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.waveform-bar {
  flex: 1;
  height: 20%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  transition: height 0.2s ease, background 0.2s ease;
}

.audio-practice-widget.playing .waveform-bar {
  background: var(--accent-gold);
  animation: waveAnim 1.2s infinite ease-in-out alternate;
}

.audio-practice-widget.playing .waveform-bar:nth-child(2n) { animation-delay: 0.2s; }
.audio-practice-widget.playing .waveform-bar:nth-child(3n) { animation-delay: 0.4s; }
.audio-practice-widget.playing .waveform-bar:nth-child(4n) { animation-delay: 0.1s; }

@keyframes waveAnim {
  0% { height: 15%; }
  100% { height: 95%; }
}

.audio-speed-selector {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.audio-speed-selector option {
  background: #022019;
  color: #ffffff;
}

/* Recitation High Contrast Reading Mode */
body.recitation-contrast-mode {
  background-color: #0d1b18 !important;
  color: #f1f5f9 !important;
}

body.recitation-contrast-mode .portal-content,
body.recitation-contrast-mode .card,
body.recitation-contrast-mode .journey-stage-card {
  background: #132722 !important;
  border-color: #1f3d35 !important;
  color: #ffffff !important;
}

body.recitation-contrast-mode h1,
body.recitation-contrast-mode h2,
body.recitation-contrast-mode h3,
body.recitation-contrast-mode h4 {
  color: #fef08a !important;
}

/* Quick Action Toolbar for Teacher Portal */
.quick-action-bar {
  display: flex;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.quick-action-bar label {
  font-size: 12px;
  font-weight: 700;
  color: #022019;
}






