/* ============================================================
   MS Korean LMS — MASTER STYLESHEET v2.0
   Professional Blue + White + Slate Gray Design System
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Nastaliq+Urdu:wght@400;600;700&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  --primary:        #1E40AF;
  --primary-dark:   #1E3A8A;
  --primary-light:  #3B82F6;
  --primary-glow:   rgba(59, 130, 246, 0.15);
  --accent:         #0EA5E9;
  --accent-dark:    #0284C7;
  --gold:           #F59E0B;
  --gold-light:     #FCD34D;
  --success:        #10B981;
  --danger:         #EF4444;
  --warning:        #F59E0B;
  --white:          #FFFFFF;
  --bg:             #F1F5F9;
  --bg-card:        #FFFFFF;
  --border:         #E2E8F0;
  --border-dark:    #CBD5E1;
  --text:           #0F172A;
  --text-secondary: #475569;
  --text-muted:     #94A3B8;
  --sidebar-bg:     #0F172A;
  --sidebar-text:   #94A3B8;
  --sidebar-active: #1E40AF;
  --radius:         12px;
  --radius-lg:      18px;
  --radius-xl:      24px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:         0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:      0 10px 40px rgba(0,0,0,0.12);
  --transition:     all 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Urdu Text */
.urdu, [lang="ur"] {
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  direction: rtl;
  line-height: 2;
  font-size: 1.05em;
}

/* Korean Text */
.korean, [lang="ko"] {
  font-family: 'Noto Sans KR', sans-serif;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

/* ─── Public Navbar ─────────────────────────────────────── */
.lms-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.22s ease;
  overflow: visible;
  height: auto;
}
.lms-nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans KR', sans-serif;
  color: white;
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-brand-text .brand-main {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-dark);
  display: block;
  line-height: 1.1;
}
.nav-brand-text .brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 7px 14px;
  border-radius: 8px;
  transition: var(--transition);
}
.nav-links a:hover { background: var(--primary-glow); color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 600; }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-nav-login {
  color: var(--primary) !important;
  border: 1.5px solid var(--border-dark);
  border-radius: 8px;
  padding: 7px 16px !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
}
.btn-nav-login:hover {
  border-color: var(--primary) !important;
  background: var(--primary-glow) !important;
}
.btn-nav-apply {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white !important;
  border-radius: 8px;
  padding: 8px 18px !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  box-shadow: 0 2px 8px rgba(30,64,175,0.3);
}
.btn-nav-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30,64,175,0.4);
  color: white !important;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  z-index: 2010;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  pointer-events: none;
}

/* Fixed dropdown so backdrop-filter / 68px bar cannot clip it */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px 20px;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 16px 40px rgba(15,23,42,0.14);
  z-index: 2010;
  max-height: calc(100dvh - 68px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-mobile-menu.open,
.lms-nav.nav-open .nav-mobile-menu { display: flex; }
.nav-mobile-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
}
.nav-mobile-menu a:hover { background: var(--bg); }
body.nav-menu-open { overflow: hidden; }

/* Phones + large phones in landscape + small tablets */
@media (max-width: 1024px) {
  .nav-links, .nav-cta { display: none !important; }
  .nav-hamburger { display: flex !important; }
  .nav-inner { flex-wrap: nowrap; padding: 0 14px; }
}

@media (min-width: 1025px) {
  .nav-links     { display: flex !important; }
  .nav-cta       { display: flex !important; }
  .nav-hamburger { display: none !important; }
  .nav-mobile-menu,
  .nav-mobile-menu.open,
  .lms-nav.nav-open .nav-mobile-menu { display: none !important; }
  body.nav-menu-open { overflow: auto; }
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius);
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(30,64,175,0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30,64,175,0.35);
  color: white;
}
.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--border-dark);
}
.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--primary);
}
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; color: white; transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; color: white; transform: translateY(-1px); }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #D97706; color: white; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; border-radius: 14px; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: 8px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 8px; }
.btn-icon-sm { width: 30px; height: 30px; padding: 0; border-radius: 7px; font-size: 0.75rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ─── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title i { color: var(--primary); }
.card-body { padding: 22px; }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: #FAFBFC;
}

/* ─── Status Badges ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-pending  { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-verified { background: #D1FAE5; color: #065F46; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }
.badge-active   { background: #DBEAFE; color: #1E40AF; }
.badge-inactive { background: #F1F5F9; color: #64748B; }
.badge-info     { background: #E0F2FE; color: #0369A1; }

/* ─── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  color: white;
}
.stat-icon.blue   { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.stat-icon.green  { background: linear-gradient(135deg, #10B981, #34D399); }
.stat-icon.amber  { background: linear-gradient(135deg, #F59E0B, #FCD34D); }
.stat-icon.red    { background: linear-gradient(135deg, #EF4444, #F87171); }
.stat-icon.cyan   { background: linear-gradient(135deg, #0EA5E9, #38BDF8); }
.stat-icon.purple { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 3px;
}
.stat-delta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  margin-top: 2px;
}

/* ─── Progress Bar ────────────────────────────────────────── */
.progress-wrap { background: #E2E8F0; border-radius: 100px; overflow: hidden; }
.progress-bar {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1s ease;
  position: relative;
}
.progress-bar.success { background: linear-gradient(90deg, var(--success), #34D399); }
.progress-bar.amber   { background: linear-gradient(90deg, var(--gold), #FCD34D); }

/* ─── Tables ─────────────────────────────────────────────── */
.lms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.lms-table thead th {
  background: #F8FAFC;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.lms-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  color: var(--text);
}
.lms-table tbody tr:last-child td { border-bottom: none; }
.lms-table tbody tr:hover { background: #FAFBFC; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── Forms ──────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-group { margin-bottom: 18px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 5px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; flex-shrink: 0; }
.input-icon { position: relative; }
.input-icon .form-control { padding-left: 40px; }
.input-icon i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; pointer-events: none; }

/* ─── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.alert i { flex-shrink: 0; font-size: 1rem; }
.alert-success { background: #D1FAE5; color: #065F46; border-left: 4px solid var(--success); }
.alert-danger   { background: #FEE2E2; color: #991B1B; border-left: 4px solid var(--danger); }
.alert-warning  { background: #FEF3C7; color: #92400E; border-left: 4px solid var(--warning); }
.alert-info     { background: #E0F2FE; color: #0369A1; border-left: 4px solid var(--accent); }

/* ─── Admin Layout ─────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Admin Sidebar */
.admin-sidebar {
  width: 256px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transition: transform 0.28s ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #1E293B transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #1E293B; border-radius: 4px; }

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.sidebar-logo-mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans KR', sans-serif;
  color: white;
  font-weight: 900;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.sidebar-brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
}
.sidebar-brand-sub {
  font-size: 0.68rem;
  color: var(--sidebar-text);
}
.sidebar-admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}
.sidebar-admin-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}
.sidebar-admin-role {
  font-size: 0.7rem;
  color: var(--sidebar-text);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #475569;
  padding: 12px 10px 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: white; }
.sidebar-link.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(30,64,175,0.4);
}
.sidebar-link i {
  width: 18px;
  font-size: 0.875rem;
  flex-shrink: 0;
  text-align: center;
}
.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}
.sidebar-link.active .sidebar-badge { background: rgba(255,255,255,0.25); }

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 199;
  backdrop-filter: blur(2px);
}

/* Admin Content Area */
.admin-content {
  margin-left: 256px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Admin Topbar */
.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.topbar-title span { color: var(--primary); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-user-info { text-align: right; }
.topbar-user-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.topbar-user-role { font-size: 0.7rem; color: var(--text-muted); }
.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.82rem;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
}
#adminMenuBtn {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}
#adminMenuBtn:hover { background: var(--bg); }

/* Admin Main */
.admin-main {
  flex: 1;
  padding: 28px;
  background: var(--bg);
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 60%, #1E40AF 100%);
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  margin-bottom: 24px;
  color: white;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59,130,246,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.welcome-banner-ko {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 4.5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  user-select: none;
  line-height: 1;
}
.welcome-banner h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 5px;
  position: relative;
}
.welcome-banner p {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  margin: 0;
  position: relative;
}
.welcome-banner .highlight { color: var(--gold-light); }

/* ─── Login Pages ────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #0EA5E9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(30,64,175,0.4) 0%, transparent 65%);
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14,165,233,0.3) 0%, transparent 65%);
  pointer-events: none;
}
.login-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  position: relative;
  z-index: 1;
}
.login-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: white;
  margin: 0 auto 18px;
  box-shadow: 0 4px 20px rgba(30,64,175,0.4);
}
.login-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}
.login-card p.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 28px;
}
.login-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  position: relative;
  margin: 20px 0;
}
.login-divider::before, .login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after  { right: 0; }

/* ─── Public Hero Section ──────────────────────────────── */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 55%, #1E40AF 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(59,130,246,0.2);
  border: 1px solid rgba(59,130,246,0.4);
  color: #93C5FD;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-badge span { color: var(--gold-light); }
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 14px;
}
.hero h1 .ko { font-family: 'Noto Sans KR', sans-serif; color: var(--gold-light); }
.hero h1 .ur { font-family: 'Noto Nastaliq Urdu', serif; font-size: 0.85em; color: rgba(255,255,255,0.85); }
.hero-desc {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
}
.hero-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-xl);
  padding: 30px;
  text-align: center;
  color: white;
  max-width: 300px;
}
.hero-card-ko {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  color: white;
  line-height: 1;
  margin-bottom: 10px;
}
.hero-card-ur {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 1.1rem;
  color: var(--gold-light);
  direction: rtl;
  line-height: 2;
}
.hero-card-en { font-size: 0.85rem; color: rgba(255,255,255,0.55); margin-top: 8px; }
.hero-card-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.hero-tag {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 60px 24px; }
  .hero-visual { display: none; }
}

/* ─── Courses Section ────────────────────────────────────── */
.section {
  padding: 80px 0;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}
.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.7;
}
.section-header { margin-bottom: 48px; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.course-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.course-card-top {
  padding: 24px 24px 18px;
  background: linear-gradient(135deg, #F8FAFF 0%, #EEF2FF 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.course-card-top::before {
  content: attr(data-ko);
  position: absolute;
  right: -5px;
  bottom: -15px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  color: rgba(30,64,175,0.07);
  user-select: none;
}
.course-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.course-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.course-card-duration {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.course-card-body { padding: 18px 24px 22px; flex: 1; display: flex; flex-direction: column; }
.course-card-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.65; flex: 1; margin-bottom: 14px; }
.course-features { list-style: none; margin-bottom: 18px; }
.course-features li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}
.course-features li i { color: var(--success); font-size: 0.7rem; }
.course-card-fee {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}
.course-card-fee .fee-label { font-size: 0.75rem; font-weight: 400; color: var(--text-muted); display: block; }

/* ─── Features Section ──────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
  text-align: center;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
  margin: 0 auto 16px;
}
.feature-title { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.feature-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }

/* ─── CTA Section ────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent-dark) 100%);
  padding: 80px 0;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '한국어';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 10rem;
  font-weight: 900;
  color: rgba(255,255,255,0.03);
  white-space: nowrap;
  pointer-events: none;
}
.cta-section h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.7); margin-bottom: 32px; font-size: 1rem; }

/* ─── Contact Section ───────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.contact-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}
.contact-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.contact-value { font-size: 0.875rem; font-weight: 600; color: var(--text); margin-top: 3px; }
.contact-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--sidebar-bg);
  color: rgba(255,255,255,0.55);
  padding: 48px 0 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .footer-logo {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
}
.footer-brand p { font-size: 0.82rem; line-height: 1.7; max-width: 260px; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: white; }
.footer-col h4 { font-size: 0.82rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.footer-col a {
  display: block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
  transition: var(--transition);
}
.footer-col a:hover { color: white; padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: white; }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ─── Responsive Admin ───────────────────────────────────── */
@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-sidebar.open + .sidebar-overlay { display: block; }
  .admin-content { margin-left: 0; }
  #adminMenuBtn { display: flex; align-items: center; }
  .admin-main { padding: 20px 16px; }
}
@media (max-width: 576px) {
  .admin-main { padding: 16px 12px; }
  .welcome-banner { padding: 20px; }
  .welcome-banner-ko { display: none; }
}

/* ─── Misc Utilities ─────────────────────────────────────── */
.text-primary   { color: var(--primary) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warning) !important; }
.text-muted     { color: var(--text-muted) !important; }
.fw-600         { font-weight: 600 !important; }
.fw-700         { font-weight: 700 !important; }
.fw-800         { font-weight: 800 !important; }
.mt-auto        { margin-top: auto !important; }
.gap-2          { gap: 8px !important; }
.gap-3          { gap: 12px !important; }
.d-flex         { display: flex !important; }
.align-center   { align-items: center !important; }
.justify-between{ justify-content: space-between !important; }
.w-100          { width: 100% !important; }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i  { font-size: 2.5rem; margin-bottom: 14px; display: block; }
.empty-state p  { font-size: 0.875rem; }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.fade-in-up { animation: fadeInUp 0.4s ease forwards; }
.skeleton {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

/* ============================================================
   PANEL THEME KIT — shared by Admin / Teacher / Student portals
   ============================================================ */

/* Panel card (same visual language as .card) */
.admin-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.admin-card:hover { box-shadow: var(--shadow); }
.admin-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #FAFBFD;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-card-title i { color: var(--primary); }
.admin-card-body { padding: 20px; }
.admin-card-body.p-0 { padding: 0 !important; }

/* Section heading used above grids inside panels */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.panel-head h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-head h5 i { color: var(--primary); }

/* Simple list rows inside panel cards */
.panel-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.panel-list-row:last-child { border-bottom: none; }
.panel-list-row .plr-title { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.panel-list-row .plr-meta  { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }

/* Compact empty state for cards */
.empty-state-sm {
  text-align: center;
  padding: 26px 16px;
  color: var(--text-muted);
}
.empty-state-sm i { font-size: 1.6rem; display: block; margin-bottom: 8px; opacity: 0.55; }
.empty-state-sm p { font-size: 0.82rem; margin: 0; }

/* Outline buttons — themed (override Bootstrap defaults) */
.btn-outline-primary   { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline-primary:hover   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-outline-danger    { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-outline-danger:hover    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-outline-success   { background: transparent; color: var(--success); border: 1.5px solid var(--success); }
.btn-outline-success:hover   { background: var(--success); color: #fff; border-color: var(--success); }
.btn-outline-secondary { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border-dark); }
.btn-outline-secondary:hover { background: var(--bg); color: var(--text); border-color: var(--text-muted); }
.btn-outline-light     { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5); }
.btn-outline-light:hover     { background: rgba(255,255,255,0.16); color: #fff; border-color: #fff; }

/* Selects & checkboxes aligned with themed inputs */
.form-select {
  padding: 10px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background-color: #fff;
  transition: var(--transition);
}
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus   { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-check-label { font-size: 0.85rem; color: var(--text-secondary); }

/* Modals */
.modal-content { border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.modal-header  { background: #FAFBFD; border-bottom: 1px solid var(--border); padding: 16px 22px; }
.modal-title   { font-size: 0.98rem; font-weight: 700; color: var(--text); }
.modal-body    { padding: 22px; }
.modal-footer  { background: #FAFBFD; border-top: 1px solid var(--border); padding: 14px 22px; }

/* Sidebar toggle button in topbars (teacher/admin/student) */
#sidebarToggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
}
@media (max-width: 992px) { #sidebarToggle { display: inline-block; } }

/* ─── Print ──────────────────────────────────────────────── */
@media print {
  .admin-sidebar, .admin-topbar, .sidebar-overlay { display: none !important; }
  .admin-content { margin-left: 0 !important; }
  body { background: white !important; }
}

/* ─── Public SEO / AEO pages ─────────────────────────────── */
.seo-page { padding-top: 68px; }
.seo-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 55%, #1E40AF 100%);
  color: #fff;
  padding: 48px 20px 40px;
}
.seo-hero h1 { font-size: clamp(1.6rem, 4vw, 2.35rem); font-weight: 800; margin: 12px 0 10px; color: #fff; }
.seo-lead { max-width: 720px; color: rgba(255,255,255,0.82); font-size: 1.02rem; margin: 0; }
.seo-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.seo-crumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; opacity: 0.6; }
.seo-crumbs a { color: #93C5FD; }
.seo-body { max-width: 900px; margin: 0 auto; padding: 36px 20px 80px; }
.seo-body h2 { font-size: 1.35rem; font-weight: 800; color: #0F172A; margin: 28px 0 10px; }
.seo-body p, .seo-body li { color: #334155; font-size: 0.98rem; line-height: 1.75; }
.seo-body ul { padding-left: 1.2rem; margin: 0 0 16px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 16px 18px; }
.faq-item h2 { font-size: 1.02rem; margin: 0 0 8px; color: #1E3A8A; }
.faq-item p { margin: 0; }
.seo-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.course-seo-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 22px; margin-bottom: 16px; }
.course-seo-card h2 { margin-top: 0; }
@media (max-width: 576px) {
  .seo-hero { padding: 36px 16px 28px; }
  .seo-body { padding: 24px 16px 64px; }
}

