/* QRAIVY Academy (academy.html) — the Admin dashboard's own black/gray theme:
   the sidebar palette of dashboard-shell.css (#sidebar --sbx-*: near-black
   background, charcoal surfaces, white text, gray secondary text, QRAIVY
   orange), its borders, card radii and fonts. Green (QDS success) only marks
   helpful notes. The sidebar itself is the shared Admin shell. */
body.academy-page {
  --ac-bg: #101012;             /* --sbx-bg */
  --ac-surface: #171719;        /* --sbx-tab */
  --ac-surface-2: #1d1d20;      /* --sbx-tab-hover */
  --ac-border: var(--dashboard-border, rgba(255, 255, 255, 0.07));   /* = --sbx-line */
  --ac-border-strong: rgba(255, 255, 255, 0.12);                     /* --qds-color-border-default */
  --ac-text: #FFFFFF;           /* --sbx-text */
  --ac-text-2: #A1A1AA;         /* --sbx-text-2 */
  --ac-muted: #71717A;          /* --sbx-muted */
  --ac-orange: #FF5B2A;         /* --sbx-orange */
  --ac-orange-hover: #FF7247;
  --ac-orange-soft: rgba(255, 91, 42, 0.14);
  --ac-green: #22C55E;          /* --qds-color-success */
  --ac-green-soft: rgba(34, 197, 94, 0.08);
  --ac-green-border: rgba(34, 197, 94, 0.28);
  --ac-radius: var(--card-radius, 12px);
  --ac-radius-lg: var(--card-radius-lg, 14px);
  background: var(--ac-bg);
  color: var(--ac-text);
}
body.academy-page #main-content { background: var(--ac-bg); }

.ac { max-width: 1180px; margin: 0 auto; padding: 36px 36px 72px; font-family: var(--font-body, Inter), system-ui, sans-serif; }
.ac h1, .ac h2, .ac h3 { font-family: var(--font-heading, 'Space Grotesk'), Inter, system-ui, sans-serif; margin: 0; }
.ac p { margin: 0; }

/* Header */
.ac-head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.ac-head__mark { width: 44px; height: 44px; border-radius: var(--ac-radius); background: var(--ac-orange); display: grid; place-items: center; flex: none; }
.ac-head__mark svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ac-title { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.ac-title__brand { color: var(--ac-orange); }
.ac-sub { color: var(--ac-text-2); font-size: 0.95rem; margin-top: 4px; }

/* Welcome */
.ac-welcome { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius-lg); padding: 28px 30px; margin-bottom: 28px; }
.ac-welcome__title { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; }
.ac-welcome__text { color: var(--ac-text-2); font-size: 1rem; line-height: 1.6; margin-top: 10px; max-width: 760px; }
.ac-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 12px 14px; background: var(--ac-green-soft); border: 1px solid var(--ac-green-border); border-radius: var(--ac-radius); color: var(--ac-text-2); font-size: 0.9rem; line-height: 1.5; max-width: 760px; }
.ac-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: var(--ac-green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Featured */
.ac-featured { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 26px; align-items: center; background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius-lg); padding: 20px; margin-bottom: 40px; }
.ac-featured__body { padding: 6px 8px 6px 0; }
.ac-eyebrow { display: inline-block; color: var(--ac-orange); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.ac-featured__title { font-size: 1.45rem; font-weight: 700; line-height: 1.25; }
.ac-featured__desc { color: var(--ac-text-2); line-height: 1.6; margin: 10px 0 16px; }

/* 16:9 media: player or "coming soon" placeholder */
.ac-media { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--ac-radius); overflow: hidden; background: var(--ac-bg); }
.ac-video { width: 100%; height: 100%; display: block; background: #000; }
.ac-media--soon { display: grid; place-items: center; background:
  radial-gradient(110% 90% at 18% 12%, rgba(255, 255, 255, 0.05), transparent 60%),
  linear-gradient(160deg, #232326, #141416); border: 1px solid var(--ac-border); }
.ac-media__icon { width: 30%; max-width: 120px; height: auto; fill: none; stroke: var(--ac-orange); opacity: 0.55; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ac-media--big .ac-media__icon { max-width: 150px; }
.ac-soon { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(16, 16, 18, 0.88); border: 1px solid rgba(255, 91, 42, 0.45); color: var(--ac-text); font-size: 0.78rem; font-weight: 600; }
.ac-media--big .ac-soon { left: 16px; bottom: 16px; font-size: 0.85rem; padding: 7px 13px; }
.ac-soon__icon { width: 14px; height: 14px; fill: none; stroke: var(--ac-orange); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Library */
.ac-library__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ac-library__title { font-size: 1.25rem; font-weight: 700; }
.ac-count { color: var(--ac-muted); font-size: 0.88rem; }
.ac-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.ac-filter { font: 500 0.88rem var(--font-body, Inter), system-ui, sans-serif; color: var(--ac-text-2); background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: 999px; padding: 8px 15px; cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.ac-filter:hover { color: var(--ac-text); border-color: var(--ac-border-strong); background: var(--ac-surface-2); }
.ac-filter.is-active { background: var(--ac-orange); border-color: var(--ac-orange); color: #fff; }
.ac-filter:focus-visible, .ac-btn:focus-visible { outline: 2px solid var(--ac-orange); outline-offset: 2px; }

.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ac-card { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.ac-card .ac-media { border-radius: var(--ac-radius); }
.ac-card__body { padding: 0 4px 6px; display: flex; flex-direction: column; gap: 8px; }
.ac-card__title { font-size: 1.02rem; font-weight: 600; line-height: 1.35; }
.ac-card__desc { color: var(--ac-text-2); font-size: 0.88rem; line-height: 1.55; }
.ac-card__duration { color: var(--ac-muted); font-size: 0.8rem; }
.ac-chip { align-self: flex-start; display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--ac-text-2); background: var(--ac-surface-2); border: 1px solid var(--ac-border); border-radius: 999px; padding: 3px 10px; }
.ac-empty { color: var(--ac-text-2); padding: 24px 0; }

/* Help & support */
.ac-help { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 28px; align-items: center; background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius-lg); padding: 26px 28px; }
.ac-help__title { font-size: 1.3rem; font-weight: 700; }
.ac-help__text { color: var(--ac-text-2); margin-top: 6px; line-height: 1.55; }
.ac-help__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ac-help .ac-note { grid-column: 1 / -1; margin-top: 0; max-width: none; }
.ac-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 0.9rem var(--font-body, Inter), system-ui, sans-serif; border-radius: var(--ac-radius); padding: 11px 18px; text-decoration: none; transition: background .15s, border-color .15s; }
.ac-btn--primary { background: var(--ac-orange); color: #fff; border: 1px solid var(--ac-orange); }
.ac-btn--primary:hover { background: var(--ac-orange-hover); border-color: var(--ac-orange-hover); }
.ac-btn--ghost { background: var(--ac-surface-2); color: var(--ac-text); border: 1px solid var(--ac-border-strong); }
.ac-btn--ghost:hover { border-color: var(--ac-muted); }

@media (max-width: 1024px) {
  .ac-featured { grid-template-columns: 1fr; }
  .ac-featured__body { padding: 4px 6px 6px; }
}
@media (max-width: 768px) {
  .ac { padding: 20px 16px 96px; }
  .ac-head { margin-bottom: 20px; }
  .ac-title { font-size: 1.5rem; }
  .ac-welcome { padding: 20px 18px; }
  .ac-welcome__title { font-size: 1.3rem; }
  .ac-featured { padding: 12px; gap: 14px; margin-bottom: 32px; }
  .ac-featured__title { font-size: 1.2rem; }
  .ac-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 18px; padding: 0 16px 4px; scrollbar-width: none; }
  .ac-filters::-webkit-scrollbar { display: none; }
  .ac-grid { grid-template-columns: 1fr; gap: 14px; }
  .ac-help { grid-template-columns: 1fr; padding: 20px 18px; }
  .ac-help__actions { flex-direction: column; }
  .ac-btn { width: 100%; }
}
