/* ============================================
   LUMOSOFT INSTRUCTOR PANEL - SITE STYLES
   Matching Admin Panel Design
============================================ */

/* =============== CSS VARIABLES =============== */
:root {
  --sidebar-expanded: 260px;
  --sidebar-collapsed: 78px;
  --sidebar-bg-start: #5b21b6;
  --sidebar-bg-end: #4338ca;
  --sidebar-text: #f8fafc;
  --sidebar-text-muted: #c7d2fe;
  --sidebar-hover: #6d28d9;
  --sidebar-active: #7c3aed;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============== BASE STYLES =============== */
html,
body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============== CONTENT BODY =============== */
.content-body {
  flex: 1 0 auto;
  margin-left: var(--sidebar-expanded);
  padding: 24px;
  padding-top: 100px;
  transition: margin-left var(--transition-fast);
  background: #f8fafc;
}

#main-wrapper.menu-toggle .content-body {
  margin-left: var(--sidebar-collapsed);
}

/* =============== HEADER STYLES =============== */
.header {
  background: transparent !important;
  border: 0;
  box-shadow: none;
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-expanded);
  z-index: 999;
  transition: left var(--transition-fast);
}

#main-wrapper.menu-toggle .header {
  left: var(--sidebar-collapsed);
}

.header .header-content {
  background: transparent !important;
  padding: 0 24px;
}

.header .navbar {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 2px 10px rgba(17, 24, 39, .05);
  margin: 16px 0 12px 0;
  width: 100%;
}

.header .sidebar-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease;
}

.header .sidebar-trigger-btn:hover {
  background: rgba(17, 24, 39, .06);
}

.header .brand-title .header-title {
  font-size: 16px;
  margin: 0;
  color: #111827;
  font-weight: 700;
  white-space: nowrap;
}

.header .navbar-nav.header-right {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
}

.header .sidebar-info span {
  color: #111827 !important;
}

.header .sidebar-info .text-muted {
  color: #6b7280 !important;
}

/* =============== PROFILE DROPDOWN =============== */
.profile-menu {
  border: 1px solid rgba(0, 0, 0, .04) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .04) !important;
  border-radius: 12px !important;
  overflow: hidden;
  background: #fefefe !important;
}

.profile-menu .card {
  border: 0;
  box-shadow: none;
  background: #fff !important;
}

.profile-menu .card-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding: 1rem;
}

.profile-menu .avatar-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sidebar-bg-start), var(--sidebar-bg-end));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.profile-menu .avatar-circle .material-icons {
  font-size: 28px;
}

.profile-menu .dropdown-item {
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  border-radius: 8px;
  margin: 2px 0;
  transition: background 0.15s ease;
}

.profile-menu .dropdown-item:hover {
  background: #f8f9fa;
}

.profile-menu .card-footer {
  background: #fafafa !important;
  border-top: 1px solid #e5e7eb !important;
  padding: 0.75rem;
}

.btn-logout {
  background: #fafafa;
  color: #dc2626;
  border: 1px solid #e5e7eb;
  padding: 0.625rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

/* =============== SIDEBAR STYLES =============== */
.dlabnav {
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-expanded);
  background: linear-gradient(180deg, var(--sidebar-bg-start), var(--sidebar-bg-end));
  transition: width var(--transition-fast);
  z-index: 1001;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .12);
}

#main-wrapper.menu-toggle .dlabnav {
  width: var(--sidebar-collapsed);
}

/* Brand area */
.dlabnav .sidebar-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  overflow: hidden;
}

.dlabnav .sidebar-brand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
  opacity: .8;
}

.dlabnav .brand-full {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.dlabnav .brand-full img {
  max-height: 34px;
  width: auto;
  display: block;
}

.dlabnav .brand-full .logo-text {
  color: white;
  font-size: 20px;
  font-weight: 700;
}

.dlabnav .brand-compact {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  text-decoration: none;
}

.dlabnav .brand-compact:hover {
  background: rgba(255, 255, 255, .28);
}

#main-wrapper.menu-toggle .dlabnav .brand-full {
  opacity: 0;
  visibility: hidden;
}

#main-wrapper.menu-toggle .dlabnav .brand-compact {
  opacity: 1;
  visibility: visible;
}

/* Scroll area */
.dlabnav .dlabnav-scroll {
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.dlabnav .dlabnav-scroll>ul {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
}

/* Menu items */
.metismenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.metismenu li a {
  white-space: nowrap;
  overflow: hidden;
  color: var(--sidebar-text);
  transition: background var(--transition-fast), color var(--transition-fast);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 4px;
}

.metismenu li a:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.metismenu li a.active,
.metismenu li.mm-active>a {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.metismenu li a .material-icons-outlined {
  font-size: 21px;
  margin-right: 12px;
  opacity: 0.85;
  transition: all 0.2s ease;
  font-weight: 300;
}

.metismenu li a:hover .material-icons-outlined {
  opacity: 1;
  transform: scale(1.05);
}

#main-wrapper.menu-toggle .metismenu li a .material-icons-outlined {
  margin-right: 0;
  font-size: 24px;
}

.metismenu .nav-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 1;
  transition: opacity var(--transition-fast), max-width var(--transition-fast);
  white-space: nowrap;
}

.metismenu .badge {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
}

#main-wrapper.menu-toggle .metismenu .nav-text {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
}

#main-wrapper.menu-toggle .metismenu li a {
  justify-content: center;
}

#main-wrapper.menu-toggle .metismenu li a .material-icons {
  margin-right: 0;
}

/* Copyright */
.dlabnav .copyright {
  padding: 16px;
  margin-top: auto;
  color: var(--sidebar-text-muted);
  text-align: center;
}

.dlabnav .copyright p {
  margin: 0;
  font-size: 12px;
}

#main-wrapper.menu-toggle .dlabnav .copyright {
  opacity: 0;
  visibility: hidden;
}

/* Scrollbar */
.dlabnav .dlabnav-scroll>ul::-webkit-scrollbar {
  width: 8px;
}

.dlabnav .dlabnav-scroll>ul::-webkit-scrollbar-track {
  background: transparent;
}

.dlabnav .dlabnav-scroll>ul::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .18);
  border-radius: 6px;
}

/* =============== FOOTER =============== */
.footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 20px;
  margin-left: var(--sidebar-expanded);
  transition: margin-left var(--transition-fast);
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

#main-wrapper.menu-toggle .footer {
  margin-left: var(--sidebar-collapsed);
}

.footer .copyright {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.footer .copyright a {
  color: var(--sidebar-bg-start);
  text-decoration: none;
}

/* =============== DASHBOARD STYLES =============== */
.welcome-card {
  background: linear-gradient(135deg, var(--sidebar-bg-start), var(--sidebar-bg-end));
  border-radius: 16px;
  padding: 32px;
  color: white;
  margin-bottom: 24px;
}

.welcome-card h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.welcome-card p {
  opacity: 0.9;
  margin: 0;
  font-size: 16px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.2s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.stat-card .stat-icon.purple {
  background: rgba(91, 33, 182, 0.1);
  color: #5b21b6;
}

.stat-card .stat-icon.blue {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.stat-card .stat-icon.green {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #92400e;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* =============== RESPONSIVE =============== */
@media (max-width: 768px) {
  .dlabnav {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    width: 280px !important;
    max-width: 85vw;
  }

  .dlabnav.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, .25);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  body.sidebar-mobile-open {
    overflow: hidden !important;
  }

  .content-body {
    margin-left: 0 !important;
    padding: 16px;
    padding-top: 90px;
  }

  .header {
    left: 0 !important;
  }

  .header .header-content {
    padding: 0 12px;
  }

  .header .brand-title {
    display: none;
  }

  .footer {
    margin-left: 0 !important;
  }

  .welcome-card {
    padding: 24px;
  }

  .welcome-card h1 {
    font-size: 22px;
  }
}

@media (max-width: 576px) {
  .header .navbar {
    padding: 8px 12px;
    border-radius: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card .stat-value {
    font-size: 24px;
  }
}