/* =============================================
   KOSi Platform — Master Stylesheet
   ============================================= */
:root {
  --gold:    #C8A96E;
  --dark:    #0D0820;
  --dark2:   #160D2E;
  --primary: #0D0820;
  --bg:      #F5F3EF;
  --white:   #FFFFFF;
  --text:    #1A1A2E;
  --muted:   #6B7280;
  --border:  #E5E7EB;
  --success: #10B981;
  --danger:  #EF4444;
  --warning: #F59E0B;
  --radius:  10px;
  --shadow:  0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(13, 8, 32, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(200,169,110,0.2);
  height: 62px;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 20px; height: 62px;
  display: flex; align-items: center; gap: 16px;
}
.nav-logo {
  font-size: 24px; font-weight: 800;
  flex-shrink: 0; cursor: pointer;
}
.nav-logo .k { color: var(--gold); }
.nav-logo .osi { color: #fff; }
.nav-links {
  display: flex; gap: 4px; flex: 1;
}
.nav-links a {
  color: rgba(255,255,255,0.7); padding: 7px 13px;
  border-radius: 8px; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: 0.2s;
}
.nav-links a:hover { color: var(--gold); background: rgba(200,169,110,0.08); }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* Guest buttons */
.btn-login {
  color: rgba(255,255,255,0.8); padding: 7px 14px;
  border-radius: 8px; font-size: 14px; font-weight: 500;
  cursor: pointer; background: none; border: none;
  transition: 0.2s;
}
.btn-login:hover { color: var(--gold); }
.btn-signup {
  background: var(--gold); color: var(--dark);
  padding: 8px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; transition: 0.2s;
}
.btn-signup:hover { background: #E2C98A; }

/* User pill */
.user-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(200,169,110,0.2);
  padding: 5px 12px 5px 8px; border-radius: 50px;
  cursor: pointer; position: relative;
}
.user-pill:hover { background: rgba(200,169,110,0.1); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-pill span { color: #fff; font-size: 13px; font-weight: 500; }
.user-pill i { color: rgba(255,255,255,0.4); font-size: 11px; }
.user-drop {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--dark2); border: 1px solid rgba(200,169,110,0.2);
  border-radius: var(--radius); min-width: 190px;
  display: none; overflow: hidden;
  box-shadow: var(--shadow-lg); z-index: 200;
}
.user-drop.open { display: block; }
.user-drop a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; color: rgba(255,255,255,0.75);
  font-size: 14px; cursor: pointer; transition: 0.15s;
}
.user-drop a:hover { background: rgba(200,169,110,0.08); color: var(--gold); }
.user-drop a i { width: 16px; }
.drop-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 4px 0; }
.drop-logout { color: rgba(239,68,68,0.8) !important; }
.drop-logout:hover { color: #F87171 !important; background: rgba(239,68,68,0.07) !important; }

/* ── HAMBURGER / MOBILE NAV ─────────────────── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center;
  align-items: center; gap: 5px;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(200,169,110,0.2);
  border-radius: 8px; cursor: pointer;
  margin-left: auto;
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: #fff; border-radius: 2px; transition: 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  position: fixed; top: 62px; left: 0; right: 0; bottom: 0;
  background: var(--dark2); z-index: 999;
  padding: 20px; overflow-y: auto;
  flex-direction: column; gap: 6px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; color: rgba(255,255,255,0.8);
  font-size: 16px; font-weight: 500;
  border-radius: var(--radius); cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: 0.15s;
}
.mobile-menu a:hover { background: rgba(200,169,110,0.08); color: var(--gold); }
.mobile-menu a i { width: 20px; color: var(--gold); }
.mobile-menu .m-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 8px 0; }
.mobile-menu .m-logout { color: rgba(239,68,68,0.7) !important; }
.mobile-user {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; margin-bottom: 12px;
  background: rgba(200,169,110,0.06);
  border-radius: var(--radius);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mobile-user .m-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
}
.mobile-user .m-name { color: #fff; font-weight: 600; font-size: 15px; }
.mobile-user .m-role { color: var(--gold); font-size: 12px; text-transform: uppercase; font-weight: 700; }

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: 0.2s;
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: var(--dark); }
.btn-primary:hover { background: #E2C98A; transform: translateY(-1px); }
.btn-dark { background: var(--dark); color: #fff; border: 1px solid rgba(200,169,110,0.2); }
.btn-dark:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 13px 30px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }

/* ── FORMS ───────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.label-white { color: rgba(255,255,255,0.75); }
.input, .select, .textarea {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px; background: #fff;
  color: var(--text); outline: none; transition: 0.2s;
  font-size: 14px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,169,110,0.12); }
.input-dark { background: rgba(255,255,255,0.06); border-color: rgba(200,169,110,0.25); color: #fff; }
.input-dark::placeholder { color: rgba(255,255,255,0.3); }
.input-dark:focus { border-color: var(--gold); }
.textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── CARDS ───────────────────────────────────── */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.card-head { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { font-size: 15px; }
.card-body { padding: 18px; }

/* ── BADGE ───────────────────────────────────── */
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: capitalize; }
.badge-pending  { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }
.badge-published{ background: #DBEAFE; color: #1E40AF; }
.badge-draft    { background: #F3F4F6; color: #6B7280; }
.badge-paid     { background: #D1FAE5; color: #065F46; }
.badge-admin    { background: rgba(239,68,68,0.12); color: #B91C1C; }
.badge-creator  { background: rgba(200,169,110,0.18); color: #92400E; }
.badge-student  { background: rgba(59,130,246,0.12); color: #1D4ED8; }

/* ── TABLE ───────────────────────────────────── */
.tbl-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; margin-bottom: 20px; }
.tbl-head { padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.tbl-head h3 { font-size: 15px; }
.tbl-wrap table { width: 100%; border-collapse: collapse; }
.tbl-wrap thead th { padding: 10px 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tbl-wrap tbody td { padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--border); color: #374151; vertical-align: middle; }
.tbl-wrap tbody tr:last-child td { border-bottom: none; }
.tbl-wrap tbody tr:hover { background: rgba(200,169,110,0.03); }

/* Mobile table scroll */
.tbl-scroll { overflow-x: auto; }

/* ── STAT CARDS ──────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 18px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 12px; }
.stat-val { font-size: 26px; font-weight: 800; line-height: 1; margin-bottom: 3px; }
.stat-lbl { font-size: 13px; color: var(--muted); }
.stat-gold .stat-icon { background: rgba(200,169,110,0.12); color: #92400E; }
.stat-blue .stat-icon { background: rgba(59,130,246,0.1); color: #1D4ED8; }
.stat-green .stat-icon { background: rgba(16,185,129,0.1); color: #065F46; }
.stat-red .stat-icon { background: rgba(239,68,68,0.1); color: #B91C1C; }

/* ── PROGRESS ────────────────────────────────── */
.prog-wrap { background: #E5E7EB; border-radius: 10px; height: 6px; overflow: hidden; }
.prog-fill  { height: 100%; background: var(--gold); border-radius: 10px; transition: width 0.5s; }
.prog-green { background: var(--success); }

/* ── TOAST ───────────────────────────────────── */
#toast {
  position: fixed; top: 76px; right: 20px; z-index: 9999;
  padding: 13px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg); max-width: 340px;
  animation: slideIn 0.3s ease;
  display: none;
}
#toast.show { display: flex; }
.toast-success { background: #ECFDF5; color: #065F46; border-left: 4px solid var(--success); }
.toast-error   { background: #FEF2F2; color: #991B1B; border-left: 4px solid var(--danger); }
.toast-info    { background: #EFF6FF; color: #1E40AF; border-left: 4px solid #3B82F6; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* ── MODAL ───────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 2000; display: none;
  align-items: center; justify-content: center; padding: 16px;
}
.modal-bg.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 14px; width: 100%;
  max-width: 600px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-top {
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-top h3 { font-size: 18px; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-content { padding: 20px; }

/* ── EMPTY STATE ─────────────────────────────── */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .e-icon { font-size: 44px; margin-bottom: 12px; opacity: 0.4; }
.empty h3 { font-size: 18px; color: #374151; margin-bottom: 6px; }

/* ── TABS ────────────────────────────────────── */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tab { padding: 7px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: #fff; color: var(--muted); transition: 0.15s; }
.tab:hover, .tab.active { background: var(--gold); color: var(--dark); border-color: var(--gold); }

/* ── DASHBOARD LAYOUT ────────────────────────── */
.dash-wrap { display: flex; min-height: 100vh; padding-top: 62px; }

/* Sidebar */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--dark);
  border-right: 1px solid rgba(200,169,110,0.12);
  position: sticky; top: 62px;
  height: calc(100vh - 62px); overflow-y: auto;
  display: flex; flex-direction: column;
}
.sidebar-logo {
  padding: 18px 18px 14px; font-size: 20px; font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.06); cursor: pointer;
}
.sidebar-logo .k  { color: var(--gold); }
.sidebar-logo .osi{ color: #fff; }
.sidebar-section { padding: 14px 0 4px; }
.sidebar-lbl { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.28); text-transform: uppercase; letter-spacing: 1.2px; padding: 0 18px 6px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; color: rgba(255,255,255,0.6);
  font-size: 14px; font-weight: 500; cursor: pointer;
  border-left: 3px solid transparent; transition: 0.15s;
}
.sidebar-link:hover { color: rgba(255,255,255,0.9); background: rgba(200,169,110,0.06); }
.sidebar-link.active { color: var(--gold); background: rgba(200,169,110,0.1); border-left-color: var(--gold); }
.sidebar-link i { width: 18px; }
.sidebar-badge {
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  margin-left: auto;
}
.sidebar-badge.hidden { display: none; }
.sidebar-user {
  margin-top: auto; padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sidebar-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--dark); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.sidebar-name { color: #fff; font-size: 13px; font-weight: 600; }
.sidebar-role { color: var(--gold); font-size: 11px; text-transform: uppercase; font-weight: 700; }
.sidebar-logout { width: 100%; background: rgba(239,68,68,0.1); color: #F87171; border: 1px solid rgba(239,68,68,0.2); padding: 8px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; transition: 0.15s; }
.sidebar-logout:hover { background: rgba(239,68,68,0.2); }

/* Main content area */
.dash-main { flex: 1; padding: 26px; background: var(--bg); min-width: 0; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-head p  { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* Mobile sidebar toggle button */
.sidebar-toggle {
  display: none;
  position: fixed; bottom: 20px; right: 20px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--gold); color: var(--dark);
  border: none; cursor: pointer; z-index: 800;
  font-size: 18px; box-shadow: var(--shadow-lg);
  align-items: center; justify-content: center;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 700;
}
.sidebar-overlay.open { display: block; }
.sidebar.mobile-open { transform: translateX(0) !important; }

/* ── COURSE CARD ──────────────────────────────── */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.course-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  overflow: hidden; display: flex; flex-direction: column;
  transition: 0.22s; cursor: pointer;
}
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.course-thumb { position: relative; padding-bottom: 56.25%; overflow: hidden; background: var(--dark2); }
.course-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.course-card:hover .course-thumb img { transform: scale(1.05); }
.course-thumb .no-img { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.course-thumb-badge { position: absolute; top: 10px; left: 10px; background: rgba(13,8,32,0.85); color: #E2C98A; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.course-thumb-free { position: absolute; top: 10px; right: 10px; background: var(--success); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 20px; box-shadow: 0 4px 14px rgba(22,163,74,.25); }
.course-info { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.course-cat  { font-size: 11px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.course-title{ font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-by   { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.course-foot { padding: 12px 15px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.course-price{ font-size: 20px; font-weight: 800; }

/* ── HERO ─────────────────────────────────────── */
.hero {
  background: var(--dark); min-height: 88vh;
  display: flex; align-items: center;
  padding-top: 62px; position: relative; overflow: hidden;
}
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 25% 50%, rgba(200,169,110,0.1) 0%, transparent 60%); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(200,169,110,0.04) 1px,transparent 1px), linear-gradient(90deg, rgba(200,169,110,0.04) 1px, transparent 1px); background-size: 56px 56px; }
.hero-inner { max-width: 1280px; margin: 0 auto; padding: 60px 24px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; position: relative; z-index: 1; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; background: rgba(200,169,110,0.1); border: 1px solid rgba(200,169,110,0.22); color: var(--gold); font-size: 13px; font-weight: 600; padding: 5px 14px; border-radius: 20px; margin-bottom: 20px; }
.hero-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1}50%{opacity:0.2} }
.hero h1 { font-size: clamp(32px,5vw,56px); color: #fff; line-height: 1.1; font-weight: 800; margin-bottom: 16px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { color: rgba(255,255,255,0.62); font-size: 17px; max-width: 500px; margin-bottom: 30px; line-height: 1.7; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 36px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.07); flex-wrap: wrap; }
.hero-stat-val { font-size: 26px; font-weight: 800; color: var(--gold); }
.hero-stat-lbl { font-size: 13px; color: rgba(255,255,255,0.45); }
.hero-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(200,169,110,0.18); border-radius: 14px; padding: 22px; color: #fff; max-width: 360px; }

/* ── SECTION ──────────────────────────────────── */
.section { padding: 68px 24px; }
.section-dark { background: var(--dark2); }
.section-white{ background: #fff; }
.section-inner{ max-width: 1280px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-eye  { font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(24px,4vw,38px); font-weight: 800; margin-bottom: 10px; }
.section-head p  { font-size: 16px; color: var(--muted); max-width: 520px; margin: 0 auto; }
.section-dark .section-head h2 { color: #fff; }
.section-dark .section-head p  { color: rgba(255,255,255,0.5); }

/* ── CATEGORIES ───────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px,1fr)); gap: 14px; }
.cat-card { background: #fff; border-radius: var(--radius); padding: 22px 14px; text-align: center; border: 1px solid var(--border); cursor: pointer; transition: 0.2s; }
.cat-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(200,169,110,0.18); }
.cat-icon { font-size: 28px; margin-bottom: 10px; }
.cat-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.cat-count{ font-size: 12px; color: var(--muted); }

/* ── COURSE DETAIL ────────────────────────────── */
.detail-hero { background: var(--dark); padding: 50px 24px 36px; padding-top: calc(62px + 36px); }
.detail-inner{ max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start; }
.detail-title{ font-size: clamp(22px,3.5vw,36px); color: #fff; font-weight: 800; margin-bottom: 12px; }
.detail-meta { display: flex; gap: 16px; flex-wrap: wrap; color: rgba(255,255,255,0.6); font-size: 13px; margin-top: 12px; }
.detail-meta span { display: flex; align-items: center; gap: 5px; }
.enroll-box  { background: #fff; border-radius: 14px; padding: 24px; box-shadow: var(--shadow-lg); position: sticky; top: 80px; }
.enroll-price{ font-size: 34px; font-weight: 800; margin-bottom: 14px; }
.includes { list-style: none; margin-top: 14px; }
.includes li { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.includes li:last-child { border: none; }
.includes li i { color: var(--gold); width: 16px; }

/* ── LEARN LAYOUT ─────────────────────────────── */
.learn-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: 62px; background: var(--dark);
  border-bottom: 1px solid rgba(200,169,110,0.15);
  display: flex; align-items: center; padding: 0 16px; gap: 14px;
}
.learn-wrap { display: grid; grid-template-columns: 290px 1fr; min-height: 100vh; padding-top: 62px; }
.learn-sidebar { background: var(--dark2); border-right: 1px solid rgba(200,169,110,0.1); position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; }
.learn-main { min-width: 0; }
.lesson-sec-hd { padding: 9px 14px; background: rgba(0,0,0,0.2); font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; }
.lesson-row { display: flex; align-items: center; gap: 9px; padding: 10px 14px; font-size: 13px; color: rgba(255,255,255,0.6); cursor: pointer; border-left: 3px solid transparent; transition: 0.15s; }
.lesson-row:hover { background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.9); }
.lesson-row.active { color: var(--gold); background: rgba(200,169,110,0.09); border-left-color: var(--gold); }
.lesson-row.done   { color: var(--success); }
.lesson-chk { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 9px; flex-shrink: 0; }
.lesson-row.done   .lesson-chk { background: var(--success); border-color: var(--success); color: #fff; }
.lesson-row.active .lesson-chk { border-color: var(--gold); }
.video-wrap { background: #000; position: relative; padding-bottom: 56.25%; }
.video-wrap iframe, .video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.lesson-body { max-width: 820px; margin: 0 auto; padding: 26px 20px; }

/* ── AUTH ─────────────────────────────────────── */
.auth-page { min-height: 100vh; background: var(--dark); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { background: var(--dark2); border: 1px solid rgba(200,169,110,0.18); border-radius: 16px; padding: 36px; width: 100%; max-width: 440px; box-shadow: 0 16px 48px rgba(0,0,0,0.35); }
.auth-logo { text-align: center; font-size: 32px; font-weight: 800; margin-bottom: 20px; }
.auth-logo .k  { color: var(--gold); }
.auth-logo .osi{ color: #fff; }
.auth-title { font-size: 22px; font-weight: 800; color: #fff; text-align: center; margin-bottom: 4px; }
.auth-sub   { color: rgba(255,255,255,0.45); text-align: center; font-size: 14px; margin-bottom: 24px; }
.auth-foot  { text-align: center; margin-top: 16px; font-size: 14px; color: rgba(255,255,255,0.45); }
.auth-foot a { color: var(--gold); font-weight: 600; cursor: pointer; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.role-btn { border: 2px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 14px 10px; text-align: center; cursor: pointer; transition: 0.2s; color: rgba(255,255,255,0.6); }
.role-btn:hover { border-color: rgba(200,169,110,0.4); color: rgba(255,255,255,0.9); }
.role-btn.on { border-color: var(--gold); color: var(--gold); background: rgba(200,169,110,0.08); }
.role-btn .ri { font-size: 24px; margin-bottom: 6px; }
.role-btn .rn { font-size: 13px; font-weight: 700; }
.role-btn .rs { font-size: 11px; opacity: 0.6; }

/* ── FOOTER ───────────────────────────────────── */
footer { background: var(--dark); border-top: 1px solid rgba(200,169,110,0.12); color: rgba(255,255,255,0.5); padding: 40px 24px 20px; }
.footer-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-logo { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.footer-logo .k  { color: var(--gold); }
.footer-logo .osi{ color: #fff; }
.footer-grid p { font-size: 14px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-col a  { display: block; font-size: 14px; margin-bottom: 10px; cursor: pointer; transition: 0.15s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { max-width: 1280px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 18px; text-align: center; font-size: 13px; }

/* ── UTILITY ──────────────────────────────────── */
.hidden   { display: none !important; }
.star     { color: #F59E0B; }
.star-off { color: #E5E7EB; }
.flex     { display: flex; }
.gap-2    { gap: 8px; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-3 { margin-bottom: 16px; }
.text-muted { color: var(--muted); }
.text-gold  { color: var(--gold); }

/* ── MESSAGING LAYOUT ──────────────────────────── */
.messaging-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 250px);
  max-height: 600px;
}
.messaging-wrap .messages-display {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  background: #363636;
  margin-bottom: 12px;
}
.messaging-wrap .messages-input {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.messaging-wrap .messages-input .input-group {
  display: flex;
  gap: 5px;
  flex: 1;
  min-width: 280px;
}
.messaging-wrap .messages-input .input-group input {
  flex: 1;
}
.messaging-wrap .messages-input .btn {
  white-space: nowrap;
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 900px) {
  /* Nav: hide desktop links, show hamburger */
  .nav-links { display: none; }
  .nav-right .btn-login, .nav-right .btn-signup { display: none; }
  .nav-right .user-pill { display: none; }
  .hamburger { display: flex; }

  /* Hero */
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card  { display: none; }

  /* Course detail hero — stack price box below title on mobile */
  .detail-inner { grid-template-columns: 1fr !important; }
  .enroll-box   { position: static !important; }

  /* Dashboard */
  .sidebar {
    position: fixed; top: 62px; left: 0; bottom: 0;
    z-index: 750; transform: translateX(-100%);
    transition: transform 0.3s ease; width: 260px;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .dash-main { padding: 16px; }

  /* Learn layout */
  .learn-wrap { grid-template-columns: 1fr; }
  .learn-sidebar { display: none; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  /* Form row */
  .form-row { grid-template-columns: 1fr; }

  /* Messaging mobile layout */
  .messaging-wrap {
    max-height: none;
    height: auto;
  }
  .messaging-wrap .messages-input {
    flex-direction: column;
    align-items: stretch;
  }
  .messaging-wrap .messages-input .input-group {
    min-width: auto;
    width: 100%;
  }
  .messaging-wrap .messages-input .btn {
    width: 100%;
  }
  .messaging-wrap .messages-display {
    max-height: 400px;
  }
}

@media (max-width: 560px) {
  .courses-grid { grid-template-columns: 1fr; }
  .stats-row    { grid-template-columns: 1fr 1fr; }
  .cat-grid     { grid-template-columns: repeat(2, 1fr); }
  .footer-grid  { grid-template-columns: 1fr; }
  .auth-card    { padding: 26px 18px; }
  .hero-stats   { gap: 16px; }
  .section      { padding: 44px 16px; }
  .dash-main    { padding: 12px; }

  /* Messaging on very small mobile */
  .messaging-wrap .messages-display {
    max-height: 50vh;
    margin-bottom: 8px;
  }
  .messaging-wrap .messages-input {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 8px;
    border-top: 1px solid var(--border);
    margin: -15px -15px 0 -15px;
    padding: 12px;
    gap: 8px;
  }
  .messaging-wrap .messages-input .input-group {
    width: 100%;
    display: flex;
    gap: 5px;
  }
  .messaging-wrap .messages-input .btn {
    width: 50px;
    padding: 8px;
    flex-shrink: 0;
  }
}
