/* ============================================================================
   SLCJ LEARNING MANAGEMENT SYSTEM — Design System
   Sri Lanka College of Journalism  |  Poppins · Purple & White · Dark Mode
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. DESIGN TOKENS
--------------------------------------------------------------------------- */
:root {
  --primary:       #7C3AED;
  --primary-dark:  #6D28D9;
  --secondary:     #A78BFA;
  --accent:        #C4B5FD;
  --highlight:     #EDE9FE;
  --bg:            #FAF8FF;
  --card:          #FFFFFF;
  --sidebar:       #FFFFFF;
  --navbar:        rgba(255, 255, 255, .82);
  --footer:        #1F2937;
  --text:          #1F2937;
  --text-2:        #64748B;
  --border:        #E5E7EB;
  --success:       #22C55E;
  --warning:       #F59E0B;
  --danger:        #EF4444;
  --info:          #0EA5E9;
  --grad:          linear-gradient(135deg, #A78BFA 0%, #6D28D9 100%);
  --grad-soft:     linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
  --shadow-sm:     0 1px 3px rgba(31, 41, 55, .06);
  --shadow:        0 10px 30px -12px rgba(109, 40, 217, .18);
  --shadow-lg:     0 24px 60px -20px rgba(109, 40, 217, .28);
  --glass:         rgba(255, 255, 255, .7);
  --radius:        20px;
  --radius-sm:     14px;
  --radius-xs:     10px;
  --font:          'Poppins', system-ui, -apple-system, sans-serif;
  --sidebar-w:     264px;
  --topbar-h:      76px;
}

[data-theme="dark"] {
  --primary:      #A78BFA;
  --primary-dark: #8B5CF6;
  --secondary:    #C4B5FD;
  --accent:       #DDD6FE;
  --highlight:    #2E1065;
  --bg:           #111827;
  --card:         #1F2937;
  --sidebar:      #111827;
  --navbar:       rgba(17, 24, 39, .85);
  --footer:       #0B1220;
  --text:         #F9FAFB;
  --text-2:       #9CA3AF;
  --border:       #374151;
  --grad:         linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);
  --grad-soft:    linear-gradient(135deg, #2E1065 0%, #3B1874 100%);
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, .4);
  --shadow:       0 10px 30px -12px rgba(0, 0, 0, .55);
  --shadow-lg:    0 24px 60px -20px rgba(0, 0, 0, .7);
  --glass:        rgba(31, 41, 55, .7);
}

/* ---------------------------------------------------------------------------
   2. BASE
--------------------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary); }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; }
h1, h2, h3, h4, h5 { line-height: 1.25; color: var(--text); font-weight: 700; }

::selection { background: var(--highlight); color: var(--primary-dark); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------------------
   3. LAYOUT UTILITIES
--------------------------------------------------------------------------- */
.container { width: min(1200px, 92%); margin-inline: auto; }
.site-main { min-height: 62vh; padding: 40px 0 80px; }

.grid { display: grid; gap: 24px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.section { padding: 72px 0; }
.section-alt { background: var(--grad-soft); }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-title .eyebrow { color: var(--primary); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 12.5px; }
.section-title h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 8px 0 12px; }
.section-title p { color: var(--text-2); }

.eyebrow {
  color: var(--primary); font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; font-size: 12.5px; display: inline-block;
}

.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-2); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-small { font-size: 13px; }
.text-primary { color: var(--primary); }
.fw-600 { font-weight: 600; }
.flex { display: flex; align-items: center; gap: 12px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------------------
   4. BUTTONS
--------------------------------------------------------------------------- */
.btn {
  --ripple: rgba(255, 255, 255, .55);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; border: 0;
  font-family: var(--font); font-size: 14.5px; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(109, 40, 217, .55);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(109, 40, 217, .65); }

.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.btn-soft { background: var(--highlight); color: var(--primary-dark); }
.btn-soft:hover { color: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-outline { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger-outline:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 15px 32px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.ripple-ink {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: var(--ripple); opacity: .5; pointer-events: none;
  animation: rippleAnim .6s ease-out forwards;
}

/* ---------------------------------------------------------------------------
   5. BADGES & ALERTS
--------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.badge i { font-size: 10px; }
.badge-success { background: rgba(34, 197, 94, .12); color: #16A34A; }
.badge-warning { background: rgba(245, 158, 11, .14); color: #D97706; }
.badge-danger  { background: rgba(239, 68, 68, .12); color: #DC2626; }
.badge-info    { background: rgba(14, 165, 233, .12); color: #0284C7; }
.badge-primary { background: var(--highlight); color: var(--primary-dark); }
.badge-neutral { background: rgba(100, 116, 139, .12); color: var(--text-2); }
[data-theme="dark"] .badge-success { background: rgba(34,197,94,.16); color:#4ADE80; }
[data-theme="dark"] .badge-warning { background: rgba(245,158,11,.16); color:#FBBF24; }
[data-theme="dark"] .badge-danger  { background: rgba(239,68,68,.16); color:#F87171; }
[data-theme="dark"] .badge-info    { background: rgba(14,165,233,.16); color:#38BDF8; }

.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 14px; position: relative;
  border: 1px solid transparent;
}
.alert-success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: var(--success); }
.alert-error   { background: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.3);  color: var(--danger); }
.alert-warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: var(--warning); }
.alert-info    { background: rgba(14,165,233,.1); border-color: rgba(14,165,233,.3); color: var(--info); }
.alert-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: inherit; opacity: .6; font-size: 14px; }
.alert-close:hover { opacity: 1; }

/* ---------------------------------------------------------------------------
   6. FORMS
--------------------------------------------------------------------------- */
.field { position: relative; margin-bottom: 22px; }

.field input,
.field select,
.field textarea {
  width: 100%; max-width: 100%; padding: 16px 16px 8px;
  font-family: var(--font); font-size: 15px; color: var(--text);
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); transition: border-color .25s ease, box-shadow .25s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { padding: 14px 40px 14px 16px; -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237C3AED' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }

.field label {
  position: absolute; left: 16px; top: 14px; right: 16px;
  font-size: 15px; color: var(--text-2); pointer-events: none;
  transition: all .2s ease; transform-origin: left top;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.field input:focus, .field select:focus, .field textarea:focus,
.field input:not(:placeholder-shown), .field textarea:not(:placeholder-shown) {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .12);
}
.field input:focus ~ label, .field textarea:focus ~ label,
.field input:not(:placeholder-shown) ~ label, .field textarea:not(:placeholder-shown) ~ label {
  top: 6px; font-size: 11px; font-weight: 600; color: var(--primary);
  letter-spacing: .04em; text-transform: uppercase;
}
.field select:focus ~ label { top: 6px; font-size: 11px; font-weight: 600; color: var(--primary);
  letter-spacing: .04em; text-transform: uppercase; }
.field select:required:valid ~ label { display: none; }
.field input::placeholder, .field textarea::placeholder { color: transparent; }

.field .hint { font-size: 12px; color: var(--text-2); margin-top: 5px; }
.field .error { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.field.has-error input { border-color: var(--danger); }
.field.has-error .error { display: block; }

.checkline { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.checkline input { accent-color: var(--primary); width: 16px; height: 16px; }

.auth-wrap {
  min-height: calc(100vh - 320px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 0;
}
.auth-card {
  width: min(460px, 100%); padding: 40px 36px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; box-shadow: var(--shadow-lg);
}
.auth-card .logo-mark { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 26px; box-shadow: var(--shadow); }
.auth-card h1 { text-align: center; font-size: 24px; }
.auth-card .sub { text-align: center; color: var(--text-2); font-size: 14px; margin: 6px 0 28px; }
.auth-alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-2); }

/* ---------------------------------------------------------------------------
   7. CARDS & IMAGE PLACEHOLDERS
--------------------------------------------------------------------------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-pad { padding: 26px; }
.card-title { font-size: 17px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.card-title i { color: var(--primary); }

.glass {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: var(--shadow);
}

.img-placeholder {
  display: grid; place-items: center;
  min-height: 170px; color: var(--ph-color, var(--primary));
  font-size: 46px; border-radius: var(--radius);
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE) !important;
}
.img-placeholder::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.55), transparent 45%);
}
.img-placeholder i { position: relative; z-index: 1; filter: drop-shadow(0 8px 14px rgba(109,40,217,.25)); }
[data-theme="dark"] .img-placeholder { background: linear-gradient(135deg, #2E1065, #3B1874) !important; color: var(--accent); }

/* Course card */
.course-card { overflow: hidden; display: flex; flex-direction: column; }
.course-card .cc-media { position: relative; }
.course-card .cc-media .img-placeholder { min-height: 180px; border-radius: 0 0 0 0; }
.course-card .cc-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-card .cc-body h3 { font-size: 17px; }
.course-card .cc-body p { color: var(--text-2); font-size: 13.5px; flex: 1; }
.course-card .cc-foot { display: flex; align-items: center; justify-content: space-between; }
.course-card .cc-price { font-weight: 700; color: var(--primary-dark); font-size: 17px; }
.cc-level { position: absolute; top: 14px; left: 14px; z-index: 2; }
.cc-level .badge { background: rgba(255,255,255,.92); color: var(--primary-dark); backdrop-filter: blur(6px); }

/* Stat card */
.stat-card { padding: 22px; display: flex; align-items: flex-start; gap: 16px; }
.stat-card .stat-icon {
  width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 21px; color: var(--primary-dark);
  background: var(--highlight);
}
.stat-card .stat-body { flex: 1; min-width: 0; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-card .stat-label { color: var(--text-2); font-size: 13px; }
.stat-card .stat-trend { font-size: 12px; font-weight: 600; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }
.stat-card .stat-trend.up { color: var(--success); }
.stat-card .stat-trend.down { color: var(--danger); }
.stat-card.primary .stat-icon { background: var(--grad); color: #fff; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------------------
   8. PUBLIC NAVBAR & HERO
--------------------------------------------------------------------------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--navbar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s ease;
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: .02em; }
.brand-text small { font-size: 10.5px; color: var(--text-2); letter-spacing: .05em; text-transform: uppercase; }
.brand-light .brand-text strong { color: #F9FAFB; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a:not(.btn) {
  padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text);
  position: relative;
}
.nav-links > a:not(.btn)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--grad); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-links > a:not(.btn):hover { color: var(--primary); }
.nav-links > a:not(.btn):hover::after,
.nav-links > a:not(.btn).active::after { transform: scaleX(1); }
.nav-links > a:not(.btn).active { color: var(--primary-dark); font-weight: 600; }
.nav-links .btn { margin-left: 8px; }

.nav-toggle { display: none; background: none; border: 0; font-size: 22px; color: var(--text); padding: 8px; }

/* Hero */
.hero { position: relative; padding: 84px 0 96px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 {
  font-size: clamp(32px, 5vw, 54px); font-weight: 800; line-height: 1.12; margin: 16px 0 18px;
}
.hero h1 .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { color: var(--text-2); font-size: 17px; max-width: 540px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats .hs strong { font-size: 30px; font-weight: 800; color: var(--text); display: block; line-height: 1.1; }
.hero-stats .hs span { color: var(--text-2); font-size: 13px; }

.hero-art { position: relative; min-height: 420px; }
.hero-card {
  position: absolute; background: var(--glass); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.5); border-radius: 22px; padding: 22px;
  box-shadow: var(--shadow-lg); width: 260px;
}
.hero-card .hc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hero-card .hc-top .hc-ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 18px;
}
.hero-card .hc-top strong { font-size: 14.5px; display: block; }
.hero-card .hc-top small { color: var(--text-2); font-size: 12px; }
.hero-card .hc-line { height: 8px; border-radius: 8px; background: var(--border); margin-bottom: 8px; overflow: hidden; }
.hero-card .hc-line span { display: block; height: 100%; border-radius: 8px; background: var(--grad); }
.hero-card .hc-row { display: flex; gap: 8px; margin-top: 10px; }
.hero-card .hc-chip { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--highlight); color: var(--primary-dark); font-weight: 600; }
.hc-a { top: 6%; left: 0; transform: rotate(-3deg); }
.hc-b { top: 38%; right: 0; transform: rotate(2deg); }
.hc-c { bottom: 2%; left: 10%; transform: rotate(-1deg); }
.hero-ring {
  position: absolute; inset: 0; margin: auto; width: 380px; height: 380px;
  border-radius: 50%; background: radial-gradient(circle, rgba(124,58,237,.16), transparent 65%);
  filter: blur(8px);
}

/* Floating background blobs */
.floating-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: float 18s ease-in-out infinite; }
.b1 { width: 460px; height: 460px; background: rgba(124,58,237,.16); top: -140px; right: -120px; }
.b2 { width: 360px; height: 360px; background: rgba(167,139,250,.14); bottom: -100px; left: -120px; animation-delay: -6s; }
.b3 { width: 240px; height: 240px; background: rgba(253,186,116,.2); top: 45%; left: 55%; animation-delay: -12s; }
[data-theme="dark"] .blob { opacity: .22; }

/* Feature tiles */
.feature-tile { padding: 30px; }
.feature-tile .ft-ico {
  width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center;
  font-size: 23px; color: var(--primary-dark); background: var(--highlight); margin-bottom: 18px;
  transition: transform .3s ease;
}
.feature-tile:hover .ft-ico { transform: translateY(-4px) rotate(-6deg); }
.feature-tile h3 { font-size: 17px; margin-bottom: 8px; }
.feature-tile p { color: var(--text-2); font-size: 13.5px; }

/* Timeline (how it works) */
.timeline { position: relative; max-width: 720px; margin: 0 auto; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--accent), var(--primary)); border-radius: 2px; }
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -29px; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--primary);
}
.timeline-item h4 { font-size: 16.5px; }
.timeline-item p { color: var(--text-2); font-size: 14px; }

/* CTA band */
.cta-band { border-radius: 28px; padding: 54px; background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  border-radius: 50%; background: rgba(255,255,255,.14); }
.cta-band h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 520px; margin-bottom: 24px; }
.cta-band .btn { background: #fff; color: var(--primary-dark); }
.cta-band .btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(0,0,0,.3); }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }

/* ---------------------------------------------------------------------------
   9. FOOTER
--------------------------------------------------------------------------- */
.footer { background: var(--footer); color: #9CA3AF; padding: 64px 0 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.footer-col h4 { color: #F9FAFB; font-size: 15px; margin-bottom: 16px; }
.footer-col a { display: block; color: #9CA3AF; font-size: 14px; padding: 5px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-col p { font-size: 14px; padding: 5px 0; }
.footer-col p i { color: var(--primary); width: 22px; }
.footer-col > .brand p { padding-top: 12px; font-size: 13.5px; }
.social-row { display: flex; gap: 10px; margin-top: 16px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #F9FAFB !important; font-size: 15px; padding: 0;
  transition: transform .2s ease, background .2s ease;
}
.social-row a:hover { background: var(--grad); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; font-size: 13px; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.footer-dots { color: rgba(255,255,255,.4); }

/* ---------------------------------------------------------------------------
   10. APP SHELL — SIDEBAR, TOPBAR, CONTENT
--------------------------------------------------------------------------- */
.app-body { background: var(--bg); }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 90;
  transition: transform .3s ease;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.sidebar-close { display: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 14px; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin: 18px 10px 8px; }
.nav-group:first-child { margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px; margin-bottom: 2px;
  color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav-item i { width: 20px; text-align: center; font-size: 15px; }
.nav-item:hover { background: var(--highlight); color: var(--primary-dark); transform: translateX(2px); }
.nav-item.active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(109,40,217,.6); }
.nav-item.active:hover { color: #fff; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.sidebar-foot { border-top: 1px solid var(--border); padding: 14px; }
.sidebar-foot .nav-item { margin-bottom: 0; }
.nav-danger:hover { background: rgba(239,68,68,.1); color: var(--danger); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 80; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 70;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px;
  background: var(--navbar); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-title h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.breadcrumb i { font-size: 9px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--primary); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 0;
  background: transparent; color: var(--text-2); font-size: 17px;
  display: grid; place-items: center; position: relative;
  transition: background .2s ease, color .2s ease;
}
.icon-btn:hover { background: var(--highlight); color: var(--primary-dark); }

.theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: block; }

.dot-badge {
  position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}

/* Dropdowns */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 280px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 8px; z-index: 120; display: none;
}
.dropdown-menu.open { display: block; animation: slideDown .18s ease; }
.dropdown-menu a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-size: 14px; }
.dropdown-menu a:hover { background: var(--highlight); color: var(--primary-dark); }
.dropdown-menu a i { width: 18px; text-align: center; }
.dropdown-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.dropdown-notif { width: 330px; padding: 0; overflow: hidden; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.dropdown-head a { font-size: 12px; color: var(--primary); padding: 0; }
.dropdown-head a:hover { background: none; }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { display: flex !important; gap: 12px !important; padding: 12px 16px !important; border-radius: 0 !important; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: 0; }
.notif-item > i { margin-top: 4px; font-size: 9px; }
.notif-item > i.new { color: var(--primary); }
.notif-item > i.read { color: var(--border); }
.notif-item span { display: flex; flex-direction: column; min-width: 0; }
.notif-item strong { font-size: 13.5px; }
.notif-item small { font-size: 12px; color: var(--text-2); }
.notif-item em { font-style: normal; font-size: 11px; color: var(--text-2); opacity: .7; margin-top: 3px; }
.notif-item.unread { background: rgba(124,58,237,.05); }
.empty-mini { padding: 22px; text-align: center; color: var(--text-2); font-size: 13.5px; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.user-chip:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.user-chip-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.user-chip-text strong { font-size: 13.5px; }
.user-chip-text small { font-size: 11px; color: var(--text-2); }
.user-chip > i { font-size: 10px; color: var(--text-2); }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 17px; color: #fff;
  background: var(--grad);
}
.avatar-sm { width: 32px; height: 32px; font-size: 13px; border-radius: 10px; }

.app-content { flex: 1; padding: 28px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .alert { margin-bottom: 0; width: 100%; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.app-footer { border-top: 1px solid var(--border); padding: 16px 28px; font-size: 12.5px; color: var(--text-2); }
.app-footer .container { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------------------
   11. TABLES
--------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
table.dataTable, table.data-table { width: 100% !important; border-collapse: collapse; font-size: 14px; }
table.dataTable thead th, table.data-table thead th {
  background: var(--card); color: var(--text-2); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
}
table.dataTable tbody td, table.data-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.dataTable tbody tr, table.data-table tbody tr { transition: background .15s ease; }
table.dataTable tbody tr:hover, table.data-table tbody tr:hover { background: rgba(124,58,237,.04); }
table.dataTable tbody tr:last-child td, table.data-table tbody tr:last-child td { border-bottom: 0; }
table.dataTable .row-avatar, table.data-table .row-avatar { display: flex; align-items: center; gap: 12px; }
table.dataTable .row-avatar .avatar, table.data-table .row-avatar .avatar { width: 36px; height: 36px; font-size: 14px; border-radius: 10px; }
table.dataTable .row-avatar strong, table.data-table .row-avatar strong { display: block; font-size: 13.5px; line-height: 1.3; }
table.dataTable .row-avatar small, table.data-table .row-avatar small { color: var(--text-2); font-size: 12px; }
.dt-search { padding: 14px 16px; display: flex; justify-content: flex-end; }
.dt-search label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.dt-search input {
  padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: var(--font); background: var(--card); color: var(--text);
}
.dt-search input:focus { outline: none; border-color: var(--primary); }
.dt-length { padding: 14px 16px; }
.dt-info { padding: 14px 16px; font-size: 13px; color: var(--text-2); }
.dt-paging { padding: 14px 16px; display: flex; justify-content: flex-end; gap: 4px; }
.dt-paging button {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text-2); font-family: var(--font); font-size: 13px;
}
.dt-paging button.current { background: var(--grad); color: #fff; border-color: transparent; }
.dt-paging button:hover:not(.current) { border-color: var(--primary); color: var(--primary); }

/* ---------------------------------------------------------------------------
   12. PROGRESS BARS
--------------------------------------------------------------------------- */
.progress { height: 9px; border-radius: 999px; background: var(--border); overflow: hidden; position: relative; }
.progress > span {
  display: block; height: 100%; border-radius: 999px; background: var(--grad);
  position: relative; overflow: hidden; transition: width 1s cubic-bezier(.22,.61,.36,1);
}
.progress > span::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 2.2s infinite;
}
.progress-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.progress-label strong { color: var(--primary-dark); }

/* ---------------------------------------------------------------------------
   13. TABS & COURSE PLAYER
--------------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab {
  padding: 12px 18px; border: 0; background: none; font-family: var(--font);
  font-size: 14px; font-weight: 600; color: var(--text-2); position: relative; white-space: nowrap;
}
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--grad); transform: scaleX(0); transition: transform .2s ease; }
.tab.active { color: var(--primary-dark); }
.tab.active::after { transform: scaleX(1); }

.lesson-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 10px; background: var(--card); transition: transform .2s ease, box-shadow .2s ease;
}
.lesson-row:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.lesson-row .l-ico {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 15px;
  background: var(--highlight); color: var(--primary-dark);
}
.lesson-row .l-ico.done { background: rgba(34,197,94,.14); color: var(--success); }
.lesson-row .l-body { flex: 1; min-width: 0; }
.lesson-row .l-body strong { display: block; font-size: 14px; }
.lesson-row .l-body small { color: var(--text-2); font-size: 12px; }
.lesson-row .l-meta { display: flex; align-items: center; gap: 10px; }

.module-block { margin-bottom: 26px; }
.module-block > .mb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.module-block > .mb-head .mb-num {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 14px;
}
.module-block > .mb-head h3 { font-size: 16.5px; }

/* Video stage */
.video-stage {
  aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  background: #0B1220; position: relative; box-shadow: var(--shadow-lg);
}
.video-stage iframe, .video-stage video { width: 100%; height: 100%; border: 0; display: block; }
.video-stage .vs-placeholder {
  height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.75);
  flex-direction: column; gap: 14px; text-align: center; padding: 24px;
}
.video-stage .vs-placeholder i { font-size: 54px; color: var(--accent); }
.video-stage .vs-placeholder p { font-size: 15px; }

/* ---------------------------------------------------------------------------
   14. QUIZ
--------------------------------------------------------------------------- */
.quiz-question { margin-bottom: 26px; }
.quiz-question .q-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.quiz-question .q-text { font-weight: 600; font-size: 15.5px; }
.quiz-question .q-marks { color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.q-options { display: grid; gap: 10px; }
.q-option {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color .2s ease, background .2s ease;
  font-size: 14.5px;
}
.q-option:hover { border-color: var(--accent); background: var(--highlight); }
.q-option input { accent-color: var(--primary); width: 17px; height: 17px; }
.q-option.correct { border-color: var(--success); background: rgba(34,197,94,.08); }
.q-option.incorrect { border-color: var(--danger); background: rgba(239,68,68,.08); }
.matching-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.matching-row { display: contents; }
.matching-row .m-left { padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-xs); font-size: 14px; background: var(--card); }
.matching-row select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  font-family: var(--font); font-size: 14px; background: var(--card); color: var(--text);
}
.matching-row select:focus { outline: none; border-color: var(--primary); }

.quiz-timer {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: var(--highlight); color: var(--primary-dark);
}
.quiz-timer.low { background: rgba(239,68,68,.12); color: var(--danger); animation: pulse 1s infinite; }

/* ---------------------------------------------------------------------------
   15. CERTIFICATE
--------------------------------------------------------------------------- */
.certificate {
  max-width: 880px; margin: 0 auto; position: relative;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 60px 56px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.certificate::before {
  content: ""; position: absolute; inset: 14px; border: 2px solid var(--accent);
  border-radius: 14px; pointer-events: none; opacity: .6;
}
.certificate .cert-orn { font-size: 46px; color: var(--primary); margin-bottom: 10px; }
.certificate h2 { font-size: 15px; letter-spacing: .35em; text-transform: uppercase; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
.certificate h1 { font-size: clamp(22px, 3.4vw, 34px); margin: 10px 0 6px; }
.certificate .cert-name { font-size: clamp(26px, 4vw, 40px); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 18px 0 8px; }
.certificate .cert-line { color: var(--text-2); font-size: 15px; max-width: 560px; margin: 0 auto 26px; }
.certificate .cert-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.certificate .cert-meta .cm { text-align: left; }
.certificate .cert-meta .cm small { display: block; color: var(--text-2); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.certificate .cert-meta .cm strong { font-size: 15px; }
.certificate .cert-qr { text-align: right; }
.certificate .cert-qr img { width: 92px; height: 92px; border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.certificate .cert-no { font-size: 12.5px; color: var(--text-2); margin-top: 18px; }

/* ---------------------------------------------------------------------------
   16. MISC COMPONENTS
--------------------------------------------------------------------------- */
.search-bar { position: relative; }
.search-bar input {
  width: 100%; padding: 16px 20px 16px 52px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--card); font-family: var(--font);
  font-size: 15px; color: var(--text);
  box-shadow: var(--shadow-sm);
}
.search-bar input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124,58,237,.12); }
.search-bar i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-2); }

.pill-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-filter .pill {
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--text-2); font-size: 13.5px; font-weight: 600;
  transition: all .2s ease;
}
.pill-filter .pill:hover { border-color: var(--accent); color: var(--primary-dark); }
.pill-filter .pill.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }

.news-card { overflow: hidden; display: flex; flex-direction: column; }
.news-card .nc-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card .nc-body h3 { font-size: 16.5px; }
.news-card .nc-body h3 a { color: var(--text); }
.news-card .nc-body h3 a:hover { color: var(--primary); }
.news-card .nc-body p { color: var(--text-2); font-size: 13.5px; flex: 1; }
.news-card .nc-meta { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 12px; }

.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; aspect-ratio: 4/3; }
.gallery-item .img-placeholder { min-height: 100%; border-radius: 0; height: 100%; }
.gallery-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 40px 18px 14px;
  background: linear-gradient(transparent, rgba(17,24,39,.8));
  color: #fff; font-size: 13.5px; font-weight: 600; text-align: left;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(17,24,39,.88);
  display: none; align-items: center; justify-content: center; padding: 30px;
  backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; animation: fadeIn .25s ease; }
.lightbox .lb-box { max-width: 720px; width: 100%; }
.lightbox .lb-box .img-placeholder { min-height: 340px; border-radius: 22px; }
.lightbox .lb-cap { color: #E5E7EB; text-align: center; margin-top: 14px; font-size: 14px; }
.lightbox .lb-close { position: absolute; top: 24px; right: 28px; color: #fff; background: none; border: 0; font-size: 30px; }

/* Chat-like message rows */
.msg-thread { display: flex; flex-direction: column; gap: 12px; max-height: 480px; overflow-y: auto; padding: 6px; }
.msg-bubble { max-width: 76%; padding: 13px 16px; border-radius: 16px; font-size: 14px; }
.msg-bubble.mine { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble.theirs { align-self: flex-start; background: var(--highlight); color: var(--text); border-bottom-left-radius: 4px; }
.msg-bubble small { display: block; margin-top: 6px; font-size: 11px; opacity: .75; }

/* Loading skeletons */
.skeleton { position: relative; overflow: hidden; background: var(--border); border-radius: 10px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: shimmer 1.4s infinite;
}
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }

/* Empty states */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty-state i { font-size: 44px; color: var(--accent); margin-bottom: 14px; }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }

/* List row (compact) */
.list-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }

/* Deadline item */
.deadline-item { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--border); }
.deadline-item:last-child { border-bottom: 0; }
.deadline-item .d-date {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--highlight); color: var(--primary-dark); line-height: 1.15;
}
.deadline-item .d-date strong { font-size: 17px; }
.deadline-item .d-date small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.deadline-item .d-body { flex: 1; min-width: 0; }
.deadline-item .d-body strong { font-size: 14px; display: block; }
.deadline-item .d-body small { color: var(--text-2); font-size: 12px; }

/* ---------------------------------------------------------------------------
   17. ANIMATIONS
--------------------------------------------------------------------------- */
@keyframes rippleAnim { to { transform: scale(3); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -30px); } }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

html.js .reveal { opacity: 0; }
.reveal.in { animation: slideUp .7s cubic-bezier(.22,.61,.36,1) forwards; }
.reveal-delay-1 { animation-delay: .1s; }
.reveal-delay-2 { animation-delay: .2s; }
.reveal-delay-3 { animation-delay: .3s; }

.page-enter { animation: fadeIn .35s ease; }

/* ---------------------------------------------------------------------------
   18. RESPONSIVE
--------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }

  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw);
    background: var(--card); flex-direction: column; align-items: flex-start;
    padding: 90px 26px 30px; gap: 6px; z-index: 150;
    transform: translateX(100%); transition: transform .3s ease;
    box-shadow: -20px 0 60px rgba(0,0,0,.15);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links > a:not(.btn) { width: 100%; font-size: 16px; }
  .nav-links .btn { margin: 10px 0 0; width: 100%; }
  .nav-toggle { display: block; }

  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .sidebar-close { display: grid; }

  .topbar { padding: 0 16px; }
  .app-content { padding: 18px 14px; }
  .user-chip-text { display: none; }
  .user-chip > i { display: none; }

  .hero { padding: 56px 0 64px; }
  .cta-band { padding: 34px 24px; }
  .auth-card { padding: 30px 22px; }
  .matching-grid { grid-template-columns: 1fr; }
  .certificate { padding: 40px 22px; }
  .certificate .cert-meta { justify-content: center; text-align: center; }
  .certificate .cert-qr { text-align: center; }
  .certificate .cert-meta .cm { text-align: center; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-card { width: 220px; padding: 16px; }
  .table-wrap { border-radius: 14px; }
}

/* ---------------------------------------------------------------------------
   19. PRINT (certificate download)
--------------------------------------------------------------------------- */
@media print {
  /* Only the certificate page hides the app chrome; other pages print normally */
  body.cert-page * { visibility: hidden; }
  body.cert-page .certificate, body.cert-page .certificate * { visibility: visible; }
  body.cert-page .certificate {
    position: absolute; inset: 0; width: 100%; margin: 0;
    box-shadow: none; border-radius: 0; border-color: #ddd;
  }
  body.cert-page .no-print { display: none !important; }
  body.cert-page .app-content { padding: 0; }
  body.cert-page .page-head { display: none; }
}