/* ============================================================
   Dashboard CSS – DEVPATH Student Learning Portal (Light Theme)
   ============================================================ */

/* Main Page Setup */
.dashboard-page {
  background: linear-gradient(135deg, #f0f7ff 0%, #e2e8f0 50%, #f1f5f9 100%);
  color: #092B4C;
  min-height: 100vh;
  font-family: var(--font-family);
  overflow-x: hidden;
  position: relative;
}

/* Background Glowing Elements */
.dashboard-bg-glow-1 {
  position: absolute;
  top: -150px;
  left: -150px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(240, 247, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.dashboard-bg-glow-2 {
  position: absolute;
  top: 400px;
  right: -200px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(240, 247, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Dashboard Header / Navbar */
.dash-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(9, 43, 76, 0.08);
  padding: 14px 0;
  box-shadow: 0 4px 20px rgba(9, 43, 76, 0.04);
}

.dash-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.dash-brand:hover {
  transform: scale(1.02);
}

.dash-brand .devpath-brand-logo {
  height: 68px;
  max-height: 76px;
  width: auto;
  object-fit: contain;
  display: block;
}

.dash-nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.dash-nav-item {
  padding: 8px 16px;
  border-radius: 999px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.dash-nav-item:hover,
.dash-nav-item.active {
  color: #0284c7;
  background: rgba(56, 189, 248, 0.12);
}

.dash-user-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #092B4C;
  line-height: 1.2;
}

.user-role {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
}

.btn-dash-logout {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-dash-logout:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

/* Dashboard Main Wrapper */
.dash-main {
  position: relative;
  z-index: 1;
  padding: 36px 0 80px 0;
}

/* Welcome Banner - Light Blue Glassmorphism */
.welcome-banner {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(215, 238, 255, 0.60) 100%) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid transparent;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(215, 238, 255, 0.65) 100%),
    linear-gradient(135deg, rgba(56, 189, 248, 0.85) 0%, rgba(37, 99, 235, 0.85) 100%) !important;
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  border-radius: 28px;
  padding: 36px 40px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 35px rgba(14, 165, 233, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.95);
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-content {
  max-width: 620px;
}

.welcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(37, 99, 235, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #0284c7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.welcome-title {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  color: #092B4C !important;
  margin-bottom: 8px;
  line-height: 1.15;
}

.welcome-subtitle {
  font-size: 15px;
  color: #475569 !important;
  line-height: 1.6;
  font-weight: 500;
}

.welcome-action-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-primary-dash {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary-dash:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
}

.btn-secondary-dash {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #092B4C;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary-dash:hover {
  background: #ffffff;
  transform: translateY(-2px);
  border-color: #0284c7;
}

/* Quick Stats Bar */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.15);
}

.stat-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon-box svg {
  width: 22px;
  height: 22px;
  display: block;
}

.icon-blue {
  background: rgba(56, 189, 248, 0.15);
  color: #0284c7;
}

.icon-green {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.icon-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.icon-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #7c3aed;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #092B4C;
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: #64748B;
  margin-top: 2px;
  font-weight: 500;
}

/* Section Header & Filters */
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-section-title {
  font-size: 22px;
  font-weight: 800;
  color: #092B4C;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-section-title span {
  font-size: 13px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: #0284c7;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.dash-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 260px;
  max-width: 380px;
  flex: 1;
}

.search-box input,
.search-box input[type="text"],
.search-box .search-input {
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
  padding: 10px 16px 10px 44px !important;
  color: #092B4C;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(14, 165, 233, 0.05);
}

.search-box input::placeholder,
.search-box input[type="text"]::placeholder,
.search-box .search-input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.search-box input:hover,
.search-box input[type="text"]:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: #ffffff;
}

.search-box input:focus,
.search-box input[type="text"]:focus,
.search-box .search-input:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748B;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: color 0.2s ease;
}

.search-box:focus-within .search-icon {
  color: #0284c7;
}

.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #475569;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.chip-btn:hover,
.chip-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.25);
}

/* Course Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

/* Course Card - Light Theme & Hover Effect */
.dash-course-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(240, 249, 255, 0.7) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  box-shadow: 0 10px 30px rgba(9, 43, 76, 0.05);
  backdrop-filter: blur(16px);
  cursor: pointer;
}

/* Glass Sheen Light Sweep on Hover */
.dash-course-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-25deg);
  transition: left 0.75s ease;
  pointer-events: none;
  z-index: 10;
}

.dash-course-card:hover::after {
  left: 150%;
}

.dash-course-card:hover {
  transform: translateY(-10px) scale(1.02) !important;
  border-color: transparent !important;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(224, 242, 254, 0.85) 100%),
    linear-gradient(135deg, #38bdf8 0%, #2563eb 100%) !important;
  background-origin: padding-box, border-box !important;
  background-clip: padding-box, border-box !important;
  box-shadow:
    0 22px 50px rgba(14, 165, 233, 0.25),
    0 0 30px rgba(56, 189, 248, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.95) !important;
}

.card-banner {
  width: 100%;
  aspect-ratio: 2 / 1;
  height: auto;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  filter: brightness(1.22) contrast(1.08) saturate(1.15);
  transition: filter 0.35s ease, transform 0.35s ease;
}

.dash-course-card:hover .card-banner {
  filter: brightness(1.32) contrast(1.12) saturate(1.22);
}

.card-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(9, 43, 76, 0.15) 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.dash-course-card:hover .card-banner-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(9, 43, 76, 0.08) 100%);
}

.card-badge-top {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #0284c7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-badge-top.enrolled {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #059669;
}

.card-banner-info {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.course-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
}

.course-level {
  font-size: 11px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #092B4C;
  line-height: 1.3;
  margin-bottom: 8px;
}

.course-card-desc {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.course-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tech-chip {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #0369a1;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Progress bar inside card */
.card-progress-wrapper {
  margin-bottom: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
  color: #475569;
  font-weight: 600;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(9, 43, 76, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill-dash {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(9, 43, 76, 0.08);
  padding-top: 16px;
  margin-top: auto;
}

.course-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
}

.btn-card-action {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

.btn-card-action:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.btn-card-action.secondary {
  background: rgba(9, 43, 76, 0.06);
  border: 1px solid rgba(9, 43, 76, 0.15);
  color: #092B4C;
  box-shadow: none;
}

.btn-card-action.secondary:hover {
  background: rgba(9, 43, 76, 0.12);
}

/* Modal / Drawer for Course Details */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 43, 76, 0.5);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 24px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 60px rgba(9, 43, 76, 0.18);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(9, 43, 76, 0.08);
  border: none;
  color: #092B4C;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(9, 43, 76, 0.15);
}

.modal-header {
  margin-bottom: 20px;
}

.modal-tag {
  color: #0284c7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #092B4C;
  line-height: 1.2;
}

.modal-body {
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.modal-syllabus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.modal-syllabus-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-syllabus-item span {
  font-weight: 600;
  color: #092B4C;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* Empty search state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: 20px;
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #092B4C;
}

.empty-desc {
  font-size: 14px;
  color: #64748B;
  margin-top: 4px;
}

/* Responsive Rules for Dashboard */
@media (max-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
  }

  .dash-nav-menu {
    display: none;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dash-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }
}