.conditional-field[hidden] {
  display: none !important;
}

.conditional-field > label {
  display: block;
}

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

.radio-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.radio-group legend {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.radio-option {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

.radio-option:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
}

.radio-option input {
  width: auto;
  margin-top: 2px;
  accent-color: var(--green);
}

.justification-field {
  margin-top: 2px;
  padding-top: 4px;
}

.justification-field textarea {
  min-height: 130px;
}

.justification-field > .field-help {
  margin-top: -12px;
}

.required-documents-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.required-documents-heading h3 { margin: 0 0 6px; }
.required-documents-heading p { margin: 0 0 18px; color: var(--muted); }
.required-upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.required-upload-form { min-width: 0; margin: 0; }

.required-upload {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--green-soft);
}

.required-upload-title { min-height: 38px; color: var(--ink); font-weight: 700; }
.required-upload input[type="file"] { width: 100%; max-width: 100%; min-width: 0; padding: 10px; overflow: hidden; background: #fff; }
.required-upload small { color: var(--muted); font-weight: 400; }
.upload-state { width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.upload-state.received { color: var(--green); background: #dcefe5; }
.upload-state.pending { color: #8a4b00; background: #fff0d8; }
.auto-upload-status { min-height: 18px; color: var(--green); font-size: 12px; }
.upload-file-name { display: block; max-width: 100%; min-height: 18px; color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.upload-progress { display: block; width: 100%; height: 7px; overflow: hidden; border-radius: 999px; background: #dfe7e2; }
.upload-progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .18s ease; }
.required-upload-form.upload-error .auto-upload-status,.additional-upload.upload-error .auto-upload-status { color: var(--red); }
.required-upload-form.upload-error .upload-progress>span,.additional-upload.upload-error .upload-progress>span { background: var(--red); }
.required-upload-form.upload-success .required-upload { border-color: #83b79a; background: #f3faf6; }
.required-upload-form.is-uploading .required-upload { opacity: .72; cursor: wait; }
.required-upload-form.is-uploading input[type="file"] { pointer-events: none; }
.additional-upload { margin-top: 16px; }

@media (max-width: 850px) {
  .required-upload-grid { grid-template-columns: 1fr; }
  .required-upload-title { min-height: auto; }
}

.sgpe-operation-active { overflow: hidden; }
.sgpe-progress { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(13, 29, 21, .72); backdrop-filter: blur(7px); }
.sgpe-progress[hidden] { display: none; }
.sgpe-progress-card { width: min(540px, 100%); padding: 36px; border: 1px solid rgba(255,255,255,.35); border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.28); text-align: center; }
.sgpe-progress-card h2 { margin: 10px 0 12px; font: 700 30px/1.12 Georgia, serif; }
.sgpe-progress-card p { min-height: 24px; margin: 0; color: var(--green); font-weight: 750; }
.sgpe-progress-card small { display: block; margin-top: 18px; color: var(--muted); line-height: 1.5; }
.sgpe-progress-mark { position: relative; display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 22px; background: var(--green-soft); }
.sgpe-progress-mark span { position: absolute; width: 54px; height: 54px; border: 4px solid #b7d8c7; border-top-color: var(--green); border-radius: 50%; animation: sgpe-spin .8s linear infinite; }
.sgpe-progress-mark strong { position: relative; z-index: 1; color: var(--green); font-size: 15px; font-variant-numeric: tabular-nums; }
.sgpe-progress-count { min-height: 18px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.sgpe-progress-bar { height: 7px; margin-top: 22px; overflow: hidden; border-radius: 999px; background: #e6eee9; }
.sgpe-progress-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .35s ease; }
.sgpe-progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 18px 0 0; padding: 0; list-style: none; }
.sgpe-progress-steps li { padding: 7px 5px; border-radius: 8px; background: #f2f5f3; color: var(--muted); font-size: 10px; line-height: 1.25; }
.sgpe-progress-steps li.active { background: #fff0d8; color: #8a4b00; font-weight: 700; }
.sgpe-progress-steps li.done { background: #dcefe5; color: var(--green); font-weight: 700; }
.sgpe-complete-button { margin-top: 22px; }
.sgpe-complete-button[hidden] { display: none !important; }
.sgpe-progress.is-complete .sgpe-progress-mark span { display: none; }
.sgpe-progress.is-complete .sgpe-progress-mark { background: var(--green); }
.sgpe-progress.is-complete .sgpe-progress-mark strong { color: #fff; }
.sgpe-progress.is-complete .sgpe-progress-card p { color: var(--ink); }
@keyframes sgpe-spin { to { transform: rotate(360deg); } }

.ai-justification { margin-bottom: 19px; }

/* Tela inicial: o consentimento deve caber na viewport sem rolagem. */
body:has(.start-card) { overflow: hidden; height: 100vh; }
body:has(.start-card) .app-shell { padding-top: 18px; padding-bottom: 18px; }
body:has(.start-card) .hero { padding-top: 18px; padding-bottom: 12px; gap: 22px; }
body:has(.start-card) .hero h1 { font-size: clamp(34px, 4.5vw, 56px); margin: 8px 0 12px; }
body:has(.start-card) .hero > div > p { font-size: 14px; line-height: 1.4; }
 .start-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tour-overlay{position:fixed;inset:0;z-index:2000;background:rgba(9,28,19,.68);backdrop-filter:blur(3px)}.tour-overlay[hidden]{display:none}.tour-spotlight{position:fixed;border:2px solid #8ee0b4;border-radius:18px;box-shadow:0 0 0 9999px rgba(9,28,19,.68),0 0 0 6px rgba(142,224,180,.16);pointer-events:none;transition:all .35s ease}.tour-card{position:fixed;left:50%;bottom:34px;transform:translateX(-50%);width:min(560px,calc(100% - 32px));padding:25px 28px;border-radius:18px;background:#fff;box-shadow:0 24px 70px rgba(0,0,0,.3)}.tour-card h2{margin:7px 0 8px;font:700 28px/1.1 Georgia,serif}.tour-card p{margin:0;color:var(--muted);line-height:1.55}.tour-actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px}.tour-login{display:grid;gap:7px;margin-top:17px;padding:15px;border-radius:12px;background:#f0f8f3;border:1px solid #bddcca;color:var(--green)}.tour-login strong{font:700 22px/1 monospace;letter-spacing:.16em}.tour-login small{color:var(--muted)}.tour-files{display:flex;gap:10px;flex-wrap:wrap;font-size:12px}.tour-files i{font-style:normal;color:var(--green);font-weight:800}
body:has(.start-card) .hero aside { padding: 12px 0; line-height: 1.35; font-size: 13px; }
body:has(.start-card) .start-card { padding: 16px 20px; gap: 12px; }
body:has(.start-card) footer { padding: 12px; }
.privacy-notice { margin: 0 0 12px; padding: 13px 16px; border: 1px solid #c5ded0; border-left: 4px solid var(--green); border-radius: 10px; background: var(--green-soft); color: #285642; font-size: 12px; line-height: 1.4; }
.privacy-notice strong { display: block; margin-bottom: 4px; color: var(--ink); }
.privacy-notice p { margin: 4px 0; }
.privacy-notice a { color: var(--green); font-weight: 700; }
.privacy-notice .check { margin-top: 8px; color: var(--ink); font-size: 12px; }

@media (max-width: 850px) {
  body:has(.start-card) { overflow: auto; height: auto; }
  body:has(.start-card) .app-shell { padding-bottom: 28px; }
  body:has(.start-card) .hero h1 { font-size: 40px; }
}
.ai-justification > label { margin-bottom: 0; }
.ai-actions { display: flex; align-items: center; gap: 14px; clear: both; margin-top: 14px; padding-top: 2px; position: relative; z-index: 1; }
.ai-actions .button { flex: 0 0 auto; min-height: 44px; }
.ai-actions .button.is-loading { cursor: wait; opacity: .82; }
.ai-actions .button.is-loading::before { content: ""; width: 15px; height: 15px; margin-right: 9px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ai-spin .7s linear infinite; }
.ai-actions .button.is-loading { animation: ai-pulse 1.2s ease-in-out infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@keyframes ai-pulse { 50% { opacity: .62; } }
.ai-actions small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.ai-result { margin-top: 16px; padding: 20px; border: 1px solid #b9d8c7; border-radius: 14px; background: #f4faf7; }
.ai-result[hidden] { display: none; }
.ai-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ai-result-head > strong { color: var(--ink); }
.ai-result-head span { padding: 5px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 800; }
.ai-result-head span[data-result="precisa_melhorar"] { background: var(--amber-soft); color: var(--amber); }
.ai-result-head span[data-result="insuficiente"] { background: var(--red-soft); color: var(--red); }
.ai-result > p { margin: 0 0 16px; color: #425249; font-size: 13px; line-height: 1.55; }
.ai-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.ai-columns > div { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ai-columns strong { font-size: 12px; }
.ai-columns ul { margin: 9px 0 0; padding-left: 18px; color: #4d5c54; font-size: 12px; line-height: 1.5; }
.ai-result textarea { min-height: 160px; background: #fff; }
.ai-suggestion-warning { margin: 0 0 10px; padding: 11px 13px; border-left: 3px solid var(--amber); border-radius: 7px; background: var(--amber-soft); color: #70460e; font-size: 12px; line-height: 1.45; }
.ai-result-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 700px) { .ai-actions { align-items: stretch; flex-direction: column; } .ai-columns { grid-template-columns: 1fr; } }
 .tour-fields{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:16px}.tour-fields label,.tour-login label{font-size:11px;color:var(--muted);font-weight:700}.tour-fields input,.tour-login input{margin-top:5px;padding:9px;font-size:13px;background:#fbfdfb}
 .start-actions .button:disabled{opacity:.45;cursor:not-allowed}.tour-real-page{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:18px;padding:18px;border:1px solid var(--line);border-radius:12px;background:#f8fbf9}.tour-real-page label{font-size:11px}.tour-real-page input{margin-top:5px;padding:10px;font-size:13px;background:#fff}.tour-real-page label:last-child:nth-child(odd){grid-column:1/-1}@media(max-width:600px){.tour-real-page{grid-template-columns:1fr}}
 input[data-tour-filled],select[data-tour-filled],textarea[data-tour-filled]{border-color:#4da878;background:#f0faf4;box-shadow:0 0 0 3px rgba(77,168,120,.12)}
