/* ============================================================
   Reflexão Anual — Multi-Step Form
   ============================================================ */

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

.ra-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #f0f4ff 0%, #faf5ff 50%, #fff7f5 100%);
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.ra-header {
  background: #083FCF;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ra-header-logo {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.ra-header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

/* ── Progress bar ── */
.ra-progress-wrap {
  background: #e5e7eb;
  height: 4px;
  width: 100%;
}

.ra-progress-bar {
  height: 4px;
  background: linear-gradient(90deg, #083FCF, #FC7D55);
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

/* ── Step counter ── */
.ra-step-counter {
  text-align: center;
  padding: 1.25rem 1rem 0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #6B7280;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Main container ── */
.ra-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem 4rem;
}

.ra-form-wrap {
  width: 100%;
  max-width: 720px;
}

/* ── Step card ── */
.ra-step {
  display: none;
  animation: raFadeIn 0.35s ease;
}

.ra-step.is-active {
  display: block;
}

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

.ra-step-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(8, 63, 207, 0.07), 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
}

/* ── Step card header ── */
.ra-step-header {
  background: linear-gradient(135deg, #083FCF 0%, #1e40af 100%);
  padding: 1.75rem 2rem 1.5rem;
  position: relative;
}

.ra-step-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.6rem;
}

.ra-step-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.ra-step-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin: 0;
  line-height: 1.5;
}

/* ── Step card body ── */
.ra-step-body {
  padding: 2rem;
}

/* ── Field groups ── */
.ra-field {
  margin-bottom: 1.5rem;
}

.ra-field:last-child {
  margin-bottom: 0;
}

.ra-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6B7280;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.ra-label-hint {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: #9CA3AF;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0.15rem;
}

.ra-input,
.ra-textarea {
  width: 100%;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: #1F2937;
  background: #F8FAFF;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  resize: none;
  line-height: 1.6;
}

.ra-input:focus,
.ra-textarea:focus {
  border-color: #083FCF;
  background: white;
  box-shadow: 0 0 0 3px rgba(8, 63, 207, 0.08);
}

.ra-input::placeholder,
.ra-textarea::placeholder {
  color: #C4C9D4;
}

.ra-textarea {
  min-height: 110px;
}

.ra-textarea.ra-textarea-sm {
  min-height: 72px;
}

.ra-textarea.ra-textarea-lg {
  min-height: 150px;
}

/* ── Divider inside step ── */
.ra-divider {
  border: none;
  border-top: 1.5px dashed #E5E7EB;
  margin: 1.5rem 0;
}

/* ── Sub-section label ── */
.ra-subsection {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #083FCF;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ra-subsection::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}

/* ── Numbered list fields ── */
.ra-numbered-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ra-numbered-field {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ra-number-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: #083FCF;
  color: white;
  border-radius: 50%;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.65rem;
}

.ra-numbered-field .ra-textarea {
  flex: 1;
}

/* ── Navigation ── */
.ra-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem 1.5rem;
  border-top: 1px solid #F3F4F6;
  gap: 1rem;
}

.ra-btn-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6B7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.ra-btn-back:hover {
  color: #1F2937;
  background: #F3F4F6;
}

.ra-btn-back:disabled {
  opacity: 0;
  pointer-events: none;
}

.ra-btn-next {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #083FCF, #1e40af);
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(8, 63, 207, 0.25);
}

.ra-btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(8, 63, 207, 0.35);
}

.ra-btn-next:active {
  transform: translateY(0);
}

.ra-btn-generate {
  background: linear-gradient(135deg, #FC7D55, #e8612e);
  box-shadow: 0 2px 8px rgba(252, 125, 85, 0.35);
}

.ra-btn-generate:hover {
  box-shadow: 0 4px 14px rgba(252, 125, 85, 0.45);
}

/* ── Loading screen ── */
.ra-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  gap: 1.5rem;
}

.ra-loading.is-active {
  display: flex;
}

.ra-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid #EFE2FF;
  border-top-color: #083FCF;
  border-radius: 50%;
  animation: raSpin 0.8s linear infinite;
}

@keyframes raSpin {
  to { transform: rotate(360deg); }
}

.ra-loading-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1F2937;
  margin: 0;
}

.ra-loading-sub {
  font-size: 0.9rem;
  color: #6B7280;
  margin: 0;
}

/* ── Success screen ── */
.ra-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 1.25rem;
}

.ra-success.is-active {
  display: flex;
}

.ra-success-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #083FCF, #6B21A8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ra-success-icon svg {
  color: white;
}

.ra-success-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #1F2937;
  margin: 0;
}

.ra-success-sub {
  font-size: 0.95rem;
  color: #6B7280;
  margin: 0;
  max-width: 400px;
  line-height: 1.6;
}

.ra-btn-restart {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #083FCF;
  background: #EFE2FF;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}

.ra-btn-restart:hover {
  background: #ddd6fe;
}

/* ── Error message ── */
.ra-error-msg {
  display: none;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: #DC2626;
  margin: 0.75rem 2rem 0;
}

.ra-error-msg.is-visible {
  display: block;
}

/* ── Validation error on field ── */
.ra-input.has-error,
.ra-textarea.has-error {
  border-color: #F87171;
  background: #FFF5F5;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .ra-step-body { padding: 1.25rem; }
  .ra-step-header { padding: 1.25rem; }
  .ra-nav { padding: 1rem 1.25rem 1.25rem; }
  .ra-step-title { font-size: 1.2rem; }
  .ra-header { padding: 1rem; }
  .ra-header-title { font-size: 0.85rem; }
}
