/* Color Finale course player — visual match of the Thinkific theme.
   Palette extracted from education.colorfinale.com:
   brand tan  #E6AA67   text navy  #36394D   page bg #F2F3F5
   button txt #1D1D1D   font "Source Sans Pro" (Source Sans 3 on Google Fonts) */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand: #E6AA67;
  --ink: #36394D;
  --page: #F2F3F5;
  --card-border: #E3E4E8;
  --muted: #6B6E80;
}

html, body { height: 100%; }

body {
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, sans-serif;
  background: var(--page);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

/* ---------- top bar ---------- */

.top-bar {
  position: relative;
  height: 52px;
  flex: 0 0 52px;
  background: var(--brand);
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 10;
}

.top-bar__back {
  color: #000;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.top-bar__back:hover { text-decoration: underline; }

.top-bar__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 44px;
}

/* ---------- layout ---------- */

.layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ---------- sidebar ---------- */

.sidebar {
  width: 311px;
  flex: 0 0 311px;
  overflow-y: auto;
  padding: 12px;
}

.card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 4px;
}

.course-progress { padding: 20px 16px 16px; margin-bottom: 12px; }

.course-progress__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 16px;
}

.course-progress__bar {
  height: 3px;
  background: #D9DADF;
  border-radius: 2px;
  overflow: hidden;
}
.course-progress__fill { height: 100%; background: var(--brand); }

.course-progress__label { margin-top: 8px; font-size: 14px; }
.course-progress__label strong { font-weight: 700; }

.search-card { margin-bottom: 12px; }

.search-input {
  width: 100%;
  border: 0;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  outline: none;
}
.search-input::placeholder { color: #8A8DA0; }

/* modules */

.module { border-bottom: 1px solid var(--card-border); }

.module__row {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 8px;
  cursor: pointer;
}
.module__row::-webkit-details-marker { display: none; }

.module__circle {
  width: 20px; height: 20px;
  flex: 0 0 20px;
  border: 2px solid #B9BBC6;
  border-radius: 50%;
}
.module__circle--done { background: var(--brand); border-color: var(--brand); }

.module__title { font-size: 18px; font-weight: 600; flex: 1; line-height: 1.25; }

.module__count { font-size: 13px; color: var(--muted); }

.module__chevron {
  width: 8px; height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform .15s;
  margin-bottom: 3px;
}
details[open] > summary .module__chevron { transform: rotate(-135deg); margin-bottom: -3px; }

.module__lessons { list-style: none; padding-bottom: 8px; }

.lesson {
  display: flex;
  gap: 14px;
  padding: 10px 8px 10px 13px;
  text-decoration: none;
  color: var(--ink);
  position: relative;
}
.lesson:hover { background: #F4F4F6; }
.lesson--active { background: #ECECEF; }

.lesson__circle {
  width: 12px; height: 12px;
  flex: 0 0 12px;
  margin-top: 4px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: #fff;
  position: relative;
  z-index: 1;
}
.lesson__circle--done { background: var(--brand); }

/* vertical connector line through lesson circles */
.lesson::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #E3E4E8;
}
.module__lessons li:first-child .lesson::before { top: 14px; }
.module__lessons li:last-child .lesson::before { bottom: calc(100% - 14px); }

.lesson__body { display: flex; flex-direction: column; gap: 4px; }

.lesson__title { font-size: 16px; line-height: 1.3; }
.lesson__title--bold { font-weight: 600; }

.lesson__meta {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .2px;
}
.lesson__meta svg { opacity: .75; }

/* ---------- main content ---------- */

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto; /* the whole content column scrolls (video → description → transcript → footer) */
  padding: 12px 12px 0 0;
}

.content__card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.content__header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
}

.content__lesson-title { font-size: 14px; font-weight: 600; flex: 1; }

.video-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
}
.video-wrap iframe, .video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.demo-badge {
  position: absolute;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 3px;
  max-width: 90%;
  text-align: center;
}

.coming-soon {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #2b2d3a 0%, #36394D 100%);
}
.coming-soon__badge {
  display: inline-block;
  background: #E6AA67;
  color: #36394D;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 16px;
}
.coming-soon__title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
}
.coming-soon__sub {
  font-size: 14px;
  opacity: .7;
  margin: 0;
  max-width: 34em;
}

.lesson-description {
  padding: 14px 16px;
  display: flex;
  justify-content: center;
  max-height: 180px;      /* don't let a long description crowd out the transcript */
  overflow-y: auto;
}
.lesson-description p {
  max-width: 640px;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.content__footer {
  background: #fff;
  border: 1px solid var(--card-border);
  border-top-width: 1px;
  border-radius: 4px;
  padding: 12px;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.btn-complete {
  background: var(--brand);
  color: #1D1D1D;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 10px 18px;
  cursor: pointer;
}
.btn-complete:hover { filter: brightness(.96); }
.btn-complete__arrow { margin-left: 6px; }

/* ---------- login page ---------- */

.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 40px;
  width: 380px;
}

.login-card h1 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.login-card p { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

.login-card input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid #C9CBD4;
  border-radius: 4px;
  margin-bottom: 16px;
  color: var(--ink);
}
.login-card input:focus { outline: 2px solid var(--brand); border-color: transparent; }

.login-error {
  background: #FBEAEA;
  color: #A33;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.login-hint {
  font-size: 13px;
  color: #6B6E80;
}
.login-hint a { color: var(--brand); }

.btn-login {
  width: 100%;
  background: var(--brand);
  color: #1D1D1D;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 12px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: 0 0 auto; order: 2; }
  .content { padding: 12px; order: 1; }
}

/* ---------- Landing page (mirrors the old Thinkific sales page) ---------- */

.landing { background: #0A0A0A; margin: 0; }
.landing h1, .landing h2, .landing h3 { font-weight: 900; letter-spacing: -0.01em; }
.landing section { padding: 72px 24px; text-align: center; }
.landing section > p { max-width: 640px; margin: 12px auto 0; font-size: 18px; }

.land-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; background: #0A0A0A; border-bottom: 1px solid #1E1E1E;
}
.land-nav__logo { height: 36px; display: block; }
.land-nav__links { display: flex; align-items: center; gap: 22px; }
.land-nav__home { color: #CFCFCF; text-decoration: none; font-size: 15px; }
.land-nav__home:hover { color: #FFF; }
.land-nav__login { color: #FFF; text-decoration: none; font-size: 15px; }

.land-hero { background: #0A0A0A; color: #FFF; padding: 110px 24px !important; }
.land-hero h1 { font-size: 52px; margin: 0; }
.land-hero p { color: #CCC; font-size: 20px; }
.land-hero__actions { margin-top: 28px; display: flex; gap: 14px; justify-content: center; }

.btn-buy {
  display: inline-block; background: #4CAF50; color: #FFF; text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 12px 28px; border-radius: 4px;
}
.btn-buy:hover { background: #43A047; }
.btn-ghost { display: inline-block; color: #FFF; text-decoration: none; font-size: 16px; padding: 12px 20px; }

.land-purple { background: #380F63; color: #FFF; }
.land-purple p { color: #E7DCF5; }
.land-video {
  max-width: 760px; margin: 32px auto 0; aspect-ratio: 16 / 9;
  border: 1px solid rgba(255,255,255,0.35);
}
.land-video iframe { width: 100%; height: 100%; border: 0; display: block; }

.land-announce { background: linear-gradient(180deg,#FCE9CC 0%,#F6D6A8 100%); color: #2A2317; border-top: 4px solid #D98A2B; border-bottom: 4px solid #D98A2B; }
.land-announce__inner { max-width: 720px; margin: 0 auto; }
.land-announce__tag { display: inline-block; background: #16A34A; color: #FFF; font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 7px 16px; border-radius: 20px; margin-bottom: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.land-announce h2 { font-size: 28px; margin: 0 0 8px; color: #241F14; }
.land-announce p { color: #3A3120 !important; font-weight: 600; }
.land-announce__list { list-style: none; padding: 0; max-width: 600px; margin: 18px auto 0; text-align: left; }
.land-announce__list li { padding: 10px 0 10px 30px; position: relative; font-size: 16px; color: #2E2717; border-bottom: 1px solid rgba(160,110,40,.35); }
.land-announce__list li::before { content: "\2726"; position: absolute; left: 2px; color: #C0700F; font-weight: 700; }
.land-announce__list strong { color: #1B1E2B; }
.land-announce__cta { color: #FFF !important; font-weight: 700; margin-top: 22px; background: #36394D; border-radius: 4px; padding: 12px 24px; }
.land-announce__cta:hover { background: #24263a; }

.badge-new { display: inline-block; background: #16A34A; color: #FFF; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; vertical-align: middle; margin-left: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.land-module.is-new { border-color: #16A34A; border-left-width: 4px; }

.land-light { background: #FFF; color: var(--ink, #36394D); }
.land-light p { color: #565A6E; }
.land-bullets {
  list-style: none; padding: 0; max-width: 560px; margin: 28px auto 0; text-align: left;
}
.land-bullets li { padding: 10px 0 10px 32px; position: relative; font-size: 17px; border-bottom: 1px solid #EEE; }
.land-bullets li::before { content: "\2713"; position: absolute; left: 4px; color: #4CAF50; font-weight: 700; }

.land-offer {
  background: #0A0A0A; color: #FFF; display: flex; gap: 48px; align-items: center;
  justify-content: center; flex-wrap: wrap; text-align: left;
}
.land-offer__text { max-width: 460px; }
.land-offer__text p { color: #BBB; margin: 12px 0 20px; }
.land-offer__lede { color: #FFF !important; font-size: 19px; font-weight: 600; }
.land-offer__img { max-width: min(480px, 100%); border-radius: 6px; }

.land-curriculum .land-meta { font-weight: 700; color: var(--ink, #36394D); }
.land-modules { max-width: 640px; margin: 28px auto 0; text-align: left; }
.land-module { border: 1px solid #E3E4E8; border-radius: 4px; margin-bottom: 8px; background: #FFF; }
.land-module summary { cursor: pointer; padding: 14px 16px; font-weight: 700; }
.land-module ul { margin: 0; padding: 0 16px 12px 34px; color: #565A6E; }
.land-module li { padding: 4px 0; }

.land-instructor h3 { font-size: 24px; margin: 18px 0 0; }
.land-instructor p { margin-top: 14px; }
.land-instructor .btn-buy { margin-top: 26px; }

.land-footer { background: #0A0A0A; color: #888; text-align: center; padding: 28px; font-size: 14px; }
.land-footer a { color: #BBB; }

@media (max-width: 640px) {
  .land-hero h1 { font-size: 34px; }
  .landing section { padding: 48px 16px; }
}

/* ---------- Admin dashboard ---------- */

.admin-body { background: var(--page-bg, #F2F3F5); margin: 0; overflow-x: hidden; }
.top-bar__right { margin-left: auto; color: #FFF; font-size: 14px; }
.top-bar__right a { color: #FFF; }
.top-bar__admin {
  margin-left: auto; color: #FFF; font-size: 14px; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.6); border-radius: 4px; padding: 4px 12px;
}
.admin-wrap { max-width: 980px; margin: 0 auto; padding: 28px 16px; }
.admin-wrap h1 { font-size: 26px; }

.admin-notice {
  background: #EAF7EC; border: 1px solid #BFE5C6; color: #2C6E36;
  padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 14px;
}
.admin-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { flex: 1; min-width: 130px; padding: 14px 18px; text-align: center; }
.stat strong { display: block; font-size: 24px; color: var(--ink, #36394D); }
.stat span { font-size: 13px; color: #6B6E80; }
.stat--link { text-decoration: none; }

.admin-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-add, .admin-search { display: flex; gap: 8px; padding: 12px; flex: 1; min-width: 280px; align-items: center; }
.admin-add input, .admin-search input {
  flex: 1; min-width: 0; font-size: 14px; padding: 9px 10px; border: 1px solid #C9CBD4; border-radius: 4px;
}
.btn-tan {
  background: var(--brand, #E6AA67); border: 0; color: #FFF; font-weight: 700;
  padding: 9px 16px; border-radius: 4px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.btn-plain { background: #FFF; border: 1px solid #C9CBD4; padding: 9px 16px; border-radius: 4px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.btn-danger {
  background: #FFF; border: 1px solid #D9A0A0; color: #A33; font-size: 13px;
  padding: 5px 12px; border-radius: 4px; cursor: pointer;
}
.btn-danger:hover { background: #FBEAEA; }

.admin-table-card { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
.admin-table td:first-child { white-space: nowrap; }
/* Long refs (Stripe cs_live_… session ids) are shortened in the template (full
   value on hover) so they don't blow out the table width and push the Remove
   button off-screen. Progress stays on one line. */
.admin-table td.admin-order { white-space: nowrap; }
.admin-table td.admin-order span { cursor: help; }
.admin-table td.admin-progress { white-space: nowrap; }
.admin-table td.admin-date { white-space: nowrap; }
/* Sortable column headers */
.admin-sort { color: inherit; text-transform: inherit; letter-spacing: inherit; text-decoration: none; white-space: nowrap; }
.admin-sort:hover { text-decoration: underline; }
/* Compact × remove button so the actions column never gets clipped */
.admin-table td.admin-actions { text-align: right; white-space: nowrap; padding-right: 12px; }
.btn-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; line-height: 1;
  border: 1px solid #E3B4B4; background: #fff; color: #C0392B;
  border-radius: 4px; font-size: 17px; cursor: pointer;
}
.btn-x:hover { background: #C0392B; color: #fff; border-color: #C0392B; }
/* Email-event badges on the results page */
.evt { font-size: 12px; padding: 2px 9px; border-radius: 10px; background: #EEF0F3; color: #4A4D5E; white-space: nowrap; }
.evt-delivered { background: #E7F4EA; color: #1E7A3A; }
.evt-open, .evt-click { background: #E7EEFB; color: #2456C6; }
.evt-bounce, .evt-dropped, .evt-spamreport { background: #FBE9E7; color: #C0392B; }
/* Keep all 7 columns within the 980px admin width: cap Name/Email, tighten
   padding and the progress bar so Last activity + the × never get clipped. */
.admin-table { min-width: 0; }
.admin-table th, .admin-table td { padding: 8px 10px; }
.admin-table td.admin-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.admin-table td.admin-email { max-width: 190px; }
.admin-table td.admin-email a { display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.mini-bar { width: 56px; margin-right: 6px; }
.admin-table th {
  text-align: left; padding: 10px 14px; border-bottom: 2px solid #E3E4E8;
  color: #6B6E80; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
}
.admin-table td { padding: 9px 14px; border-bottom: 1px solid #EEE; }
.admin-table a { color: var(--ink, #36394D); }
.admin-dim { color: #8A8DA0; font-size: 13px; font-weight: 400; }

.mini-bar {
  display: inline-block; width: 90px; height: 7px; border-radius: 4px;
  background: #E9EAEE; margin-right: 8px; vertical-align: middle; overflow: hidden;
}
.mini-bar__fill { display: block; height: 100%; background: var(--brand, #E6AA67); }

.admin-user-actions { margin: 14px 0 22px; }
.admin-module { margin-bottom: 12px; padding: 14px 18px; }
.admin-module h2 { font-size: 16px; margin: 0 0 10px; }
.admin-lessons { list-style: none; margin: 0; padding: 0; }
.admin-lessons li { padding: 6px 0; font-size: 14px; display: flex; align-items: center; gap: 10px; }

.admin-pager {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 12px; border-top: 1px solid #EEE;
}
.admin-pager .btn-plain { text-decoration: none; color: var(--ink, #36394D); }
.admin-add input[name="order"] { max-width: 180px; }
.admin-add { flex-basis: 100%; }                       /* full-width row so the email field is roomy */
.admin-add input[name="email"] { min-width: 240px; flex: 3; }

@media (max-width: 640px) {
  .admin-wrap { padding: 16px 12px; }
  /* stat cards: two per row instead of one overflowing strip */
  .admin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { min-width: 0; padding: 12px; }
  /* stack the add + search forms full width */
  .admin-toolbar { flex-direction: column; }
  .admin-add, .admin-search { min-width: 0; flex-wrap: wrap; }
  .admin-add input, .admin-search input { min-width: 0; }
  .admin-add input[name="order"] { max-width: none; }
  /* the table scrolls horizontally inside its own card; page never does */
  .admin-table th, .admin-table td { padding: 9px 10px; }
}

/* ---------- Interactive transcript ---------- */

.transcript { margin: 0 0 12px; padding: 0; overflow: hidden; }
.transcript__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--card-border, #E3E4E8);
}
.transcript__title { font-size: 14px; font-weight: 600; }
.transcript__lang {
  font: inherit; font-size: 13px; padding: 6px 10px;
  border: 1px solid #C9CBD4; border-radius: 4px; background: #fff; color: var(--ink, #36394D);
}
.transcript__body { height: 400px; min-height: 160px; max-height: 78vh; resize: vertical; overflow-y: auto; padding: 8px 8px 12px; }
.transcript__hint { color: #8A8DA0; font-size: 14px; padding: 12px 8px; }
.transcript__cue {
  padding: 7px 10px; margin: 1px 0; border-radius: 4px;
  font-size: 15px; line-height: 1.5; color: #4A4D5E; cursor: pointer;
  transition: background .1s;
}
.transcript__cue:hover { background: #F4F4F6; }
.transcript__cue.is-active {
  background: #FBEEDD; color: var(--ink, #36394D); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand, #E6AA67);
}

.admin-welcome { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #6B6E80; white-space: nowrap; flex-shrink: 0; }
.admin-welcome input { flex: none; }

.transcript__head { flex-wrap: wrap; }
.transcript__search {
  flex: 1; min-width: 140px; font: inherit; font-size: 13px;
  padding: 6px 10px; border: 1px solid #C9CBD4; border-radius: 4px; color: var(--ink, #36394D);
}
.transcript__cue mark { background: #FBEAB6; color: inherit; padding: 0 1px; border-radius: 2px; }

/* audio-track toggle (Original / AI narration) in the player header */
.audio-toggle { margin-left: auto; display: inline-flex; border: 1px solid #C9CBD4; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.audio-opt { border: 0; background: #fff; color: #6B6E80; font: inherit; font-size: 12px; font-weight: 600; padding: 5px 12px; cursor: pointer; }
.audio-opt + .audio-opt { border-left: 1px solid #C9CBD4; }
.audio-opt.is-active { background: var(--brand, #E6AA67); color: #1D1D1D; }
