/* =====================================================
   Target 1 nursing platform — Main Stylesheet
   Fonts: Poppins (headings) + Inter (body)
   Palette: White · Orange #F97316 · Teal #0D9488 · Navy #0F172A
   ===================================================== */

/* ── CSS Variables ── */
:root {
  --orange:       #FF6B00;
  --orange-light: #FFF0E5;
  --orange-dark:  #FF7A00; /* Primary Accent */
  --teal:         #0D9488;
  --teal-light:   #E6FFFA;
  --teal-dark:    #0F6E56;
  --navy:         #0F172A; /* Slate 900 */
  --navy-mid:     #1E293B;
  --slate:        #475569;
  --muted:        #94A3B8;
  --border:       #E2E8F0;
  --bg:           #F8FAFC;
  --white:        #FFFFFF;
  --header-h:     64px;
  --sidebar-w:    280px;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.12);
  --transition:   .22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--slate);
  min-height: 100vh;
  overflow-x: hidden;
}

body.sidebar-open {
  overflow: hidden;
  overscroll-behavior: none;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Page Wrapper ── */
.page-wrapper {
  padding-top: var(--header-h);
  min-height: 100vh;
  animation: pageFadeIn .35s ease;
}

/* =====================================================
   FIXED HEADER
   ===================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), padding-right 0s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem 0 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  text-decoration: none;
}

.header-brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.header-icon-btn {
  position: relative;
  background: none;
  border: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.header-icon-btn:hover { background: var(--orange-light); color: var(--orange); }

.notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  background: var(--orange);
  border-radius: 50%;
  border: 1.5px solid white;
  animation: notifPulse 2s ease-in-out infinite;
}

.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border: none;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow var(--transition);
}

/* Remove Bootstrap's default dropdown-toggle caret icon on the avatar button */
.avatar-btn.dropdown-toggle::after {
  display: none !important;
  content: none !important;
}

.header-logout-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border-radius: var(--radius-sm);
  background: var(--orange-light);
  color: var(--orange-dark);
  font-size: .85rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.header-logout-btn:hover { background: var(--orange); color: white; }

.btn-header-login {
  padding: .45rem .9rem;
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-weight: 600;
  font-size: .85rem;
  transition: color var(--transition);
}
.btn-header-login:hover { color: var(--orange); }

.btn-header-register {
  padding: .45rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--orange);
  color: white;
  font-weight: 600;
  font-size: .85rem;
  transition: background var(--transition), transform var(--transition);
}
.btn-header-register:hover { background: var(--orange-dark); transform: translateY(-1px); }

/* =====================================================
   HAMBURGER BUTTON (public)
   ===================================================== */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: .4rem;
  transition: border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.hamburger-btn:hover { border-color: var(--orange); background: var(--orange-light); }

.ham-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
  transform-origin: center;
}

.hamburger-btn.is-open .ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--orange); }
.hamburger-btn.is-open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.is-open .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--orange); }

/* =====================================================
   SIDEBAR (Public)
   ===================================================== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(2px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh; /* dynamic viewport height: avoids mobile address-bar jump */
  background: var(--navy);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  /* The sidebar itself never scrolls as a whole — only .sidebar-nav does.
     This keeps the header, user card, and logout footer pinned in place
     regardless of how many nav links there are. */
  overflow: hidden;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
}

.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: .95rem;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.sidebar-close:hover { color: white; background: rgba(255,255,255,.1); }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-name {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
}

.sidebar-user-profession {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  margin-top: 1px;
}

.sidebar-nav {
  list-style: none;
  padding: .75rem 0;
  margin: 0;
  flex: 1;
  min-height: 0;       /* required so flex children can actually scroll instead of growing */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .72rem 1.25rem;
  color: #94A3B8;
  font-size: .9rem;
  font-weight: 500;
  border-radius: 0;
  transition: color var(--transition), background var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.sidebar-nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-nav-link:hover { color: white; background: rgba(255,255,255,.06); }
.sidebar-nav-item.active .sidebar-nav-link {
  color: var(--orange);
  background: rgba(249,115,22,.1);
  border-left-color: var(--orange);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}
.sidebar-logout:hover { color: #FCA5A5; background: rgba(239,68,68,.1); }
/* =====================================================
   HERO SECTION
   ===================================================== */
.hero-section {
  position: relative;
  color: white;
  padding: 5rem 0 4rem;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
  background: var(--navy);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* Mobile-first: uses the small 800px image by default */
  background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), var(--hero-bg-mobile, var(--hero-bg));
  background-size: cover;
  background-position: center;
  z-index: 0;
  animation: kenBurns 12s ease-in-out infinite alternate;
  filter: blur(4px);
}

.hero-content-anim {
  position: relative;
  z-index: 1;
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(13,148,136,.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(249,115,22,.15);
  border: 1px solid rgba(249,115,22,.3);
  color: #FED7AA;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  letter-spacing: .02em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: white;
}
.hero-title .accent { color: var(--orange); }

.hero-subtitle {
  font-size: 1.05rem;
  color: #94A3B8;
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  background: var(--orange);
  color: white;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  font-family: 'Poppins', sans-serif;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(249,115,22,.4);
}
.btn-hero-primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(249,115,22,.45); color: white; }

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border: 1.5px solid rgba(255,255,255,.25);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  transition: border-color var(--transition), background var(--transition);
}
.btn-hero-secondary:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.06); color: white; }

.hero-stats {
  margin-top: 3rem;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.hero-stat-item { 
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.hero-stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.hero-stat-number span { color: #FF7A00; }
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 2rem;
  position: relative;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 360px;
}

.hero-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: white;
}

.hero-card-inner {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1rem;
}

.hero-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.hero-card-title { font-size: .95rem; font-weight: 600; margin-bottom: 2px; }
.hero-card-sub { font-size: .78rem; color: #94A3B8; }

.hero-card-pills { display: flex; gap: .4rem; flex-wrap: wrap; }

.hero-pill {
  font-size: .72rem;
  padding: .2rem .65rem;
  border-radius: 50px;
  background: rgba(255,255,255,.08);
  color: #CBD5E1;
  border: 1px solid rgba(255,255,255,.1);
}

.hero-card-float {
  position: absolute;
  bottom: -20px; right: -20px;
  background: var(--orange);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  min-width: 150px;
  box-shadow: 0 8px 24px rgba(249,115,22,.3);
}

.float-label { font-size: .72rem; color: rgba(255,255,255,.75); margin-bottom: .25rem; }
.float-value { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.1rem; color: white; }

/* =====================================================
   SECTION STYLES (shared)
   ===================================================== */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--white); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--orange-light);
  color: var(--orange-dark);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .3rem .8rem;
  border-radius: 50px;
  margin-bottom: .75rem;
}
.section-label:hover {
  background: var(--orange);
  color: white;
  transition: all var(--transition);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .5rem;
}

.section-subtitle {
  font-size: .95rem;
  color: var(--slate);
  max-width: 500px;
  line-height: 1.65;
  margin-bottom: 0;
}

.section-head { margin-bottom: 2.5rem; }

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--orange);
  font-weight: 600;
  font-size: .88rem;
  transition: gap var(--transition);
}
.view-all-link:hover { gap: .65rem; color: var(--orange-dark); }

/* =====================================================
   PAPER CARDS
   ===================================================== */
.paper-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}
.paper-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--orange);
}
.paper-card:hover .paper-card-title {
  color: var(--orange-dark);
}
.paper-card:hover .paper-views {
  color: var(--orange);
}

.paper-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.paper-card:hover .paper-card-img { transform: scale(1.05); }

.paper-preview-container {
  height: 160px;
  background: #f1f5f9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.paper-preview-doc {
  width: 90px;
  height: 120px;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 4px;
  padding: 12px 8px;
  position: relative;
  overflow: hidden;
}

.doc-header-line { width: 60%; height: 6px; background: #e2e8f0; margin-bottom: 15px; border-radius: 2px; }
.doc-body-lines {
  background: repeating-linear-gradient(transparent, transparent 7px, #f1f5f9 8px);
  height: 70px;
  width: 100%;
}

.paper-card-body { padding: 1.25rem; }
.paper-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--navy); }

.view-pill {
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate);
  border: 1px solid var(--border);
}
.view-pill-trending { background: var(--orange-light); color: var(--orange-dark); border-color: rgba(249, 115, 22, 0.2); }
.trending-tag { position: absolute; bottom: 10px; left: 10px; background: var(--orange); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 700; }

.paper-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: .18rem .55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.paper-badge-pdf { background: #EFF6FF; color: #1D4ED8; }
.paper-badge-docx { background: #F0FDF4; color: #15803D; }

.paper-card-course {
  font-size: .78rem;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.paper-views {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  color: var(--muted);
}

.trending-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: linear-gradient(135deg, #FFF7ED, #FEE2E2);
  color: var(--orange-dark);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 50px;
  border: 1px solid rgba(249,115,22,.2);
  box-shadow: 0 2px 8px rgba(249,115,22,.2);
}

/* =====================================================
   COURSE CARDS
   ===================================================== */
.course-card {
  display: flex;
  align-items: center;
  background: white;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  transition: all 0.3s ease;
  height: 100%;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  border-color: var(--orange);
}

.course-card-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-right: 1.25rem;
  flex-shrink: 0;
}

.course-card-info { flex-grow: 1; }

.course-card-title { 
  font-size: 1.05rem; 
  font-weight: 700; 
  color: var(--navy); 
  margin-bottom: 0.15rem; 
}
.course-card-count { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

.course-card-chevron {
  color: var(--muted);
  font-size: 1.1rem;
  margin-left: 0.75rem;
  transition: transform 0.2s ease;
}
.course-card:hover .course-card-chevron { transform: translateX(3px); color: var(--orange); }

/* Compact Course Card */
.course-compact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}
.course-compact-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.course-compact-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.course-compact-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.88rem;
  line-height: 1.2;
}
.course-compact-meta {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex; align-items: center; gap: 4px;
  margin-top: 1px;
}
.course-compact-chevron { color: #CBD5E1; font-size: 0.85rem; }

/* =====================================================
   FEATURES / HOW IT WORKS
   ===================================================== */
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--navy);
}

.feature-text { font-size: .88rem; color: var(--slate); line-height: 1.65; margin: 0; }

.step-number {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-bottom: .75rem;
}

/* =====================================================
   PROFESSIONS STRIP
   ===================================================== */
.professions-strip {
  background: var(--bg);
  padding: 3rem 0;
}

.profession-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  transition: all var(--transition);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.profession-pill:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0,0,0,0.05); }
.profession-pill i { font-size: 0.9rem; color: var(--navy); opacity: 0.8; }

.professions-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}

/* =====================================================
   CTA BAND
   ===================================================== */
.cta-band {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 250px; height: 250px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.cta-band-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  color: white;
  margin-bottom: .75rem;
}
.cta-band-text { color: rgba(255,255,255,.8); font-size: 1rem; margin-bottom: 1.75rem; }

.btn-cta-white {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.75rem;
  background: white;
  color: var(--orange-dark);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  font-family: 'Poppins', sans-serif;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.btn-cta-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); color: var(--orange-dark); }

/* =====================================================
   SITE FOOTER
   ===================================================== */
.site-footer-main {
  background: var(--navy);
  color: #94A3B8;
  padding: 3.5rem 0 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: white;
  margin-bottom: .9rem;
}

.footer-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: .9rem;
}

.footer-tagline { font-size: .85rem; line-height: 1.65; color: #64748B; }

.footer-heading { font-family: 'Poppins', sans-serif; font-size: .85rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { font-size: .85rem; color: #64748B; transition: all var(--transition); }
.footer-links a:hover { color: var(--orange) !important; padding-left: 4px; }

.footer-address { font-size: .85rem; line-height: 1.65; color: #64748B; }

.footer-divider { border-color: rgba(255,255,255,.07); margin: 2rem 0 1.25rem; }

.footer-bottom {
  padding-bottom: 1.5rem;
  font-size: .82rem;
  color: #475569;
  text-align: center;
}

/* =====================================================
   AUTH PAGES
   ===================================================== */
:root {
  --auth-accent: #2563eb;
}

.auth-page {
  min-height: 100vh;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.auth-card {
  background: white;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  padding: 3rem;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(15,23,42,.12), 0 4px 16px rgba(15,23,42,.06);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 1.75rem;
}

.logo-digit {
  color: var(--orange);
  font-weight: 900;
  font-style: italic;
  margin-left: 1px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
  display: inline-block;
}

.auth-logo-icon {
  width: 40px; height: 40px;
  background: var(--auth-accent);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.05rem;
}

.auth-title { font-size: 1.45rem; font-weight: 800; color: var(--navy); margin-bottom: .3rem; }
.auth-subtitle { font-size: .88rem; color: var(--slate); margin-bottom: 1.75rem; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: .82rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}

.form-label { font-size: .82rem; font-weight: 600; color: var(--navy); margin-bottom: .4rem; }

.form-control {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .85rem 1.15rem;
  font-size: .9rem;
  color: var(--navy);
  background: #f1f5f9;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,.15);
  background: white;
  outline: none;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
  outline: none;
}

.input-group .form-control { border-right: none; }
.input-group-text {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-left: none;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.input-group-text:hover { color: var(--orange); }

.input-group-text.toggle-password {
  cursor: pointer;
  background: var(--bg);
  border-color: var(--border);
  transition: background var(--transition), color var(--transition);
}
.input-group-text.toggle-password:hover {
  background: var(--orange-light);
  color: var(--orange-dark);
}

/* Profession Dropdown */
.profession-dropdown { position: relative; width: 100%; }

.profession-dropdown-btn {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--navy);
  transition: all var(--transition);
  cursor: pointer;
  text-align: left;
}
.profession-dropdown-btn:focus, .profession-dropdown-btn.open {
  background: white;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
  outline: none;
}
.profession-dropdown-btn .placeholder-text { color: var(--muted); }

.profession-dropdown-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease-out;
}
.profession-dropdown-panel.open { display: block; }

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.profession-search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .4rem .7rem;
  font-size: .85rem;
  outline: none;
}
.profession-search input:focus { border-color: var(--orange); }

.profession-list {
  max-height: 220px;
  overflow-y: auto;
  padding: .3rem 0;
}

.profession-option {
  padding: .55rem .9rem;
  font-size: .88rem;
  color: var(--navy);
  cursor: pointer;
  transition: background var(--transition);
  display: flex; align-items: center; gap: .5rem;
}
.profession-option:hover { background: var(--orange-light); color: var(--orange-dark); }
.profession-option.selected { background: var(--orange-light); color: var(--orange-dark); font-weight: 600; }
.profession-option.hidden { display: none; }

/* Btn */
.btn-primary-custom {
  width: 100%;
  padding: .75rem;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-primary-custom:hover { background: var(--orange-dark); transform: translateY(-1px); }

.auth-footer-text { font-size: .85rem; color: var(--slate); text-align: center; margin-top: 1.25rem; }
.auth-footer-text a { color: var(--orange); font-weight: 600; }

.alert-custom {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.alert-error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }

/* =====================================================
   DASHBOARD / COURSES PAGE
   ===================================================== */
.page-hero-band {
  background: linear-gradient(135deg, var(--navy) 0%, #1a2342 60%, var(--navy-mid) 100%);
  padding: 2.5rem 0;
  color: white;
  position: relative;
  overflow: hidden;
}
.page-hero-band::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(249,115,22,.15) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero-title { font-size: 1.6rem; font-weight: 800; color: white; margin-bottom: .3rem; }
.page-hero-sub { font-size: .9rem; color: #94A3B8; }

/* =====================================================
   PAPER VIEWER
   ===================================================== */
.viewer-toggle {
  display: flex;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  width: fit-content;
}

.viewer-tab {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  background: none;
  color: var(--slate);
}
.viewer-tab.active {
  background: white;
  color: var(--navy);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.viewer-tab.active.questions-tab { color: #1D4ED8; }
.viewer-tab.active.answers-tab { color: var(--teal-dark); }

.pdf-embed-area {
  width: 100%;
  min-height: 75vh;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #525659;
  overflow: hidden;
  position: relative;
}
.pdf-embed-area iframe {
  width: 100%;
  height: 75vh;
  min-height: 600px;
  border: none;
  display: block;
}

#viewerCard:fullscreen,
#viewerCard:-webkit-full-screen {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: white;
  overflow-y: auto;
  padding: 1rem;
}
#viewerCard:fullscreen .pdf-embed-area,
#viewerCard:-webkit-full-screen .pdf-embed-area {
  min-height: 0;
  height: calc(100vh - 100px);
}
#viewerCard:fullscreen .pdf-embed-area iframe,
#viewerCard:-webkit-full-screen .pdf-embed-area iframe { height: 100%; }

.viewer-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--muted);
  background: var(--bg);
  border-radius: var(--radius-sm);
  min-height: 300px;
}
.viewer-loading .spinner-border { width: 2.5rem; height: 2.5rem; color: var(--orange); }
.viewer-loading.ready { display: none !important; }

.pdf-placeholder {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--muted);
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
  padding: 2rem;
  text-align: center;
}

.pdf-placeholder-icon {
  width: 72px; height: 72px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-sm);
}

.viewer-auto-notice {
  background: linear-gradient(135deg, var(--orange-light), #FEF3C7);
  border: 1px solid rgba(249,115,22,.2);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .83rem;
  color: var(--orange-dark);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
}

.viewer-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.viewer-action-btns { display: flex; gap: .5rem; align-items: center; }

.btn-viewer {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-viewer-primary { background: var(--orange); color: white; }
.btn-viewer-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-viewer-ghost { background: var(--bg); color: var(--slate); border: 1px solid var(--border); }
.btn-viewer-ghost:hover { background: var(--border); color: var(--navy); }

.docx-viewer-notice {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  color: #1D4ED8;
}
.docx-viewer-notice i { font-size: 2.5rem; display: block; margin-bottom: .75rem; opacity: .7; }

/* =====================================================
   ADMIN PANEL STYLES
   ===================================================== */

/* ── Overlay ── */
.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.admin-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ── Sidebar ── */
.admin-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  height: 100vh;
  height: 100dvh; /* dynamic viewport height: avoids mobile address-bar jump */
  background: var(--navy);
  z-index: 1050;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.admin-sidebar.open {
  transform: translateX(0);
  box-shadow: 8px 0 40px rgba(15,23,42,.25);
}
.admin-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* The inner wrapper itself never scrolls — only .admin-nav does, so the
     brand, user card, and logout link stay pinned and always visible. */
  overflow: hidden;
}

/* Sidebar Brand */
.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.1rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.admin-brand-logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: .95rem;
  flex-shrink: 0;
}
.admin-sidebar-brand .logo-text {
  font-family: 'Sora', sans-serif;
  font-size: .82rem;
  color: white;
  letter-spacing: .06em;
  flex: 1;
}
.admin-sidebar-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  font-size: 1rem;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.admin-sidebar-close:hover { color: white; background: rgba(255,255,255,.1); }

/* Sidebar User */
.admin-sidebar-user {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.admin-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: .88rem;
  flex-shrink: 0;
}
.admin-user-details { display: flex; flex-direction: column; min-width: 0; }
.admin-user-name {
  font-weight: 700;
  color: white;
  font-size: .88rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-email {
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  margin-top: 1px;
}

/* Sidebar Nav — this is the only part of the admin sidebar that scrolls internally */
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: .75rem .75rem 0;
  flex: 1;
  min-height: 0;       /* required so this can actually scroll instead of growing */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.55);
  font-size: .88rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.admin-nav-link i { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }
.admin-nav-link:hover { color: white; background: rgba(255,255,255,.07); }
.admin-nav-link.active {
  color: white;
  background: rgba(249,115,22,.18);
  border-left-color: var(--orange);
  font-weight: 600;
}
.logout-link { margin-top: auto; color: rgba(255,255,255,.4); flex-shrink: 0; padding-bottom: 1rem; }
.logout-link:hover { color: #FCA5A5; background: rgba(239,68,68,.12); }

/* ── Top Bar ── */
.admin-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 58px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  box-shadow: var(--shadow-sm);
  gap: 1rem;
}
.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  flex: 1;
}
.admin-topbar-brand {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: 'Sora', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .05em;
  white-space: nowrap;
}
.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-left: auto;
  flex-shrink: 0;
}
.admin-topbar-greeting {
  font-size: .83rem;
  color: var(--slate);
  white-space: nowrap;
}
.admin-topbar-logout {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border-radius: var(--radius-sm);
  background: var(--orange-light);
  color: var(--orange-dark);
  font-size: .82rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.admin-topbar-logout:hover { background: var(--orange); color: white; }

/* ── Hamburger ── */
.admin-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: .4rem;
  transition: border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.admin-hamburger:hover { border-color: var(--orange); background: var(--orange-light); }
.admin-hamburger .ham-line {
  display: block;
  width: 18px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
  transform-origin: center;
}
.admin-hamburger.is-open .ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--orange); }
.admin-hamburger.is-open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.admin-hamburger.is-open .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--orange); }

/* ── Shell & Main ── */
.admin-shell {
  padding-top: 58px;
  min-height: 100vh;
  background: var(--bg);
}
.admin-main {
  width: 100%;
  min-height: calc(100vh - 58px);
}
.admin-panel-content {
  width: 100%;
}

/* ── Cards & Components ── */
.admin-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.45rem;
  box-shadow: var(--shadow-sm);
}
.admin-card-panel { padding: 1.75rem; }
.admin-card-stat {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.admin-card-stat:hover { box-shadow: var(--shadow); transition: box-shadow var(--transition); }
.admin-card-label {
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .12em;
  margin-bottom: .75rem;
  display: block;
}

/* Admin Metric Cards */
.admin-metric-card {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  height: 100%;
}
.metric-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 1rem;
}
.bg-soft-blue { background: #E0F2FE; color: #0369A1; }
.bg-soft-orange { background: #FFEDD5; color: #C2410C; }
.bg-soft-teal { background: #CCFBF1; color: #0F766E; }
.bg-soft-purple { background: #F3E8FF; color: #7E22CE; }
.metric-val { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.metric-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }

/* ── Admin Tables ── */
.admin-table th,
.admin-table td { white-space: nowrap; }
.admin-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item::after {
  content: ''; position: absolute; left: -24px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: white; border: 2px solid var(--orange);
}
.timeline-meta { font-size: 0.7rem; font-weight: 700; color: var(--orange); text-transform: uppercase; margin-bottom: 4px; }
.timeline-content { font-size: 0.85rem; }

/* ── Notification Card ── */
.notification-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.notification-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--orange);
}
.notification-content { flex-grow: 1; min-width: 0; }
.notification-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.notification-message {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 0.6rem;
}
.notification-date { font-size: 0.75rem; color: var(--muted); }
.notification-actions { flex-shrink: 0; }
.btn-delete-notif {
  color: #EF4444;
  background: #FEF2F2;
  width: 32px; height: 32px; border-radius: 8px;
  border: none; display: flex; align-items: center; justify-content: center;
  transition: 0.2s;
}
.notif-card .btn-delete-notif:hover { background: #EF4444; color: white; }

/* =====================================================
   SMART VIEWER  (pdf.js Canvas)
   ===================================================== */
.smart-viewer-wrapper {
  position: relative;
  background: #2c2e33;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 80vh;
  box-shadow: var(--shadow-lg);
}

/* PDF Iframe Rendering Area */
.pdfjs-render-area {
  height: 80vh;
  background: #525659;
  position: relative;
}

.pdfjs-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  background: #525659;
}
.pdfjs-container-active {
  display: block;
}

.pdfjs-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: white;
}

.viewer-docx-notice {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 8px;
}

/* Fullscreen support */
.smart-viewer-wrapper:-webkit-full-screen,
.smart-viewer-wrapper:fullscreen {
  width: 100%;
  height: 100%;
  background: #525659;
}
.smart-viewer-wrapper:-webkit-full-screen .pdfjs-render-area,
.smart-viewer-wrapper:fullscreen .pdfjs-render-area {
  height: calc(100vh - 60px);
}
.smart-viewer-wrapper:-webkit-full-screen .viewer-controls-overlay,
.smart-viewer-wrapper:fullscreen .viewer-controls-overlay {
  z-index: 100;
}

.smart-toggle-pill {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  padding: 8px;
  border-radius: 50px;
  display: flex;
  gap: 8px;
  z-index: 2100;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 10px 30px -5px rgba(0,0,0,0.5);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.smart-toggle-pill.active-interaction { opacity: 1; transform: translateX(-50%) scale(1); }
.smart-toggle-pill:not(.active-interaction) { opacity: 0.5; transform: translateX(-50%) scale(0.92); }

.toggle-btn {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  width: 48px;
  height: 48px;
  border-radius: 50px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}
.toggle-btn.active {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}
.toggle-btn i { font-weight: 800 !important; }

.viewer-controls-overlay {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 10px;
  pointer-events: none;
}
.viewer-controls-overlay > div { pointer-events: auto; }

.viewer-info-card {
  border-radius: var(--radius) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow-sm);
}

.smart-viewer-wrapper:-webkit-full-screen .pdf-render-canvas,
.smart-viewer-wrapper:fullscreen .pdf-render-canvas {
  height: calc(100vh - 60px);
}

/* =====================================================
   CONFIRM DIALOG
   ===================================================== */
.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1100;
}
.confirm-dialog-overlay.active { display: flex; }
.confirm-dialog {
  width: min(520px, 100%);
  background: white;
  border-radius: 18px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 35px 100px rgba(15, 23, 42, .18);
  animation: dialogPop .24s ease;
}
.confirm-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.confirm-dialog-header h2 { margin: 0; font-size: 1.2rem; }
.confirm-dialog-subtitle { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }
.confirm-dialog-close {
  border: none;
  background: transparent;
  color: var(--navy);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: .15rem .4rem;
}
.confirm-dialog-body { margin-bottom: 1.25rem; }
.confirm-dialog-body p { margin: 0; color: var(--text); line-height: 1.65; }
.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
}
@keyframes dialogPop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */
.alert-custom.alert-success:not(.toast-notification) {
  display: none !important;
}
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}
.toast-notification {
  pointer-events: auto;
  display: flex !important;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  align-items: center;
  gap: 0.75rem;
  max-width: 400px;
  min-width: 300px;
  font-weight: 500;
  font-size: 0.9rem;
  border-left: 4px solid #16A34A;
  background: #F0FDF4;
  color: #15803D;
  animation: toastSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.toast-notification.hide { animation: toastSlideOut 0.5s ease forwards; }
@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

/* =====================================================
   SCROLL TO TOP
   ===================================================== */
.scroll-top-btn, .scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}
/* Lift scroll-to-top above the bottom tab bar on mobile */
@media (max-width: 991.98px) {
  body.has-bottom-tabbar .scroll-to-top-btn,
  body.has-bottom-tabbar .scroll-top-btn {
    bottom: 82px; /* 64px tab bar + 18px breathing room */
  }
}
.scroll-top-btn.visible, .scroll-to-top-btn.visible { opacity: 1; visibility: visible; }
.scroll-top-btn:hover, .scroll-to-top-btn:hover { transform: translateY(-5px); background: var(--orange-dark); }

/* =====================================================
   DESKTOP ADMIN SIDEBAR OVERRIDE (≥992px)
   ===================================================== */
@media (min-width: 992px) {
  .admin-sidebar {
    transform: translateX(0) !important;
    box-shadow: none;
    border-right: 1px solid var(--border);
    background: var(--white);
  }
  .admin-sidebar-brand { border-bottom-color: var(--border); }
  .admin-sidebar-user { border-bottom-color: var(--border); }
  .admin-sidebar-brand .logo-text { color: var(--navy); }
  .admin-nav-link { color: var(--slate); }
  .admin-nav-link:hover { color: var(--navy); background: var(--bg); }
  .admin-nav-link.active { color: white; background: var(--orange); border-left-color: transparent; }
  .admin-user-name { color: var(--navy); }
  .admin-user-email { color: var(--muted); }
  .admin-sidebar-close { display: none; }
  .admin-overlay { display: none !important; }
  .logout-link { color: var(--slate); }
  .logout-link:hover { color: #DC2626; background: #FEF2F2; }
  .admin-brand-logo { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); }

  .admin-topbar { left: 280px; }
  .admin-shell {
    padding-top: 58px;
    padding-left: 280px;
  }
  
  /* Hide hamburger on desktop for admin */
  .admin-hamburger { display: none; }
  
  /* Admin cards grid spacing */
  .admin-card-panel { padding: 2rem; }
}

/* =====================================================
   TABLET / MOBILE RESPONSIVE
   ===================================================== */
@media (max-width: 991.98px) {
  .admin-topbar { left: 0; }
  .admin-shell { padding-left: 0; }
  .hero-visual { display: none; }
  .hero-section { padding: 3.5rem 0 3rem; }
  .admin-topbar-left { flex: 1; }
}

@media (max-width: 767.98px) {
  .section { padding: 3rem 0; }
  .hero-stats { flex-wrap: wrap; gap: 1.25rem; padding: 1.25rem; }
  .hero-stat-item { flex: 1 1 40%; }
  .hero-stat-number { font-size: 1.4rem; }
  .hero-title { font-size: 1.8rem; }
  .header-brand-text { font-size: 1rem; }
  .btn-hero-primary, .btn-hero-secondary { font-size: .88rem; padding: .65rem 1.25rem; }
  .auth-card { padding: 1.75rem 1.25rem; }
  
  /* Admin mobile optimizations */
  .admin-panel-content .container { padding-left: .85rem; padding-right: .85rem; }
  .admin-card { padding: 1.1rem; }
  .admin-card-panel { padding: 1.1rem; }
  .admin-card-stat { min-height: 120px; }
  
  /* Stack metric cards 2x2 */
  .admin-metric-card { padding: 1.1rem; }
  .metric-val { font-size: 1.25rem; }
  
  /* Better admin form layouts on mobile */
  .admin-panel-content .row.g-4 > [class*="col-"] { margin-bottom: .75rem; }
  
  /* Stack table rows into cards on mobile for admin tables */
  .admin-table-responsive-cards table,
  .admin-table-responsive-cards thead,
  .admin-table-responsive-cards tbody,
  .admin-table-responsive-cards th,
  .admin-table-responsive-cards td,
  .admin-table-responsive-cards tr {
    display: block;
  }
  .admin-table-responsive-cards thead { display: none; }
  .admin-table-responsive-cards tr {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: .75rem;
    box-shadow: var(--shadow-sm);
  }
  .admin-table-responsive-cards td {
    padding: .35rem 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    white-space: normal;
  }
  .admin-table-responsive-cards td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
  }
  
  /* Notification cards stack on mobile */
  .notification-card { flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1rem; }
  .notification-actions { align-self: flex-end; }

  /* PDF viewer mobile height */
  .pdf-embed-area { min-height: 55vh; }
  .pdf-embed-area iframe { height: 55vh; }
  .viewer-action-bar { flex-direction: column; align-items: flex-start; }
  
  /* Smart toggle mobile */
  .smart-toggle-pill { bottom: 20px; }
  .toggle-btn { width: 40px; height: 40px; font-size: 1.1rem; }
  
  /* Course page */
  .page-hero-band { padding: 1.75rem 0; }
  .page-hero-title { font-size: 1.25rem; }
  
  /* Breadcrumb wrapping */
  .page-hero-band nav { overflow-x: auto; white-space: nowrap; padding-bottom: .25rem; }
}

@media (max-width: 575.98px) {
  .header-logout-btn span { display: none; }
  .hero-cta-group { flex-direction: column; align-items: flex-start; }
  .cta-band { padding: 3rem 0; }
  .admin-topbar { padding: 0 .85rem; }
  .admin-topbar-greeting { display: none !important; }
  .admin-topbar-right { gap: .5rem; }
  .hero-card-float { position: static; margin-top: 1rem; }
  .auth-card { padding: 1.5rem 1rem; }
  .auth-title { font-size: 1.2rem; }
  
  /* Admin tables become stacked cards on small screens */
  .table-responsive table.admin-table thead { display: none; }
  .table-responsive table.admin-table tr {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: .75rem;
    box-shadow: var(--shadow-sm);
  }
  .table-responsive table.admin-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .4rem 0;
    border: none;
    white-space: normal;
    gap: .5rem;
  }
  .table-responsive table.admin-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;
  }
  .table-responsive table.admin-table td:last-child { border-top: 1px solid var(--border); margin-top: .25rem; padding-top: .6rem; justify-content: flex-end; }
  
  /* View paper filters stack */
  .admin-card-panel .row.g-3 > [class*="col-"] { margin-bottom: .25rem; }
}

/* =====================================================
   MOBILE HEADER BRAND FIX
   Paste this at the very bottom of main.css,
   REPLACING the existing @media (max-width: 430px) block
   ===================================================== */

@media (max-width: 430px) {
  /* Remove the old rule that hid the brand text — we want it visible */
  /* .header-brand-text { display: none; } ← DELETE THIS */

  .header-inner { padding: 0 .75rem; }
  .hero-stat-item { flex: 1 1 100%; }
  .hero-stats { gap: .85rem; }
  .hero-stat-number { font-size: 1.2rem; }
}

/* ── Mobile Brand: T1NP box + text ── */
/* Show the brand icon box on mobile (hidden by default on desktop
   since the sidebar logo handles branding there) */
.header-brand-icon {
  display: flex; /* ensure it shows on all sizes */
}

/* On very small screens, tighten the brand gap */
@media (max-width: 430px) {
  .header-brand {
    gap: .35rem;
    font-size: 1rem;
  }

  /* Keep the T1NP icon but make it slightly smaller */
  .header-brand-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: .82rem;
  }

  /* Show the text but truncate gracefully */
  .header-brand-text {
    display: block !important;
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
  }
}

/* =====================================================
   UTILITY & ANIMATIONS
   ===================================================== */
.text-orange { color: var(--orange) !important; }
.bg-orange { background: var(--orange) !important; }
.text-teal { color: var(--teal) !important; }
.notif-badge { font-size: 0.65rem; padding: 2px 5px; }

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 22px; margin-bottom: 10px; }
.skeleton-card { height: 180px; border-radius: var(--radius); }

.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: .5rem;
  font-size: .88rem;
}
.dropdown-item {
  border-radius: 6px;
  padding: .45rem .75rem;
  transition: background var(--transition);
}
.dropdown-item:hover { background: var(--orange-light); color: var(--orange-dark); }

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes notifPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .7; transform: scale(1.4); }
}

html, body {
  scroll-behavior: auto !important;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.admin-nav::-webkit-scrollbar { width: 4px; }
.admin-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }

/* =====================================================
   NOTIFICATIONS ENHANCED
   ===================================================== */
.notification-card.unread {
  background: #FFF7ED !important;
  border-left: 4px solid var(--orange) !important;
}
.notif-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-light);
  color: var(--orange);
  flex-shrink: 0;
  font-size: 1.1rem;
}
.notif-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.notif-unread-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  background: var(--orange);
  color: white;
}
.empty-notif-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  font-size: 2.5rem;
  color: var(--muted);
}

/* =====================================================
   SWITCH YEAR / REQUEST SWITCH PAGES
   ===================================================== */
.switch-success-card {
  animation: switchSuccessAnim 0.5s ease-out;
}
@keyframes switchSuccessAnim {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* =====================================================
   ADMIN MOBILE IMPROVEMENTS
   ===================================================== */
@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
    width: 280px;
    background: var(--navy);
  }
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(15,23,42,.25);
  }
  .admin-sidebar-brand .logo-text { color: white; }
  .admin-nav-link { color: rgba(255,255,255,.55); }
  .admin-nav-link:hover { color: white; background: rgba(255,255,255,.07); }
  .admin-nav-link.active { color: white; background: rgba(249,115,22,.18); border-left-color: var(--orange); }
  .admin-user-name { color: white; }
  .admin-user-email { color: rgba(255,255,255,.4); }
  .admin-sidebar-close { display: flex !important; }
  .admin-sidebar-brand { border-bottom-color: rgba(255,255,255,.08); }
  .admin-sidebar-user { border-bottom-color: rgba(255,255,255,.08); }
  .logout-link { color: rgba(255,255,255,.4); }
  .logout-link:hover { color: #FCA5A5; background: rgba(239,68,68,.12); }
  .admin-topbar { left: 0; }
  .admin-shell { padding-left: 0; }
}

/* =====================================================
   COURSE THUMBNAIL STYLES
   ===================================================== */
.course-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.course-card-visual {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: 1.25rem;
}

/* =====================================================
   NOTIFICATIONS ENHANCED - Mark all read button
   ===================================================== */
.notifications-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#markAllReadBtn {
  border-radius: 50px;
  font-weight: 600;
  transition: all var(--transition);
}
#markAllReadBtn:hover {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

/* Notification card click to mark read */
.notification-card.unread {
  cursor: pointer;
  transition: all var(--transition);
}
.notification-card.unread:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(249,115,22,0.12);
}

/* Notification delete animation */
.notification-card {
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow var(--transition);
}

/* =====================================================
   VIEWER IMPROVEMENTS
   ===================================================== */
.pdf-render-canvas iframe {
  background: #525659;
  transition: transform 0.2s ease;
}

.pdf-render-canvas {
  position: relative;
  overflow: hidden;
}

.viewer-controls-overlay {
  pointer-events: none;
}
.viewer-controls-overlay > div {
  pointer-events: auto;
}

/* Better spinner */
#viewerSpinner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg);
  color: var(--muted);
  z-index: 5;
}
#viewerSpinner .spinner-border {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--orange);
}

/* DOCX notice */
#docxNotice {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Toggle pill always visible on viewer pages */
.smart-viewer-wrapper .smart-toggle-pill {
  z-index: 2100;
}

/* =====================================================
   DUAL IFRAME VIEWER
   ===================================================== */
.viewer-iframe-container {
  display: none;
  width: 100%;
  height: 80vh;
  min-height: 600px;
  overflow: auto; /* Enables both horizontal and vertical scrolling */
  background: #525659;
  border-radius: 8px;
}
.viewer-iframe-container.viewer-iframe-active {
  display: block;
}
.viewer-iframe {
  display: block;
  border: none;
  background: #525659;
  /* Width/height set dynamically by JS for zoom */
  min-width: 100%;
  min-height: 80vh;
}
.viewer-docx-notice {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 8px;
}
.viewer-docx-notice h5 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* =====================================================
   ADMIN NOTIFICATIONS PAGE STYLES
   ===================================================== */
.admin-notif-container {
  max-width: 800px;
  margin: 0 auto;
}

.admin-notif-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.admin-notif-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--orange);
}

.admin-notif-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.admin-notif-target {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* =====================================================
   RESPONSIVE IMPROVEMENTS
   ===================================================== */
@media (max-width: 767.98px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start !important;
  }
  .notifications-header-actions {
    width: 100%;
  }
  .section-head .badge {
    order: -1;
  }
}

/* =====================================================
   ADMIN TABLE IMPROVEMENTS
   ===================================================== */
.admin-panel-content .table td .badge {
  font-size: 0.75rem;
}
.admin-panel-content .table th {
  white-space: nowrap;
}

/* =====================================================
   PAGE TRANSITIONS
   ===================================================== */
.page-wrapper {
  animation: pageFadeIn 0.3s ease;
}

/* =====================================================
   CUSTOM SCROLLBAR FOR ADMIN
   ===================================================== */
.admin-panel-content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.admin-panel-content::-webkit-scrollbar-track {
  background: transparent;
}
.admin-panel-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}



/* =====================================================
   SIDEBAR v2 — matches updated nav (no top user-card,
   profile card pinned at bottom) + BOTTOM TAB BAR (mobile)
   Append this AFTER everything else in main.css.
   ===================================================== */

/* ── Sidebar nav: slightly more breathing room since the
   top user-card is gone ── */
.sidebar-nav {
  padding-top: 1.25rem;
}

/* ── Profile card pinned at the bottom, tappable ── */
.sidebar-profile-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
  flex-shrink: 0;
}
.sidebar-profile-card:hover { background: rgba(255,255,255,.05); }

.sidebar-profile-info { flex: 1; min-width: 0; }
.sidebar-profile-sub {
  font-size: .74rem;
  color: var(--muted);
  margin-top: 1px;
}
.sidebar-profile-chevron {
  color: var(--muted);
  font-size: .85rem;
  flex-shrink: 0;
}

.sidebar-signout-row {
  padding: 0 1.25rem .9rem;
  flex-shrink: 0;
}
.sidebar-signout-row .sidebar-logout {
  padding: .55rem .5rem;
  font-size: .82rem;
}

/* Guest footer variant — no top border needed since there's
   no profile card above it in the logged-out state */
.sidebar-guest-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: auto;
  flex-shrink: 0;
}

/* =====================================================
   BOTTOM TAB BAR (mobile primary nav)
   ===================================================== */
.bottom-tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--navy);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  z-index: 900;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(15,23,42,.18);
}

.bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(255,255,255,.5);
  font-size: .68rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}
.bottom-tab i {
  font-size: 1.15rem;
  line-height: 1;
}
.bottom-tab.active {
  color: var(--orange);
}
/* Active "pill" behind the icon, matching the reference's Home tab.
   Centered within the tab itself via left:50%/translateX, so it
   works regardless of tab width or position in the bar. */
.bottom-tab.active::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 30px;
  background: rgba(249,115,22,.14);
  border-radius: 10px;
  z-index: -1;
}

.bottom-tab-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bottom-tab-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--orange);
  color: white;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 50px;
  min-width: 15px;
  text-align: center;
}

/* Reserve space at the bottom of the page so content isn't
   hidden behind the fixed tab bar. Applied via a body class
   set directly in header.php (more reliable than :has()
   across older mobile browsers). */
body.has-bottom-tabbar .page-wrapper {
  padding-bottom: 76px;
}

/* Tab bar is a mobile-first pattern — hide on larger screens
   where the sidebar is the primary nav anyway */
@media (min-width: 992px) {
  .bottom-tabbar { display: none; }
  body.has-bottom-tabbar .page-wrapper { padding-bottom: 0; }
}

/* =====================================================
   "COMING SOON" placeholder card — used by progress.php
   and bookmarks.php for now-unbuilt features.
   ===================================================== */
.coming-soon-card {
  max-width: 480px;
  margin: 3rem auto 4rem;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
}
.coming-soon-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  background: var(--orange-light);
  color: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.coming-soon-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .6rem;
}
.coming-soon-text {
  font-size: .92rem;
  color: var(--slate);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}



/* =====================================================
   GREETING HERO — replaces the old marketing hero-section
   on the homepage with a compact, personal "Hello, Name"
   banner, matching the reference dashboard design.
   Append after everything else in main.css.
   ===================================================== */

.greeting-hero {
  position: relative;
  background: linear-gradient(135deg, #0F172A 0%, #16213E 60%, #1a2342 100%);
  border-radius: 20px;
  padding: 1.75rem 1.75rem 1.9rem;
  margin: 1.25rem 0 1.75rem;
  overflow: hidden;
  color: white;
}

/* Subtle dotted texture, top-right, echoing the reference's
   faint grid pattern */
.greeting-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 55%;
  height: 100%;
  background-image: radial-gradient(rgba(249,115,22,.35) 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.9), transparent);
  mask-image: linear-gradient(to left, rgba(0,0,0,.9), transparent);
  pointer-events: none;
}

.greeting-hero::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(13,148,136,.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.greeting-hero-text {
  position: relative;
  z-index: 1;
}

.greeting-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  font-weight: 800;
  color: white;
  margin: 0 0 .6rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.greeting-wave {
  display: inline-block;
  animation: greetingWave 2.2s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes greetingWave {
  0%, 100% { transform: rotate(0deg); }
  15%      { transform: rotate(14deg); }
  30%      { transform: rotate(-8deg); }
  45%      { transform: rotate(14deg); }
  60%      { transform: rotate(0deg); }
}

.greeting-hero-sub {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  color: #CBD5E1;
  font-weight: 500;
}
.greeting-hero-sub i { color: var(--orange); font-size: .95rem; }

@media (max-width: 575.98px) {
  .greeting-hero { padding: 1.5rem 1.4rem 1.6rem; border-radius: 16px; }
}



/* =====================================================
   DARK MODE TOGGLE SWITCH
   ===================================================== */
.dark-toggle {
  width: 44px;
  height: 24px;
  border-radius: 50px;
  background: #E2E8F0;
  position: relative;
  cursor: pointer;
  transition: background .3s ease;
  flex-shrink: 0;
}
.dark-toggle.on {
  background: #6366F1;
}
.dark-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.dark-toggle.on .dark-toggle-thumb {
  transform: translateX(20px);
}

/* =====================================================
   DARK MODE VARIABLES & OVERRIDES
   ===================================================== */
html.dark-mode {
  --bg:     #0F172A;
  --white:  #1E293B;
  --border: #334155;
  --slate:  #94A3B8;
  --navy:   #F1F5F9;
  --muted:  #64748B;
}

html.dark-mode body {
  background: #0F172A;
  color: #94A3B8;
}

/* Header */
html.dark-mode .site-header {
  background: #1E293B;
  border-bottom-color: #334155;
}
html.dark-mode .header-brand { color: #F1F5F9; }
html.dark-mode .header-icon-btn { color: #94A3B8; }

/* ── Fix --navy override causing white sidebars ── */
html.dark-mode {
  --navy: #F1F5F9;   /* text color */
  --bg:   #0F172A;
  --white: #1E293B;
  --border: #334155;
}

/* Sidebar and tabbar must NOT use --white or --navy as bg */
html.dark-mode .sidebar { background: #1a2342 !important; }
html.dark-mode .bottom-tabbar { background: #1a2342 !important; }


/* Cards */
html.dark-mode .pcard,
html.dark-mode .admin-card,
html.dark-mode .course-card,
html.dark-mode .paper-card,
html.dark-mode .coming-soon-card,
html.dark-mode .notification-card {
  background: #1E293B;
  border-color: #334155;
}

/* Rows */
html.dark-mode .prow { border-bottom-color: #334155; }
html.dark-mode .prow-label { color: #64748B; }
html.dark-mode .prow-value { color: #F1F5F9; }
html.dark-mode .save-bar { background: #1a2845; border-top-color: #334155; }

/* Inputs */
html.dark-mode .form-control,
html.dark-mode .prow-input,
html.dark-mode .pw-input {
  background: #0F172A;
  border-color: #334155;
  color: #F1F5F9;
}
html.dark-mode .form-control:focus,
html.dark-mode .prow-input:focus,
html.dark-mode .pw-input:focus {
  background: #1E293B;
  border-color: var(--orange);
}

/* Sidebar */
html.dark-mode .sidebar,
html.dark-mode .bottom-tabbar {
  background: #1E293B;
}
html.dark-mode .sidebar-nav-link { color: #94A3B8; }
html.dark-mode .sidebar-nav-item.active .sidebar-nav-link { color: var(--orange); }
html.dark-mode .sidebar-user-name { color: #F1F5F9; }
html.dark-mode .sidebar-user-profession { color: #64748B; }
html.dark-mode .sidebar-logo { color: white; }
html.dark-mode .sidebar-profile-card { color: #94A3B8; }
html.dark-mode .sidebar-profile-card:hover { background: rgba(255,255,255,.05); }

/* ── Bottom tab bar ── */
html.dark-mode .bottom-tab { color: rgba(255,255,255,.45); }
html.dark-mode .bottom-tab.active { color: var(--orange); }

/* ── Footer (the scrolled content showing light bg) ── */
html.dark-mode .site-footer-main { background: #0F172A; }

/* Section labels */
html.dark-mode .psec-label { color: #64748B; }

/* Action links */
html.dark-mode .action-title { color: #F1F5F9; }
html.dark-mode .action-link:hover { background: #334155; border-radius: 8px; }

/* Profile hero stays dark — no change needed */

/* Status & badges */
html.dark-mode .status-active { background: #052e16; border-color: #166534; }
html.dark-mode .member-since { color: #64748B; }

/* Page background */
html.dark-mode .admin-shell,
html.dark-mode .page-wrapper { background: #0F172A; }
html.dark-mode body { background: #0F172A; color: #94A3B8; }

/* Greeting hero — subtle adjustment */
html.dark-mode .greeting-hero {
  background: linear-gradient(135deg, #080E1E 0%, #0F172A 60%, #111827 100%);
}

/* Dropdown */
html.dark-mode .dropdown-menu {
  background: #1E293B;
  border-color: #334155;
}
html.dark-mode .dropdown-item { color: #94A3B8; }
html.dark-mode .dropdown-item:hover { background: #334155; color: #F1F5F9; }

/* Section title */
html.dark-mode .section-title { color: #F1F5F9; }
html.dark-mode .text-muted { color: #64748B !important; }

/* Password modal body */
html.dark-mode .pw-body { background: #1E293B; }
html.dark-mode .pw-label { color: #64748B; }
html.dark-mode .pw-tip { color: #475569; }




/* =====================================================
   ONBOARDING TOUR (Driver.js custom skin)
   ===================================================== */
.driver-popover {
  background: var(--white) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(15,23,42,.22) !important;
  border: 1px solid var(--border) !important;
  padding: 1.25rem 1.4rem 1.1rem !important;
  max-width: 330px !important;
  font-family: 'Inter', sans-serif !important;
}
.driver-popover-title {
  font-family: 'Poppins', sans-serif !important;
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  margin-bottom: .4rem !important;
  padding-right: 1.75rem;
}
.driver-popover-description {
  font-size: .85rem !important;
  line-height: 1.55 !important;
  color: var(--slate) !important;
}
.driver-popover-progress-text {
  font-size: .72rem !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  letter-spacing: .03em;
  flex-shrink: 0;
}
.driver-popover-footer {
  margin-top: 1.1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  row-gap: .6rem;
  gap: .5rem;
}
.driver-popover-navigation-btns {
  display: flex;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.driver-popover-prev-btn,
.driver-popover-next-btn {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  gap: .35rem !important;
  font-family: 'Inter', sans-serif !important;
  font-size: .85rem !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  padding: .55rem 1.1rem !important;
  min-height: 40px !important;
  border: none !important;
  text-shadow: none !important;
  cursor: pointer;
  transition: all .18s ease;
}
.driver-popover-prev-btn {
  background: var(--bg) !important;
  color: var(--slate) !important;
  border: 1px solid var(--border) !important;
}
.driver-popover-prev-btn:hover { background: var(--border) !important; }
.driver-popover-next-btn {
  background: var(--orange) !important;
  color: white !important;
}
.driver-popover-next-btn:hover { background: var(--orange-dark) !important; }
.driver-popover-btn-disabled { opacity: .35 !important; cursor: not-allowed !important; }

.driver-popover-close-btn {
  position: absolute !important;
  top: .65rem !important;
  right: .65rem !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--bg) !important;
  color: var(--slate) !important;
  font-size: .95rem !important;
  line-height: 1 !important;
  opacity: 1 !important;
  text-shadow: none !important;
  transition: background .18s ease, color .18s ease;
}
.driver-popover-close-btn:hover {
  background: var(--orange-light) !important;
  color: var(--orange) !important;
}

.driver-popover-arrow-side-top    { border-top-color: var(--white) !important; }
.driver-popover-arrow-side-bottom { border-bottom-color: var(--white) !important; }
.driver-popover-arrow-side-left   { border-left-color: var(--white) !important; }
.driver-popover-arrow-side-right  { border-right-color: var(--white) !important; }

html.dark-mode .driver-popover { background: var(--white) !important; border-color: var(--border) !important; }
html.dark-mode .driver-popover-title { color: var(--navy) !important; }
html.dark-mode .driver-popover-description { color: var(--slate) !important; }
html.dark-mode .driver-popover-prev-btn {
  background: #0F172A !important;
  border-color: var(--border) !important;
  color: var(--slate) !important;
}
html.dark-mode .driver-popover-close-btn {
  background: #0F172A !important;
  color: var(--slate) !important;
}


/* Larger screens swap in the bigger 1920px image */
@media (min-width: 768px) {
  .hero-section::before {
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), var(--hero-bg);
  }
}









