/* css/widgets.css - Hub de Aplicações & Estilos das Ferramentas Internas */

.hub-section {
  --hub-pin-scroll: clamp(680px, 82vh, 900px);
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  background-color: var(--bg-secondary);
  min-height: calc(100vh + var(--hub-pin-scroll) + 340px);
  padding-bottom: 0;
}

.hub-section > .container {
  max-width: none;
  min-height: inherit;
  padding-left: 0;
  padding-right: 0;
}

.hub-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.hub-header h2 span {
  display: block;
  font-size: 1.1rem;
  color: var(--brand-mint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* ==========================================================================
   DASHBOARD WINDOW SHELL
   ========================================================================== */
.dashboard-pin-stage {
  position: sticky;
  top: 0;
  z-index: 1100;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  pointer-events: none;
}

.dashboard-window {
  --dashboard-width: min(1100px, calc(100vw - 32px));
  --dashboard-height: 630px;
  --dashboard-radius: var(--border-radius-lg);
  --dashboard-progress: 0;
  --dashboard-shadow-y: 18px;
  --dashboard-shadow-blur: 48px;
  --dashboard-glow-blur: 18px;
  --dashboard-glow-opacity: 0.08;
  --dashboard-border-opacity: 0.22;
  width: var(--dashboard-width);
  height: var(--dashboard-height);
  max-width: none;
  margin: 0;
  border-radius: var(--dashboard-radius);
  overflow: hidden;
  border: 1px solid rgba(85, 203, 150, var(--dashboard-border-opacity));
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  box-shadow:
    0 var(--dashboard-shadow-y) var(--dashboard-shadow-blur) rgba(0, 0, 0, 0.28),
    0 0 var(--dashboard-glow-blur) rgba(85, 203, 150, var(--dashboard-glow-opacity));
  display: grid;
  grid-template-rows: 50px 1fr;
  pointer-events: auto;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    backdrop-filter 0.25s ease;
  will-change: width, height, border-radius, box-shadow;
}

.dashboard-window.is-immersive {
  border-color: transparent;
  backdrop-filter: blur(24px);
  grid-template-rows: 64px 1fr;
}

/* OS Window Top Control Bar */
.window-bar {
  background:
    linear-gradient(90deg, rgba(16, 26, 22, 0.92), rgba(12, 20, 17, 0.72)),
    rgba(16, 26, 22, 0.7);
  border-bottom: 1px solid rgba(85, 203, 150, 0.12);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  user-select: none;
}

.window-dots {
  display: flex;
  gap: 0.5rem;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.window-dot.red { background-color: #ff5f56; }
.window-dot.yellow { background-color: #ffbd2e; }
.window-dot.green { background-color: #27c93f; }

.window-title {
  font-family: var(--font-headings);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.window-title::before {
  content: none;
}

.window-title-kicker {
  color: var(--brand-mint);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.window-title strong {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-status {
  font-size: 0.75rem;
  color: var(--brand-mint);
  font-family: var(--font-headings);
  font-weight: 600;
  background: rgba(85, 203, 150, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(85, 203, 150, 0.15);
}

/* Dashboard Body grid */
.window-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: calc(var(--dashboard-height) - 50px);
  transition:
    height 0.2s ease-out,
    grid-template-columns 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dashboard-window.is-immersive .window-body {
  grid-template-columns: 96px 1fr;
  height: calc(var(--dashboard-height) - 64px);
}

/* Dashboard Sidebar Navigator */
.dashboard-sidebar {
  background:
    linear-gradient(180deg, rgba(85, 203, 150, 0.06), transparent 28%),
    rgba(10, 15, 13, 0.48);
  border-right: 1px solid rgba(85, 203, 150, 0.1);
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-btn {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-family: var(--font-headings);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  border: 1px solid transparent;
}

.sidebar-btn-admin {
  margin-top: auto;
  border-top: 1px solid rgba(85, 203, 150, 0.12);
  border-radius: 0;
  padding-top: 1.35rem;
}

.sidebar-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: var(--border-glass);
}

.sidebar-btn:hover svg {
  transform: scale(1.1);
}

.sidebar-btn.active {
  background: rgba(85, 203, 150, 0.08);
  border-color: rgba(85, 203, 150, 0.15);
  color: var(--brand-mint);
  box-shadow: var(--shadow-sm);
}

.dashboard-window.is-immersive .dashboard-sidebar {
  padding: 1rem 0.7rem;
  align-items: center;
}

.dashboard-window.is-immersive .sidebar-btn {
  min-height: 74px;
  padding: 0.7rem 0.45rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.42rem;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.1;
  border-radius: 18px;
}

.dashboard-window.is-immersive .sidebar-btn svg {
  width: 22px;
  height: 22px;
}

.dashboard-window.is-immersive .sidebar-btn span {
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-window.is-immersive .sidebar-btn-admin {
  width: 100%;
  padding-top: 1rem;
}

/* Main Dashboard Canvas Widget Viewport */
.dashboard-canvas {
  padding: 2.25rem;
  overflow-y: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(85, 203, 150, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 203, 150, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  background-position: center;
}

.dashboard-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(85, 203, 150, 0.12), transparent 32%),
    radial-gradient(circle at 82% 70%, rgba(0, 180, 216, 0.08), transparent 36%);
  pointer-events: none;
}

.dashboard-window.is-immersive .dashboard-canvas {
  padding: clamp(1.25rem, 2.4vw, 2.5rem);
}

/* Widget General States */
.widget-pane {
  display: none;
  animation: widgetFadeIn 0.4s ease-out;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.widget-pane.active {
  display: flex;
}

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

@media (max-width: 768px) {
  .window-body {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem;
    scrollbar-width: none;
  }
  
  .sidebar-btn {
    white-space: nowrap;
    padding: 0.75rem 1rem;
  }
  
  .dashboard-canvas {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   WIDGET 1: QUIZ PROFISSÃO DO FUTURO
   ========================================================================== */
.quiz-widget {
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.quiz-welcome {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.quiz-welcome h3 {
  font-size: 1.75rem;
}

.quiz-welcome p {
  max-width: 500px;
  margin-bottom: 1.5rem;
}

.quiz-welcome-visual {
  display: none;
}

/* Quiz Progress */
.quiz-progress-wrapper {
  width: 100%;
  margin-bottom: 2rem;
}

.quiz-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-family: var(--font-headings);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-full);
  overflow: hidden;
}

.quiz-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--gradient-brand);
  border-radius: var(--border-radius-full);
  box-shadow: var(--glow-mint-sm);
  transition: width var(--transition-normal);
}

/* Quiz Cards */
.quiz-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quiz-question {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.quiz-option {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-spring);
}

.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.option-text {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.quiz-option:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(85, 203, 150, 0.3);
  transform: translateX(5px);
}

.quiz-option:hover .option-letter {
  background: var(--brand-mint);
  border-color: var(--brand-mint);
  color: #0a0f0d;
  box-shadow: var(--glow-mint-sm);
}

.quiz-option:hover .option-text {
  color: var(--text-primary);
}

/* Selected state */
.quiz-option.selected {
  background: rgba(85, 203, 150, 0.06);
  border-color: var(--brand-mint);
}

.quiz-option.selected .option-letter {
  background: var(--brand-mint);
  border-color: var(--brand-mint);
  color: #0a0f0d;
  box-shadow: var(--glow-mint-sm);
}

.quiz-option.selected .option-text {
  color: var(--text-primary);
  font-weight: 600;
}

/* Quiz Result Panel */
.quiz-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: widgetFadeIn 0.6s ease-out;
}

.result-badge {
  background: rgba(85, 203, 150, 0.1);
  color: var(--brand-mint);
  border: 1px solid rgba(85, 203, 150, 0.2);
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius-full);
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.9rem;
}

.result-course-title {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.result-career-text {
  font-weight: 600;
  color: var(--brand-mint);
  font-size: 1.1rem;
}

.result-description {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.dashboard-window.is-immersive .quiz-widget {
  max-width: none;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.dashboard-window.is-immersive .quiz-welcome,
.dashboard-window.is-immersive .quiz-result {
  width: min(1120px, 100%);
  min-height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1.08fr);
  grid-template-areas:
    "badge visual"
    "title visual"
    "copy visual"
    "action visual";
  align-items: center;
  grid-template-rows: repeat(4, min-content);
  align-content: center;
  row-gap: 1rem;
  column-gap: clamp(2rem, 5vw, 5rem);
  text-align: left;
}

.dashboard-window.is-immersive .quiz-welcome .badge,
.dashboard-window.is-immersive .quiz-result .result-badge {
  grid-area: badge;
  align-self: end;
  justify-self: start;
}

.dashboard-window.is-immersive .quiz-welcome h3,
.dashboard-window.is-immersive .quiz-result .result-course-title {
  grid-area: title;
}

.dashboard-window.is-immersive .quiz-welcome p,
.dashboard-window.is-immersive .quiz-result .result-description {
  grid-area: copy;
  align-self: start;
}

.dashboard-window.is-immersive .quiz-welcome .btn,
.dashboard-window.is-immersive .quiz-result .hero-actions {
  grid-area: action;
  align-self: start;
}

.dashboard-window.is-immersive .quiz-welcome::after {
  content: none;
}

.dashboard-window.is-immersive .quiz-welcome-visual {
  grid-area: visual;
  position: relative;
  min-height: min(520px, 62vh);
  border-radius: 30px;
  border: 1px solid rgba(85, 203, 150, 0.16);
  background:
    radial-gradient(circle at 28% 24%, rgba(85, 203, 150, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(85, 203, 150, 0.12), rgba(0, 180, 216, 0.055) 52%, rgba(255, 255, 255, 0.025)),
    rgba(7, 13, 11, 0.54);
  display: flex;
  align-items: flex-end;
  padding: clamp(1.35rem, 2.8vw, 2.4rem);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.18);
}

.dashboard-window.is-immersive .quiz-welcome-visual::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 24px;
  border: 1px solid rgba(85, 203, 150, 0.08);
  background:
    linear-gradient(rgba(85, 203, 150, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 203, 150, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 82%);
  pointer-events: none;
}

.dashboard-window.is-immersive .quiz-visual-orbit {
  position: absolute;
  top: 13%;
  right: 10%;
  width: clamp(150px, 16vw, 230px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(85, 203, 150, 0.22);
  opacity: 0.85;
}

.dashboard-window.is-immersive .quiz-visual-orbit::before,
.dashboard-window.is-immersive .quiz-visual-orbit::after {
  content: '';
  position: absolute;
  border-radius: inherit;
  inset: 18%;
  border: 1px dashed rgba(85, 203, 150, 0.2);
}

.dashboard-window.is-immersive .quiz-visual-orbit::after {
  inset: 38%;
  border-style: solid;
  background: rgba(85, 203, 150, 0.08);
}

.dashboard-window.is-immersive .quiz-visual-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-mint);
  box-shadow: 0 0 18px rgba(85, 203, 150, 0.5);
}

.dashboard-window.is-immersive .quiz-visual-orbit span:first-child {
  top: 13%;
  left: 23%;
}

.dashboard-window.is-immersive .quiz-visual-orbit span:last-child {
  right: 17%;
  bottom: 25%;
  background: var(--theme-info);
  box-shadow: 0 0 18px rgba(0, 180, 216, 0.38);
}

.dashboard-window.is-immersive .quiz-visual-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.8rem;
}

.dashboard-window.is-immersive .quiz-metric {
  min-height: 132px;
  padding: 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(85, 203, 150, 0.13);
  background: rgba(4, 10, 8, 0.48);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.dashboard-window.is-immersive .quiz-metric.is-primary {
  grid-row: span 2;
  min-height: 276px;
  background:
    linear-gradient(145deg, rgba(85, 203, 150, 0.2), transparent 58%),
    rgba(4, 10, 8, 0.5);
}

.dashboard-window.is-immersive .quiz-metric span {
  color: var(--text-primary);
  font-family: var(--font-headings);
  font-size: clamp(3rem, 5vw, 5.8rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.86;
}

.dashboard-window.is-immersive .quiz-metric strong {
  color: var(--brand-mint);
  font-family: var(--font-headings);
  font-size: clamp(1.05rem, 1.6vw, 1.8rem);
  font-weight: 800;
  line-height: 1;
  margin-top: 0.5rem;
}

.dashboard-window.is-immersive #btn-start-quiz {
  width: min(430px, 100%);
  min-height: 58px;
  justify-content: space-between;
  padding-inline: 1.45rem;
  border: 1px solid rgba(85, 203, 150, 0.42);
  box-shadow:
    0 16px 36px rgba(85, 203, 150, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dashboard-window.is-immersive #btn-start-quiz:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 44px rgba(85, 203, 150, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dashboard-window.is-immersive .quiz-welcome h3,
.dashboard-window.is-immersive .result-course-title {
  font-size: clamp(2.2rem, 4vw, 4.6rem);
  line-height: 0.98;
  max-width: 620px;
}

.dashboard-window.is-immersive .quiz-welcome p,
.dashboard-window.is-immersive .result-description {
  max-width: 560px;
  font-size: 1.05rem;
}

.dashboard-window.is-immersive .quiz-card {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "progress progress"
    "question options";
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3.5rem);
}

.dashboard-window.is-immersive .quiz-progress-wrapper {
  grid-area: progress;
  width: min(980px, 100%);
  margin: 0 auto;
}

.dashboard-window.is-immersive .quiz-question {
  grid-area: question;
  min-height: 320px;
  margin: 0;
  padding: clamp(1.6rem, 3vw, 3rem);
  border-radius: 28px;
  border: 1px solid rgba(85, 203, 150, 0.13);
  background:
    linear-gradient(145deg, rgba(85, 203, 150, 0.13), transparent 48%),
    rgba(255, 255, 255, 0.035);
  display: flex;
  align-items: flex-end;
  font-size: clamp(1.7rem, 2.6vw, 3.25rem);
  line-height: 1.08;
  text-align: left;
}

.dashboard-window.is-immersive .quiz-options {
  grid-area: options;
  justify-content: center;
  gap: 1rem;
}

.dashboard-window.is-immersive .quiz-option {
  min-height: 92px;
  padding: 1.25rem 1.35rem;
  border-radius: 18px;
  background: rgba(7, 13, 11, 0.56);
}

.dashboard-window.is-immersive .option-text {
  font-size: 1rem;
  line-height: 1.35;
}

/* ==========================================================================
   WIDGET 2: RASPADINHA DE MARKETING
   ========================================================================== */
.scratch-widget {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: 400px;
}

.scratch-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.scratch-header p {
  font-size: 0.95rem;
}

/* Canvas Box shell */
.scratch-card-wrapper {
  width: 320px;
  height: 320px;
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: var(--bg-tertiary);
  border: 2px dashed rgba(85, 203, 150, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  user-select: none;
}

.scratch-card-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: crosshair;
}

.scratch-prize-reveal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  z-index: 5;
}

.scratch-prize-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: prizeFloat 2.5s ease-in-out infinite;
}

@keyframes prizeFloat {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

.scratch-prize-title {
  font-family: var(--font-headings);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-mint);
  margin-bottom: 0.5rem;
}

.scratch-prize-label {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Anti-fraud locked view */
.scratch-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: widgetFadeIn 0.5s ease-out;
}

.locked-icon {
  font-size: 3rem;
  color: var(--brand-mint);
  background: rgba(85, 203, 150, 0.08);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(85, 203, 150, 0.2);
}

.locked-timer {
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.scratch-locked-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.locked-eyebrow {
  color: var(--brand-mint);
  font-family: var(--font-headings);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scratch-lock-panel {
  width: min(360px, 100%);
  padding: 1.4rem;
  border-radius: 24px;
  border: 1px solid rgba(85, 203, 150, 0.14);
  background:
    radial-gradient(circle at 50% 0%, rgba(85, 203, 150, 0.14), transparent 58%),
    rgba(7, 13, 11, 0.58);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.locked-note {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 280px;
}

.dashboard-window.is-immersive .scratch-widget {
  max-width: none;
  height: 100%;
  min-height: 0;
  justify-content: center;
}

.dashboard-window.is-immersive .scratch-playable,
.dashboard-window.is-immersive .scratch-locked {
  width: min(1080px, 100%);
  min-height: 100%;
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: minmax(320px, 0.88fr) minmax(360px, 1.12fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  text-align: left;
}

.dashboard-window.is-immersive .scratch-locked {
  width: min(980px, 100%);
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 0.78fr);
  grid-template-areas: "copy panel";
  justify-content: center;
}

.dashboard-window.is-immersive .scratch-locked-copy {
  grid-area: copy;
  align-items: flex-start;
  text-align: left;
}

.dashboard-window.is-immersive .scratch-lock-panel {
  grid-area: panel;
  width: min(420px, 100%);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: 30px;
}

.dashboard-window.is-immersive .scratch-header {
  align-self: center;
}

.dashboard-window.is-immersive .scratch-header h3,
.dashboard-window.is-immersive .scratch-locked-copy h3 {
  font-size: clamp(2.1rem, 3.5vw, 4.2rem);
  line-height: 1;
  max-width: 520px;
}

.dashboard-window.is-immersive .scratch-header p,
.dashboard-window.is-immersive .scratch-locked-copy p {
  max-width: 480px;
  font-size: 1.02rem;
}

.dashboard-window.is-immersive .scratch-lock-panel .locked-text {
  max-width: none;
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-headings);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-window.is-immersive .scratch-lock-panel .locked-timer {
  font-size: clamp(2.7rem, 5vw, 4.6rem);
  line-height: 0.95;
  color: var(--text-primary);
  text-shadow: 0 0 24px rgba(85, 203, 150, 0.18);
}

.dashboard-window.is-immersive .scratch-lock-panel .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}

.dashboard-window.is-immersive .scratch-card-wrapper {
  width: min(430px, 34vw);
  height: min(430px, 34vw);
  min-width: 320px;
  min-height: 320px;
  justify-self: center;
  border-radius: 30px;
  border-style: solid;
  background:
    radial-gradient(circle at 50% 0%, rgba(85, 203, 150, 0.16), transparent 55%),
    var(--bg-tertiary);
}

.dashboard-window.is-immersive #scratch-actions-area {
  grid-column: 2;
  justify-self: center;
}

.dashboard-window.is-immersive .scratch-locked .locked-icon,
.dashboard-window.is-immersive .scratch-locked .locked-timer,
.dashboard-window.is-immersive .scratch-locked .locked-text,
.dashboard-window.is-immersive .scratch-locked .btn {
  grid-column: 2;
  justify-self: center;
}

/* Raspadinha 3x3: grade com tres tentativas */
.scratch-playable {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.scratch-eyebrow {
  display: inline-flex;
  margin-bottom: 0.55rem;
  color: var(--brand-mint);
  font-family: var(--font-headings);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scratch-card-wrapper {
  width: min(430px, calc(100vw - 44px));
  height: auto;
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 28px;
  border: 1px solid rgba(85, 203, 150, 0.24);
  border-style: solid;
  background:
    radial-gradient(circle at 50% 0%, rgba(85, 203, 150, 0.18), transparent 58%),
    linear-gradient(145deg, rgba(10, 35, 28, 0.94), rgba(5, 13, 11, 0.98));
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.scratch-card-wrapper::after {
  border-radius: inherit;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.48);
}

.scratch-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.scratch-cell {
  appearance: none;
  padding: 0;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(85, 203, 150, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(85, 203, 150, 0.18), transparent 70%),
    rgba(8, 20, 16, 0.88);
  color: var(--text-primary);
  font: inherit;
  cursor: crosshair;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.16);
  transition:
    border-color var(--transition-normal),
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.scratch-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

.scratch-cell:hover {
  transform: translateY(-2px);
  border-color: rgba(85, 203, 150, 0.42);
}

.scratch-cell.is-revealed {
  border-color: rgba(85, 203, 150, 0.58);
  box-shadow:
    0 0 0 1px rgba(85, 203, 150, 0.12),
    0 14px 30px rgba(0, 0, 0, 0.22),
    inset 0 0 24px rgba(85, 203, 150, 0.08);
}

.scratch-cell.is-revealed::after {
  animation: scratchCellSweep 520ms ease forwards;
}

@keyframes scratchCellSweep {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

.scratch-cell-prize {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  padding: 0.7rem;
  text-align: center;
}

.scratch-cell-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--brand-mint);
}

.scratch-cell-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(85, 203, 150, 0.2));
}

.scratch-cell-prize strong {
  color: var(--text-primary);
  font-family: var(--font-headings);
  font-size: clamp(0.7rem, 1.5vw, 0.86rem);
  line-height: 1.08;
}

.scratch-cell-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: crosshair;
  transition:
    opacity 520ms ease,
    transform 520ms ease,
    filter 520ms ease;
  touch-action: none;
}

.scratch-dust {
  position: absolute;
  z-index: 12;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(199, 255, 228, 0.86);
  box-shadow: 0 0 12px rgba(85, 203, 150, 0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: scratchDust 560ms ease-out forwards;
}

@keyframes scratchDust {
  to {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--dust-x)), calc(-50% + var(--dust-y)))
      scale(0.25);
  }
}

.scratch-result {
  width: min(430px, calc(100vw - 44px));
  min-height: 104px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(85, 203, 150, 0.16);
  border-radius: 18px;
  background: rgba(7, 17, 14, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color var(--transition-normal),
    background var(--transition-normal),
    transform var(--transition-normal);
}

.scratch-result-kicker {
  color: var(--brand-mint);
  font-family: var(--font-headings);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scratch-result strong {
  color: var(--text-primary);
  font-family: var(--font-headings);
  font-size: 1.25rem;
}

.scratch-result p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.35;
}

.scratch-result.is-winning {
  border-color: rgba(85, 203, 150, 0.55);
  background:
    radial-gradient(circle at 50% 0%, rgba(85, 203, 150, 0.2), transparent 70%),
    rgba(8, 28, 21, 0.84);
  transform: translateY(-2px);
}

.scratch-result.is-empty {
  border-color: rgba(255, 183, 3, 0.28);
}

.scratch-win {
  animation: scratchWinPulse 900ms ease-in-out infinite alternate;
}

.scratch-loss {
  border-color: rgba(255, 183, 3, 0.28);
}

@keyframes scratchWinPulse {
  from {
    box-shadow:
      0 24px 54px rgba(0, 0, 0, 0.32),
      0 0 16px rgba(85, 203, 150, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  to {
    box-shadow:
      0 30px 70px rgba(0, 0, 0, 0.38),
      0 0 34px rgba(85, 203, 150, 0.45),
      inset 0 0 28px rgba(85, 203, 150, 0.14);
  }
}

.dashboard-window.is-immersive .scratch-card-wrapper {
  width: min(440px, 34vw);
  height: auto;
}

.dashboard-window.is-immersive .scratch-result,
.dashboard-window.is-immersive #scratch-actions-area {
  grid-column: 2;
  justify-self: center;
}

/* ==========================================================================
   WIDGET 3: CAPTURA DE LEADS (CADASTRO)
   ========================================================================== */
.leads-widget {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.leads-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.leads-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.leads-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.form-label {
  font-family: var(--font-headings);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  font-size: 0.98rem;
  color: var(--text-primary);
  transition: all var(--transition-normal);
}

.form-input:focus {
  border-color: var(--brand-mint);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--glow-mint-sm);
}

/* Form Select Styling */
select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2355CB96'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 1.5rem;
  padding-right: 3rem;
}

select.form-input option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Field Validation UI states */
.form-group.success .form-input {
  border-color: rgba(85, 203, 150, 0.4);
}

.form-group.error .form-input {
  border-color: rgba(255, 77, 109, 0.5);
  background: rgba(255, 77, 109, 0.02);
}

.form-group.error .form-input:focus {
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.15);
}

.error-message {
  font-size: 0.8rem;
  color: var(--theme-enferm);
  margin-top: 0.25rem;
  font-weight: 500;
  display: none;
}

.form-group.error .error-message {
  display: block;
}

/* Success lead submit overlay */
.lead-success-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 0;
  gap: 1.5rem;
  animation: widgetFadeIn 0.5s ease-out;
}

.success-icon {
  font-size: 3.5rem;
  color: var(--brand-mint);
  animation: bounceSuccess 1s var(--transition-spring);
}

@keyframes bounceSuccess {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-size: 1.75rem;
  font-weight: 700;
}
.success-subtitle {
  color: var(--text-secondary);
  max-width: 420px;
}

/* ==========================================================================
   FINAL CTA: MATRÍCULA
   ========================================================================== */
.enrollment-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(85, 203, 150, 0.12), transparent 32%),
    radial-gradient(circle at 82% 78%, rgba(var(--theme-info-rgb), 0.1), transparent 34%),
    var(--bg-primary);
}

.enrollment-container {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 4rem;
  align-items: center;
}

.enrollment-copy {
  max-width: 540px;
}

.enrollment-eyebrow {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--brand-mint);
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.enrollment-copy h2 {
  margin-bottom: 1rem;
}

.enrollment-copy p {
  font-size: 1.12rem;
  max-width: 500px;
}

.enrollment-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.enrollment-points span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--border-radius-md);
  background: rgba(85, 203, 150, 0.06);
  border: 1px solid rgba(85, 203, 150, 0.14);
  color: var(--text-secondary);
  font-family: var(--font-headings);
  font-size: 0.88rem;
  font-weight: 600;
}

.enrollment-points span::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-mint);
  box-shadow: var(--glow-mint-sm);
}

.enrollment-card {
  position: relative;
  padding: 2.25rem;
  border-radius: var(--border-radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--bg-glass);
  border: 1px solid rgba(85, 203, 150, 0.16);
  box-shadow: var(--shadow-lg), 0 0 42px rgba(85, 203, 150, 0.08);
  backdrop-filter: blur(18px);
}

.enrollment-card::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--border-radius-lg) - 1px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.enrollment-card .leads-widget {
  max-width: none;
}

.enrollment-card .leads-header {
  text-align: left;
  margin-bottom: 2rem;
}

.enrollment-card .leads-header p {
  margin-top: 0.4rem;
}

@media (max-width: 992px) {
  .hub-section {
    min-height: auto;
  }

  .dashboard-window {
    width: 100%;
    height: auto;
    margin: 0;
  }

  .dashboard-pin-stage {
    position: relative;
    top: auto;
    z-index: auto;
    height: auto;
    margin-top: 0;
    pointer-events: auto;
  }

  .enrollment-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .enrollment-card {
    padding: 1.5rem;
  }
}
