:root {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #101828;
  background-color: #f7f7fb;
  line-height: 1.6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f8fb;
  color: #0f172a;
}

img,
video {
  max-width: 100%;
  border-radius: 20px;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  z-index: 20;
  transition: transform 0.3s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand__logo {
  color: #0056d2;
  font-size: 1rem;
}

.brand__tagline {
  font-size: 0.75rem;
  color: #475467;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav__link {
  font-weight: 500;
  color: #475467;
}

.site-nav__link:hover {
  color: #111;
}

.profile-chip {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: #eef2ff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #1d3a8a;
}

.profile-chip__status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}

.page-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: #6366f1;
  font-weight: 600;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.hero__content h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 1rem;
}

.hero__description {
  color: #475467;
  max-width: 600px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: #0056d2;
  color: #fff;
  box-shadow: 0 15px 30px rgba(0, 86, 210, 0.25);
}

.btn--ghost {
  background: rgba(0, 86, 210, 0.1);
  color: #0056d2;
}

.btn--danger {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.btn:hover {
  transform: translateY(-1px);
}

.hero__stats {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  gap: 1.5rem;
}

.hero__stats span {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
}

.hero__media {
  position: relative;
}

.hero__media img {
  width: 100%;
  border-radius: 28px;
  border: 8px solid #fff;
  box-shadow: 0 50px 70px rgba(15, 23, 42, 0.18);
}

.hero__media-card {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--accent, #111);
  color: #fff;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
}

.catalog__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.catalog__filters {
  display: flex;
  gap: 1rem;
}

.catalog__filters input,
.catalog__filters select {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid #d0d5dd;
  min-width: 200px;
  font-size: 1rem;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.empty-state {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  color: #475467;
  grid-column: 1 / -1;
}

.course-card {
  background: #fff;
  border-radius: 28px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
}

.course-card__media {
  position: relative;
}

.course-card__media img {
  border-radius: 20px;
  height: 180px;
  object-fit: cover;
  width: 100%;
}

.course-card__level {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  font-weight: 600;
}

.course-card__category {
  color: #6366f1;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.course-card__tagline {
  color: #475467;
}

.course-card__stats {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.course-card__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.course-card__skills span {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 86, 210, 0.08);
  font-size: 0.85rem;
}

.course-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-card__rating {
  color: #f59e0b;
  font-weight: 600;
  margin-right: 0.5rem;
}

.admin-hero {
  padding-bottom: 1rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  font-weight: 600;
}

.alert--success {
  background: rgba(34, 197, 94, 0.15);
  color: #065f46;
}

.alert--danger {
  background: rgba(248, 113, 113, 0.2);
  color: #991b1b;
}

.admin-upload {
  margin-bottom: 2rem;
}

.upload-form {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.upload-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  color: #475467;
}

.upload-form input[type='text'],
.upload-form input[type='file'] {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid #d0d5dd;
}

.course-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.course-hero__chips,
.lesson-hero__meta,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #4c1d95;
  font-size: 0.85rem;
}

.chip--ghost {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.course-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.course-hero__stats strong {
  font-size: 1.8rem;
  display: block;
}

.course-hero__media video,
.course-hero__media img {
  border-radius: 30px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
}

.course-hero__outcomes {
  margin-top: 1.5rem;
  background: #fff;
  border-radius: 24px;
  padding: 1.2rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

.modules__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.module-card {
  background: #fff;
  padding: 1.2rem;
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
}

.module-card__meta {
  color: #475467;
  margin: 0.6rem 0;
}

.module-card details {
  margin-top: 0.8rem;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  padding: 0.8rem 1rem;
}

.lesson-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.lesson-list__item {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid #e4e7ec;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.lesson-list__item--video {
  border-color: rgba(32, 201, 151, 0.4);
}

.lesson-list__item--article {
  border-color: rgba(99, 102, 241, 0.3);
}

.lesson-list__item--resource {
  border-color: rgba(249, 115, 22, 0.3);
}

.suggestions__grid,
.related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.suggestion,
.related__grid article {
  background: #fff;
  padding: 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.06);
}

.lesson-hero {
  margin-bottom: 1.5rem;
}

.lesson-player video {
  width: 100%;
  margin-bottom: 1rem;
}

.article-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  margin-top: 2rem;
}

.lesson-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.lesson-nav__btn {
  flex: 1;
  text-align: center;
  padding: 0.9rem 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  font-weight: 600;
  color: #0f172a;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.lesson-nav__btn:hover {
  border-color: #6366f1;
  transform: translateY(-1px);
}

.lesson-sidebar {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-content table {
  border-collapse: collapse;
  width: 100%;
}

.article-content table,
.article-content th,
.article-content td {
  border: 1px solid #e4e7ec;
}

.resource-card {
  background: linear-gradient(120deg, rgba(0, 86, 210, 0.1), rgba(99, 102, 241, 0.1));
  border-radius: 20px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.transcripts {
  margin-top: 2rem;
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.transcripts__controls {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.transcripts__controls select {
  flex: 1;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid #d0d5dd;
}

.transcripts pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 16px;
  min-height: 180px;
  overflow: auto;
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  margin-top: 4rem;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.badge-row .chip {
  background: rgba(34, 197, 94, 0.15);
  color: #065f46;
}

.subtitle-panel {
  margin-top: 1rem;
  background: #fff;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.subtitle-panel select {
  padding: 0.75rem 2.2rem 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid #CBD5F5;
  min-width: 240px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.12));
  color: #1e293b;
  appearance: none;
  position: relative;
}

.subtitle-panel select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.subtitle-panel__title {
  margin: 0;
  font-weight: 600;
  color: #101828;
}

.progress-card {
  background: #fff;
  border-radius: 22px;
  padding: 1.2rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.progress-card__meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  margin: 0.8rem 0;
  overflow: hidden;
}

.progress-card__meter div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #3b82f6);
}

.progress-card__meta {
  margin: 0;
  color: #475467;
  font-weight: 500;
}

.sidebar-lessons {
  background: #fff;
  border-radius: 22px;
  padding: 1rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  max-height: calc(100vh - 200px);
  overflow: auto;
}

.sidebar-section + .sidebar-section {
  border-top: 1px solid #e4e7ec;
  margin-top: 1rem;
  padding-top: 1rem;
}

.sidebar-section__title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.sidebar-unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475467;
  margin: 0.7rem 0 0.3rem;
}

.sidebar-lesson-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-lesson a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  color: #0f172a;
}

.sidebar-lesson small {
  color: #64748b;
  text-transform: capitalize;
}

.sidebar-lesson.is-active a {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  font-weight: 600;
}

.sidebar-lesson:not(.is-active) a:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.05);
}

.breadcrumb {
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .site-header__inner {
    padding: 1rem;
  }
  .page-shell {
    padding: 1.5rem 1rem;
  }
  .hero__stats {
    flex-wrap: wrap;
  }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__actions .btn {
    text-align: center;
    width: 100%;
  }
  .catalog__filters {
    flex-direction: column;
    width: 100%;
  }
  .transcripts__controls {
    flex-direction: column;
  }
  .lesson-layout {
    grid-template-columns: 1fr;
  }
  .lesson-sidebar {
    position: static;
    max-height: none;
  }
  .lesson-nav {
    flex-direction: column;
  }
}

.personalization {
  margin: 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.personalization__panel {
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.personalization__panel form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.personalization__panel input {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid #e4e7ec;
  min-width: 240px;
}

.personalization__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.panel {
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
}

.personalization__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.personalization__summary div {
  background: #f5f8ff;
  padding: 1rem;
  border-radius: 18px;
}

.personalization__summary span {
  display: block;
  font-size: 0.85rem;
  color: #475467;
}

.personalization__summary strong {
  font-size: 2rem;
  display: block;
  color: #0f172a;
}

.progress-board__item {
  border-radius: 20px;
  border: 1px solid #e4e7ec;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.progress-board__item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-board__item header h4 {
  margin: 0;
}

.progress-board__lesson {
  color: #475467;
}

.progress-board__status {
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}

.panel--history ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel--history li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f3f8;
}

.history__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.history__status {
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.history__status--completed {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.history__status--reopened {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
}

.course-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
}

.course-progress__next {
  border: 1px dashed #e4e7ec;
  border-radius: 20px;
  padding: 1rem;
}

.lesson-progress-toggle {
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 1rem;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.lesson-progress-toggle[data-state='done'] {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
}

.muted {
  color: #94a3b8;
}

.admin-upload--secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: center;
}

.upload-form--compact {
  display: grid;
  gap: 1rem;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
}

.upload-item__title {
  font-weight: 600;
  margin: 0;
}

.upload-item__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  max-width: 90%;
  width: 480px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.2);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal.is-open .modal__content {
  transform: scale(1);
}

.modal__content h2 {
  margin-top: 0.25rem;
}

.modal__content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal__content form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal__content form input {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid #d0d5dd;
  font-size: 1rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}
