/* ==========================================================================
   CHARDHO ASPIRE - STUDENT DASHBOARD STYLESHEET (dashboard.css)
   ========================================================================== */

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

/* ==========================================================================
   Dashboard Sidebar
   ========================================================================== */

.dashboard-sidebar {
  width: 280px;
  background-color: #0F172A;
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #1E293B;
  transition: all var(--transition-normal);
  z-index: 100;
}

.sidebar-brand {
  height: 76px;
  display: flex;
  align-items: center;
  padding-inline: 1.5rem;
  border-bottom: 1px solid #1E293B;
}

.sidebar-menu {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-category-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
  padding: 0.75rem 0.75rem 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: #94A3B8;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.sidebar-link:hover {
  background-color: #1E293B;
  color: #FFFFFF;
}

.sidebar-link.active {
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-link .badge-count {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  border-radius: var(--radius-full);
  background: #3B82F6;
  color: #FFFFFF;
}

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid #1E293B;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.user-compact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2563EB;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-compact-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-compact-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

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

/* ==========================================================================
   Dashboard Main Container
   ========================================================================== */

.dashboard-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

.dashboard-topbar {
  height: 76px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-page);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  width: 300px;
}

.dashboard-search input {
  background: transparent;
  width: 100%;
  font-size: 0.85rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  position: relative;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: #E2E8F0;
  color: var(--primary);
}

.icon-btn .notify-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid #FFFFFF;
}

/* Dashboard Content Area */
.dashboard-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 2rem;
}

.tab-pane.active {
  display: flex;
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, #1E3A8A 0%, #1E293B 100%);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.welcome-banner h1 {
  color: #FFFFFF;
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
}

.welcome-banner p {
  color: #CBD5E1;
  font-size: 0.95rem;
  max-width: 600px;
}

/* Stats Widgets Grid */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-widget {
  background: #FFFFFF;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-widget-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-widget-icon.blue { background: #EFF6FF; color: #2563EB; }
.stat-widget-icon.green { background: #ECFDF5; color: #059669; }
.stat-widget-icon.purple { background: #FAF5FF; color: #9333EA; }
.stat-widget-icon.amber { background: #FFFBEB; color: #D97706; }

.stat-widget-content h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.1;
}

.stat-widget-content p {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Continue Learning Card */
.learning-resume-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 2rem;
}

.learning-resume-thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.learning-resume-thumb img {
  width: 100%;
  height: 135px;
  object-fit: cover;
}

.learning-resume-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.learning-resume-info h3 {
  font-size: 1.2rem;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.4rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #10B981);
  border-radius: var(--radius-full);
}

/* Course Cards in Dashboard */
.my-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.enrolled-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}

.enrolled-card-header {
  padding: 1.25rem;
  background: #F1F5F9;
  border-bottom: 1px solid var(--border-light);
}

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

.enrolled-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Schedule List */
.schedule-table-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.schedule-table th, .schedule-table td {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.schedule-table th {
  background: var(--bg-surface-alt);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.schedule-table tr:hover {
  background: #F8FAFC;
}

/* Certificates Showcase */
.cert-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.cert-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.cert-preview-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.cert-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Responsive Dashboard Layout */
@media (max-width: 1024px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .learning-resume-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
  }
  .dashboard-sidebar.mobile-open {
    transform: translateX(0);
  }
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-topbar {
    padding-inline: 1rem;
  }
  .dashboard-search {
    display: none;
  }
}
