/* ====== RESET & BASE ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f2f5;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ====== HEADER ====== */
header {
  background: linear-gradient(135deg, #1a3a6b, #2563aa);
  color: white;
  padding: 16px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-badge {
  width: 48px; height: 48px;
  background: #f5a623;
  color: #1a3a6b;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 18px;
  flex-shrink: 0;
}
.logo-area h1 { font-size: 20px; font-weight: 700; }
.logo-area span { font-size: 12px; opacity: 0.85; }

/* ====== MAIN ====== */
main { flex: 1; padding: 30px 20px; }

/* ====== FOOTER ====== */
footer {
  background: #1a3a6b;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 12px;
  font-size: 12px;
}

/* ====== WIZARD CONTAINER ====== */
.wizard-container {
  max-width: 780px;
  margin: 0 auto;
}

/* ====== PROGRESS ====== */
.wizard-header {
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.wizard-step-info { margin-bottom: 12px; }
.step-badge {
  display: inline-block;
  background: #e8f0fe;
  color: #1a3a6b;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.wizard-header h2 { font-size: 20px; color: #1a3a6b; }
.progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563aa, #f5a623);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress-pct { font-size: 12px; color: #666; margin-top: 4px; text-align: right; }

/* ====== FORM ====== */
.wizard-form {
  background: white;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.question-block { margin-bottom: 24px; }
.question-label {
  font-weight: 600;
  font-size: 15px;
  color: #1a3a6b;
  margin-bottom: 10px;
  display: block;
}
.question-hint {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.5;
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a3a6b;
  border-left: 4px solid #f5a623;
  padding-left: 10px;
  margin: 20px 0 14px;
}
.section-desc { font-size: 13px; color: #666; margin-bottom: 16px; }

/* ====== CARD OPTIONS (step 1) ====== */
.card-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.card-option { cursor: pointer; }
.card-option input { display: none; }
.card-option-inner {
  border: 2px solid #dde3ec;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s;
  background: white;
}
.card-option input:checked + .card-option-inner {
  border-color: #2563aa;
  background: #e8f0fe;
  box-shadow: 0 0 0 3px rgba(37,99,170,0.15);
}
.card-option-inner:hover { border-color: #2563aa; }
.card-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.card-option-inner strong { display: block; font-size: 14px; margin-bottom: 4px; }
.card-option-inner small { font-size: 12px; color: #666; }

/* ====== RADIO LIST ====== */
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-item {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: background 0.15s;
}
.radio-item:hover { background: #f0f4ff; }
.radio-item input[type=radio] { accent-color: #2563aa; width: 16px; height: 16px; flex-shrink: 0; }
.radio-item span { font-size: 14px; }

/* ====== GRID OPTIONS (segmento) ====== */
.grid-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.grid-opt {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.15s;
  font-size: 13px;
}
.grid-opt:hover { background: #f0f4ff; border-color: #2563aa; }
.grid-opt input { accent-color: #2563aa; flex-shrink: 0; }
.grid-opt input:checked + span { color: #1a3a6b; font-weight: 600; }

/* ====== FIELDS ====== */
.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: #333; }
.field-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: #333; }
.field-input {
  width: 100%;
  border: 1.5px solid #d1d9e6;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
}
.field-input:focus { border-color: #2563aa; box-shadow: 0 0 0 3px rgba(37,99,170,0.12); }
.field-select {
  width: 100%;
  border: 1.5px solid #d1d9e6;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  background: white;
  outline: none;
}
.field-select:focus { border-color: #2563aa; }
.field-textarea {
  width: 100%;
  border: 1.5px solid #d1d9e6;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
  outline: none;
}
.field-textarea:focus { border-color: #2563aa; box-shadow: 0 0 0 3px rgba(37,99,170,0.12); }
.field-hint { font-size: 12px; color: #888; margin-top: 4px; display: block; }
.field-row { display: flex; gap: 14px; }
.field-row .field-group { flex: 1; }
.select-wrap { position: relative; }
.radio-inline { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-inline label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.radio-inline input { accent-color: #2563aa; }

/* ====== UPLOAD ====== */
.upload-area {
  border: 2px dashed #aac0e4;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8faff;
  position: relative;
}
.upload-area:hover, .upload-area.drag-over { border-color: #2563aa; background: #eef3ff; }
.upload-icon { font-size: 36px; margin-bottom: 8px; }
.upload-area p { font-size: 14px; color: #555; margin-bottom: 4px; }
.upload-area small { font-size: 12px; color: #888; }
.upload-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; justify-content: space-between;
  background: #f0f4ff;
  border: 1px solid #c7d9f5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

/* ====== REVIEW STEP ====== */
.review-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}
.review-section h3 { font-size: 16px; color: #1a3a6b; margin-bottom: 16px; }
.review-block {
  display: flex; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.review-block:last-child { border-bottom: none; }
.review-label { font-weight: 600; font-size: 13px; color: #555; min-width: 200px; }
.review-value { font-size: 14px; color: #222; }

/* ====== LGPD ====== */
.lgpd-box {
  background: #fffbea;
  border: 1px solid #f5c842;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.lgpd-check {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
}
.lgpd-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #2563aa; flex-shrink: 0; }
.lgpd-check span { font-size: 13px; color: #555; line-height: 1.5; }

/* ====== ALERTS ====== */
.alert {
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
}
.alert-error { background: #fff0f0; border: 1px solid #f5c6c6; color: #c0392b; }
.info-box {
  background: #e8f0fe;
  border: 1px solid #aac0e4;
  border-radius: 10px;
  padding: 16px;
  font-size: 14px;
  color: #1a3a6b;
}

/* ====== BUTTONS ====== */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.btn {
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-primary { background: #2563aa; color: white; }
.btn-primary:hover { background: #1a4a8a; }
.btn-primary:disabled { background: #aab8cc; cursor: not-allowed; }
.btn-secondary { background: #e2e8f0; color: #444; }
.btn-secondary:hover { background: #d1d9e6; }
.btn-success { background: #1a8c55; color: white; }
.btn-success:hover { background: #146b42; }
.btn-success:disabled { background: #aacfbc; cursor: not-allowed; }

/* ====== CONFIRMAÇÃO ====== */
.success-card {
  background: white;
  border-radius: 14px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  max-width: 640px;
  margin: 0 auto;
}
.success-icon { font-size: 56px; margin-bottom: 16px; }
.success-card h2 { font-size: 24px; color: #1a3a6b; margin-bottom: 10px; }
.success-card > p { font-size: 15px; color: #555; margin-bottom: 28px; }
.download-buttons { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.btn-download {
  background: #1a3a6b;
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
  justify-content: center;
}
.btn-download:hover { background: #2563aa; }
.email-section { margin-top: 10px; text-align: left; }
.email-section h3 { font-size: 16px; color: #1a3a6b; margin-bottom: 8px; }
.email-section p { font-size: 13px; color: #666; margin-bottom: 10px; }
.email-form { display: flex; gap: 10px; }
.email-form .field-input { flex: 1; }
.email-msg {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.email-msg.sending { background: #e8f0fe; color: #1a3a6b; }
.email-msg.success { background: #e6f9ef; color: #1a8c55; }
.email-msg.error { background: #fff0f0; color: #c0392b; }
.nova-inscricao { margin-top: 24px; }

/* ====== BOTÕES EXTRA ====== */
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ====== AUTH (login / cadastro) ====== */
.auth-card {
  background: white;
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  max-width: 420px;
  margin: 0 auto;
}
.auth-card h2 { font-size: 22px; color: #1a3a6b; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: #666; margin-bottom: 22px; line-height: 1.5; }
.auth-form { margin-bottom: 16px; }
.auth-alt { text-align: center; font-size: 14px; color: #555; }
.auth-alt a { color: #2563aa; font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* ====== PAINEL MINHAS INSCRIÇÕES ====== */
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.panel-head h2 { font-size: 22px; color: #1a3a6b; }
.panel-sub { font-size: 14px; color: #666; margin-top: 2px; }
.insc-list { display: flex; flex-direction: column; gap: 12px; }
.insc-item {
  background: white;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.insc-info strong { display: block; font-size: 15px; color: #1a3a6b; margin-bottom: 4px; }
.insc-meta { font-size: 12px; color: #888; }
.status-tag {
  display: inline-block; border-radius: 20px; padding: 2px 10px;
  font-size: 11px; font-weight: 600;
}
.status-rascunho { background: #fff3e0; color: #b06a00; }
.status-concluida { background: #e8f0fe; color: #1a3a6b; }
.status-pdf_gerado { background: #e6f9ef; color: #1a8c55; }
.status-email_enviado { background: #e6f9ef; color: #1a8c55; }
.insc-rascunho { font-size: 12px; color: #999; }

/* ====== EMAIL OPCIONAL (confirmação) ====== */
.email-details {
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 16px;
  margin-top: 4px;
}
.email-details summary {
  cursor: pointer; font-size: 14px; font-weight: 600; color: #2563aa;
  padding: 10px 0;
}
.email-details .email-section { margin-top: 6px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 600px) {
  .field-row { flex-direction: column; gap: 0; }
  .card-options { grid-template-columns: 1fr; }
  .grid-options { grid-template-columns: 1fr 1fr; }
  .email-form { flex-direction: column; }
  .wizard-nav { flex-direction: column-reverse; gap: 10px; }
  .btn { width: 100%; justify-content: center; }
  .auth-card, .success-card { padding: 24px 18px; }
  .download-buttons .btn-download { padding: 16px; font-size: 15px; }
  .insc-item { flex-direction: column; align-items: stretch; }
  .insc-actions .btn { width: 100%; }
  .nova-inscricao { display: flex; flex-direction: column; gap: 10px; }
  .panel-head .btn { width: auto; }
}
