:root {
  --ks-bg: #f3efe7;
  --ks-surface: rgba(255, 255, 255, 0.84);
  --ks-surface-strong: rgba(255, 255, 255, 0.94);
  --ks-ink: #132238;
  --ks-muted: #5d6b7e;
  --ks-line: rgba(19, 34, 56, 0.1);
  --ks-primary: #0d5c63;
  --ks-primary-deep: #09484e;
  --ks-secondary: #f2a65a;
  --ks-accent: #6f8f72;
  --ks-shadow: 0 22px 45px rgba(15, 41, 62, 0.12);
  --ks-radius: 24px;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body.lms-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ks-ink);
  background:
    radial-gradient(circle at top left, rgba(242, 166, 90, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(13, 92, 99, 0.18), transparent 22%),
    linear-gradient(180deg, #f8f5ef 0%, #eef3f1 100%);
  font-family: Aptos, "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  background: rgba(19, 34, 56, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-brand {
  color: white;
}

.brand-mark {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-tagline {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.84) !important;
  font-weight: 600;
}

.nav-link:hover,
.nav-link:focus {
  color: white !important;
}

.shell-user {
  color: rgba(255, 255, 255, 0.7);
}

.app-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
}

.hero-panel,
.page-header,
.panel,
.stat-card,
.meta-box,
.course-card,
.lesson-row,
.quiz-question,
.video-placeholder,
.quiz-option {
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface);
  box-shadow: var(--ks-shadow);
}

.hero-panel,
.page-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.hero-panel::after,
.page-header::after {
  content: "";
  position: absolute;
  inset: auto -70px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(111, 143, 114, 0.16);
}

.hero-panel > *,
.page-header > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.eyebrow {
  background: rgba(13, 92, 99, 0.1);
  color: var(--ks-primary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-panel h1,
.page-header h1,
.panel h2,
.panel h3,
.course-card h3,
.lesson-row h3,
.quiz-question h3 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

.hero-panel h1,
.page-header h1 {
  margin: 0.6rem 0 0.7rem;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
}

.hero-copy,
.page-header p,
.panel p,
.meta-box span,
.course-card small,
.lesson-row p,
.app-shell-footer,
.app-shell-footer span {
  color: var(--ks-muted);
}

.hero-stat,
.meta-box {
  min-width: 220px;
  align-self: start;
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  background: var(--ks-surface-strong);
}

.hero-stat strong,
.meta-box strong,
.stat-card strong {
  font-size: 2rem;
}

.content-grid,
.stats-grid {
  display: grid;
  gap: 1.25rem;
}

.content-grid {
  grid-template-columns: 1.8fr 1fr;
}

.lesson-grid {
  align-items: start;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.panel,
.stat-card,
.course-card,
.quiz-question {
  padding: 1.4rem;
}

.section-head,
.course-card-top,
.progress-row,
.action-row,
.lesson-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.course-list,
.lesson-list,
.task-list,
.quiz-panel {
  display: grid;
  gap: 1rem;
}

.lesson-row {
  padding: 1rem 1.1rem;
}

.progress-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(19, 34, 56, 0.08);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ks-primary), var(--ks-secondary));
}

.pill-complete {
  background: rgba(13, 92, 99, 0.12);
  color: var(--ks-primary);
}

.pill-pending {
  background: rgba(242, 166, 90, 0.14);
  color: #8a4f10;
}

.video-placeholder {
  min-height: 280px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background:
    linear-gradient(135deg, rgba(13, 92, 99, 0.12), rgba(242, 166, 90, 0.18)),
    #f8f4ea;
}

.task-list {
  margin: 0;
  padding-left: 1.2rem;
}

.task-list li {
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.quiz-option {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.65rem;
}

.quiz-option:hover {
  border-color: rgba(13, 92, 99, 0.24);
  background: rgba(13, 92, 99, 0.06);
}

.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  background: var(--ks-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(13, 92, 99, 0.16);
}

.primary-button:hover {
  background: var(--ks-primary-deep);
}

.app-shell-footer {
  border-top: 1px solid var(--ks-line);
  background: rgba(255, 255, 255, 0.66);
}

.footer-title {
  font-weight: 800;
  color: var(--ks-ink);
}

.form-control,
.form-select {
  border-radius: 16px;
  padding: 0.85rem 1rem;
  border-color: rgba(19, 34, 56, 0.12);
}

.form-control:focus,
.form-select:focus,
.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 92, 99, 0.14);
  border-color: rgba(13, 92, 99, 0.4);
}

@media (max-width: 900px) {
  .hero-panel,
  .page-header,
  .content-grid,
  .stats-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .content-grid,
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .hero-panel,
  .page-header,
  .panel,
  .stat-card,
  .meta-box,
  .course-card,
  .lesson-row,
  .quiz-question,
  .video-placeholder,
  .quiz-option {
    border-radius: 20px;
  }

  .app-shell {
    width: min(100%, calc(100% - 1rem));
    padding-top: 1.25rem;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
