/* =========================================================
   LearnHub LMS — Design System
   ========================================================= */
:root {
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-black: #01050B;
  --color-black-soft: #14161d;
  --color-primary: #2f6fed;
  --color-primary-dark: #1e56cf;
  --color-primary-light: #eaf1ff;
  --color-text: #1a1d29;
  --color-text-muted: #6b7280;
  --color-border: #e6e9f0;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 20px rgba(16, 24, 40, 0.08);
   --font-display: 'Manrope', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
      --text:          #F5F7FB;
  --text-dim:      #A7AFC4;
  --text-faint:    #6C7690;
      --blue:          #4C8DFF;
  --shadow-lg: 0 20px 40px rgba(16, 24, 40, 0.12);
  --transition: all 0.18s ease;

}


[data-theme="dark"] {
  --color-bg: #0f1117;
  --color-surface: #171923;
  --color-black: #05060a;
  --color-text: #eef1f7;
  --color-text-muted: #9aa1b1;
  --color-border: #262a38;
  --color-primary-light: #1a2947;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}
a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Top Navbar ---------- */
.navbar {
  background: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.02em;
}
.navbar .brand span {
  color: var(--color-primary);
}
.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.navbar .nav-links a {
  color: #c7cbd6;
  font-weight: 500;
  font-size: 14.5px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.navbar .nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.navbar .nav-links a.active {
  color: #fff;
  background: var(--color-primary);
}
.navbar .toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.nav__logo{ display:flex; align-items:center; gap:.5rem; font-family:var(--font-display); font-weight:800; font-size:1.15rem; }
.nav__mark{ color:var(--blue); font-family:var(--font-mono); font-weight:600; }
.nav__logo-thin{ font-weight:500; color:var(--text-dim); }
.mhal{

  color: white;
}

@media (max-width: 900px) {
  .navbar .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-black);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    transform: translateY(-120%);
    transition: var(--transition);
    gap: 2px;
  }
  .navbar .nav-links.open {
    transform: translateY(0);
  }
  .navbar .toggle {
    display: block;
  }
}

/* ---------- Layout ---------- */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}
.page-header {
  
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}
.page-header p.subtitle {
  color: var(--color-text-muted);
  margin: 4px 0 0;
  font-size: 14.5px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 18px;
  margin-bottom: 14px;
}
.stat-card .value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stat-card .label {
  color: var(--color-text-muted);
  font-size: 13.5px;
  margin-top: 2px;
}

/* ---------- Big dashboard action cards (student home) ---------- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.action-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.action-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}
.action-card .emoji {
  font-size: 42px;
  margin-bottom: 14px;
  display: block;
}
.action-card h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
}
.action-card p {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 22px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
}
.btn-dark {
  background: var(--color-black);
  color: #fff;
}
.btn-dark:hover {
  background: var(--color-black-soft);
}
.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-danger {
  background: #fef2f2;
  color: var(--color-danger);
}
.btn-danger:hover {
  background: var(--color-danger);
  color: #fff;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 18px;
}
label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="file"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  transition: var(--transition);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b0d12 0%, #1a2947 100%);
  padding: 20px;
}
.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 44px;
  width: 100%;
  max-width: 420px;
}
.auth-card .logo {
  text-align: center;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 6px;
}
.auth-card .logo span {
  color: var(--color-primary);
}
.auth-card p.tag {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13.5px;
  margin-bottom: 28px;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--color-surface);
}
table.data-table th {
  text-align: left;
  background: #fafbfd;
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border);
}
table.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
table.data-table tr:last-child td {
  border-bottom: none;
}
table.data-table tr:hover td {
  background: #fafbff;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-success {
  background: #ecfdf3;
  color: var(--color-success);
}
.badge-warning {
  background: #fffbeb;
  color: var(--color-warning);
}
.badge-danger {
  background: #fef2f2;
  color: var(--color-danger);
}
.badge-info {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.badge-gray {
  background: #f1f2f5;
  color: var(--color-text-muted);
}

/* ---------- Alerts ---------- */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-success {
  background: #ecfdf3;
  color: #067647;
  border-color: #b8f0cf;
}
.alert-error {
  background: #fef2f2;
  color: #b42318;
  border-color: #fecdca;
}

/* ---------- Sidebar (Admin) ---------- */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 68px);
}
.admin-sidebar {
  width: 240px;
  background: var(--color-black);
  color: #c7cbd6;
  flex-shrink: 0;
  padding: 20px 12px;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 3px;
}
.admin-sidebar a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.admin-sidebar a.active {
  background: var(--color-primary);
  color: #fff;
}
.admin-content {
  flex: 1;
  padding: 28px;
  min-width: 0;
}
@media (max-width: 900px) {
  .admin-sidebar {
    display: none;
  }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 13, 18, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 {
  margin-top: 0;
}

/* ---------- Utility ---------- */
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.gap-16 {
  gap: 16px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.mb-16 {
  margin-bottom: 16px;
}
.text-muted {
  color: var(--color-text-muted);
}
.w-full {
  width: 100%;
}
.footer {
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted);
  font-size: 13px;
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
}

/* ---------- Skeleton loading ---------- */
.skeleton {
  background: linear-gradient(90deg, #eef0f4 25%, #f7f8fa 37%, #eef0f4 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* ---------- Breadcrumb (recordings) ---------- */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.crumb a {
  color: var(--color-primary);
  font-weight: 600;
}
.module-accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
}
.module-accordion summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 700;
  background: #fafbfd;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.module-accordion summary::-webkit-details-marker {
  display: none;
}
.lecture-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
}
.lecture-row:hover {
  background: #fafbff;
}
