/* ============================================
   DETOX CARNIVORO - AREA DE ALUNAS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Bebas+Neue&display=swap');

:root {
  --orange-50: #fff5f3;
  --orange-100: #ffe4df;
  --orange-200: #ffc7bd;
  --orange-300: #ff9b8f;
  --orange-400: #ef5a4c;
  --orange-500: #d8342a;
  --orange-600: #9f1712;

  --ink-900: #0a0a0a;
  --ink-800: #1a1a1a;
  --ink-700: #2d2d2d;
  --ink-500: #6b6b6b;
  --ink-400: #9a9a9a;
  --ink-300: #c5c5c5;
  --ink-200: #e8e8e8;
  --ink-100: #f5f5f5;

  --bg: #fffdfc;
  --green-ok: #4caf85;
  --red-warn: #d44d4d;

  --card-shadow: 0 16px 44px -26px rgba(159, 23, 18, 0.32);

  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-top: env(safe-area-inset-top, 0);

  --topbar-h: 64px;        /* altura da topbar SEM safe-area */
  --tabbar-h: 84px;        /* altura da tabbar SEM safe-area */
}

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

html, body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============ TOPBAR (branca translúcida com blur — IGUAL EM TODAS PÁGINAS) ============ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.topbar-logo {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
  max-width: 60%;
  overflow: hidden;
}
.topbar-logo img {
  height: 28px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-700);
  background: rgba(0, 0, 0, 0.05);
  transition: background .15s;
}
.icon-btn:hover { background: rgba(0, 0, 0, 0.1); }

.progress-ring {
  position: relative;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
}
.progress-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.progress-ring span {
  font-size: 11px; font-weight: 700;
  color: var(--ink-700);
  position: relative; z-index: 1;
}
.progress-ring .ring-bg { stroke: rgba(0, 0, 0, 0.1); }
.progress-ring .ring-fg { stroke: var(--orange-500); }

/* ============ MAIN — margem superior PADRONIZADA em todas ============ */
.main-content {
  padding-top: calc(var(--topbar-h) + var(--safe-top));
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  min-height: 100dvh;
}

/* ============ LOGIN (sem topbar, sem tabbar) ============ */
.login-body {
  background: linear-gradient(180deg, var(--orange-50) 0%, #fff 50%, var(--orange-50) 100%);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.login-blob {
  position: absolute; top: -100px; right: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--orange-300) 0%, transparent 70%);
  filter: blur(60px); opacity: .4;
  pointer-events: none;
}
.login-blob-2 {
  position: absolute; bottom: -100px; left: -120px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--orange-200) 0%, transparent 70%);
  filter: blur(60px); opacity: .3;
  pointer-events: none;
}

.login-wrap {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: calc(28px + var(--safe-top)) 24px calc(40px + var(--safe-bottom));
  max-width: 460px; margin: 0 auto; width: 100%;
  position: relative; z-index: 1;
}

.install-btn-login {
  background: var(--ink-900);
  color: #fff; font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px;
  margin-bottom: 30px;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  transition: transform .2s;
}
.install-btn-login:active { transform: scale(.96); }

.login-logo-wrap {
  display: flex; align-items: center; justify-content: center;
  margin: 30px 0 40px;
}
.login-logo-wrap img { max-width: 240px; height: auto; }

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 26px 28px;
  width: 100%;
  box-shadow: 0 10px 40px -15px rgba(0,0,0,.12);
  border: 1px solid var(--ink-200);
}
.login-card h1 { font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.login-sub { text-align: center; color: var(--ink-500); font-size: 14px; margin-bottom: 22px; }

.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 13px; font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.field-input {
  display: flex; align-items: center;
  background: #f6f6f8;
  border: 1.5px solid #ececec;
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color .2s, background .2s;
}
.field-input:focus-within { border-color: var(--orange-400); background: #fff; }
.field-input svg { color: var(--ink-500); flex-shrink: 0; margin-right: 10px; }
.field-input input {
  flex: 1; padding: 13px 0;
  background: none; border: none; outline: none;
  font-size: 16px;
}

.btn-primary {
  width: 100%;
  background: var(--ink-900);
  color: #fff; font-weight: 600;
  font-size: 16px;
  padding: 15px;
  border-radius: 12px;
  margin-top: 6px;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:hover { background: var(--ink-700); }

.btn-orange {
  background: var(--orange-400) !important;
  color: var(--ink-900) !important;
  box-shadow: 0 4px 14px rgba(245, 160, 92, .4) !important;
}
.btn-orange:hover { background: var(--orange-500) !important; }

.alert {
  background: #fff0f0; color: #b3261e;
  padding: 12px 14px; border-radius: 10px;
  font-size: 14px; margin-bottom: 16px;
  border-left: 3px solid #b3261e;
}

/* ============ CARROSSEL ============ */
.banner-carousel {
  position: relative;
  overflow: hidden;
  background: #000;
}
.banner-track {
  display: flex;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}
.banner-slide {
  flex: 0 0 100%;
  position: relative;
  /* Proporção dinâmica - definida via style inline a partir das dimensões da imagem */
  aspect-ratio: var(--banner-ratio, 16/9);
  overflow: hidden;
  background: #1a1a1a;
}
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-slide a { display: block; width: 100%; height: 100%; }
.banner-dots {
  position: absolute; bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
  z-index: 2;
}
.banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: width .3s, background .3s;
}
.banner-dot.active { width: 24px; background: var(--orange-400); }

/* ============ SECTIONS ============ */
.section { padding: 24px 18px 8px; }
.section-title {
  font-size: 19px; font-weight: 700;
  margin-bottom: 14px;
}

/* ============ MÓDULOS ============ */
.continue-section { padding: 18px 18px 4px; }
.continue-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  display: grid;
  grid-template-columns: 84px 1fr 42px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  color: var(--ink-900);
}
.continue-cover {
  width: 84px;
  aspect-ratio: 1/1;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  background-color: var(--ink-200);
}
.continue-info { min-width: 0; }
.continue-info span {
  display: block;
  color: var(--orange-500);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.continue-info strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  margin-bottom: 4px;
}
.continue-info small { color: var(--ink-500); font-size: 12px; }
.continue-action {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange-400);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 900;
}
.continue-card:active { transform: scale(.98); }

.modulos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.modulo-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: transform .15s;
  display: block;
}
.modulo-card:active { transform: scale(.97); }
.modulo-card-img {
  /* proporção padrão = 1/1, mas pode ser sobrescrita inline com aspect-ratio */
  aspect-ratio: var(--card-ratio, 1/1);
  background-size: cover; background-position: center;
  background-color: var(--ink-200);
  position: relative;
}
.modulo-card-info { padding: 12px 14px; }
.modulo-card-info small {
  font-size: 11px;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.modulo-card-info strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
}

/* full-img: card é 100% imagem, sem texto, sem faixa branca, com proporção real */
.modulo-card.full-img {
  background: transparent;
}
.modulo-card.full-img .modulo-card-info {
  display: none;
}
.modulo-card.full-img .modulo-card-img {
  /* respeita a proporção real da imagem (definida inline via --card-ratio) */
  aspect-ratio: var(--card-ratio, 1/1.3);
  border-radius: 18px;
}

.modulo-card.locked { cursor: pointer; }
.modulo-card.locked .modulo-card-img { filter: grayscale(.6) brightness(.7); }
.modulo-card.locked::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 1; }
.modulo-card.locked::after {
  content: '🔒';
  position: absolute;
  top: 38%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px; z-index: 2;
}
.lock-info {
  position: absolute;
  bottom: 50px; left: 0; right: 0;
  text-align: center;
  color: #fff; font-size: 11px;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  z-index: 2;
}

/* ============ UPSELL ============ */
.upsell-card {
  background: #1a1a1a;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: transform .15s;
  display: block;
  /* proporção padrão = 1/1.3, customizável via --card-ratio */
  aspect-ratio: var(--card-ratio, 1/1.3);
}
.upsell-card:active { transform: scale(.97); }
.upsell-card-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.5) saturate(.8);
}
/* Variante full-img: imagem inteira sem escurecer e sem texto sobreposto */
.upsell-card.full-img .upsell-card-img { filter: none; }
.upsell-card.full-img .upsell-card-overlay { display: none; }
.upsell-card.full-img .upsell-card-label { display: none; }

.upsell-card-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 14px;
  text-align: center;
}
.upsell-lock {
  color: var(--orange-400);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
  margin-bottom: 12px;
}
.upsell-card-label {
  color: #fff; font-size: 12px; line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  padding: 0 12px;
}
.upsell-card-label strong { display: block; font-size: 14px; letter-spacing: .5px; margin-top: 2px; }

/* ============ MÓDULO HEADER ============ */
.modulo-header {
  background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
  color: #fff;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.modulo-header::before {
  content: '';
  position: absolute;
  top: -30%; right: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--orange-400) 0%, transparent 70%);
  opacity: .2;
}
.modulo-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  letter-spacing: 1px;
  color: var(--orange-400);
  line-height: 1;
  position: relative;
}
.modulo-header p { font-size: 13px; margin-top: 6px; opacity: .8; position: relative; }

/* ============ AULAS ============ */
.aulas-list { padding: 16px 18px; display: grid; gap: 12px; }
.aula-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  position: relative;
  transition: transform .15s;
}
.aula-card:active { transform: scale(.98); }
.aula-card-img {
  width: 100%; height: 100%;
  min-height: 100px;
  background-size: cover; background-position: center;
  background-color: var(--ink-200);
}
.aula-card-info { padding: 14px; }
.aula-card-day {
  font-size: 11px;
  color: var(--orange-500);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.aula-card-info h3 { font-size: 16px; font-weight: 700; margin-top: 4px; }
.aula-card-info p {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aula-card-status {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-ok);
  color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.aula-card.locked { opacity: .5; pointer-events: none; }
.aula-card.locked::after {
  content: '🔒';
  position: absolute;
  top: 50%; right: 14px;
  transform: translateY(-50%);
  font-size: 20px;
}

/* ============ AULA DETAIL ============ */
.aula-detail { padding: 0; }
.video-wrap {
  position: relative;
  width: 100%;
  background: #000;
}
.video-wrap-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
/* Vídeo vertical (9:16): limita largura pra não tomar a tela toda em desktop e fica mais alto */
.video-wrap.is-vertical .video-wrap-inner {
  aspect-ratio: 9/16;
  max-width: 420px;
  margin: 0 auto;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* Voomly: o embed costuma vir com div + script. Força o conteúdo a respeitar o container */
.video-wrap-inner > div,
.video-wrap-inner > .voomly-container {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
}
.video-wrap-inner > div > iframe,
.video-wrap-inner .vooPlayer,
.video-wrap-inner iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.aula-body { padding: 22px 20px 20px; }
.aula-day-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange-500);
  font-weight: 700;
  margin-bottom: 6px;
}
.aula-body h1 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.aula-body .description { font-size: 14px; color: var(--ink-700); line-height: 1.6; margin-bottom: 18px; }
.instructions-box {
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.instructions-box h3 { font-size: 15px; margin: 12px 0 6px; }
.instructions-box h3:first-child { margin-top: 0; }
.instructions-box ul { padding-left: 20px; }
.instructions-box li { margin: 4px 0; font-size: 14px; }
.instructions-box p { margin: 6px 0; font-size: 14px; }

.btn-conclude {
  display: block;
  margin: 20px;
  padding: 16px;
  background: var(--orange-400);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 15px;
  border-radius: 14px;
  width: calc(100% - 40px);
  box-shadow: 0 6px 18px -4px rgba(245, 160, 92, .5);
  transition: transform .15s;
  text-align: center;
}
.btn-conclude:active { transform: scale(.98); }
.btn-conclude.is-done { background: var(--green-ok); color: #fff; }

/* ============ TABBAR ============ */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 10px 10px calc(10px + var(--safe-bottom));
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  box-shadow: 0 -12px 34px rgba(43,43,43,.10);
  border-top: 1px solid rgba(199,62,114,.12);
}
.tabbar.tabs-3 { grid-template-columns: repeat(3, 1fr); }
.tabbar.tabs-4 { grid-template-columns: repeat(4, 1fr); }
.tabbar.tabs-5 { grid-template-columns: repeat(5, 1fr); }
.tab {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  padding: 8px 4px;
  border-radius: 18px;
  color: rgba(43,43,43,.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  min-width: 0;
  transition: color .2s, transform .15s, background .2s, box-shadow .2s;
}
.tab svg { width: 22px; height: 22px; flex-shrink: 0; }
.tab span {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tab.is-active {
  color: var(--orange-500);
  background: rgba(232,93,143,.12);
  background: color-mix(in srgb, var(--orange-400) 18%, white);
  box-shadow: inset 0 0 0 1px rgba(199,62,114,.12);
  font-weight: 800;
  transform: translateY(-2px);
}

/* ============ FEED ============ */
.feed-list { padding: 16px 16px 24px; }
.feed-item {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
}
.feed-item-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.feed-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--orange-400); color: var(--ink-900);
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.feed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.feed-author { font-weight: 700; font-size: 14px; }
.feed-date { font-size: 11px; color: var(--ink-500); }
.feed-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.feed-content {
  font-size: 14px; line-height: 1.6;
  color: var(--ink-700);
  margin-bottom: 12px;
  white-space: pre-wrap;
}
.feed-image { width: 100%; border-radius: 12px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-500); }

/* ============ COMUNIDADE ============ */
.comunidade-wrap {
  min-height: calc(100dvh - var(--topbar-h) - var(--safe-top) - var(--tabbar-h) - var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 18px;
}
.comunidade-card {
  background: #000;
  border-radius: 22px;
  padding: 36px 24px 32px;
  text-align: center;
  color: #fff;
  background-image: radial-gradient(circle at top right, rgba(248,180,200,.35), transparent 60%);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.3);
}
.comunidade-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  background: rgba(248,180,200,.18);
  border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--orange-400);
}
.comunidade-card h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 1.5px;
  color: var(--orange-400);
  margin-bottom: 14px;
}
.comunidade-card p {
  font-size: 14px;
  line-height: 1.6;
  opacity: .9;
  margin-bottom: 24px;
  color: #fff;
}
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s;
}
.btn-whatsapp:active { transform: scale(.97); }

/* ============ PERFIL ============ */
.perfil-card {
  background: #000;
  color: #fff;
  margin: 18px;
  border-radius: 20px;
  padding: 26px 20px;
  text-align: center;
}
.perfil-avatar {
  width: 90px; height: 90px;
  background: var(--orange-400);
  border-radius: 50%;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  font-size: 32px; font-weight: 800;
  color: var(--ink-900);
  position: relative;
  overflow: hidden;
}
.perfil-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.perfil-nome { font-size: 20px; font-weight: 700; }
.perfil-email { font-size: 12px; opacity: .7; margin-top: 4px; }

.perfil-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 18px;
  margin-bottom: 18px;
}
.perfil-stat {
  background: #fff;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.perfil-stat-value { font-size: 26px; font-weight: 800; color: var(--orange-500); }
.perfil-stat-label {
  font-size: 11px; color: var(--ink-500); margin-top: 2px;
  text-transform: uppercase; letter-spacing: 1px;
}

.perfil-menu { padding: 0 18px; }
.perfil-menu-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
  font-weight: 500; font-size: 14px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.perfil-menu-item.danger { color: var(--red-warn); }

.perfil-faq {
  padding: 8px 18px 28px;
}
.perfil-faq-head {
  margin: 8px 0 12px;
}
.perfil-faq-head span {
  color: var(--orange-500);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.perfil-faq-head h2 {
  font-size: 20px;
  margin-top: 2px;
}
.faq-list { display: grid; gap: 10px; }
.faq-item {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid rgba(199,62,114,.08);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 46px 16px 16px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-900);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(232,93,143,.12);
  color: var(--orange-500);
  font-weight: 900;
}
.faq-item[open] summary::after { content: '-'; }
.faq-item div {
  padding: 0 16px 16px;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.6;
}
.faq-modal-overlay {
  padding: 18px;
  align-items: center;
}
.faq-modal-card {
  max-width: 430px;
  max-height: min(78dvh, 680px);
  overflow: auto;
  text-align: left;
  padding: 24px 18px 18px;
  position: relative;
}
.faq-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(232,93,143,.12);
  color: var(--orange-500);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
}
.faq-modal-head {
  padding-right: 40px;
  margin-bottom: 14px;
}
.faq-modal-head span {
  color: var(--orange-500);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.faq-modal-head h2 {
  font-size: 22px;
  line-height: 1.1;
  margin-top: 3px;
}

/* ============ PERFIL EDITAR ============ */
.perfil-edit-wrap { padding: 16px 18px 30px; }
.perfil-edit-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.back-btn {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: var(--card-shadow);
}
.perfil-edit-header h1 { font-size: 22px; font-weight: 700; }

.avatar-uploader {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 24px;
}
.avatar-uploader-pic {
  position: relative;
  width: 110px; height: 110px;
  background: var(--orange-400);
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
  font-size: 40px; font-weight: 800;
  color: var(--ink-900);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: var(--card-shadow);
}
.avatar-uploader-pic img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.avatar-uploader-edit {
  position: absolute;
  bottom: 0; right: 0;
  background: var(--ink-900);
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid #fff;
}
.avatar-uploader-pic input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0;
  cursor: pointer;
}
.avatar-uploader small {
  margin-top: 10px;
  color: var(--ink-500);
  font-size: 12px;
}
.perfil-edit-form { background: #fff; border-radius: 16px; padding: 18px; box-shadow: var(--card-shadow); }
.perfil-edit-form .field { margin-bottom: 14px; }

/* ============ MODAL (parabenização e bloqueado) ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal-card {
  background: #fff;
  border-radius: 22px;
  padding: 30px 24px 24px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: popIn .3s cubic-bezier(.34, 1.56, .64, 1);
}
.modal-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.modal-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--ink-900);
}
.modal-card p {
  font-size: 15px;
  color: var(--ink-700);
  line-height: 1.5;
  margin-bottom: 22px;
  white-space: pre-wrap;
}
.modal-btn {
  background: var(--orange-400);
  color: var(--ink-900);
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 12px;
  font-size: 15px;
  width: 100%;
  box-shadow: 0 4px 14px rgba(245, 160, 92, .4);
  transition: transform .15s;
}
.modal-btn:active { transform: scale(.97); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: scale(.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ============ AULA CARD SEM CAPA ============ */
/* Quando a aula não tem imagem_capa, o card vira só texto sem a coluna da imagem */
.aula-card.no-cover {
  grid-template-columns: 1fr;
}
.aula-card.no-cover .aula-card-info {
  padding: 18px 16px;
}

/* ============ TOAST ============ */
.toast-welcome {
  position: fixed;
  top: calc(var(--topbar-h) + var(--safe-top) + 12px);
  left: 14px; right: 14px;
  background: var(--green-ok);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 500; font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  display: flex; align-items: center; gap: 10px;
  z-index: 80;
  animation: slideDown .4s ease, fadeOut .4s ease 3s forwards;
}
@keyframes slideDown { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-30px); } }

/* ============ DETOX CARNIVORO REDESIGN ============ */
:root {
  --topbar-h: 72px;
  --tabbar-h: 94px;
}
.login-body {
  background:
    linear-gradient(180deg, #fffdfc 0%, #fff5f3 48%, #fff 100%);
}
.login-blob,
.login-blob-2 {
  display: none;
}
.login-logo-wrap {
  width: 100%;
  margin: 36px 0 30px;
}
.login-logo-wrap img {
  width: min(280px, 86vw);
  max-width: none;
  border-radius: 24px;
  box-shadow: 0 20px 48px -30px rgba(159, 23, 18, .55);
}
.login-card {
  border-radius: 30px;
  border-color: rgba(216, 52, 42, .10);
  box-shadow: 0 28px 70px -42px rgba(159, 23, 18, .55);
}
.field-input {
  border-radius: 18px;
  background: #fff8f6;
  border-color: rgba(216, 52, 42, .12);
}
.btn-primary,
.btn-orange,
.modal-btn,
.btn-conclude {
  border-radius: 999px;
}
.btn-orange,
.btn-conclude,
.modal-btn,
.continue-action {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600)) !important;
  color: #fff !important;
  box-shadow: 0 16px 34px -22px rgba(159, 23, 18, .75) !important;
}
.topbar {
  height: calc(72px + var(--safe-top));
  padding: var(--safe-top) 18px 0;
  background: rgba(255, 253, 252, .9);
  border-bottom: 1px solid rgba(216, 52, 42, .08);
}
.topbar-logo {
  max-width: 72%;
}
.topbar-logo img {
  height: 40px;
  border-radius: 14px;
}
.icon-btn,
.progress-ring,
.back-btn,
.faq-modal-close {
  border-radius: 18px;
  background: #fff5f3;
  color: var(--orange-600);
  box-shadow: inset 0 0 0 1px rgba(216, 52, 42, .08);
}
.banner-carousel {
  margin: 18px 18px 0;
  border-radius: 30px;
  background: #fff5f3;
  box-shadow: var(--card-shadow);
}
.banner-slide {
  background: #fff5f3;
}
.banner-dot {
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, .72);
}
.banner-dot.active {
  width: 28px;
  background: #fff;
}
.section {
  padding: 26px 18px 8px;
}
.section-title {
  font-size: 21px;
  font-weight: 900;
}
.continue-card,
.modulo-card,
.upsell-card,
.aula-card,
.feed-item,
.perfil-card,
.perfil-stat,
.perfil-menu-item,
.faq-item,
.perfil-edit-form,
.instructions-box,
.modal-card,
.comunidade-card {
  border-radius: 28px;
}
.continue-card,
.modulo-card,
.aula-card,
.feed-item,
.perfil-stat,
.perfil-menu-item,
.faq-item,
.perfil-edit-form,
.instructions-box {
  border: 1px solid rgba(216, 52, 42, .08);
}
.continue-cover,
.modulo-card.full-img .modulo-card-img,
.feed-image {
  border-radius: 24px;
}
.modulo-card {
  padding: 8px;
}
.modulo-card-img {
  border-radius: 22px;
  overflow: hidden;
}
.modulo-card-info {
  padding: 13px 10px 8px;
}
.modulo-card-info small,
.aula-card-day,
.continue-info span,
.perfil-faq-head span,
.faq-modal-head span {
  color: var(--orange-600);
}
.modulo-card-info strong {
  font-size: 16px;
  line-height: 1.18;
}
.modulo-card.locked {
  background: #fff7f5;
}
.modulo-card.locked::before {
  border-radius: 28px;
  background: rgba(68, 12, 10, .48);
}
.modulo-card.locked::after {
  content: '';
  width: 46px;
  height: 46px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 0 0 8px rgba(216, 52, 42, .16);
}
.lock-info {
  bottom: 22px;
  display: inline-grid;
  place-items: center;
  width: max-content;
  max-width: calc(100% - 28px);
  margin: 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--orange-600);
  font-weight: 900;
  text-shadow: none;
}
.modulo-header,
.perfil-card,
.comunidade-card {
  background: linear-gradient(145deg, var(--orange-600) 0%, #2b0705 100%);
}
.modulo-header h1,
.comunidade-card h2 {
  color: #fff;
}
.modulo-header::before {
  display: none;
}
.aula-card {
  grid-template-columns: 108px 1fr;
  padding: 8px;
}
.aula-card-img {
  min-height: 108px;
  border-radius: 22px;
}
.aula-card-status,
.feed-avatar,
.perfil-avatar,
.avatar-uploader-pic,
.comunidade-icon {
  border-radius: 24px;
  background: #fff5f3;
  color: var(--orange-600);
}
.tabbar {
  margin: 0 12px calc(10px + var(--safe-bottom));
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  border: 1px solid rgba(216, 52, 42, .10);
  border-radius: 28px;
  padding: 8px;
  background: rgba(255, 253, 252, .94);
  box-shadow: 0 18px 46px -28px rgba(159, 23, 18, .6);
}
.tab {
  border-radius: 22px;
  min-height: 58px;
}
.tab svg {
  width: 24px;
  height: 24px;
}
.tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  box-shadow: 0 14px 28px -22px rgba(159, 23, 18, .8);
}
.main-content {
  padding-bottom: calc(104px + var(--safe-bottom));
}

/* ============ DESKTOP ============ */
@media (min-width: 720px) {
  body { background: #1a1a1a; }
  .main-content {
    max-width: 460px;
    margin: 0 auto;
    background: var(--bg);
    min-height: 100dvh;
  }
  .topbar {
    max-width: 460px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 100%;
  }
  .tabbar {
    max-width: 460px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 436px;
    max-width: calc(100% - 24px);
    margin-left: 0;
    margin-right: 0;
  }
}
