/* =============================================================
   Central Dev · Cardápio Web — tema escuro roxo
   Fonte oficial do site (Museo Sans Rounded) + tokens
   ============================================================= */

@font-face {
  font-family: "Museo Sans Rounded";
  src: url("/assets/museosansrounded-500-001abe36.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Museo Sans Rounded";
  src: url("/assets/museosansrounded-700-82bb3860.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Museo Sans Rounded";
  src: url("/assets/museosansrounded-900-728491c7.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "Museo Sans Rounded";
  src: url("/assets/museosansrounded-1000-5a300c51.ttf") format("truetype");
  font-weight: 1000;
  font-display: swap;
}

:root {
  /* Tema claro no padrão do menu: lavanda + branco + roxo da marca */
  --bg0: #f3edfb;
  --bg1: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f3fd;
  --surface-3: #efe7fa;
  --line: #e7dcf7;
  --line-soft: #efe8f9;

  --text: #241b3a;
  --text-dim: #4e4b66;
  --text-faint: #9284ad;

  --brand-deep: #59327a;
  --brand: #a543fa;
  --brand-strong: #7b2ff7;
  --brand-soft: #7c3aed;
  --lavanda: #ebd9ff;
  --blue: #1863dc;
  --blue-strong: #3c8af7;
  --amber: #ffae00;
  --green: #17a26b;
  --red: #e11d48;

  --grad-brand: linear-gradient(135deg, #6d3fa0 0%, #a543fa 100%);
  --grad-cta: linear-gradient(135deg, #1257c4 0%, #3c8af7 100%);
  --glow-brand: 0 12px 26px -12px rgba(123, 47, 247, 0.45);
  --glow-cta: 0 12px 26px -12px rgba(24, 99, 220, 0.4);
  --shadow-card: 0 18px 40px -24px rgba(89, 50, 122, 0.28);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;

  --font-display: "Museo Sans Rounded", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

}

* { box-sizing: border-box; }

/* O atributo hidden precisa vencer o display dos componentes
   (senão elementos alternados por JS continuam visíveis) */
[hidden] { display: none !important; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  margin: 0;
  letter-spacing: 0;
}

h1 { font-weight: 900; }

p { margin: 0; }
a { color: var(--brand-soft); text-decoration: none; }
a:hover { color: var(--brand-strong); }

img { max-width: 100%; display: block; }

::selection { background: rgba(165, 67, 250, 0.25); }

:focus-visible {
  outline: 2px solid var(--brand-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d9cbf0; border-radius: 8px; border: 2px solid var(--bg0); }
::-webkit-scrollbar-track { background: transparent; }

/* Fundo lavanda com brilhos suaves que respiram lentamente */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(560px 420px at 10% -8%, rgba(165, 67, 250, 0.08), transparent 65%),
    radial-gradient(680px 520px at 104% 14%, rgba(123, 47, 247, 0.06), transparent 60%),
    radial-gradient(720px 620px at 50% 116%, rgba(24, 99, 220, 0.05), transparent 62%),
    var(--bg0);
}

.bg-orbs::before,
.bg-orbs::after {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  will-change: transform;
}

.bg-orbs::before {
  top: -220px;
  left: -140px;
  background: radial-gradient(circle, rgba(165, 67, 250, 0.16), transparent 70%);
  animation: orb-drift-a 26s ease-in-out infinite alternate;
}

.bg-orbs::after {
  right: -180px;
  bottom: -240px;
  background: radial-gradient(circle, rgba(60, 138, 247, 0.12), transparent 70%);
  animation: orb-drift-b 32s ease-in-out infinite alternate;
}

@keyframes orb-drift-a {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(110px, 70px) scale(1.15); }
}

@keyframes orb-drift-b {
  from { transform: translate(0, 0) scale(1.1); }
  to { transform: translate(-120px, -80px) scale(0.92); }
}

.ico { flex: none; }

/* =============================================================
   Shell do app: sidebar + main
   ============================================================= */

.app-shell {
  display: grid;
  grid-template-columns: 302px minmax(0, 1fr);
  min-height: 100vh;
}

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

.app-content {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 36px 60px;
}

/* Entrada em cascata dos cards */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.course-grid > *,
.stat-grid > *,
.hero-stats > * {
  animation: rise-in 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.course-grid > :nth-child(1), .stat-grid > :nth-child(1), .hero-stats > :nth-child(1) { animation-delay: 0.05s; }
.course-grid > :nth-child(2), .stat-grid > :nth-child(2), .hero-stats > :nth-child(2) { animation-delay: 0.12s; }
.course-grid > :nth-child(3), .stat-grid > :nth-child(3), .hero-stats > :nth-child(3) { animation-delay: 0.19s; }
.course-grid > :nth-child(4), .stat-grid > :nth-child(4) { animation-delay: 0.26s; }
.course-grid > :nth-child(5), .stat-grid > :nth-child(5) { animation-delay: 0.33s; }
.course-grid > :nth-child(n+6), .stat-grid > :nth-child(n+6) { animation-delay: 0.4s; }

/* Rodapé com onda roxa (eco do menu) */
.app-footer { margin-top: 40px; }

.footer-wave { display: block; width: 100%; height: 42px; }

.app-footer-bar {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 18px 22px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(90deg, #5f2d90, #8b3df2);
  margin-top: -1px;
}

.app-footer-bar .fx-spark { position: static; width: 12px; }

/* ---------- Sidebar — padrão claro com ondas ---------- */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  padding: 14px 0 14px 14px;
}

.sb-card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f5f0fb;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 26px 70px -30px rgba(10, 4, 24, 0.95);
}

.sb-top {
  position: relative;
  background: #ffffff;
  padding: 18px 20px 19px;
  text-align: center;
}

.sb-logo { display: inline-block; }
.sb-logo img { width: 112px; height: auto; margin: 0 auto; }

.sb-wave-top {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -21px;
  width: 100%;
  height: 22px;
  display: block;
}

.sb-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sb-nav::-webkit-scrollbar { width: 6px; }
.sb-nav::-webkit-scrollbar-thumb { background: #ddd0f0; border: 0; }

.sb-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-radius: 18px;
  color: #4e4b66;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sb-item:hover { color: #6d28c9; }
.sb-item:hover .sb-caret { transform: translateX(3px); color: #8b5cf6; }

.sb-item:not(.is-active) + .sb-item:not(.is-active) { border-top: 1px solid #eae1f7; border-radius: 0 0 18px 18px; }

.sb-item.is-active {
  background: #ece1fb;
  color: #6d28c9;
  padding: 11px 10px;
  margin: 5px 0;
  box-shadow: 0 12px 26px -16px rgba(109, 40, 201, 0.5);
}

.sb-item.is-active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 10%;
  bottom: 10%;
  width: 5px;
  border-radius: 0 6px 6px 0;
  background: #7b2ff7;
}

.sb-item.is-active .sb-caret { display: none; }

.sb-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  flex: none;
  background: #f0e8fb;
  box-shadow: inset 0 0 0 1px #e7dcf7;
  transition: background 0.15s ease;
}

.sb-item.is-active .sb-ico { background: #ffffff; box-shadow: inset 0 0 0 1px #eadffa; }
.sb-item:hover:not(.is-active) .sb-ico { background: #ede3fa; }

.sb-ico img { width: 33px; height: 33px; }
.sb-ico-line { color: #7b3fd4; }

.sb-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-caret { color: #beafdb; transition: transform 0.15s ease, color 0.15s ease; }

.sb-count {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  color: #6d28c9;
  background: #e3d5f8;
  padding: 2px 9px;
  border-radius: 99px;
}

.sb-count-hot { color: #8a5a00; background: #ffe5b0; }

.sb-section {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #a292c2;
  padding: 12px 10px 5px;
}

/* Cartão do usuário (topo, logo abaixo da onda) */
.sb-user {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 16px 0;
  padding: 10px 13px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 34px -20px rgba(60, 30, 110, 0.45);
}

.sb-avatar {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: #f0e8fb;
  box-shadow: inset 0 0 0 1px #e7dcf7;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sb-avatar:hover { transform: scale(1.07); box-shadow: 0 0 0 3px rgba(123, 47, 247, 0.25); }

.sb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sb-user-info { flex: 1; min-width: 0; line-height: 1.3; }

.sb-user-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  color: #241b3a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-user-info span { font-size: 12px; color: #9284ad; }

.sb-logout {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: #f2ecfa;
  color: #59327a;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sb-logout:hover { background: #e8dcf8; color: #7b2ff7; }

/* Rodapé com onda, brilhos e mascote */
.sb-footer { position: relative; height: 116px; margin-top: 2px; flex: none; }

.sb-wave-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 74px;
  display: block;
}

.sb-mascote {
  position: absolute;
  right: 8px;
  bottom: 4px;
  width: 135px;
  z-index: 2;
  filter: drop-shadow(0 10px 18px rgba(30, 10, 60, 0.4));
  animation: mascote-bob 4.5s ease-in-out infinite alternate;
}

@keyframes mascote-bob {
  from { transform: translateY(0) rotate(-1deg); }
  to { transform: translateY(-5px) rotate(1.5deg); }
}

.sb-spark { position: absolute; z-index: 2; animation: spark-twinkle 2.8s ease-in-out infinite; }
.sb-spark-1 { width: 16px; left: 22px; bottom: 52px; }
.sb-spark-2 { width: 11px; left: 58px; bottom: 22px; animation-delay: 0.9s; }
.sb-spark-3 { width: 9px; right: 148px; bottom: 62px; animation-delay: 1.7s; }

@keyframes spark-twinkle {
  0%, 100% { opacity: 0.4; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.1) rotate(18deg); }
}

.brand-chip {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 6px;
  background: #f4edff;
  border-radius: 14px;
  box-shadow: 0 4px 18px -6px rgba(165, 67, 250, 0.5);
  flex: none;
}

.brand-chip img { width: 100%; height: 100%; object-fit: contain; }

.brand-chip-lg { width: 74px; height: 74px; padding: 10px; border-radius: 20px; }
.brand-chip-sm { width: 38px; height: 38px; padding: 5px; border-radius: 11px; }

/* ---------- Avatares e botões de ícone ---------- */

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex: none;
  background: linear-gradient(135deg, #59327a, #8b52c8);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.avatar-sm { width: 32px; height: 32px; font-size: 11.5px; border-radius: 10px; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; border-radius: 18px; }

/* Avatar com imagem da galeria */
.avatar-img { overflow: hidden; background: #e7def5; }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Perfil: avatar grande clicável + seletor */
.profile-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  cursor: pointer;
  background: #e7def5;
  box-shadow: 0 14px 30px -14px rgba(123, 47, 247, 0.45);
  transition: transform 0.15s ease;
}

.profile-avatar:hover { transform: scale(1.04); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-avatar-static { cursor: default; display: block; }
.profile-avatar-static:hover { transform: none; }

.profile-avatar-edit {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(20, 8, 40, 0.72);
  color: #fff;
  backdrop-filter: blur(4px);
}

.link-quiet-plain { text-decoration: none; color: var(--brand-soft); font-weight: 600; }
.link-quiet-plain:hover { color: var(--brand-strong); }

.modal-avatars { max-width: min(600px, calc(100vw - 40px)); }

/* Switch feminino/masculino */
.avatar-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-top: 6px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.avatar-switch button {
  padding: 8px 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font: 700 13.5px var(--font-display);
  cursor: pointer;
  transition: all 0.16s ease;
}

.avatar-switch button:hover { color: var(--text); }

.avatar-switch button.is-on {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--glow-brand);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 11px;
  margin: 12px 0 4px;
  width: 100%;
  max-height: min(46vh, 420px);
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
}

.avatar-option {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  line-height: 0;
  transition: transform 0.14s ease, border 0.14s ease, box-shadow 0.14s ease;
}

.avatar-option img { width: 100%; height: auto; display: block; border-radius: 16px; }

.avatar-option:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 26px -12px rgba(165, 67, 250, 0.5);
}

.avatar-option.is-current {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.3);
}

.avatar-grid form { display: contents; }
.avatar-lead { background: linear-gradient(135deg, #3f2b58, #59327a); color: var(--brand-soft); }
.avatar-link { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.avatar-link:hover { transform: translateY(-1px); box-shadow: var(--glow-brand); color: #fff; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover { background: rgba(165, 67, 250, 0.1); color: var(--text); }
.icon-btn-danger:hover { background: rgba(255, 93, 122, 0.12); color: var(--red); }

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 237, 251, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-brand { display: none; }

.topbar-search {
  flex: 1;
  /* sem min-width:0 a largura do input impede o encolhimento e a página ganha
     rolagem horizontal em telas estreitas */
  min-width: 0;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-faint);
  box-shadow: 0 8px 20px -14px rgba(89, 50, 122, 0.25);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.topbar-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.16);
}

.topbar-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}

.topbar-search input::placeholder { color: var(--text-faint); }

kbd {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-faint);
  background: var(--surface-3);
  border: 1px solid #ddd0f0;
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 7px;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
}

.pill-admin {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: var(--glow-brand);
}

.pill-admin:hover { color: #fff; filter: brightness(1.1); }

.pill-ghost { color: var(--text-dim); border: 1px solid var(--line); }
.pill-ghost:hover { color: var(--text); border-color: var(--brand); }

/* ---------- Menu em gaveta (mobile) ---------- */

/* O hamburguer só existe no mobile; no desktop o menu já está na tela */
.topbar-burger {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--brand-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.topbar-burger:hover { border-color: var(--brand); background: var(--surface-2); }
.burger-close { display: none; }
.topbar-burger[aria-expanded="true"] .burger-open { display: none; }
.topbar-burger[aria-expanded="true"] .burger-close { display: block; }

.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgba(26, 12, 46, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.nav-scrim.is-open { opacity: 1; pointer-events: auto; }
body.nav-locked { overflow: hidden; }

/* No celular a pílula de admin vira só ícone, senão sobra pouco para a busca */
@media (max-width: 620px) {
  .topbar-right .pill-label { display: none; }
  .topbar-right .pill { padding: 7px 10px; }
}

/* ---------- Barra de ações fixa (curso e aula, no mobile) ---------- */

.mobile-actions {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 60;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 44px -20px rgba(89, 50, 122, 0.5);
}

.mobile-actions .btn { white-space: nowrap; }
.ma-main { flex: 1; min-width: 0; }
.ma-main .btn, .ma-main form, .ma-main form .btn { width: 100%; }

.ma-progress {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: none;
  width: 66px;
}

.ma-progress b { font-family: var(--font-display); font-size: 12.5px; color: var(--brand-soft); }
.ma-progress .progress-track { width: 100%; }

.ma-side {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--brand-soft);
}

.ma-side.is-off { opacity: 0.35; pointer-events: none; }

/* =============================================================
   Componentes básicos
   ============================================================= */

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font: 700 14px var(--font-display);
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none;
}

/* Botão de ação principal no azul CTA do site */
.btn-primary {
  background: var(--grad-cta);
  color: #fff;
  box-shadow: var(--glow-cta);
}

.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); color: #fff; }

/* Brilho que atravessa o botão no hover */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  transition: left 0.5s ease;
  pointer-events: none;
}

.btn-primary:hover::after { left: 130%; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-dim);
}

.btn-ghost:hover { border-color: var(--brand); color: var(--text); }

.btn-done {
  background: #e2f6ec;
  border-color: #a9dfc4;
  color: #14804f;
}

.btn-done:hover { background: #d2f0e0; }

.btn-danger-ghost {
  background: transparent;
  border-color: rgba(255, 93, 122, 0.35);
  color: var(--red);
}

.btn-danger-ghost:hover { background: rgba(255, 93, 122, 0.1); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-xs { padding: 5px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.chip-cover { background: rgba(20, 8, 40, 0.45); color: #fff; backdrop-filter: blur(6px); }
.chip-outline { background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); }
.chip-enrolled { background: #efe7fa; color: #6d28c9; }
.chip-live { background: #e2f6ec; color: #14804f; }
.chip-draft { background: #fdf0d3; color: #96650a; }
.chip-admin { background: var(--grad-brand); color: #fff; }
.chip-you { background: var(--surface-3); color: var(--text-faint); }
.chip-xs { padding: 2px 8px; font-size: 10px; }

.chip-status-pendente { background: #fdf0d3; color: #96650a; }
.chip-status-convidado { background: #e4edfd; color: #2757b8; }
.chip-status-ativo { background: #e2f6ec; color: #14804f; }

.chip-filter {
  padding: 7px 16px;
  font-size: 13px;
  color: var(--text-dim);
  background: #ffffff;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip-filter:hover { border-color: var(--brand); color: var(--text); }

.chip-filter.is-on {
  background: #efe7fa;
  border-color: var(--brand);
  color: #6d28c9;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row-tabs { margin: 22px 0 16px; }

.count-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-soft);
  background: rgba(165, 67, 250, 0.14);
  border-radius: 99px;
  padding: 2px 10px;
  margin-left: 6px;
  vertical-align: 2px;
}

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-soft);
  margin-bottom: 10px;
}

.text-faint { color: var(--text-faint); }
.text-dim { color: var(--text-dim); font-size: 13px; }
.text-warn { color: #b45309; font-style: normal; }

/* Estrelas */
.stars { display: inline-flex; gap: 1.5px; color: #d9cdee; }
.star { fill: transparent; }
.star.is-filled, .star.is-half { color: var(--amber); }
.star.is-filled { fill: currentColor; }

/* Medidor de nível (3 barrinhas) */
.level-meter { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 13px; }
.level-meter i { width: 4px; border-radius: 2px; background: #ddd0f0; }
.level-meter i:nth-child(1) { height: 6px; }
.level-meter i:nth-child(2) { height: 9px; }
.level-meter i:nth-child(3) { height: 13px; }
.level-meter i.on { background: var(--brand-strong); }

/* Barras de progresso */
.progress-track {
  display: inline-block;
  width: 130px;
  height: 7px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  vertical-align: middle;
}

.progress-track i {
  position: relative;
  display: block;
  height: 100%;
  background: var(--grad-brand);
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(165, 67, 250, 0.6);
  overflow: hidden;
}

/* Reflexo que percorre as barras de progresso */
.progress-track i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.45) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: shimmer 2.6s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}

.progress-label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.progress-inline { display: inline-flex; align-items: center; gap: 10px; }

/* Flash / toasts */
.flash-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 22px 46px -20px rgba(89, 50, 122, 0.45);
  font-size: 13.5px;
  font-weight: 500;
  animation: flash-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.flash .ico { margin-top: 1px; }
.flash-notice { border-left: 3px solid var(--green); }
.flash-notice .ico { color: var(--green); }
.flash-alert { border-left: 3px solid var(--amber); }
.flash-alert .ico { color: var(--amber); }

.flash button {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--text-faint);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.flash.is-leaving { opacity: 0; transform: translateX(12px); transition: all 0.25s ease; }

@keyframes flash-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* =============================================================
   Páginas do membro
   ============================================================= */

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 40px;
}

.hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }

.hero-sub { max-width: 480px; margin-top: 14px; color: var(--text-dim); }

.hero-stats { display: flex; gap: 12px; }

.stat-tile {
  min-width: 108px;
  padding: 18px 18px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: left;
  box-shadow: 0 12px 30px -24px rgba(89, 50, 122, 0.3);
}

/* Sparkles decorativos reutilizáveis (mesma animação do menu) */
.fx-spark {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  animation: spark-twinkle 2.8s ease-in-out infinite;
}

.fx-wrap { position: relative; }

.stat-tile strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(120deg, #59327a, #a543fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-tile span { font-size: 11.5px; line-height: 1.3; color: var(--text-faint); display: block; margin-top: 4px; }

/* Boxes de destaque: grupo WhatsApp + documentação */
.promo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 44px;
}

.promo-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px -26px rgba(89, 50, 122, 0.35);
}

.promo-head { display: flex; align-items: center; gap: 14px; }
.promo-head h2 { font-size: 19px; }

.promo-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.promo-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex: none;
}

.promo-text { font-size: 13.5px; color: var(--text-dim); max-width: 520px; }

.promo-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 22px;
}

.promo-points li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-dim);
}

.promo-card .btn { margin-top: 6px; }

/* Box do WhatsApp — verde em contraste com o lavanda */
.promo-whats {
  background:
    radial-gradient(420px 220px at 108% -30%, rgba(37, 211, 102, 0.14), transparent 68%),
    #ffffff;
  border-color: #b5e6c8;
}

.promo-icon-whats {
  background: #e3f8ec;
  color: #1faa53;
}

.promo-whats .promo-points .ico { color: #1faa53; }
.promo-whats .promo-label { color: #178a52; }

.btn-whats {
  background: linear-gradient(135deg, #1faa53, #25d366);
  color: #06220f;
  box-shadow: 0 10px 30px -10px rgba(37, 211, 102, 0.5);
}

.btn-whats:hover { filter: brightness(1.08); transform: translateY(-1px); color: #06220f; }

/* Box da documentação — azul CTA */
.promo-docs {
  background:
    radial-gradient(380px 200px at 108% -30%, rgba(24, 99, 220, 0.1), transparent 68%),
    #ffffff;
  border-color: #c3d8f8;
  justify-content: flex-start;
}

.promo-icon-docs {
  background: #e4edfd;
  color: var(--blue);
}

.promo-docs .promo-label { color: var(--blue); }

.btn-docs {
  background: transparent;
  border-color: #a9c7f5;
  color: var(--blue);
}

.btn-docs:hover { background: #eaf2ff; border-color: var(--blue); color: #12489e; }

.section { margin-bottom: 42px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 { font-size: 20px; }
.section-link { font-size: 13px; font-weight: 600; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.page-head h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.page-sub { color: var(--text-dim); margin-top: 8px; max-width: 560px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.filter-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.search-note { margin: -8px 0 18px; font-size: 13.5px; color: var(--text-dim); }

/* Grid de cursos */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 20px;
}

.course-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.18s ease, border 0.18s ease, box-shadow 0.18s ease;
}

.course-card { box-shadow: 0 12px 30px -24px rgba(89, 50, 122, 0.3); }

.course-card:hover {
  transform: translateY(-4px);
  border-color: rgba(165, 67, 250, 0.55);
  box-shadow: 0 26px 50px -22px rgba(123, 47, 247, 0.35);
  color: var(--text);
}

.course-cover {
  position: relative;
  height: 128px;
  padding: 14px;
  overflow: hidden;
  background-size: cover;
}

.course-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1.6px);
  background-size: 18px 18px;
  opacity: 0.5;
}

.cover-glyph {
  position: absolute;
  right: 6px;
  bottom: -34px;
  font-family: var(--font-display);
  font-size: 130px;
  font-weight: 1000;
  line-height: 1;
  color: rgba(255, 255, 255, 0.14);
  user-select: none;
  transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.course-card:hover .cover-glyph { transform: translateY(-8px) rotate(-5deg) scale(1.07); }

.course-cover::after { transition: background-position 0.6s ease; }
.course-card:hover .course-cover::after { background-position: 9px 9px; }

.chip-cover { position: relative; z-index: 1; }

.cover-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.cover-progress i { display: block; height: 100%; background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, 0.8); }

/* Selo "tem aula te esperando" */
.cover-new {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  border-radius: 99px;
  background: #ffffff;
  color: #6d28c9;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 18px -8px rgba(20, 8, 40, 0.65);
}

.cover-new i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse-dot 1.9s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.5; }
}

/* Acentos de capa */
.accent-roxo { background: linear-gradient(135deg, #4b2769, #8b52c8); }
.accent-violeta { background: linear-gradient(135deg, #6d28c9, #a543fa); }
.accent-ambar { background: linear-gradient(135deg, #8a4d0f, #ffae00); }
.accent-magenta { background: linear-gradient(135deg, #8b1e63, #e5518f); }
.accent-azul { background: linear-gradient(135deg, #1d3f8f, #4f8ff7); }
.accent-verde { background: linear-gradient(135deg, #0e6b4f, #3ddc97); }

.course-card-body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 18px; }
.course-card-body h3 { font-size: 16.5px; }
.course-card-body > p {
  font-size: 13px;
  color: var(--text-dim);
  min-height: 34px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-faint);
}

.course-meta span { display: inline-flex; align-items: center; gap: 5px; }
.course-meta-level { gap: 7px; }

.course-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.course-rating-label { font-size: 12px; color: var(--text-dim); }
.course-rating-empty { color: var(--text-faint); font-style: italic; }
.course-foot .chip-enrolled { margin-left: auto; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 22px;
}

.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--brand-soft); }
.breadcrumb span { color: var(--text); font-weight: 500; }

/* Cabeçalho do curso — sem banner, título em contraste e CTA em destaque */
.course-head { margin-bottom: 40px; }

.course-accent-bar {
  display: block;
  width: 54px;
  height: 6px;
  border-radius: 99px;
  margin-bottom: 18px;
}

.course-head .chip-row { margin-bottom: 14px; }

.course-head h1 {
  font-size: clamp(26px, 3.4vw, 38px);
  max-width: 720px;
}

.course-head-tagline {
  margin-top: 10px;
  font-size: 15.5px;
  color: var(--text-dim);
  max-width: 620px;
}

.course-head .course-meta { margin-top: 16px; font-size: 12.5px; gap: 16px; }

.course-head-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn-lg { padding: 14px 30px; font-size: 15px; }

.chip-tag {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--brand-soft);
}

.chip-tag-soft { color: var(--text-dim); }

.link-quiet-form { display: inline-flex; }

.link-quiet {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-faint);
  font: 500 12.5px var(--font-body);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-quiet:hover { color: var(--red); }

.course-body {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.course-body h2 { font-size: 19px; margin-bottom: 14px; }
.course-body .section-head h2 { margin-bottom: 0; }

/* Página do curso (banner antigo, mantido para referência) */
.course-hero {
  position: relative;
  border-radius: var(--r-lg);
  padding: 40px 40px 34px;
  margin-bottom: 34px;
  overflow: hidden;
  height: auto;
}

.course-hero::after { opacity: 0.35; }

.course-hero-copy { position: relative; z-index: 1; max-width: 640px; }
.course-hero h1 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; color: #fff; margin-top: 16px; }
.course-hero-tagline { color: rgba(255, 255, 255, 0.82); font-size: 16px; margin-top: 10px; }

.course-meta-hero { margin-top: 20px; font-size: 13px; color: rgba(255, 255, 255, 0.78); gap: 18px; }
.course-meta-hero .stars { color: rgba(255, 255, 255, 0.35); }
.course-meta-stars { gap: 8px; }

.course-hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.course-hero .progress-track { background: rgba(0, 0, 0, 0.35); }
.course-hero .progress-label { color: rgba(255, 255, 255, 0.85); }

.course-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
}

.course-about h2 { font-size: 20px; margin: 30px 0 14px; }
.course-about h2:first-child { margin-top: 0; }

.prose { color: var(--text-dim); font-size: 14.5px; }
.prose p { margin-bottom: 12px; }

/* Lista de aulas */
.lesson-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.lesson-row-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  transition: border 0.15s ease, background 0.15s ease;
}

a.lesson-row-link:hover { border-color: var(--brand); background: var(--surface-2); color: var(--text); }

.lesson-row.is-done .lesson-row-link { border-color: #bfe8d4; }
.lesson-row.is-done .lesson-index { background: #e2f6ec; color: var(--green); }

.lesson-row-link.is-locked { opacity: 0.65; }

.lesson-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: none;
  background: var(--surface-3);
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
}

.lesson-info { flex: 1; min-width: 0; }
.lesson-info strong { display: block; font-size: 14px; font-weight: 600; }
.lesson-info small { color: var(--text-faint); font-size: 12px; }

.lesson-duration { font-size: 12px; color: var(--text-faint); flex: none; }

/* Avaliações */
.reviews-block { margin-top: 34px; }
.reviews-avg { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-dim); }

.review-form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 22px;
}

.review-form-card h3 { font-size: 15px; margin-bottom: 14px; }

.rating-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 2px;
  margin-bottom: 12px;
}

.rating-input input { position: absolute; opacity: 0; pointer-events: none; }

.rating-input label {
  cursor: pointer;
  color: #d9cdee;
  transition: color 0.12s ease, transform 0.12s ease;
}

.rating-input label .ico { fill: transparent; }

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
  color: var(--amber);
}

.rating-input label:hover .ico,
.rating-input label:hover ~ label .ico,
.rating-input input:checked ~ label .ico {
  fill: currentColor;
}

.rating-input label:hover { transform: scale(1.12); }

.review-form textarea {
  width: 100%;
  resize: vertical;
}

.review-form-actions { display: flex; gap: 10px; margin-top: 12px; }

.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }

.review-item { display: flex; gap: 13px; }

.review-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.review-item-head strong { font-size: 13.5px; }
.review-item-head time { font-size: 12px; color: var(--text-faint); }
.review-item p { font-size: 13.5px; color: var(--text-dim); }

.reviews-empty { color: var(--text-faint); font-size: 13.5px; }

/* Sidebars de conteúdo */
.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: 0 14px 34px -28px rgba(89, 50, 122, 0.35);
}

.side-card h4 { font-size: 14px; margin-bottom: 12px; }

.side-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.side-list li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); }
.side-list .ico { color: var(--green); }
.side-list-stats .ico { color: var(--brand-strong); }

/* Player */
.player-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

/* O player permanece escuro de propósito: área de cinema */
.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #17102a;
  border: 1px solid #2b1e46;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(89, 50, 122, 0.5);
}

.player-frame iframe, .player-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #8f80b3;
  background:
    radial-gradient(360px 200px at 50% 30%, rgba(165, 67, 250, 0.14), transparent 70%);
}

.player-placeholder .ico { color: var(--brand); }
.player-placeholder p { font-family: var(--font-display); font-weight: 600; color: #cfc3ea; }
.player-placeholder small { font-size: 12px; }

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 22px 0 6px;
}

.player-head h1 { font-size: clamp(20px, 2.6vw, 27px); }

.lesson-content { margin-top: 18px; }
.lesson-lead { font-size: 15px; color: var(--text); font-weight: 500; }

/* Avaliação da aula (abaixo do conteúdo, no player) */
.lesson-rate {
  margin-top: 26px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 14px 34px -28px rgba(89, 50, 122, 0.35);
}

.lesson-rate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.lesson-rate-head h2 { font-size: 16px; }
.lesson-rate-head p { font-size: 13px; color: var(--text-faint); margin-top: 4px; }

.lesson-rate-saved { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; }

.lesson-rate-avg { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.lesson-rate-avg strong { font-family: var(--font-display); font-size: 15px; color: var(--text); }
.lesson-rate-avg small { color: var(--text-faint); }

.lesson-rate .rating-input { margin-bottom: 10px; }

.lesson-rate-comment { display: flex; gap: 10px; align-items: flex-start; }

.lesson-rate-comment textarea {
  flex: 1;
  padding: 10px 13px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.lesson-rate-comment textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.16);
}

.lesson-rate-comment input[type="submit"] { flex: none; }

.admin-lesson-rating { display: inline-flex; align-items: center; gap: 4px; vertical-align: -2px; }
.lesson-reviews-panel { margin-top: 20px; }

.player-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
}

.player-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text-dim);
  max-width: 46%;
}

.player-nav-link:hover { border-color: var(--brand); color: var(--text); }
.player-nav-link small { display: block; font-size: 11px; color: var(--text-faint); }
.player-nav-next { text-align: right; margin-left: auto; }

.side-card-lessons { padding: 16px; position: sticky; top: 84px; }

.side-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 12px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 10px;
}

.side-progress .progress-track { flex: 1; width: auto; }

.side-lessons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 60vh;
  overflow-y: auto;
}

.side-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 13px;
}

.side-lesson:hover { background: var(--surface-2); color: var(--text); }

.side-lesson.is-current {
  background: #efe7fa;
  color: var(--text);
}

.side-lesson.is-current .lesson-index { background: var(--grad-brand); color: #fff; }
.side-lesson.is-done .lesson-index { background: rgba(61, 220, 151, 0.13); color: var(--green); }

.side-lesson .lesson-index { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.side-lesson-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-lesson small { color: var(--text-faint); font-size: 11px; }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 70px 30px;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  color: var(--text-faint);
}

.empty-state .ico { color: var(--brand); opacity: 0.8; }
.empty-state h3 { color: var(--text); font-size: 18px; }
.empty-state p { max-width: 380px; font-size: 14px; }
.empty-state .btn { margin-top: 10px; }

/* =============================================================
   Formulários
   ============================================================= */

.form { display: flex; flex-direction: column; gap: 18px; max-width: 640px; }

.field { display: flex; flex-direction: column; gap: 7px; flex: 1; }

.field label, .field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="search"],
.field select,
.field textarea,
.review-form textarea {
  padding: 11px 14px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.review-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.16);
}

.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%), linear-gradient(135deg, var(--text-faint) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

.field textarea { resize: vertical; }

.field-hint { font-size: 12px; color: var(--text-faint); }

.field-row { display: flex; gap: 16px; }
.field-row-3 .field { min-width: 0; }

.field-group {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.field-group legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 0 8px;
}

.field-group legend small { color: var(--text-faint); font-weight: 400; }

.field-reveal { position: relative; display: flex; }
.field-reveal input { flex: 1; padding-right: 46px; }
.field-reveal .icon-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-action-right { margin-left: auto; }

.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-dim);
}

.switch-field input { position: absolute; opacity: 0; }

.switch {
  width: 42px;
  height: 24px;
  border-radius: 99px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.18s ease;
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: all 0.18s ease;
}

.switch-field input:checked + .switch { background: var(--grad-brand); border-color: transparent; }
.switch-field input:checked + .switch::after { left: 20px; background: #fff; }
.switch-field input:focus-visible + .switch { outline: 2px solid var(--brand); outline-offset: 2px; }

.accent-picker { display: flex; gap: 10px; flex-wrap: wrap; }

.accent-option { position: relative; cursor: pointer; }
.accent-option input { position: absolute; opacity: 0; }

.accent-option i {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: inherit;
  transition: transform 0.14s ease;
}

.accent-option { border-radius: 14px; padding: 0; background: transparent !important; }
.accent-option i { background: inherit; }
.accent-option.accent-roxo i { background: linear-gradient(135deg, #4b2769, #8b52c8); }
.accent-option.accent-violeta i { background: linear-gradient(135deg, #6d28c9, #a543fa); }
.accent-option.accent-ambar i { background: linear-gradient(135deg, #8a4d0f, #ffae00); }
.accent-option.accent-magenta i { background: linear-gradient(135deg, #8b1e63, #e5518f); }
.accent-option.accent-azul i { background: linear-gradient(135deg, #1d3f8f, #4f8ff7); }
.accent-option.accent-verde i { background: linear-gradient(135deg, #0e6b4f, #3ddc97); }

.accent-option input:checked + i {
  border-color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 0 0 3px var(--brand-strong);
}

/* =============================================================
   Painel admin
   ============================================================= */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.stat-card {
  position: relative;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  margin: 10px 0 2px;
}

.stat-card strong em {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: #96650a;
  margin-left: 8px;
  vertical-align: 4px;
}

.stat-card > span:last-child { font-size: 12.5px; color: var(--text-faint); }

.stat-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #f0e5fd;
  color: var(--brand-strong);
}

.stat-card-hot { border-color: #f0d9a8; }
.stat-card-hot .stat-icon { background: #fdf0d3; color: #d18a00; }
.stat-card-hot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(220px 120px at 90% -20%, rgba(255, 174, 0, 0.1), transparent 70%);
}

.admin-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}

.admin-course-columns {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 20px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: 0 14px 34px -28px rgba(89, 50, 122, 0.35);
}

.panel-form { max-width: none; }
.panel-head { margin-bottom: 18px; }
.panel-head h2 { font-size: 17px; }
.panel-head p { font-size: 13.5px; color: var(--text-dim); margin-top: 6px; }
.panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-empty { color: var(--text-faint); font-size: 13.5px; padding: 14px 0; }

/* Tabelas */
.table { width: 100%; border-collapse: collapse; }

.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  vertical-align: middle;
}

.table tbody tr { transition: background 0.12s ease; }
.table tbody tr:hover { background: rgba(165, 67, 250, 0.04); }
.table td small { display: block; color: var(--text-faint); font-size: 12px; margin-top: 2px; }
.table td strong { font-weight: 600; }

.table-course { display: flex; align-items: center; gap: 12px; }

.table-cover {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.table-actions { text-align: right; white-space: nowrap; }
.table-actions > * { display: inline-flex; margin-left: 6px; vertical-align: middle; }
.table-actions form { display: inline-flex; }
.table-empty { text-align: center; color: var(--text-faint); padding: 30px !important; }
.table-stars .stars { vertical-align: middle; }
.table-subnote { display: block; font-size: 11px; color: var(--text-faint); margin-top: 3px; }

/* Feeds do dashboard */
.feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.feed-list > li { display: flex; gap: 12px; }
.feed-list p { font-size: 13.5px; }
.feed-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-faint); margin-top: 3px; }
.feed-quote { color: var(--text-dim); font-size: 12.5px; font-style: italic; margin-top: 5px; }

/* Aulas no admin */
.admin-lesson-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.admin-lesson-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg1);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}

.admin-lesson-info { flex: 1; min-width: 0; }
.admin-lesson-info strong { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.admin-lesson-info small { color: var(--text-faint); font-size: 12px; }
.admin-lesson-actions { display: flex; gap: 4px; }

/* Importação de leads */
.panel-import {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 22px;
  margin-bottom: 8px;
  border-style: dashed;
}

.panel-import-copy h3 { display: flex; align-items: center; gap: 9px; font-size: 14.5px; }
.panel-import-copy h3 .ico { color: var(--brand-soft); }
.panel-import-copy p { font-size: 12.5px; color: var(--text-faint); margin-top: 5px; }
.panel-import-copy code {
  background: var(--surface-3);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--brand-soft);
}

.import-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.import-form input[type="file"] { font-size: 12.5px; color: var(--text-dim); max-width: 240px; }

.import-form input[type="file"]::file-selector-button {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text-dim);
  padding: 8px 14px;
  margin-right: 10px;
  font: 600 12.5px var(--font-body);
  cursor: pointer;
}

.inline-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-faint);
}

.inline-search input { border: 0; background: transparent; color: var(--text); font: inherit; outline: none; width: 210px; }

/* =============================================================
   Autenticação
   ============================================================= */

.auth-body { min-height: 100vh; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  min-height: 100vh;
}

/* Hero do login: dark roxo de propósito, contrastando com o painel claro */
.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 46px 60px 0;
  background:
    radial-gradient(560px 420px at 18% 8%, rgba(165, 67, 250, 0.22), transparent 62%),
    radial-gradient(700px 560px at 90% 100%, rgba(139, 61, 242, 0.28), transparent 65%),
    linear-gradient(160deg, #1b1029, #0e0817);
  overflow: hidden;
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 90px;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
}

/* Onda roxa no rodapé do hero (eco do menu) */
.auth-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 88px;
  pointer-events: none;
}

.auth-wave svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.auth-hero-inner { position: relative; z-index: 1; max-width: 520px; }

/* Arte oficial da CW App Store flutuando no hero */
.auth-art {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(520px, 40vw);
  margin: 14px 0 0;
  pointer-events: none;
}

.auth-art::before {
  content: "";
  position: absolute;
  inset: 12% 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(165, 67, 250, 0.32), rgba(24, 99, 220, 0.1) 60%, transparent 75%);
  filter: blur(46px);
  animation: art-glow 5.5s ease-in-out infinite alternate;
}

.auth-art img {
  position: relative;
  width: 100%;
  height: auto;
  animation: art-float 7s ease-in-out infinite alternate;
  filter: drop-shadow(0 30px 50px rgba(10, 4, 20, 0.65));
}

@keyframes art-float {
  from { transform: translateY(0) rotate(-0.6deg); }
  to { transform: translateY(-16px) rotate(0.8deg); }
}

@keyframes art-glow {
  from { opacity: 0.65; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.05); }
}

.auth-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #c9a8ff;
  margin: 22px 0 14px;
}

.auth-headline {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 900;
  background: linear-gradient(115deg, #ffffff 30%, #ebd9ff 55%, #c9a8ff 75%, #8ab4ff 95%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: headline-sheen 7s ease-in-out infinite alternate;
}

@keyframes headline-sheen {
  from { background-position: 0% 0; }
  to { background-position: 100% 0; }
}

.auth-sub { margin-top: 18px; color: var(--text-dim); font-size: 15.5px; max-width: 460px; }

.auth-points { list-style: none; margin: 34px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-size: 14px; }
.auth-points .ico { color: var(--brand-strong); }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
  background: var(--bg0);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 34px 32px;
  box-shadow: 0 30px 70px -34px rgba(89, 50, 122, 0.45);
}

.auth-title { font-size: 26px; font-weight: 800; margin: 6px 0 10px; }
.auth-note { color: var(--text-dim); font-size: 14px; margin-bottom: 26px; }

.form-auth { max-width: none; gap: 16px; }

.auth-links { margin-top: 18px; font-size: 13.5px; }

.auth-foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--text-faint);
}

/* =============================================================
   Perfil
   ============================================================= */

.profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.side-card-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.side-card-profile strong { font-family: var(--font-display); font-size: 16px; }
.side-list-stats { width: 100%; margin: 8px 0 0; }
.side-list-stats li { justify-content: flex-start; }

/* =============================================================
   Certificação — admin (designer + questões)
   ============================================================= */

.cert-checklist {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  margin-bottom: 22px;
  border: 1px dashed #f0d9a8;
  border-radius: var(--r-md);
  background: #fdf6e3;
  font-size: 13.5px;
  color: #96650a;
}

.cert-designer {
  position: relative;
  container-type: inline-size;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid #ddd0f0;
  cursor: crosshair;
  background: #f7f3fd;
  box-shadow: 0 12px 28px -20px rgba(89, 50, 122, 0.3);
}

.cert-designer img { width: 100%; display: block; }

.cert-name-overlay {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: "Museo Sans Rounded", sans-serif;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.15);
}

.cert-designer .cert-name-overlay::after {
  content: "";
  position: absolute;
  inset: -6px -10px;
  border: 1.5px dashed rgba(165, 67, 250, 0.65);
  border-radius: 8px;
}

.cert-designer-empty {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  color: var(--text-faint);
  font-size: 13.5px;
  justify-content: center;
}

.cert-coords { justify-content: center; }
.cert-coords-value { font-size: 13.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.field input[type="range"] { accent-color: var(--brand); padding: 12px 0; }
.field input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 4px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
}

/* Painel de acesso à certificação no curso (admin) */
.cert-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: rgba(165, 67, 250, 0.06);
  border: 1px solid rgba(165, 67, 250, 0.22);
  border-radius: var(--r-md);
}

.cert-access-info { display: flex; align-items: center; gap: 12px; }
.cert-access-info strong { display: block; font-size: 13.5px; }
.cert-access-info small { color: var(--text-faint); font-size: 12px; }

.promo-icon-cert {
  background: rgba(165, 67, 250, 0.14);
  color: var(--brand-strong);
}

/* Questões (admin) */
.q-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.q-item {
  background: var(--bg1);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}

.q-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.q-item summary::-webkit-details-marker { display: none; }
.q-item-title { flex: 1; font-size: 13.5px; font-weight: 600; }
.q-caret { color: var(--text-faint); transition: transform 0.2s ease; }
.q-item[open] .q-caret { transform: rotate(90deg); }
.q-item[open] { border-color: rgba(165, 67, 250, 0.35); }

.q-item-body { padding: 4px 16px 16px; border-top: 1px solid var(--line-soft); }
.q-item-body .q-form { margin-top: 14px; }

.q-new {
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}

.q-new h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin-bottom: 14px; }
.q-new h3 .ico { color: var(--brand-strong); }

.q-choices { display: flex; flex-direction: column; gap: 8px; }

.q-choice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.q-choice-row input[type="radio"] { accent-color: var(--green); width: 16px; height: 16px; flex: none; }

.q-choice-letter {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  flex: none;
  background: var(--surface-3);
  color: var(--text-faint);
  font: 700 12px var(--font-display);
}

.q-choice-row input[type="text"] {
  flex: 1;
  padding: 9px 12px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
}

.q-choice-row input[type="text"]:focus { outline: none; border-color: var(--brand); }
.q-choice-row:has(input[type="radio"]:checked) .q-choice-letter { background: rgba(61, 220, 151, 0.16); color: var(--green); }

.q-delete-form { margin-top: 10px; }

/* =============================================================
   Prova do aluno
   ============================================================= */

.exam-intro {
  max-width: 620px;
  margin: 24px auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.exam-badge {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f1e7fd, #ffffff);
  border: 1px solid #e0cffa;
  color: var(--brand-strong);
  box-shadow: var(--glow-brand);
}

.exam-intro h1 { font-size: clamp(24px, 3vw, 32px); }

.exam-rules {
  list-style: none;
  margin: 10px 0 6px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.exam-rules li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--text-dim); }
.exam-rules .ico { color: var(--brand-soft); flex: none; }

.exam-blocked {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: #fdf6e3;
  border: 1px solid #f0d9a8;
  max-width: 480px;
}

.exam-blocked .ico { color: #d18a00; flex: none; margin-top: 2px; }
.exam-blocked strong { display: block; color: #96650a; margin-bottom: 3px; }
.exam-blocked span { font-size: 13.5px; color: var(--text-dim); }

.exam-retry-note { font-size: 13.5px; color: var(--text-dim); }

/* Modal de aviso */
.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(460px, calc(100vw - 40px));
  margin: auto;
}

.modal::backdrop {
  background: rgba(36, 22, 60, 0.45);
  backdrop-filter: blur(6px);
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 40px 90px -40px rgba(60, 25, 110, 0.55);
  animation: rise-in 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(255, 174, 0, 0.12);
  color: var(--amber);
}

.modal-card h2 { font-size: 20px; }
.modal-card p { font-size: 14px; color: var(--text-dim); }
.modal-card p strong { color: var(--text); }
.modal-note { font-size: 12.5px !important; color: var(--text-faint) !important; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }

/* Prova em andamento */
.exam-shell { max-width: 760px; margin: 0 auto; }

.exam-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.exam-topbar h1 { font-size: 22px; }
.exam-progress { display: flex; align-items: center; gap: 12px; }
.exam-progress .progress-track { width: 180px; }

.exam-step { display: none; border: 0; padding: 0; margin: 0; }
.exam-step.is-active { display: block; animation: rise-in 0.35s cubic-bezier(0.22, 0.8, 0.3, 1); }

.exam-step-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--brand-soft);
  margin-bottom: 12px;
  display: block;
}

.exam-statement {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 22px;
}

.exam-options { display: flex; flex-direction: column; gap: 10px; }

.exam-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.exam-option:hover { border-color: rgba(165, 67, 250, 0.5); transform: translateX(3px); }

.exam-option input { position: absolute; opacity: 0; pointer-events: none; }

.exam-option-letter {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex: none;
  background: var(--surface-3);
  color: var(--text-faint);
  font: 700 13px var(--font-display);
  transition: all 0.15s ease;
}

.exam-option-text { flex: 1; font-size: 14.5px; color: var(--text-dim); }

.exam-option-check {
  opacity: 0;
  color: var(--brand-strong);
  transition: opacity 0.15s ease;
}

.exam-option:has(input:checked) {
  border-color: var(--brand);
  background: #f5edfe;
}

.exam-option:has(input:checked) .exam-option-letter { background: var(--grad-brand); color: #fff; }
.exam-option:has(input:checked) .exam-option-text { color: var(--text); }
.exam-option:has(input:checked) .exam-option-check { opacity: 1; }

.exam-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.exam-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

.exam-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--surface-3);
  cursor: pointer;
  transition: all 0.15s ease;
}

.exam-dot.is-answered { background: var(--brand); }
.exam-dot.is-current { box-shadow: 0 0 0 3px rgba(165, 67, 250, 0.3); transform: scale(1.2); }

/* Revisão final */
.exam-review { text-align: center; padding: 10px 0; animation: rise-in 0.35s ease; }
.exam-review h2 { font-size: 22px; margin-bottom: 8px; }
.exam-review-note { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }

.exam-review-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}

.exam-review-cell {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  font: 700 14px var(--font-display);
  cursor: pointer;
  transition: all 0.15s ease;
}

.exam-review-cell.is-answered { background: #efe7fa; border-color: var(--brand); color: #6d28c9; }
.exam-review-cell.is-blank { border-style: dashed; }
.exam-review-cell:hover { transform: translateY(-2px); }

.exam-review-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 13px;
  color: #96650a;
  margin-bottom: 16px;
}

/* Resultado */
.exam-result {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin: 20px 0 40px;
}

.result-score { position: relative; width: 168px; height: 168px; flex: none; }

.result-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.result-ring .ring-track { fill: none; stroke: var(--line); stroke-width: 10; }
.result-ring .ring-value {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  animation: result-ring-in 1.2s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.result-score.is-passed .ring-value { stroke: var(--green); filter: drop-shadow(0 0 8px rgba(61, 220, 151, 0.6)); }
.result-score.is-failed .ring-value { stroke: var(--amber); filter: drop-shadow(0 0 8px rgba(255, 174, 0, 0.5)); }

@keyframes result-ring-in {
  from { stroke-dasharray: 0 326.7; }
}

.result-score-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-score-label strong { font-family: var(--font-display); font-size: 38px; font-weight: 900; }
.result-score-label span { font-size: 11.5px; color: var(--text-faint); }

.result-copy { flex: 1; min-width: 280px; }
.result-copy h1 { font-size: clamp(24px, 3vw, 32px); margin-top: 6px; }
.result-note { color: var(--text-dim); margin-top: 12px; max-width: 520px; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.result-breakdown h2 { font-size: 19px; margin-bottom: 16px; }
.result-questions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 780px; }

.result-question {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.result-question.is-right { border-color: #bfe8d4; }
.result-question.is-right .lesson-index { background: #e2f6ec; color: #14804f; }
.result-question.is-wrong { border-color: #f0d9a8; }
.result-question.is-wrong .lesson-index { background: #fdf0d3; color: #96650a; }
.result-question-text { flex: 1; font-size: 13.5px; color: var(--text-dim); }
.result-question .chip { flex: none; }

/* =============================================================
   Meus certificados
   ============================================================= */

.btn-cert {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--glow-brand);
}

.btn-cert:hover { filter: brightness(1.1); transform: translateY(-1px); color: #fff; }

.ico-flip { transform: rotate(180deg); }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.cert-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.18s ease, border 0.18s ease, box-shadow 0.18s ease;
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: rgba(165, 67, 250, 0.5);
  box-shadow: 0 24px 50px -24px rgba(165, 67, 250, 0.35);
  color: var(--text);
}

.cert-thumb {
  position: relative;
  container-type: inline-size;
  background: #ece4f8;
  border-bottom: 1px solid var(--line-soft);
}

.cert-thumb img { width: 100%; display: block; }

.cert-thumb-name {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: "Museo Sans Rounded", sans-serif;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.cert-card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.cert-card-body strong { font-family: var(--font-display); font-size: 15px; }

.cert-card-meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-faint); }
.cert-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.cert-card-meta .ico { color: var(--amber); }

.cert-code {
  font-family: Consolas, monospace;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}

.cert-opportunities { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.cert-opportunity {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.cert-opportunity-info { flex: 1; min-width: 220px; }
.cert-opportunity-info strong { display: block; font-size: 14px; }
.cert-opportunity-info small { color: var(--text-faint); font-size: 12.5px; }

.cert-opportunity-state { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.cert-opportunity-state .progress-track { width: 110px; }
.cert-opportunity-state small { font-size: 11.5px; color: var(--text-faint); }

/* Visualização do certificado */
.cert-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.cert-stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}

.cert-canvas-wrap {
  position: relative;
  container-type: inline-size;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: 0 24px 54px -24px rgba(89, 50, 122, 0.45);
}

.cert-canvas-wrap img { width: 100%; display: block; }

.cert-side .side-card h4 { font-size: 15px; }
.cert-side-note {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f5effc;
  border-radius: 10px;
}

.cert-side .btn-block + .btn-block { margin-top: 8px; }

/* =============================================================
   Responsivo
   ============================================================= */

@media (max-width: 1080px) {
  /* minmax(0, 1fr) e não 1fr: com "1fr" a coluna não encolhe abaixo do
     min-content e a página inteira ganha rolagem horizontal no celular */
  .course-columns, .player-columns, .admin-course-columns, .cert-view, .profile-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .player-main, .course-main { min-width: 0; }
  .side-card-lessons { position: static; }
  .course-side { order: -1; }
  .course-side .side-card { display: none; }
  .exam-result { gap: 24px; }
  .profile-side { order: -1; }
  .side-card-profile { flex-direction: row; text-align: left; align-items: center; flex-wrap: wrap; }
  .side-card-profile .side-list-stats { width: auto; flex: 1; min-width: 220px; margin: 0; }
  .side-card-profile .modal { text-align: center; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 12px 14px; gap: 12px; }
  .topbar-brand { display: block; }
  .topbar-burger { display: grid; }
  .app-content { padding: 22px 18px 46px; }
  .nav-scrim { display: block; }

  /* Mesmo menu do desktop, agora em gaveta atrás do hamburguer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 95;
    width: min(312px, 88vw);
    height: 100dvh;
    padding: 12px 0 12px 12px;
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0s linear 0.3s;
  }

  .sidebar.is-open {
    transform: none;
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0s;
  }

  /* Barra de ações fixa e o espaço que ela reserva no fim da página */
  .mobile-actions { display: flex; }
  .app-main:has(.mobile-actions) .app-footer { padding-bottom: 96px; }

  .course-head-actions .btn-lg,
  .course-head-actions .progress-inline,
  .course-head-actions .btn-cert,
  .player-nav,
  .player-head form { display: none; }

  .hero { flex-direction: column; align-items: flex-start; }
  /* Sparkles decorativos usam right negativo: no celular passariam da borda */
  .hero-copy .fx-spark { display: none; }
  .hero-stats { width: 100%; }
  .stat-tile { flex: 1; min-width: 0; }
  .promo-grid { grid-template-columns: 1fr; }
  .promo-points { grid-template-columns: 1fr; }

  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { padding: 44px 26px 0; min-height: auto; }
  .auth-headline { font-size: 26px; }
  .auth-panel { padding: 36px 22px 60px; }
  .auth-art { width: min(340px, 78%); margin: 10px auto -18px; align-self: center; }

  .course-hero { padding: 28px 22px; }
  .field-row { flex-direction: column; gap: 18px; }
  .field-row-3 { flex-direction: row; }
  .panel-import { flex-direction: column; align-items: flex-start; }
  .page-actions { width: 100%; }

  /* Tabelas largas rolam dentro delas mesmas, sem arrastar a página junto */
  .table { display: block; overflow-x: auto; }
}

@media (max-width: 560px) {
  .field-row-3 { flex-direction: column; }
  .course-grid { grid-template-columns: 1fr; }
  .player-nav { flex-direction: column; }
  .player-nav-link { max-width: none; }
  .topbar-search kbd { display: none; }
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
  .side-card-profile { flex-direction: column; text-align: center; }
  .side-card-profile .side-list-stats li { justify-content: center; }
  .modal-card { padding: 24px 18px; }
}

/* ============================================================
   PASSO A PASSO — trilha do integrador (gibi + etapas)
   ============================================================ */

/* Selo "novo" no menu lateral */
.sb-count-new {
  color: #ffffff;
  background: linear-gradient(135deg, #7b2ff7, #a543fa);
  font-size: 9.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
}

/* ---------- Destaque na home ---------- */

.pb-promo {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  align-items: center;
  gap: 24px;
  padding: 30px 32px;
  margin-bottom: 26px;
  border: 1px solid #e2d2fb;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, #f6ecff 0%, rgba(246, 236, 255, 0) 60%),
    linear-gradient(135deg, #fbf7ff 0%, #ffffff 62%);
  box-shadow: var(--shadow-card);
}

.pb-promo-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-soft);
  margin-bottom: 12px;
}

.pb-promo-kicker em {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.8px;
  color: #ffffff;
  background: linear-gradient(135deg, #7b2ff7, #a543fa);
  padding: 3px 9px;
  border-radius: 99px;
}

.pb-promo h2 { font-size: clamp(21px, 2.6vw, 27px); line-height: 1.22; }
.pb-promo-text { margin-top: 12px; color: var(--text-dim); max-width: 52ch; }

.pb-promo-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 20px;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.pb-promo-points li { display: inline-flex; align-items: center; gap: 7px; }
.pb-promo-points .ico { color: var(--brand); }

.pb-promo-art { position: relative; justify-self: center; }
.pb-promo-art img { display: block; width: min(210px, 100%); height: auto; }

/* ---------- Progresso das etapas ---------- */

.pb-progress-box { min-width: 250px; max-width: 380px; }

.pb-progress {
  height: 10px;
  border-radius: 99px;
  background: #ece3fa;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #e2d5f7;
}

.pb-progress > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--grad-brand);
  transition: width 0.35s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.pb-progress-label { margin-top: 9px; font-size: 13px; color: var(--text-faint); }
.pb-progress-label b { color: var(--brand-soft); font-family: var(--font-display); font-size: 15px; }

/* ---------- Cabeçalhos de seção ---------- */

.pb-section-head { margin-bottom: 26px; }
.pb-section-head h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; line-height: 1.15; }
.pb-section-head h2 { font-size: clamp(21px, 2.6vw, 26px); }
.pb-section-head p { margin-top: 8px; color: var(--text-dim); max-width: 62ch; }

.pb-section-head-steps {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
}

/* ---------- O gibi ---------- */

.pb-comic { margin-bottom: 56px; }

.pb-comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.pb-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid #2b1b49;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 5px 5px 0 rgba(43, 27, 73, 0.13);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pb-panel:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(43, 27, 73, 0.16); }

.pb-panel-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 196px;
  padding: 18px 18px 12px;
  border-bottom: 2px solid #2b1b49;
  background-color: var(--tint, #f2e9ff);
  background-image: radial-gradient(rgba(43, 27, 73, 0.11) 1.3px, transparent 1.3px);
  background-size: 10px 10px;
}

.pb-panel-art img {
  display: block;
  max-width: 100%;
  max-height: 168px;
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(43, 27, 73, 0.22));
}

.pb-panel-n {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #2b1b49;
  border-radius: 50%;
  background: #ffffff;
  color: #2b1b49;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.pb-panel-body { padding: 20px 20px 6px; }

.pb-balloon {
  position: relative;
  padding: 14px 17px;
  border: 2px solid #2b1b49;
  border-radius: 16px;
  background: #ffffff;
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text);
}

.pb-balloon::before,
.pb-balloon::after {
  content: "";
  position: absolute;
  left: 26px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
}

.pb-balloon::before { top: -14px; border-bottom: 14px solid #2b1b49; }
.pb-balloon::after { top: -11px; border-bottom: 14px solid #ffffff; }

.pb-caption {
  margin: 16px 14px 14px;
  margin-top: auto;
  padding: 11px 14px;
  border: 1.5px dashed #cbb6ee;
  border-radius: 12px;
  background: #fbf8ff;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}

.tom-ideia { --tint: #fff2d0; }
.tom-codigo { --tint: #ddeaff; }
.tom-problema { --tint: #ffe2e6; }
.tom-virada { --tint: #ecdcff; }
.tom-metodo { --tint: #ddf5e8; }
.tom-tracao { --tint: #ffe7d2; }
.tom-crescimento { --tint: #d9efff; }
.tom-final { --tint: #ffeab8; }

.pb-comic-end {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
  padding: 22px;
  border: 1px dashed #d8c6f5;
  border-radius: var(--r-lg);
  background: #fbf8ff;
}

.pb-comic-end p { font-size: 16px; color: var(--text-dim); }

/* ---------- Etapas ---------- */

.pb-steps { margin-bottom: 46px; }

.pb-step {
  position: relative;
  padding: 28px 30px 24px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  scroll-margin-top: 90px;
  transition: border-color 0.2s ease;
}

.pb-step.is-done { border-color: #b7e5cd; }

.pb-step-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.pb-step-head h3 { font-size: clamp(19px, 2.2vw, 23px); }

.pb-step-n {
  display: grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 17px;
  background: var(--grad-brand);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  box-shadow: var(--glow-brand);
  transition: background 0.2s ease;
}

.pb-step.is-done .pb-step-n { background: linear-gradient(135deg, #12855a, #17a26b); box-shadow: none; }

.pb-step-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 7px; }

.pb-tag {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
}

.pb-tag-mail { background: #dce9ff; color: #17509e; }
.pb-tag-code { background: #ece0ff; color: #6528c4; }
.pb-tag-build { background: #ffeec6; color: #8a5a00; }
.pb-tag-live { background: #d9f3e5; color: #12744f; }
.pb-tag-grow { background: #ffe2ee; color: #b02064; }

.pb-time { font-size: 12.5px; color: var(--text-faint); }

.pb-step-body > * + * { margin-top: 18px; }
.pb-step-body p { color: var(--text-dim); }
.pb-step-body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  padding: 2px 7px;
  border-radius: 7px;
  background: #f2ebfd;
  color: #5b21b6;
  word-break: break-all;
}

/* Fala do Johnny */
.pb-johnny {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 18px 14px 15px;
  border-radius: 16px;
  border-left: 3px solid var(--brand);
  background: #f8f3ff;
}

.pb-johnny-face {
  display: grid;
  place-items: center;
  flex: none;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #e7dcf7;
  overflow: hidden;
}

.pb-johnny-face img { width: 58px; height: 58px; object-fit: contain; }
.pb-johnny-quote { font-size: 14.5px; font-style: italic; line-height: 1.5; color: #4a3a68; }

/* Blocos "o que fazer" */
.pb-do {
  padding: 20px 22px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: #fbf9fe;
}

.pb-do-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text) !important;
  margin-bottom: 12px;
}

.pb-do ul, .pb-do ol { list-style: none; display: grid; gap: 9px; }
.pb-do-grid { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)) !important; }

.pb-do li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
  /* URLs longas não podem empurrar a página para o lado */
  overflow-wrap: anywhere;
}

.pb-do a { overflow-wrap: anywhere; }

.pb-do ul > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.pb-flow { counter-reset: passo; }
.pb-flow > li { padding-left: 34px; }

.pb-flow > li::before {
  counter-increment: passo;
  content: counter(passo);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ece0ff;
  color: #6528c4;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.pb-do ul.pb-check-list > li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 11px;
  height: 6px;
  border-left: 2.2px solid var(--green);
  border-bottom: 2.2px solid var(--green);
  border-radius: 1px;
  background: none;
  transform: rotate(-45deg);
}

/* Público x privado */
.pb-tipos-sub { font-size: 13.5px; margin: -6px 0 16px; }

.pb-tipos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 14px; }

.pb-tipo {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.pb-tipo-priv { border-color: #f4dfab; background: #fff9ea; }

.pb-tipo header { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }

.pb-tipo-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  background: var(--grad-brand);
  box-shadow: var(--glow-brand);
}

.pb-tipo-priv .pb-tipo-ico {
  background: linear-gradient(135deg, #f09000, #ffb92e);
  box-shadow: 0 12px 26px -12px rgba(255, 174, 0, 0.6);
}

.pb-tipo h4 { font-family: var(--font-display); font-size: 17.5px; font-weight: 800; }
.pb-tipo header p { font-size: 12.5px; color: var(--text-faint) !important; margin-top: 2px; }
.pb-tipo header p b { color: var(--brand-soft); }
.pb-tipo-priv header p b { color: #a86a00; }

.pb-tipo ul { list-style: none; display: grid; gap: 11px; }

.pb-tipo li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-dim);
}

.pb-tipo li .ico { flex: none; margin-top: 1px; color: var(--brand); }
.pb-tipo-priv li .ico { color: #e09000; }

/* Avisos */
.pb-note {
  padding: 13px 17px;
  border-radius: 13px;
  border-left: 3px solid var(--brand);
  background: #f7f3fd;
  font-size: 14px;
  line-height: 1.55;
}

.pb-note-warn { border-left-color: var(--amber); background: #fff8e8; }
.pb-note b { color: var(--text); }

/* Links de documentação */
.pb-links { display: flex; flex-wrap: wrap; gap: 8px; }

.pb-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pb-links a:hover { border-color: var(--brand); background: #faf6ff; }

/* Ambientes */
.pb-envs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }

.pb-env {
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbf9fe;
}

.pb-env-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--brand-soft) !important;
  margin-bottom: 7px;
}

.pb-env-prod { border-color: #cfe1ff; background: #f6faff; }
.pb-env-prod .pb-env-label { color: var(--blue) !important; }
.pb-env code { display: inline-block; background: none; padding: 0; font-size: 13px; color: var(--text); }
.pb-env-note { font-size: 13px; color: var(--text-faint) !important; margin-top: 10px !important; }

/* Prompt de IA */
.pb-prompt {
  border: 1px solid #3a2a5e;
  border-radius: 18px;
  overflow: hidden;
  background: #251a3d;
}

.pb-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #3a2a5e;
}

.pb-prompt-head p {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #b9a8dd !important;
}

.pb-prompt pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #ece4ff;
  white-space: pre-wrap;
  word-break: break-word;
}

/* E-mails prontos */
.pb-mail {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}

.pb-mail-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #faf7ff;
}

.pb-mail-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #ede2fc;
  color: var(--brand-soft);
}

.pb-mail-id { min-width: 0; }
.pb-mail-title { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; color: var(--text) !important; }
.pb-mail-to { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; color: var(--text-faint) !important; }

.pb-copy-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* o endereco e um token longo: sem isso ele empurra a pagina para o lado */
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
  padding: 3px 11px;
  border: 0;
  border-radius: 99px;
  background: #ede2fc;
  color: var(--brand-soft);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pb-copy-inline:hover { background: #e2d2fb; }
.pb-copy-inline.is-copied { background: #d5f2e3; color: #12744f; }

.pb-mail-body {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  background: #fffdfb;
}

.pb-mail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  background: #fdfcff;
}

.pb-mail-hint { font-size: 12.5px; color: var(--text-faint) !important; }
.pb-mail-hint b { color: var(--brand-soft); }
.pb-mail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.is-copied { background: var(--green); box-shadow: none; }

/* Cards de crescimento */
.pb-grow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px; }

.pb-grow-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-dim);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.pb-grow-card:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--text-dim); }
.pb-grow-card .ico { flex: none; color: var(--brand); }
.pb-grow-card span { font-size: 12.5px; line-height: 1.45; }
.pb-grow-card b { display: block; font-size: 14px; color: var(--text); margin-bottom: 3px; }

/* Marcar etapa */
.pb-step-foot { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }

.pb-check {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 9px 20px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pb-check:hover { border-color: var(--brand); color: var(--text); }

.pb-check-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1.5px solid #d6c7ee;
  border-radius: 50%;
  background: var(--surface);
  color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pb-check-done { display: none; }
.pb-step.is-done .pb-check { border-color: #a9dfc4; background: #f2fbf6; color: #14804f; }
.pb-step.is-done .pb-check-box { background: var(--green); border-color: var(--green); color: #ffffff; }
.pb-step.is-done .pb-check-label { display: none; }
.pb-step.is-done .pb-check-done { display: inline; }

/* Fechamento */
.pb-final {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 28px;
  padding: 32px 34px;
  border: 1px solid #e2d2fb;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, #f6ecff 0%, rgba(246, 236, 255, 0) 62%),
    linear-gradient(135deg, #fbf7ff 0%, #ffffff 60%);
}

.pb-final-art { justify-self: center; }
.pb-final-art img { display: block; width: min(200px, 100%); height: auto; }
.pb-final-copy h2 { font-size: clamp(21px, 2.6vw, 27px); }
.pb-final-copy p { margin-top: 12px; color: var(--text-dim); max-width: 58ch; }
.pb-final-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

@media (max-width: 900px) {
  .pb-promo, .pb-final { grid-template-columns: 1fr; text-align: left; }
  .pb-promo-art, .pb-final-art { order: -1; justify-self: start; }
  .pb-promo-art img, .pb-final-art img { width: min(160px, 45vw); }
  .pb-section-head-steps { align-items: flex-start; }
  .pb-progress-box { width: 100%; max-width: none; }
  .pb-step { padding: 24px 20px 20px; }
  .pb-mail-body, .pb-prompt pre { font-size: 13px; }
}

@media (max-width: 560px) {
  .pb-step-head { align-items: flex-start; }
  .pb-step-n { width: 42px; height: 42px; font-size: 19px; border-radius: 14px; }
  .pb-johnny { flex-direction: column; align-items: flex-start; gap: 10px; }
  .pb-mail-foot, .pb-prompt-head { flex-direction: column; align-items: flex-start; }
  .pb-mail-actions .btn, .pb-comic-end .btn { width: 100%; }
}

/* Respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
