@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.cdnfonts.com/css/yearling-spirit');

@font-face {
  font-family: 'Relationship of Melodrame';
  src: url('Relationship of mélodrame.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

:root {
  --primary: #FF8C00;
  --primary-dark: #E07800;
  --primary-light: #FFF3E0;
  --accent: #FF6584;
  --bg: #F4F5FA;
  --sidebar-bg: #006400;
  --sidebar-hover: rgba(255,255,255,.12);
  --sidebar-active: #FFA500;
  --sidebar-text: #ffffff;
  --white: #FFFFFF;
  --text-1: #111827;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --border: #E5E7EB;
  --success: #10B981;
  --warning: #F59E0B;
  --card-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --card-shadow-hover: 0 4px 8px rgba(0,0,0,.08), 0 12px 32px rgba(108,99,255,.15);
  --radius: 14px;
  --radius-sm: 8px;
  --sidebar-width: 240px;
}

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

/* ───── SPLASH SCREEN ───── */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #FFA500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease;
}

.splash-screen.splash-fade {
  opacity: 0;
  pointer-events: none;
}

.splash-logo-wrap {
  animation: splashSpin 1.1s linear infinite;
}

.splash-logo-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  display: block;
}

@keyframes splashSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ───── LOGIN ───── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16123A 0%, #2a2560 50%, #1a1645 100%);
  padding: 20px;
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.logo-img-login {
  width: 120px;
  height: auto;
  margin-bottom: 4px;
  object-fit: contain;
}

.login-logo h1 {
  font-family: 'Yearling Spirit', cursive;
  font-size: 75px;
  font-weight: 400;
  color: var(--text-1);
  margin-bottom: 6px;
  line-height: 1;
}

.login-logo p {
  font-size: 14px;
  color: var(--text-2);
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 6px;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  color: var(--text-1);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  background: #FAFAFA;
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,.12);
  background: white;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  margin-top: 8px;
}

.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.error-msg {
  color: #EF4444;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 4px;
}

.login-toggle {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.login-toggle a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.login-toggle a:hover { text-decoration: underline; }

/* ── Esqueci minha senha ── */
.forgot-wrap {
  text-align: center;
  margin-top: 14px;
}

.forgot-link {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color .2s;
}

.forgot-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ── Modal genérico ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  animation: fadeIn .18s ease;
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  position: relative;
  animation: slideUp .22s ease;
}

@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0 }
  to   { transform: translateY(0);    opacity: 1 }
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-2);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--text-1);
}

.modal-icon {
  font-size: 36px;
  text-align: center;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  text-align: center;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-2);
  text-align: center;
  line-height: 1.55;
  margin-bottom: 24px;
}

.success-msg {
  color: var(--success);
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 4px;
  font-weight: 500;
}

.btn-loading {
  opacity: .7;
  pointer-events: none;
}

/* ───── DASHBOARD LAYOUT ───── */
.dashboard-page {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-logo {
  padding: 28px 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.logo-img-sidebar { display: none; }

.sidebar-logo span {
  font-family: 'Yearling Spirit', cursive;
  font-size: 60px;
  font-weight: 400;
  color: #ffffff;
  line-height: 0.85;
  letter-spacing: 1px;
  display: block;
  text-align: center;
  overflow: visible;
  white-space: nowrap;
}

.sidebar-tagline {
  font-family: 'Relationship of Melodrame', serif;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  margin-top: 6px;
  line-height: 1.45;
  padding: 0 10px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(165,180,252,.4);
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
}

.nav-icon {
  font-style: normal;
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-user-card {
  margin: 8px 12px 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.logout-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: color .15s;
  display: block;
}

.logout-link:hover { color: var(--accent); }

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-2);
}

.topbar-greeting {
  font-size: 14px;
  color: var(--text-2);
}

.topbar-greeting strong {
  color: var(--text-1);
}

.page-content {
  padding: 28px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto; /* centraliza o conteúdo em telas largas */
}

/* PAGES */
.page { display: none; }
.page.active { display: block; }

.page-header {
  margin-bottom: 28px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}

.page-header p {
  font-size: 14px;
  color: var(--text-2);
}

/* ───── HOME ───── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--card-shadow);
  border: 1px solid transparent;
  transition: box-shadow .2s, transform .2s;
}

.stat-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card.highlight .stat-number { color: white; }

.stat-label {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}

.stat-card.highlight .stat-label { color: rgba(255,255,255,.8); }

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 14px;
}

.recent-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  border: 1.5px solid transparent;
}

.recent-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
  border-color: var(--primary-light);
}

.recent-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 13px;
}

.video-icon { background: var(--primary-light); color: var(--primary); }
.pdf-icon { background: #FEF3C7; color: #D97706; }
.audio-icon { background: #F0FDF4; color: var(--success); }
.diario-icon { background: #F5F3FF; color: #7C3AED; font-size: 20px; }

/* ── MURAL DE VITÓRIAS ─────────────────────────────────────────────────── */
.mural-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1.5px solid var(--border);
}

.mural-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mural-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: -8px;
  margin-bottom: 16px;
}

.mural-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.mural-card {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF9C3 100%);
  border: 1.5px solid #FDE68A;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(251,191,36,.15);
  transition: transform .2s, box-shadow .2s;
}

.mural-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(251,191,36,.25);
}

.mural-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mural-estrela {
  font-size: 18px;
  line-height: 1;
}

.mural-data {
  font-size: 11px;
  font-weight: 600;
  color: #92400E;
  background: #FEF3C7;
  border-radius: 20px;
  padding: 2px 8px;
}

.mural-texto {
  font-size: 14px;
  color: #78350F;
  line-height: 1.5;
  margin: 0;
  word-break: break-word;
}

.recent-info { flex: 1; min-width: 0; }
.recent-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; font-weight: 600; letter-spacing: .05em; margin-bottom: 3px; }
.recent-name { font-size: 14px; font-weight: 500; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───── BADGES ───── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.badge.new { background: #DCFCE7; color: #16A34A; }
.badge.em-breve { background: #FEF3C7; color: #D97706; }

/* ───── AULAS ───── */
.module-section { margin-bottom: 36px; }

.module-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.video-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}

.video-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.video-card.locked { opacity: .6; cursor: not-allowed; }
.video-card.locked:hover { transform: none; }

.video-thumb {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.play-btn {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: transform .15s, background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
}

.video-card:hover .play-btn {
  transform: scale(1.1);
  background: white;
}

.duration {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0,0,0,.7);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-new-video {
  position: absolute;
  top: 8px;
  left: 10px;
  background: var(--success);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.video-info { padding: 14px 16px; }
.video-title { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.video-meta { font-size: 12px; color: var(--text-3); }

/* ───── PDFs ───── */
.pdf-list { display: flex; flex-direction: column; gap: 12px; }

.pdf-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--card-shadow);
  transition: box-shadow .2s, transform .2s;
  border: 1.5px solid transparent;
}

.pdf-item:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
  border-color: #FEF3C7;
}

.pdf-icon-box {
  width: 48px;
  height: 56px;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  letter-spacing: .05em;
}

.pdf-details { flex: 1; min-width: 0; }
.pdf-name { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.pdf-meta { font-size: 12px; color: var(--text-3); }

.pdf-actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn-outline {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  background: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.btn-download {
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}

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

/* ───── ÁUDIOS ───── */
.audio-list { display: flex; flex-direction: column; gap: 14px; }

.audio-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--card-shadow);
  transition: box-shadow .2s, transform .2s;
  border: 1.5px solid transparent;
}

.audio-item:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
  border-color: #F0FDF4;
}

.audio-num {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.audio-details { flex: 1; min-width: 0; }
.audio-title { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.audio-meta { font-size: 12px; color: var(--text-3); }

.audio-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.play-audio-btn {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--success), #059669);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: white;
  transition: transform .15s, opacity .15s;
}

.play-audio-btn:hover { transform: scale(1.1); opacity: .9; }

.audio-duration {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  min-width: 38px;
  text-align: right;
}

/* ───── MOBILE ───── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 90;
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.active { display: block; }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 16px; }
  .pdf-actions { flex-direction: column; }
  .audio-controls { gap: 8px; }
  .topbar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 32px 24px; }
  .video-grid { grid-template-columns: 1fr; }
}

/* ───── PERFIL ───── */
.perfil-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.perfil-avatar-section {
  display: flex;
  align-items: center;
  gap: 18px;
}

.perfil-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  cursor: pointer;
}

.perfil-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: white;
  overflow: hidden;
}

.perfil-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.perfil-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  transition: opacity .2s;
}

.perfil-avatar-wrap:hover .perfil-avatar-overlay {
  opacity: 1;
}

.btn-trocar-foto {
  margin-top: 8px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.btn-trocar-foto:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.perfil-avatar-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 3px;
}

.perfil-avatar-email {
  font-size: 13px;
  color: var(--text-2);
}

.perfil-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--card-shadow);
}

.perfil-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.perfil-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.perfil-field.full {
  grid-column: 1 / -1;
}

.perfil-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
}

.perfil-field input,
.perfil-field select,
.perfil-field textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-1);
  background: #FAFAFA;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  resize: none;
}

.perfil-field input:focus,
.perfil-field select:focus,
.perfil-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,.1);
  background: white;
}

.perfil-field textarea {
  line-height: 1.6;
}

.char-count {
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
}

.perfil-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-salvar {
  width: auto;
  padding: 12px 32px;
  font-size: 14px;
}

@media (max-width: 600px) {
  .perfil-grid { grid-template-columns: 1fr; }
  .perfil-field.full { grid-column: 1; }
  .perfil-form { padding: 20px 16px; }
  .perfil-card { padding: 18px; }
}

/* ───── TOAST ───── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-1);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  transform: translateY(80px);
  opacity: 0;
  transition: transform .3s, opacity .3s;
  z-index: 1000;
  max-width: 300px;
}

.toast.show { transform: translateY(0); opacity: 1; }

/* ───── VISUALIZADOR ───── */
.viewer-card {
  background: var(--white);
  border-radius: 16px;
  width: 90vw;
  max-width: 960px;
  height: 82vh;
  max-height: 720px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  animation: slideUp .22s ease;
}

.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}

.viewer-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.viewer-frame-wrap {
  flex: 1;
  overflow: hidden;
  background: #000;
}

.viewer-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 600px) {
  .viewer-card { width: 100vw; height: 70vh; border-radius: 12px 12px 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
}

/* ───── ADMIN ───── */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.admin-tab {
  padding: 11px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}

.admin-tab:hover { color: var(--primary); }

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.admin-tab-content { }
.admin-tab-content.hidden { display: none !important; }

.admin-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

/* Tabela de alunos */
.admin-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 560px;
}

.admin-table th {
  background: var(--bg);
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafbff; }

.admin-count {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
}

/* Lista de conteúdo admin */
.admin-content-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-content-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--card-shadow);
  border: 1.5px solid transparent;
  transition: border-color .15s;
}

.admin-content-item:hover { border-color: var(--primary-light); }

.admin-content-info { flex: 1; min-width: 0; }

.admin-content-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-content-meta { font-size: 12px; color: var(--text-3); }

.admin-content-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ───── UTILITÁRIOS ───── */
.btn-primary.btn-sm {
  width: auto;
  padding: 9px 20px;
  font-size: 13px;
}

.btn-sm {
  padding: 7px 13px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.btn-outline.btn-sm {
  border: 1.5px solid var(--border);
  background: none;
  color: var(--text-2);
  transition: border-color .15s, color .15s, background .15s;
}

.btn-outline.btn-sm:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  border: none;
  color: white;
  transition: opacity .15s;
}

.btn-danger:hover { opacity: .85; }

/* Status do aluno */
.aluno-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.aluno-status--ok        { background: rgba(16,185,129,.12); color: #059669; }
.aluno-status--bloqueado { background: rgba(239,68,68,.12);  color: #DC2626; }
.aluno-status--vencido   { background: rgba(239,68,68,.10);  color: #B91C1C; }
.aluno-status--pendente  { background: rgba(245,158,11,.12); color: #D97706; }
.aluno-status--aguardando{ background: rgba(99,102,241,.12); color: #4F46E5; }

/* Botões de bloquear/liberar */
.btn-access {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
  white-space: nowrap;
}
.btn-access:hover { opacity: .82; }
.btn-bloquear { background: rgba(239,68,68,.12);  color: #DC2626; }
.btn-liberar  { background: rgba(16,185,129,.12); color: #059669; }
.btn-deletar  { background: rgba(107,114,128,.12); color: #4B5563; }
.btn-deletar:hover { background: rgba(239,68,68,.15); color: #DC2626; }
.td-acoes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ─── Whitelist de e-mails autorizados ───────────────────────────────────── */
.whitelist-info-box {
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.5;
}
.whitelist-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.whitelist-email-input,
.whitelist-nota-input {
  flex: 1;
  min-width: 200px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  background: var(--white);
  transition: border-color .2s;
}
.whitelist-email-input:focus,
.whitelist-nota-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ─── Chat IA Flutuante ─────────────────────────────────────────────────── */
/* ── CHAT INSIGHTS (admin) ── */
.insights-stats {
  display: flex;
  gap: 20px;
  padding: 10px 0 16px;
  font-size: 14px;
  color: var(--text-2);
}
.insights-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-2);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.insight-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.insight-card--aprovada {
  border-color: #22c55e;
  background: #f0fdf4;
}
.insight-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.insight-email { font-weight: 500; }
.insight-pergunta { font-size: 13.5px; margin-bottom: 6px; }
.insight-resposta {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 4px;
  max-height: 72px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: max-height .3s ease;
}
.insight-resposta.expanded {
  max-height: 1000px;
  display: block;
}
.btn-ver-mais {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 10px;
}
.btn-ver-mais:hover { text-decoration: underline; }
.insight-acoes { display: flex; gap: 8px; flex-wrap: wrap; }

.chat-ia-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.chat-ia-container.hidden { display: none; }

.chat-ia-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sidebar-bg);
  border: none;
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(0,100,0,.35);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-ia-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(0,100,0,.5); }

.chat-ia-panel {
  width: 340px;
  max-height: 500px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatSlideUp .2s ease;
}
.chat-ia-panel.hidden { display: none; }

@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-ia-header {
  background: var(--sidebar-bg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  flex-shrink: 0;
}
.chat-ia-header-info { display: flex; align-items: center; gap: 10px; }
.chat-ia-avatar { font-size: 22px; }
.chat-ia-header strong { display: block; font-size: 13.5px; }
.chat-ia-header span   { font-size: 11px; opacity: .85; }
.chat-ia-close {
  background: none; border: none; color: #fff;
  cursor: pointer; font-size: 16px; opacity: .8; line-height: 1;
}
.chat-ia-close:hover { opacity: 1; }

.chat-ia-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.chat-msg { max-width: 86%; }
.chat-msg p { margin: 0; font-size: 13.5px; line-height: 1.55; }

.chat-msg--bot {
  align-self: flex-start;
  background: var(--primary-light);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  color: var(--text-1);
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--primary);
  border-radius: 12px 12px 4px 12px;
  padding: 10px 14px;
  color: #fff;
}
.chat-msg--loading { background: var(--primary-light); border-radius: 12px 12px 12px 4px; padding: 12px 14px; }
.chat-dots { display: flex; gap: 5px; align-items: center; }
.chat-dots span {
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
  animation: chatDot 1.2s infinite;
}
.chat-dots span:nth-child(2) { animation-delay: .2s; }
.chat-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes chatDot {
  0%, 80%, 100% { opacity: .25; transform: scale(.75); }
  40%           { opacity: 1;   transform: scale(1); }
}

.chat-ia-input-area {
  display: flex;
  padding: 10px 12px;
  gap: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-ia-input-area input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.chat-ia-input-area input:focus { border-color: var(--primary); }
.chat-ia-send {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}
.chat-ia-send:hover { background: var(--primary-dark); }

@media (max-width: 480px) {
  .chat-ia-container { bottom: 16px; right: 16px; }
  .chat-ia-panel { width: calc(100vw - 32px); }
}

.loading-msg {
  color: var(--text-3);
  font-size: 14px;
  padding: 24px 0;
  text-align: center;
}

.empty-state {
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px 28px;
  text-align: center;
  color: var(--text-2);
  font-size: 15px;
  box-shadow: var(--card-shadow);
}

.campo-obrigatorio {
  color: #EF4444;
  font-weight: 700;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Label de seção admin na sidebar */
.nav-admin-label { margin-top: 10px; }

@media (max-width: 768px) {
  .admin-content-item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .admin-content-actions { width: 100%; justify-content: flex-end; }
}

/* ───── OVERLAY DE ACESSO BLOQUEADO ───── */
.access-blocked-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.access-blocked-overlay.hidden { display: none !important; }

.access-blocked-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}

.access-blocked-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 20px;
}

.access-blocked-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 14px;
}

.access-blocked-msg {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 20px;
}

.access-blocked-email {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  background: var(--primary-light);
  padding: 10px 20px;
  border-radius: 8px;
  margin-bottom: 28px;
  word-break: break-all;
  transition: opacity .15s;
}

.access-blocked-email:hover { opacity: .8; }

.access-blocked-logout {
  display: block;
  width: 100%;
  font-size: 14px;
}

@media (max-width: 480px) {
  .access-blocked-card { padding: 36px 24px; }
}

/* ───── HOME — banner cadastro incompleto ───── */
.profile-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #FFF8E1;
  border: 1.5px solid #FFB300;
  border-left: 5px solid #FFB300;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.profile-banner.hidden { display: none !important; }

.profile-banner--urgent {
  background: #FFF0F0;
  border-color: #EF4444;
  border-left-color: #EF4444;
}

.profile-banner-body {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.profile-banner-icon {
  font-size: 26px;
  flex-shrink: 0;
  line-height: 1;
}

.profile-banner-info {
  min-width: 0;
}

.profile-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 3px;
}

.profile-banner-sub {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
}

.profile-banner--urgent .profile-banner-title { color: #B91C1C; }

.profile-banner-btn {
  flex-shrink: 0;
  background: #FFB300;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s, transform .15s;
}

.profile-banner-btn:hover { opacity: .9; transform: translateY(-1px); }
.profile-banner--urgent .profile-banner-btn { background: #EF4444; }

@media (max-width: 600px) {
  .profile-banner { flex-direction: column; align-items: flex-start; }
  .profile-banner-btn { width: 100%; text-align: center; }
}

/* ───── HOME — banner jornada ───── */
.home-journey-banner {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.home-journey-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 16px 28px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16,185,129,.30);
  transition: opacity .15s, transform .15s;
}

.home-journey-btn:hover {
  opacity: .92;
  transform: translateY(-2px);
}

/* ───── QUIZ — abas ───── */
.quiz-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
}

.quiz-tab {
  padding: 11px 22px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.quiz-tab:hover { color: var(--primary); }
.quiz-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.quiz-tab-content.hidden { display: none !important; }

/* ───── QUIZ — landing card ───── */
.quiz-landing-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--card-shadow);
  max-width: 620px;
  text-align: center;
}

.quiz-landing-icon {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 18px;
}

.quiz-landing-titulo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 14px;
}

.quiz-landing-intro {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 20px;
}

.quiz-landing-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.quiz-landing-pill {
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
}

.quiz-landing-note {
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  padding: 13px 16px;
  margin-bottom: 24px;
  text-align: left;
}

.quiz-landing-note--warning {
  background: rgba(245,158,11,.10);
  color: #92400E;
  border: 1px solid rgba(245,158,11,.25);
}

.quiz-landing-note--admin {
  background: rgba(139,92,246,.08);
  color: var(--primary);
  border: 1px solid rgba(139,92,246,.2);
}

.quiz-start-btn {
  padding: 14px 40px;
  font-size: 16px;
  border-radius: 10px;
}

/* ───── QUIZ — fluxo pergunta a pergunta ───── */
.quiz-flow {
  max-width: 680px;
}
.quiz-flow.hidden { display: none !important; }

/* Barra de progresso */
.quiz-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.quiz-progress-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width .35s ease;
}

.quiz-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
}

/* Card de pergunta única */
.quiz-single-question {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

.quiz-question-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.5;
  margin-bottom: 20px;
}

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

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 10px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}

.quiz-option:hover {
  border-color: var(--primary);
  background: rgba(139,92,246,.04);
  transform: translateX(2px);
}

.quiz-option.selected {
  border-color: var(--primary);
  background: rgba(139,92,246,.08);
}

.quiz-option input[type=radio] { display: none; }

.quiz-option-letra {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--bg-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  transition: background .15s, color .15s;
}

.quiz-option.selected .quiz-option-letra {
  background: var(--primary);
  color: #fff;
}

.quiz-option-texto {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.5;
  padding-top: 5px;
}

.quiz-no-answer-hint {
  font-size: 13px;
  color: #EF4444;
  margin-top: 12px;
  text-align: center;
}
.quiz-no-answer-hint.hidden { display: none !important; }

/* Navegação prev / next */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

.quiz-prev-btn { min-width: 120px; }
.quiz-next-btn { min-width: 180px; }

/* ───── QUIZ — card de resultado ───── */
.quiz-result-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--card-shadow);
  max-width: 720px;
  text-align: center;
}
.quiz-result-card.hidden { display: none !important; }

.quiz-result-saved-badge {
  display: inline-block;
  background: rgba(16,185,129,.12);
  color: #059669;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.quiz-result-admin-badge {
  background: rgba(139,92,246,.12);
  color: var(--primary);
}

.quiz-result-emoji {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
}

.quiz-result-titulo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 16px;
}

.quiz-result-counts {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.quiz-count-badge {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.quiz-count-A { background: rgba(139,92,246,.12); color: var(--primary); }
.quiz-count-B { background: rgba(245,158,11,.12);  color: #D97706; }
.quiz-count-C { background: rgba(16,185,129,.12);  color: #059669; }

.quiz-result-texto {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  text-align: left;
  margin-bottom: 20px;
}
.quiz-result-texto p { margin-bottom: 14px; }
.quiz-result-texto p:last-child { margin-bottom: 0; }

.quiz-result-rodape {
  font-size: 14px;
  color: var(--text-3);
  font-style: italic;
  line-height: 1.6;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.quiz-result-data {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.quiz-refazer-btn {
  margin-top: 24px;
  padding: 10px 28px;
}

@media (max-width: 600px) {
  .quiz-landing-card { padding: 28px 20px; }
  .quiz-single-question { padding: 20px 16px; }
  .quiz-result-card { padding: 24px 18px; }
  .quiz-question-text { font-size: 15px; }
  .quiz-option { padding: 11px 12px; }
  .quiz-nav { flex-direction: column-reverse; }
  .quiz-prev-btn, .quiz-next-btn { width: 100%; min-width: unset; }
}

/* ───── MEU DIÁRIO ───── */
#page-diario { padding: 0; }

/* Resumo do topo */
.diario-resumo {
  display: flex;
  gap: 12px;
  padding: 24px 32px 0;
  flex-wrap: wrap;
}

.diario-resumo-stat {
  flex: 1;
  min-width: 90px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.diario-resumo-num {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.1;
}

.diario-resumo-label {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 500;
}

/* Lista de cards */
.diario-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 32px 40px;
}

/* Card individual do dia */
.diario-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow .2s;
}

.diario-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.diario-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}

.diario-card-header:hover { background: #fafafa; }

/* Info lado esquerdo */
.diario-card-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.diario-dia-num {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 8px;
  padding: 4px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.diario-dia-semana {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.diario-dia-data {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}

/* Lado direito do header */
.diario-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Badges de status */
.diario-badge-hoje {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

.diario-badge-ok {
  background: #d1fae5;
  color: #065f46;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

.diario-badge-vazio {
  background: var(--bg);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  border: 1px dashed var(--border);
}

.diario-chevron {
  font-size: 16px;
  color: var(--text-3);
  transition: transform .25s;
  flex-shrink: 0;
}

.diario-card.open .diario-chevron {
  transform: rotate(90deg);
}

/* Corpo do card */
.diario-card-body {
  display: none;
  padding: 0 20px 22px;
  border-top: 1px solid var(--border);
}

.diario-card.open .diario-card-body { display: block; }

/* Formulário */
.diario-form { padding-top: 4px; }

.diario-field { margin-top: 18px; }

.diario-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}

/* Seletor de humor */
.diario-humor-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.diario-humor-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  font-size: 11px;
  color: var(--text-2);
  font-weight: 500;
  min-width: 68px;
}

.diario-humor-btn:hover {
  background: var(--primary-light);
  border-color: #FFD0A0;
}

.diario-humor-btn.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: scale(1.05);
}

.diario-humor-btn span {
  font-size: 26px;
  line-height: 1;
}

/* Textareas */
.diario-textarea {
  width: 100%;
  min-height: 68px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
  line-height: 1.5;
}

.diario-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,140,0,.12);
}

.diario-textarea::placeholder { color: var(--text-3); }

/* Protocolos */
.diario-protocolos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diario-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.diario-check-label:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.diario-check-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* Ações */
.diario-acoes {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.diario-salvo-msg {
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
}

.diario-salvo-msg.hidden { display: none; }

/* Cards futuros travados */
.diario-card--locked {
  opacity: 0.55;
  pointer-events: none;
}

.diario-card--locked .diario-card-header {
  cursor: default;
}

.diario-badge-locked {
  background: var(--bg);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  border: 1px dashed var(--border);
}

/* Responsivo */
@media (max-width: 600px) {
  .diario-resumo     { padding: 16px 16px 0; gap: 8px; }
  .diario-lista      { padding: 14px 16px 32px; }
  .diario-humor-btns { gap: 6px; }
  .diario-humor-btn  { min-width: 56px; padding: 8px 8px; }
  .diario-humor-btn span { font-size: 22px; }
  .diario-card-header { padding: 12px 14px; }
  .diario-card-body   { padding: 0 14px 18px; }
}

/* ───── DESAFIO CONTINUAR ───── */
.nav-oculto-tag {
  margin-left: auto;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255,255,255,.18);
  color: rgba(255,255,255,.85);
}

.desafio-icon { background: var(--primary-light); color: var(--primary-dark); font-size: 20px; }

/* Banner na home */
.home-desafio-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 24px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--sidebar-bg), #0B7A0B);
  color: white;
  box-shadow: var(--card-shadow);
}
.home-desafio-titulo { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.home-desafio-sub    { font-size: 14px; color: rgba(255,255,255,.85); }
.home-desafio-btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  background: var(--primary);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.home-desafio-btn:hover { background: var(--primary-dark); }

/* Topo */
.desafio-hero {
  padding: 28px 28px 24px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--sidebar-bg), #0B7A0B);
  color: white;
}
.desafio-hero-kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #FFD08A;
  margin-bottom: 6px;
}
.desafio-hero h2 { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.desafio-hero-frase { font-size: 15px; color: rgba(255,255,255,.85); }

/* Blocos */
.desafio-bloco {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 22px 22px 18px;
  margin-bottom: 20px;
}
.desafio-bloco-titulo { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.desafio-bloco-sub    { font-size: 13px; color: var(--text-2); margin-bottom: 16px; line-height: 1.5; }
.desafio-opcional     { font-weight: 400; color: var(--text-3); font-size: 13px; }

/* Escolha de nível */
.desafio-niveis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.desafio-nivel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 18px 18px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.desafio-nivel-card:hover { border-color: #FFC266; }
.desafio-nivel-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(255,140,0,.15);
}
.desafio-nivel-radio {
  position: absolute;
  top: 18px; right: 18px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
}
.desafio-nivel-card.selected .desafio-nivel-radio {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 4px var(--white);
  background: var(--primary);
}
.desafio-nivel-nome  { font-size: 17px; font-weight: 700; color: var(--text-1); padding-right: 28px; }
.desafio-nivel-desc  { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.desafio-nivel-metas {
  list-style: none;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.4;
}

/* Metas pessoais */
.desafio-extra-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  font-size: 14px;
  color: var(--text-1);
}
.desafio-extra-remover {
  border: none;
  background: none;
  color: var(--text-2);
  font-size: 15px;
  cursor: pointer;
  padding: 2px 6px;
}
.desafio-extra-form { display: flex; gap: 8px; }
.desafio-extra-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
}
.desafio-extra-form input:focus { outline: none; border-color: var(--primary); }

.desafio-escolha-acoes {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 32px;
}
.desafio-escolha-acoes .btn-primary { margin-top: 0; padding: 12px 26px; font-size: 15px; }

/* Incentivo + resumo */
.desafio-incentivo {
  padding: 18px 22px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-1);
}
.desafio-incentivo-num { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.desafio-faixa-otimo,
.desafio-incentivo-fim { background: #E8F7EF; border-left-color: var(--success); }

.desafio-resumo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.desafio-resumo-stat {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 16px 12px;
  text-align: center;
}
.desafio-resumo-num {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.1;
}
.desafio-resumo-num small { font-size: 14px; color: var(--text-3); font-weight: 600; }
.desafio-resumo-label { display: block; font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* Tema da semana */
.desafio-tema {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 20px 22px;
  margin-bottom: 20px;
  border-top: 4px solid var(--primary);
}
.desafio-tema-kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.desafio-tema h3 { font-size: 19px; color: var(--text-1); margin-bottom: 8px; }
.desafio-tema-gancho { font-size: 15px; font-style: italic; color: var(--text-2); line-height: 1.5; }
.desafio-tema-post { margin-top: 14px; }
.desafio-tema-post summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
}
.desafio-tema-texto {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-1);
}

/* Checklist */
.desafio-check-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  scroll-margin-top: 80px;
}
.desafio-check-grupo {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  margin: 6px 0 10px;
}
.desafio-check-grupo span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.desafio-check {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.desafio-check:hover { border-color: #FFC266; }
.desafio-check-box {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
  transition: background .15s, border-color .15s;
}
.desafio-check.feito { border-color: var(--success); background: #F0FAF5; }
.desafio-check.feito .desafio-check-box { background: var(--success); border-color: var(--success); }
.desafio-check.limite.feito { border-color: #FFC266; background: var(--primary-light); }
.desafio-check.limite.feito .desafio-check-box { background: var(--primary); border-color: var(--primary); }
.desafio-check-emoji { font-size: 22px; flex-shrink: 0; }
.desafio-check-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.desafio-check-txt strong { font-size: 15px; color: var(--text-1); }
.desafio-check-txt small  { font-size: 13px; color: var(--text-2); }
.desafio-check-txt .desafio-check-nota { color: var(--primary-dark); margin-top: 4px; }
.desafio-check-contador {
  flex-shrink: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.1;
}
.desafio-check-contador small { display: block; font-size: 10px; font-weight: 500; color: var(--text-3); }

/* Mapa de dias */
.desafio-mapa {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 46px));
  gap: 6px;
}
.desafio-dia {
  aspect-ratio: 1;
  min-width: 0;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #F3F4F6;
  color: var(--text-2);
}
.desafio-dia.futuro,
.desafio-dia.fora { background: transparent; border: 1.5px dashed var(--border); color: var(--text-3); cursor: default; }
.desafio-dia.fora { opacity: .4; }
.desafio-dia.n1 { background: #FFE8C7; color: #8A4B00; }
.desafio-dia.n2 { background: #FFB547; color: white; }
.desafio-dia.n3 { background: var(--success); color: white; }
.desafio-dia.hoje { box-shadow: 0 0 0 2px var(--text-1); }
.desafio-dia.sel  { outline: 3px solid var(--primary); outline-offset: 1px; }

.desafio-legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-2);
}
.desafio-legenda span { display: flex; align-items: center; gap: 6px; }
.desafio-legenda .desafio-dia { width: 14px; height: 14px; border-radius: 4px; display: inline-block; cursor: default; }

.desafio-rodape {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 4px 40px;
  font-size: 14px;
  color: var(--text-2);
}
.desafio-link {
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: underline;
  cursor: pointer;
}

/* Admin */
.desafio-admin-resumo { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.desafio-admin-tabela-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.desafio-admin-tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.desafio-admin-tabela th,
.desafio-admin-tabela td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.desafio-admin-tabela th { font-size: 12px; color: var(--text-2); font-weight: 600; background: #FAFAFB; }
.desafio-admin-tabela small { color: var(--text-3); }

.dcfg-secao {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.dcfg-secao h4 { font-size: 16px; color: var(--text-1); margin-bottom: 6px; }
.dcfg-ajuda { font-size: 13px; color: var(--text-2); margin: 0 0 14px; line-height: 1.5; }
.dcfg-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.dcfg-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.dcfg-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.dcfg-card-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dcfg-semana summary { cursor: pointer; font-size: 14px; color: var(--text-1); }
.dcfg-semana[open] summary { margin-bottom: 12px; }
.dcfg-linha { display: flex; gap: 12px; flex-wrap: wrap; }
.dcfg-linha .dcfg-campo { flex: 1; min-width: 180px; }
.dcfg-linha .dcfg-curto { flex: 0 0 80px; min-width: 80px; }
.dcfg-campo { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.dcfg-campo em { font-weight: 400; color: var(--text-3); }
.dcfg-campo input,
.dcfg-campo select,
.dcfg-campo textarea,
.dcfg-nivel input {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-1);
  background: var(--white);
  width: 100%;
}
.dcfg-campo textarea { resize: vertical; line-height: 1.5; }
.dcfg-niveis { display: flex; flex-direction: column; gap: 8px; }
.dcfg-nivel { display: grid; grid-template-columns: 110px 1fr 80px; gap: 8px; align-items: center; }
.dcfg-nivel-nome { font-size: 13px; font-weight: 600; color: var(--text-1); }
.dcfg-salvar {
  position: sticky;
  bottom: 0;
  padding: 14px 0 20px;
  background: linear-gradient(transparent, var(--bg) 35%);
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .desafio-hero { padding: 22px 18px 18px; }
  .desafio-hero h2 { font-size: 22px; }
  .desafio-bloco,
  .desafio-tema { padding: 18px 16px 14px; }
  .desafio-resumo { gap: 8px; }
  .desafio-resumo-num { font-size: 22px; }
  .desafio-mapa { grid-template-columns: repeat(7, minmax(0, 46px)); }
  .desafio-check { padding: 12px; gap: 10px; }
  .desafio-check-emoji { display: none; }
  .home-desafio-btn { width: 100%; }
  .dcfg-nivel { grid-template-columns: 1fr 70px; }
  .dcfg-nivel-nome { grid-column: 1 / -1; }
}

/* Login: abas Entrar / Desafio */
.login-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: #F3F4F6;
}
.login-tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.login-tab.active { background: var(--white); color: var(--primary-dark); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.desafio-signup-intro {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
}
.desafio-signup-titulo { font-size: 16px; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.desafio-signup-info   { font-size: 13px; color: var(--text-2); line-height: 1.45; }

.desafio-admin-bloq {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 99px;
  background: #FEE2E2;
  color: #B91C1C;
  font-size: 11px;
  font-weight: 600;
}
.dcfg-check-campo { flex: 1; min-width: 180px; margin-bottom: 12px; }

/* Admin: exclusão definitiva */
.admin-excluidas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  font-size: 13px;
  color: var(--text-2);
}
.desafio-admin-acoes { display: flex; gap: 6px; }


/* ───── Inscrição do desafio em passos ───── */
.desafio-passos {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 20px;
  padding: 14px 18px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.desafio-passo { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); font-weight: 500; }
.desafio-passo-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 13px; font-weight: 700;
  background: #F3F4F6; color: var(--text-3);
}
.desafio-passo.atual { color: var(--text-1); font-weight: 600; }
.desafio-passo.atual .desafio-passo-num { background: var(--primary); color: white; }
.desafio-passo.feito .desafio-passo-num { background: var(--success); color: white; }
.desafio-passo-linha { flex: 1; height: 2px; min-width: 12px; background: var(--border); }

.desafio-btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  background: #25D366;
  color: white;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.desafio-btn-whatsapp:hover { background: #1EBE5A; }

.desafio-input {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  color: var(--text-1);
  background: var(--white);
}
.desafio-input:focus { outline: none; border-color: var(--primary); }
textarea.desafio-input { resize: vertical; line-height: 1.5; }

.desafio-campo-linha { display: flex; gap: 8px; max-width: 420px; }
.desafio-campo-linha .btn-primary { margin-top: 0; white-space: nowrap; }

.desafio-partida-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.desafio-medidas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.desafio-medida { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.desafio-medida-destaque { font-size: 14px; color: var(--text-1); }
.desafio-input-unidade { position: relative; display: block; }
.desafio-input-unidade .desafio-input { padding-right: 42px; }
.desafio-input-unidade em {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 13px;
  color: var(--text-3);
  pointer-events: none;
}
.desafio-meta-texto { margin-bottom: 4px; }
.desafio-admin-info { color: var(--primary-dark); cursor: help; }

@media (max-width: 600px) {
  .desafio-passos { padding: 12px; gap: 6px; }
  .desafio-passo-label { display: none; }
  .desafio-passo.atual .desafio-passo-label { display: inline; }
  .desafio-medidas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desafio-btn-whatsapp { width: 100%; justify-content: center; }
}
.desafio-escolha-acoes .btn-outline { padding: 12px 22px; font-size: 15px; border-radius: var(--radius-sm); }


/* ───── Ponto de chegada (dia 60) ───── */
.desafio-final { border-top: 4px solid var(--success); }
.desafio-final .desafio-tema-kicker { color: #047857; }
.desafio-antes { font-weight: 400; color: var(--text-3); margin-left: 4px; }
.desafio-final-acoes { margin-bottom: 0; }
.desafio-comparativo td:first-child { font-weight: 600; color: var(--text-1); }
.desafio-dif-menos  { color: #047857; font-weight: 700; }
.desafio-dif-neutra { color: var(--text-2); }
.desafio-final-meta { margin: 14px 0 10px; font-size: 14px; color: var(--text-2); line-height: 1.5; }


/* ───── Conferência no grupo do WhatsApp ───── */
.desafio-grupo-aviso {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-1);
}
.desafio-grupo-aviso p { margin-bottom: 8px; }
.desafio-grupo-aviso a { color: var(--primary-dark); }
.desafio-grupo-aviso.conferindo { background: #F3F4F6; border-color: var(--border); color: var(--text-2); }
.desafio-selo {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: #FEF3C7;
  color: #92400E;
}
.desafio-selo.ok { background: #D1FAE5; color: #047857; }

.desafio-diag { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; color: var(--text-2); }
