/* ============================================================
   AEON Akademi LMS — Main Stylesheet
   Pixelworx Studio © 2025
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --ae-red:           #8C1FA5;
  --ae-red-dark:      #6B1580;
  --ae-red-hover:     #7A1A90;
  --ae-red-light:     #F7EDFB;
  --ae-red-border:    #DDB3EB;

  --ae-green:         #0F6E56;
  --ae-green-light:   #E1F5EE;
  --ae-blue:          #185FA5;
  --ae-blue-light:    #E6F1FB;
  --ae-amber:         #854F0B;
  --ae-amber-light:   #FAEEDA;

  --ae-text:          #1A1A1A;
  --ae-text-muted:    #555555;
  --ae-text-faint:    #888888;
  --ae-bg:            #F4F4F2;
  --ae-surface:       #FFFFFF;
  --ae-border:        #E3E3E0;
  --ae-border-light:  #EEEEEC;

  --ae-sidebar-w:     240px;
  --ae-topbar-h:      62px;
  --ae-radius:        8px;
  --ae-radius-lg:     12px;
  --ae-radius-xl:     16px;
  --ae-shadow:        0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --ae-shadow-md:     0 4px 12px rgba(0,0,0,0.08);

  --ae-font:         'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ae-transition:    0.18s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--ae-font);
  font-size: 14px;
  color: var(--ae-text);
  background: var(--ae-bg);
  line-height: 1.6;
}
a { color: var(--ae-red); text-decoration: none; transition: color var(--ae-transition); }
a:hover { color: var(--ae-red-dark); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: var(--ae-font); cursor: pointer; }
ul, ol { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ae-font);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ae-text);
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
small { font-size: 0.75rem; }

/* ── Layout Shell ───────────────────────────────────────────── */
.ae-wrap {
  display: flex;
  min-height: 100vh;
}

.ae-sidebar {
  width: var(--ae-sidebar-w);
  flex-shrink: 0;
  background: var(--ae-surface);
  border-right: 1px solid var(--ae-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

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

.ae-topbar {
  height: var(--ae-topbar-h);
  background: var(--ae-surface);
  border-bottom: 1px solid var(--ae-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.ae-content {
  flex: 1;
  padding: 28px 28px 48px;
}

/* ── Sidebar Brand ──────────────────────────────────────────── */
.ae-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--ae-border-light);
  text-decoration: none;
}
.ae-sidebar__logo {
  background: var(--ae-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 5px 11px;
  border-radius: var(--ae-radius);
}
.ae-sidebar__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ae-text);
  line-height: 1.1;
}
.ae-sidebar__tagline {
  font-size: 10px;
  color: var(--ae-text-faint);
  font-weight: 400;
}

/* ── Sidebar Nav ────────────────────────────────────────────── */
.ae-nav {
  padding: 14px 10px;
  flex: 1;
}
.ae-nav__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ae-text-faint);
  padding: 8px 10px 4px;
  margin-top: 8px;
}
.ae-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--ae-radius);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ae-text-muted);
  transition: all var(--ae-transition);
  margin-bottom: 2px;
  text-decoration: none;
}
.ae-nav__item:hover {
  background: var(--ae-red-light);
  color: var(--ae-red);
}
.ae-nav__item.active,
.ae-nav__item[aria-current="page"] {
  background: var(--ae-red-light);
  color: var(--ae-red);
  font-weight: 600;
}
.ae-nav__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.8;
}
.ae-nav__badge {
  margin-left: auto;
  background: var(--ae-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 100px;
}
.ae-sidebar__footer {
  padding: 14px 10px;
  border-top: 1px solid var(--ae-border-light);
}
.ae-sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--ae-radius);
}
.ae-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ae-red-light);
  border: 1.5px solid var(--ae-red-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ae-red);
  flex-shrink: 0;
  overflow: hidden;
}
.ae-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ae-avatar--sm { width: 30px; height: 30px; font-size: 10px; }
.ae-avatar--lg { width: 52px; height: 52px; font-size: 16px; }
.ae-user__name { font-size: 13px; font-weight: 600; color: var(--ae-text); }
.ae-user__role { font-size: 11px; color: var(--ae-text-faint); }

/* ── Topbar ─────────────────────────────────────────────────── */
.ae-topbar__breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ae-text-muted);
}
.ae-topbar__breadcrumb a { color: var(--ae-text-muted); }
.ae-topbar__breadcrumb a:hover { color: var(--ae-red); }
.ae-topbar__breadcrumb--current {
  color: var(--ae-text);
  font-weight: 600;
}
.ae-topbar__breadcrumb--sep {
  color: var(--ae-border);
}
.ae-topbar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.ae-topbar__progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ae-topbar__progress-label { font-size: 12px; color: var(--ae-text-faint); }
.ae-topbar__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ae-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ae-text-muted);
  transition: all var(--ae-transition);
}
.ae-topbar__icon-btn:hover { background: var(--ae-red-light); color: var(--ae-red); border-color: var(--ae-red-border); }
.ae-topbar__icon-btn svg { width: 16px; height: 16px; }

/* ── Cards ──────────────────────────────────────────────────── */
.ae-card {
  background: var(--ae-surface);
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-radius-lg);
  overflow: hidden;
}
.ae-card__body { padding: 20px; }
.ae-card__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ae-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ae-card__title { font-size: 14px; font-weight: 600; color: var(--ae-text); }
.ae-card__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--ae-border-light);
  background: #FAFAF9;
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.ae-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.ae-stat {
  background: var(--ae-surface);
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-radius-lg);
  padding: 18px;
  text-align: center;
}
.ae-stat__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ae-text);
  line-height: 1;
  margin-bottom: 6px;
}
.ae-stat__label {
  font-size: 11px;
  color: var(--ae-text-faint);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ae-stat--accent .ae-stat__value { color: var(--ae-red); }

/* ── Progress Bar ───────────────────────────────────────────── */
.ae-progress {
  height: 6px;
  background: var(--ae-border);
  border-radius: 3px;
  overflow: hidden;
}
.ae-progress__fill {
  height: 100%;
  background: var(--ae-red);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.ae-progress--sm { height: 4px; }
.ae-progress--lg { height: 8px; }
.ae-progress--green .ae-progress__fill { background: var(--ae-green); }

/* ── Badges ─────────────────────────────────────────────────── */
.ae-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.ae-badge--red   { background: var(--ae-red-light);   color: var(--ae-red); }
.ae-badge--green { background: var(--ae-green-light); color: var(--ae-green); }
.ae-badge--blue  { background: var(--ae-blue-light);  color: var(--ae-blue); }
.ae-badge--amber { background: var(--ae-amber-light); color: var(--ae-amber); }
.ae-badge--gray  { background: #F0F0EE; color: #555; }
.ae-badge--h5p   { background: var(--ae-blue); color: #fff; }
.ae-badge--new   { background: var(--ae-green); color: #fff; }

/* ── Buttons ─────────────────────────────────────────────────── */
.ae-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--ae-radius);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--ae-font);
  transition: all var(--ae-transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.ae-btn svg { width: 15px; height: 15px; }
.ae-btn--primary {
  background: var(--ae-red);
  color: #fff;
}
.ae-btn--primary:hover { background: var(--ae-red-hover); color: #fff; }
.ae-btn--ghost {
  background: transparent;
  border: 1px solid var(--ae-border);
  color: var(--ae-text-muted);
}
.ae-btn--ghost:hover { border-color: var(--ae-red-border); background: var(--ae-red-light); color: var(--ae-red); }
.ae-btn--sm { padding: 7px 14px; font-size: 12px; }
.ae-btn--lg { padding: 13px 28px; font-size: 15px; }
.ae-btn--full { width: 100%; }
.ae-btn--icon { padding: 9px; border-radius: var(--ae-radius); }
.ae-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Form Elements ───────────────────────────────────────────── */
.ae-form-group { margin-bottom: 18px; }
.ae-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ae-text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.ae-input,
.ae-select,
.ae-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-radius);
  font-family: var(--ae-font);
  font-size: 14px;
  color: var(--ae-text);
  background: var(--ae-surface);
  transition: border-color var(--ae-transition), box-shadow var(--ae-transition);
  outline: none;
  appearance: none;
}
.ae-input:focus,
.ae-select:focus,
.ae-textarea:focus {
  border-color: var(--ae-red);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.1);
}
.ae-input::placeholder { color: var(--ae-text-faint); }
.ae-textarea { resize: vertical; min-height: 100px; }

/* ── Course Cards ────────────────────────────────────────────── */
.ae-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.ae-course-card {
  background: var(--ae-surface);
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-radius-lg);
  overflow: hidden;
  transition: border-color var(--ae-transition), box-shadow var(--ae-transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.ae-course-card:hover {
  border-color: var(--ae-red-border);
  box-shadow: var(--ae-shadow-md);
}
.ae-course-card__thumb {
  height: 140px;
  background: var(--ae-red-light);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ae-course-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ae-course-card__thumb-icon {
  font-size: 40px;
  opacity: 0.6;
}
.ae-course-card__status {
  position: absolute;
  top: 10px;
  right: 10px;
}
.ae-course-card__body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.ae-course-card__cat { margin-bottom: 8px; }
.ae-course-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ae-text);
  margin-bottom: 10px;
  flex: 1;
  line-height: 1.4;
}
.ae-course-card__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--ae-border-light);
  background: #FAFAF9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ae-text-faint);
}

/* ── Lesson Player Layout ─────────────────────────────────────── */
.ae-player {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.ae-player__main { flex: 1; min-width: 0; }
.ae-player__sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--ae-topbar-h) + 20px);
  max-height: calc(100vh - var(--ae-topbar-h) - 40px);
  overflow-y: auto;
}

/* ── Video Player ─────────────────────────────────────────────── */
.ae-video-wrap {
  background: #111;
  border-radius: var(--ae-radius-lg) var(--ae-radius-lg) 0 0;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
}
.ae-video-wrap iframe,
.ae-video-wrap video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── H5P Content Zone ─────────────────────────────────────────── */
.ae-h5p-zone {
  background: var(--ae-surface);
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.ae-h5p-zone__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ae-border-light);
  background: #FAFAF9;
}
.ae-h5p-zone__title { font-size: 13px; font-weight: 600; color: var(--ae-text); }
.ae-h5p-zone__body { padding: 20px; }
.h5p-iframe-wrapper,
.ae-h5p-zone .h5p-content { width: 100% !important; }

/* ── Course Outline Sidebar ───────────────────────────────────── */
.ae-outline { }
.ae-outline__module {
  margin-bottom: 4px;
}
.ae-outline__module-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ae-text-faint);
  padding: 10px 12px 4px;
}
.ae-outline__lesson {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--ae-radius);
  font-size: 12.5px;
  color: var(--ae-text-muted);
  text-decoration: none;
  transition: all var(--ae-transition);
  line-height: 1.4;
}
.ae-outline__lesson:hover { background: var(--ae-red-light); color: var(--ae-red); }
.ae-outline__lesson.active { background: var(--ae-red-light); color: var(--ae-red); font-weight: 600; }
.ae-outline__lesson.completed { color: var(--ae-text-faint); }
.ae-outline__lesson-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.ae-outline__lesson.completed .ae-outline__lesson-icon {
  background: var(--ae-green);
  color: #fff;
}
.ae-outline__lesson.active .ae-outline__lesson-icon {
  background: var(--ae-red);
  color: #fff;
}
.ae-outline__lesson:not(.completed):not(.active) .ae-outline__lesson-icon {
  border: 1.5px solid var(--ae-border);
}
.ae-outline__type-icon {
  width: 10px;
  height: 10px;
}

/* ── Quiz Styles ─────────────────────────────────────────────── */
.ae-quiz-header {
  background: var(--ae-surface);
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.ae-quiz-progress-dots {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ae-quiz-dot {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ae-border);
  color: var(--ae-text-faint);
  transition: all var(--ae-transition);
}
.ae-quiz-dot.done     { background: var(--ae-red); border-color: var(--ae-red); color: #fff; }
.ae-quiz-dot.current  { background: var(--ae-red-light); border-color: var(--ae-red); color: var(--ae-red); }
.ae-quiz-dot.correct  { background: var(--ae-green); border-color: var(--ae-green); color: #fff; }
.ae-quiz-dot.wrong    { background: #CC0000; border-color: #CC0000; color: #fff; }
.ae-quiz-counter { font-size: 13px; color: var(--ae-text-muted); }

.ae-quiz-body {
  background: var(--ae-surface);
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-radius-lg);
  padding: 28px;
  margin-bottom: 16px;
}
.ae-quiz-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--ae-text-faint); margin-bottom: 10px; }
.ae-quiz-question { font-size: 16px; font-weight: 600; color: var(--ae-text); margin-bottom: 24px; line-height: 1.5; }

.ae-quiz-options { display: flex; flex-direction: column; gap: 10px; }
.ae-quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--ae-border);
  border-radius: var(--ae-radius);
  cursor: pointer;
  transition: all var(--ae-transition);
  font-size: 14px;
  color: var(--ae-text);
  background: var(--ae-surface);
}
.ae-quiz-option:hover { border-color: var(--ae-red-border); background: var(--ae-red-light); }
.ae-quiz-option.selected { border-color: var(--ae-red); background: var(--ae-red-light); color: var(--ae-red); }
.ae-quiz-option.correct  { border-color: var(--ae-green); background: var(--ae-green-light); color: var(--ae-green); }
.ae-quiz-option.incorrect { border-color: #CC0000; background: #FFF0F0; color: #990000; }
.ae-quiz-option__key {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0;
}
.ae-quiz-option.selected .ae-quiz-option__key,
.ae-quiz-option.correct .ae-quiz-option__key,
.ae-quiz-option.incorrect .ae-quiz-option__key {
  background: currentColor;
}
.ae-quiz-option.selected .ae-quiz-option__key span,
.ae-quiz-option.correct .ae-quiz-option__key span,
.ae-quiz-option.incorrect .ae-quiz-option__key span {
  color: #fff;
}

.ae-quiz-feedback {
  padding: 14px 16px;
  border-radius: var(--ae-radius);
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.6;
}
.ae-quiz-feedback.correct  { background: var(--ae-green-light); color: #085041; border: 1px solid #9FE1CB; }
.ae-quiz-feedback.incorrect { background: var(--ae-red-light); color: #790000; border: 1px solid var(--ae-red-border); }
.ae-quiz-feedback__title { font-weight: 700; margin-bottom: 4px; }

/* ── Dashboard Banner ────────────────────────────────────────── */
.ae-banner {
  background: linear-gradient(135deg, var(--ae-red-light) 0%, #fff 100%);
  border: 1px solid var(--ae-red-border);
  border-radius: var(--ae-radius-xl);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.ae-banner__greeting { font-size: 20px; font-weight: 700; color: var(--ae-text); margin-bottom: 4px; }
.ae-banner__sub { font-size: 13px; color: var(--ae-text-muted); }
.ae-banner__percent { font-size: 36px; font-weight: 700; color: var(--ae-red); line-height: 1; }
.ae-banner__percent-label { font-size: 11px; color: var(--ae-text-faint); text-align: right; }

/* ── Announcement ────────────────────────────────────────────── */
.ae-announcement {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ae-border-light);
}
.ae-announcement:last-child { border-bottom: none; padding-bottom: 0; }
.ae-announcement__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ae-red);
  margin-top: 5px;
  flex-shrink: 0;
}
.ae-announcement__dot--read { background: var(--ae-border); }
.ae-announcement__title { font-size: 13px; font-weight: 600; color: var(--ae-text); margin-bottom: 2px; }
.ae-announcement__meta { font-size: 11px; color: var(--ae-text-faint); }

/* ── Certificate Block ───────────────────────────────────────── */
.ae-certificate-card {
  background: linear-gradient(135deg, #FFF8F8 0%, #FFF 100%);
  border: 1px solid var(--ae-red-border);
  border-radius: var(--ae-radius-lg);
  padding: 20px;
  text-align: center;
}

/* ── Page: Login ─────────────────────────────────────────────── */
.ae-login-page {
  min-height: 100vh;
  background: var(--ae-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ae-login-box {
  width: 100%;
  max-width: 400px;
}
.ae-login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.ae-login-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ae-login-card {
  background: var(--ae-surface);
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-radius-xl);
  padding: 32px 30px;
  box-shadow: var(--ae-shadow-md);
}
.ae-login-card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ae-text);
  margin-bottom: 6px;
}
.ae-login-card__sub {
  font-size: 13px;
  color: var(--ae-text-faint);
  margin-bottom: 24px;
}
.ae-login-footer {
  text-align: center;
  font-size: 11px;
  color: var(--ae-text-faint);
  margin-top: 20px;
}
.ae-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--ae-text-faint);
}
.ae-divider::before,
.ae-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ae-border);
}

/* ── Section Headers ─────────────────────────────────────────── */
.ae-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ae-section-title { font-size: 14px; font-weight: 700; color: var(--ae-text); }
.ae-section-link  { font-size: 12px; color: var(--ae-red); }
.ae-section-link:hover { color: var(--ae-red-dark); }

/* ── Notices & Alerts ────────────────────────────────────────── */
.ae-notice {
  padding: 12px 16px;
  border-radius: var(--ae-radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 3px solid;
}
.ae-notice--info    { background: var(--ae-blue-light); color: var(--ae-blue); border-color: var(--ae-blue); }
.ae-notice--success { background: var(--ae-green-light); color: var(--ae-green); border-color: var(--ae-green); }
.ae-notice--warning { background: var(--ae-amber-light); color: var(--ae-amber); border-color: var(--ae-amber); }
.ae-notice--error   { background: var(--ae-red-light); color: var(--ae-red); border-color: var(--ae-red); }

/* ── Utility ─────────────────────────────────────────────────── */
.ae-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.ae-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.ae-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.ae-flex   { display: flex; }
.ae-flex-between { display: flex; align-items: center; justify-content: space-between; }
.ae-gap-4  { gap: 4px; }  .ae-gap-8  { gap: 8px; }
.ae-gap-12 { gap: 12px; } .ae-gap-16 { gap: 16px; }
.ae-mb-4   { margin-bottom: 4px; }  .ae-mb-8  { margin-bottom: 8px; }
.ae-mb-12  { margin-bottom: 12px; } .ae-mb-16 { margin-bottom: 16px; }
.ae-mb-20  { margin-bottom: 20px; } .ae-mb-24 { margin-bottom: 24px; }
.ae-text-sm   { font-size: 12px; }
.ae-text-muted { color: var(--ae-text-muted); }
.ae-text-faint { color: var(--ae-text-faint); }
.ae-text-red   { color: var(--ae-red); }
.ae-fw-600 { font-weight: 600; }
.ae-w-full { width: 100%; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --ae-sidebar-w: 200px; }
  .ae-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 768px) {
  .ae-sidebar { display: none; }
  .ae-content { padding: 16px; }
  .ae-player { flex-direction: column; }
  .ae-player__sidebar { width: 100%; position: static; max-height: none; }
  .ae-grid-3, .ae-grid-4 { grid-template-columns: 1fr; }
  .ae-banner { flex-direction: column; text-align: center; }
  .ae-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── WordPress Admin Bar Offset ─────────────────────────────── */
.admin-bar .ae-sidebar   { top: 32px; height: calc(100vh - 32px); }
.admin-bar .ae-topbar    { top: 32px; }
.admin-bar .ae-player__sidebar { top: calc(var(--ae-topbar-h) + 32px + 20px); }

/* ── Tutor LMS Overrides ─────────────────────────────────────── */
.tutor-wrap,
.tutor-container { max-width: none !important; padding: 0 !important; }
.tutor-course-lead-info { padding: 0 !important; }
.tutor-btn-primary { background: var(--ae-red) !important; border-color: var(--ae-red) !important; }
.tutor-btn-primary:hover { background: var(--ae-red-dark) !important; }
.tutor-loader { border-top-color: var(--ae-red) !important; }

/* Let Tutor LMS render its own dashboard layout unmodified */

/* ── Tutor course/lesson content alignment ───────────────────── */
.tutor-course-single-wrapper,
.tutor-single-course-wrapper,
.tutor-course-details-page,
.tutor-single-course .tutor-container,
.tutor-single-lesson .tutor-container,
.tutor-single-quiz .tutor-container {
  padding-left: 28px !important;
  padding-right: 28px !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Course content left column */
.tutor-course-single-wrapper .tutor-course-single-content,
.tutor-single-course-main-content,
.tutor-course-content-list,
.tutor-lead-info-group-btns,
.tutor-lead-info {
  padding-left: 0 !important;
}

/* Tabs alignment fix */
.tutor-course-single-wrapper .tutor-nav,
.tutor-course-single-wrapper .tutor-nav-tabs {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Course title and meta */
.tutor-single-course .tutor-page-header,
.tutor-single-course h1,
.tutor-single-course h2 {
  padding-left: 0 !important;
}

/* General Tutor page body padding */
.tutor-page-wrap,
.tutor-wrap {
  padding: 24px 28px !important;
  box-sizing: border-box !important;
}

/* Lesson player content */
.tutor-single-lesson .tutor-lesson-content,
.tutor-lesson-content-area {
  padding: 24px 28px !important;
}
.tutor-dashboard-permalinks .tutor-dashboard-menu li.tutor-is-active > a,
.tutor-dashboard-permalinks .tutor-dashboard-menu li.tutor-is-active > a:hover {
  background-color: #F7EDFB !important;
  color: #8C1FA5 !important;
  border-color: #8C1FA5 !important;
}
.tutor-dashboard-permalinks .tutor-dashboard-menu li > a:hover {
  background-color: #F7EDFB !important;
  color: #8C1FA5 !important;
}
.tutor-dashboard-permalinks .tutor-dashboard-menu li.tutor-is-active > a svg,
.tutor-dashboard-permalinks .tutor-dashboard-menu li.tutor-is-active > a i,
.tutor-dashboard-permalinks .tutor-dashboard-menu li > a:hover svg,
.tutor-dashboard-permalinks .tutor-dashboard-menu li > a:hover i {
  color: #8C1FA5 !important;
  fill: #8C1FA5 !important;
}

/* ── Hide Tutor's own Logout link — we have Sign out in topbar ── */
.tutor-dashboard-permalinks .tutor-dashboard-menu li:last-child,
.tutor-dashboard-menu a[href*="logout"],
.tutor-dashboard-menu a[href*="wp-logout"],
.tutor-dashboard-menu li:has(a[href*="logout"]),
.tutor-dashboard-menu li:has(a[href*="action=logout"]) {
  display: none !important;
}

/* Fix Tutor quiz styling to match our design */
.tutor-quiz-attempt-info { border-radius: var(--ae-radius-lg) !important; border: 1px solid var(--ae-border) !important; }
.tutor-quiz-option-wrap label { border-radius: var(--ae-radius) !important; transition: all .18s ease !important; }
.tutor-quiz-option-wrap label:hover { border-color: var(--ae-red-border) !important; background: var(--ae-red-light) !important; }
.tutor-quiz-option-wrap input:checked ~ label { border-color: var(--ae-red) !important; background: var(--ae-red-light) !important; color: var(--ae-red) !important; }

/* ── Landing Page ─────────────────────────────────────────────── */
.ae-landing { font-family: var(--ae-font); color: var(--ae-text); background: #fff; }

/* Landing fixed header */
.ae-land-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 70px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ae-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
}
.ae-land-header__logo { height: 36px; width: auto; display: block; }
.ae-land-header__right { display: flex; align-items: center; gap: 12px; }
.ae-land-header__link { font-size: 14px; color: var(--ae-text-muted); font-weight: 500; text-decoration: none; transition: color .18s; }
.ae-land-header__link:hover { color: var(--ae-red); }

/* Hero */
.ae-land-hero {
  margin-top: 70px;
  position: relative;
  height: 90vh; min-height: 520px; max-height: 800px;
  overflow: hidden;
  display: flex; align-items: center;
}
.ae-land-hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
}
.ae-land-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}
.ae-land-hero__content {
  position: relative; z-index: 2;
  padding: 0 72px;
  max-width: 640px;
}
.ae-land-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ae-red); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 100px;
  margin-bottom: 20px;
}
.ae-land-hero__title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800; color: #fff; line-height: 1.2;
  margin-bottom: 16px;
}
.ae-land-hero__sub {
  font-size: clamp(14px, 1.5vw, 17px);
  color: rgba(255,255,255,0.85);
  line-height: 1.7; margin-bottom: 32px;
}
.ae-land-hero__cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ae-land-btn-primary {
  background: var(--ae-red); color: #fff;
  padding: 14px 32px; border-radius: var(--ae-radius);
  font-size: 15px; font-weight: 700; font-family: var(--ae-font);
  border: none; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .18s, transform .15s;
}
.ae-land-btn-primary:hover { background: var(--ae-red-dark); color: #fff; transform: translateY(-1px); }
.ae-land-btn-ghost {
  background: rgba(255,255,255,0.15); color: #fff;
  padding: 13px 28px; border-radius: var(--ae-radius);
  font-size: 15px; font-weight: 600; font-family: var(--ae-font);
  border: 1.5px solid rgba(255,255,255,0.5); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  backdrop-filter: blur(4px); transition: all .18s;
}
.ae-land-btn-ghost:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* Stats bar */
.ae-land-stats {
  background: var(--ae-red);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 28px 48px; gap: 24px;
}
.ae-land-stat { text-align: center; }
.ae-land-stat__num { font-size: 28px; font-weight: 800; color: #fff; line-height: 1; margin-bottom: 4px; }
.ae-land-stat__lbl { font-size: 12px; color: rgba(255,255,255,0.8); font-weight: 500; letter-spacing: 0.3px; }

/* Courses section */
.ae-land-section { padding: 64px 72px; }
.ae-land-section--alt { background: #FAFAF9; }
.ae-land-section__header { text-align: center; margin-bottom: 40px; }
.ae-land-section__eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ae-red); margin-bottom: 10px; }
.ae-land-section__title { font-size: 28px; font-weight: 800; color: var(--ae-text); margin-bottom: 10px; }
.ae-land-section__sub { font-size: 15px; color: var(--ae-text-muted); max-width: 520px; margin: 0 auto; line-height: 1.7; }

/* Landing footer */
.ae-land-footer {
  background: #1A1A1A;
  padding: 32px 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ae-land-footer__logo { height: 28px; filter: brightness(0) invert(1); opacity: 0.8; }
.ae-land-footer__copy { font-size: 12px; color: rgba(255,255,255,0.5); }
.ae-land-footer__copy a { color: rgba(255,255,255,0.7); text-decoration: none; }
.ae-land-footer__copy a:hover { color: #fff; }

@media (max-width: 768px) {
  .ae-land-header { padding: 0 20px; }
  .ae-land-hero__content { padding: 0 24px; }
  .ae-land-stats { grid-template-columns: repeat(2,1fr); padding: 24px; }
  .ae-land-section { padding: 40px 20px; }
  .ae-land-footer { padding: 24px 20px; flex-direction: column; text-align: center; }
}

/* ════════════════════════════════════════
   MOBILE RESPONSIVE FIXES
   Max-width: 600px
════════════════════════════════════════ */
@media (max-width: 600px) {

  /* General */
  body { font-size: 14px; }

  /* Tutor course listing grid → single column */
  .tutor-course-archive .tutor-col-4,
  .tutor-course-archive .tutor-col-3 {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Tutor dashboard columns → stack */
  .tutor-dashboard .tutor-row {
    flex-direction: column !important;
  }
  .tutor-dashboard .tutor-col-4,
  .tutor-dashboard .tutor-col-8 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  /* Tutor lesson/course content */
  .tutor-single-course-main-content,
  .tutor-course-single-wrapper,
  .tutor-single-lesson .tutor-container {
    padding: 12px !important;
  }

  /* Course sidebar → full width below content */
  .tutor-single-course-aside {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Tutor quiz options */
  .tutor-quiz-option-wrap {
    margin-bottom: 10px !important;
  }

  /* Video wrapper aspect ratio */
  .tutor-video-player,
  .tutor-video-wrap {
    height: auto !important;
    aspect-ratio: 16/9;
  }

  /* Tutor course lead info */
  .tutor-lead-info-group-btns {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .tutor-lead-info-group-btns .tutor-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* H5P content */
  .h5p-iframe-wrapper { overflow: hidden; }
  .h5p-iframe-wrapper iframe { min-width: 0 !important; width: 100% !important; }

  /* Tutor course content accordion */
  .tutor-course-content-list-header,
  .tutor-course-content-list-title { font-size: 13px !important; }

  /* Pagination */
  .tutor-pagination { flex-wrap: wrap !important; gap: 6px !important; }

  /* Browse all courses strip on dashboard */
  #ae-browse-cta {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
}

/* ── Tutor mobile bottom nav — add body padding so content isn't hidden behind it ── */
@media (max-width: 600px) {
  #ae-page-body,
  .tutor-dashboard,
  .tutor-single-course-wrapper,
  .tutor-single-lesson {
    padding-bottom: 80px !important;
  }
  /* Tutor's own mobile bottom nav fix */
  .tutor-mobile-nav,
  [class*="tutor-mobile-bottom"] {
    z-index: 999 !important;
  }
  /* Browse CTA on mobile — stack vertically */
  #ae-browse-cta {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

/* ── Tutor mobile bottom nav overlap — extra fix ── */
@media (max-width: 768px) {
  /* Push content above Tutor's bottom nav bar */
  body { padding-bottom: 120px !important; }
  /* Tutor bottom nav sits above browser chrome */
  .tutor-dashboard-menu-mobile,
  .tutor-mobile-bottom-nav,
  .tutor-bottom-navigation,
  [class*="tutor-mobile-nav"],
  [class*="tutor-bottom-nav"] {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9998 !important;
  }
}

/* ════════════════════════════════════════
   HIDE TUTOR MOBILE BOTTOM NAV — we use our own hamburger
════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hide Tutor's bottom nav bar completely */
  .tutor-dashboard-menu-mobile,
  .tutor-mobile-bottom-nav,
  .tutor-bottom-navigation,
  .tutor-mobile-nav,
  [class*="tutor-mobile-nav"],
  [class*="tutor-bottom-nav"],
  [class*="tutor-mobile-menu"],
  .tutor-page-nav-mobile,
  .tutor-dashboard .tutor-row > .tutor-col-3,
  /* Tutor bottom bar with Dashboard/Quiz/Menu icons */
  nav.tutor-dashboard-permalinks-mobile {
    display: none !important;
  }

  /* Remove bottom padding we no longer need */
  body { padding-bottom: 20px !important; }

  /* Make sure Tutor dashboard sidebar is hidden on mobile */
  .tutor-dashboard .tutor-sidebar-nav { display: none !important; }
}

/* ════ NUCLEAR OPTION — Kill Tutor bottom nav on mobile ════ */
@media (max-width: 768px) {
  /* Target every possible Tutor mobile nav variation */
  .tutor-dashboard-menu-mobile,
  .tutor-mobile-bottom-nav,
  .tutor-bottom-navigation,
  .tutor-mobile-nav,
  .tutor-page-nav-mobile,
  nav[class*="tutor"][class*="mobile"],
  div[class*="tutor"][class*="mobile"][class*="nav"],
  div[class*="tutor"][class*="bottom"],
  .tutor-wrap > nav,
  .tutor-container > nav,
  body > nav[class*="tutor"],
  /* The specific bottom bar with Dashboard/Quiz/Menu */
  .tutor-dashboard-nav-mobile,
  [class="tutor-dashboard-permalinks-mobile"],
  .tutor-mobile-menu-bar,
  .tutor-sticky-bar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }
  body {
    padding-bottom: 20px !important;
  }
}
