/* ══════════════════════════════════════════════════
   MOTORBOOST — Base: reset, tipografia, layout global
   ══════════════════════════════════════════════════ */

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

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overflow-x: hidden;
}

/* ── App wrapper ── */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── HEADER ── */
.hdr {
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(249, 115, 22, 0.2);
  padding: 0.6rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 30;
}

.logo-img {
  height: 44px;
  width: auto;
}

.hdr-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 0 2rem;
}

.progress-track {
  width: 100%;
  max-width: 500px;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-orange-dark), var(--color-orange));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.hdr-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Live badge ── */
.live-b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--color-orange);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ldot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-orange);
  animation: pulse 1.6s infinite;
}

/* ── Botões do header ── */
.closer-btn {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-body);
}
.closer-btn:hover {
  color: var(--color-orange);
  border-color: rgba(249, 115, 22, 0.3);
}

.save-btn {
  font-size: 10px;
  color: var(--color-orange);
  background: var(--color-orange-light);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 4px 12px;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition-base);
}
.save-btn:hover {
  background: var(--color-orange-mid);
}

/* ── Stage container ── */
.stage-wrap {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 2; /* acima do canvas ff-canvas (z-index:1) — abaixo do header (z-index:30) */
}

/*
   ARQUITETURA DE VISIBILIDADE:
   flex-direction e justify-content ficam no .stage base (não em .stage.active)
   para garantir layout correto mesmo quando display vem de inline style residual.
   .stage.active só controla display:flex — gerenciado via classList em stages.js.
*/
.stage {
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 4rem 6rem;
  overflow-x: hidden;
  box-sizing: border-box;
  animation: stageIn var(--transition-slow) both;
}

.stage.active {
  display: flex;
}

/* ── Nav bar (fixed bottom) ── */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(6, 6, 6, 0.95);
  border-top: 1px solid var(--border-subtle);
  padding: 0.85rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-lname {
  font-size: 12px;
  color: var(--text-muted);
}

.stage-counter {
  font-size: 11px;
  color: var(--text-muted2);
}

/* ── Tipografia base ── */
.stage-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 0.6rem;
}
.stage-tag::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--color-orange);
}

.stage-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.stage-title em {
  color: var(--color-orange);
  font-style: normal;
}

.stage-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 680px;
}

/* ── Grid helpers ── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }

/* Previne overflow horizontal em filhos de grids e flex containers */
.g2 > *, .g3 > *, .g4 > *,
.data-grid > *,
.ba-wrap > *,
.maturity-layout > * { min-width: 0; }

