/* SmartExec — visual limpo, inspirado na estética Apple (claro, espaçoso, sóbrio) */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --inset: #f0f0f2;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --muted-2: #86868b;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --accent: #0071e3;
  --accent-press: #0077ed;
  --green: #34c759;
  --amber: #ff9f0a;
  --red: #ff3b30;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 30px rgba(0,0,0,.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

#app { max-width: 860px; margin: 0 auto; padding: 48px 24px 96px; }
.screen { animation: fade .4s cubic-bezier(.2,.7,.2,1); }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

h1 { font-size: 32px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; margin: 10px 0 14px; }
h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 12px; }
h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); margin: 0 0 18px; }

/* ---- Marca / intro ---- */
.brand { text-align: center; margin-bottom: 32px; }
.logo { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.logo span { color: var(--accent); }
.tagline { color: var(--muted); margin: 6px 0 0; font-size: 16px; }

.chip {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); background: rgba(0,0,0,.05);
  padding: 5px 12px; border-radius: 980px; margin-bottom: 10px;
}
.scenario-summary { color: var(--muted); font-size: 17px; }
.scenario-summary strong { color: var(--text); font-weight: 600; }

.context-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 24px 0; }
.ctx-item { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; }
.ctx-label { font-size: 13px; color: var(--muted); }
.ctx-value { font-size: 18px; font-weight: 600; margin-top: 3px; letter-spacing: -0.01em; }

.objetivo {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 15px; margin-bottom: 12px; border-left: 3px solid var(--green);
}
.partida {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 15px; margin-bottom: 24px; border-left: 3px solid var(--amber);
}
.hint { color: var(--muted); font-size: 14px; margin: 16px 0 0; }

/* ---- Botões ---- */
.btn {
  cursor: pointer; border: none; border-radius: var(--radius-sm); font-size: 16px; font-weight: 500;
  padding: 13px 24px; transition: background .18s, opacity .18s, transform .08s; font-family: inherit;
  letter-spacing: -0.01em;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--accent-press); }
.btn-ghost { background: transparent; color: var(--accent); padding: 13px 18px; }
.btn-ghost:hover { background: rgba(0,113,227,.07); }
.btn[disabled] { opacity: .6; cursor: default; }

/* Spinners / loading */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff; border-radius: 50%; animation: se-spin .7s linear infinite; vertical-align: -2px; margin-right: 8px; }
.loader { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: se-spin .8s linear infinite; margin: 6px auto 18px; }
@keyframes se-spin { to { transform: rotate(360deg); } }

/* ---- Seleção de avaliação ---- */
.picker-list { display: flex; flex-direction: column; gap: 16px; }
.picker-card { margin-bottom: 0; }
.picker-card h2 { margin-top: 8px; }
.picker-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.picker-meta span { background: var(--surface-2); color: var(--muted); border-radius: 980px; padding: 5px 12px; font-size: 13px; font-weight: 500; }
.picker-actions { margin-top: 18px; }
.picker-actions .btn { width: auto; }

/* ---- Tela "Como funciona" ---- */
.how-grid { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 8px; }
.how-item { display: flex; gap: 16px; align-items: flex-start; background: var(--surface-2); border-radius: var(--radius-sm); padding: 16px 18px; }
.how-num { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; }
.how-item strong { display: block; margin-bottom: 3px; font-weight: 600; }
.how-item p { margin: 0; color: var(--muted); font-size: 15px; }
.how-sub { margin: 28px 0 14px; }
.how-types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-item { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; }
.type-item strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.type-item span { color: var(--muted); font-size: 14px; }
.how-tip { margin: 24px 0; background: var(--surface-2); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 14px 16px; font-size: 15px; color: var(--muted); }
.how-tip strong { color: var(--text); font-weight: 600; }

/* ---- Consentimento LGPD ---- */
.consent { display: flex; gap: 11px; align-items: flex-start; margin: 22px 0 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex: none; cursor: pointer; }
.consent span { font-size: 14px; color: var(--text); line-height: 1.5; }
.linklike { background: none; border: none; padding: 0; margin: 0; font: inherit; color: var(--accent);
  font-weight: 600; cursor: pointer; text-decoration: underline; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--accent); }

/* ---- Página LGPD ---- */
.back-link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 14px; padding: 0; margin-bottom: 12px; font-family: inherit; }
.lgpd h1 { font-size: 26px; }
.lgpd-sec { margin-top: 18px; }
.lgpd-sec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); margin: 0 0 6px; }
.lgpd-sec p { margin: 0; font-size: 15px; color: var(--text); }
.lgpd-sec p strong { font-weight: 600; }
.lgpd-sec p a { color: var(--accent); font-weight: 600; }
.lgpd-foot { margin: 22px 0; font-size: 14px; color: var(--muted); }

/* ---- Formulário ---- */
.reg-form { margin-top: 22px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { font-size: 14px; color: var(--muted); }
.field input {
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: 13px 15px; font-size: 16px; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,.15); }
.reg-actions { display: flex; gap: 12px; margin-top: 6px; align-items: center; }
.reg-actions .btn { width: auto; }
.reg-actions .btn-primary { margin-left: auto; }

/* ---- Painel de indicadores ---- */
.dash-head { margin-bottom: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dash-title { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.dash-sub { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.timer { flex: none; display: inline-flex; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; box-shadow: var(--shadow); }
.timer-ic { font-size: 14px; line-height: 1; filter: grayscale(1); opacity: .7; }
.timer strong { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: .02em; }
.dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.metric { background: var(--surface); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.metric-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 10px; gap: 6px; }
.metric-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-top strong { color: var(--text); font-size: 14px; font-weight: 600; flex: none; }
.track { height: 6px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.fill { height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.fill.verde { background: var(--green); }
.fill.ambar { background: var(--amber); }
.fill.vermelho { background: var(--red); }
.fill.azul { background: var(--accent); }

/* ---- Estágio ---- */
.stage-head { margin-bottom: 18px; }
.stage-count { font-size: 13px; color: var(--accent); font-weight: 600; }
.stage-head h2 { margin-top: 4px; }
.narrative { font-size: 17px; color: var(--text); }
.news { margin: 16px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.news-item { background: var(--surface-2); border-left: 3px solid var(--amber); padding: 11px 14px; border-radius: 10px; font-size: 15px; color: var(--text); }
.news-dot { display: none; }

/* ---- Inputs ---- */
.inputs { margin-top: 20px; }
.question { font-weight: 600; font-size: 17px; margin: 22px 0 14px; letter-spacing: -0.01em; }

.option {
  display: flex; gap: 13px; align-items: flex-start; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 10px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.option:hover { border-color: var(--muted-2); }
.option.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: rgba(0,113,227,.04); }
.option input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.option-body { display: flex; flex-direction: column; }
.option-label { font-weight: 600; letter-spacing: -0.01em; }
.option-descr { font-size: 14px; color: var(--muted); margin-top: 1px; }

/* pesos */
.pesos { margin-top: 4px; }
.peso-row { display: flex; align-items: center; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.peso-row:last-of-type { border-bottom: none; }
.peso-info { flex: 1; display: flex; flex-direction: column; }
.peso-control { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.peso-range { width: 150px; accent-color: var(--accent); }
.peso-val { width: 46px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.peso-sum { margin-top: 14px; text-align: right; color: var(--muted); font-size: 14px; }
.peso-sum.ok strong { color: var(--green); }
.peso-sum strong { color: var(--amber); font-weight: 600; }

/* slider */
.slider-input { padding: 10px 0; }
.big-range { width: 100%; accent-color: var(--accent); height: 6px; }
.slider-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-top: 8px; }
.slider-value { text-align: center; font-size: 19px; font-weight: 600; margin-top: 14px; color: var(--accent); letter-spacing: -0.01em; }

.stage-footer { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.stage-footer .btn { width: auto; margin-left: auto; }
.validation { color: var(--red); font-size: 14px; }

/* ---- Relatório ---- */
.candidate-head { display: flex; align-items: center; gap: 18px; }
.cand-avatar { width: 54px; height: 54px; flex: none; border-radius: 50%; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.cand-info { flex: 1; }
.cand-name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.cand-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.cand-scenario { text-align: right; font-size: 14px; font-weight: 600; }
.cand-scenario span { display: block; font-size: 11px; color: var(--muted-2); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }

.report-hero { text-align: center; }
.score-ring { width: 128px; height: 128px; border-radius: 50%; margin: 16px auto; display: flex; align-items: baseline;
  justify-content: center; gap: 2px; border: 6px solid var(--accent); background: var(--surface); }
.score-ring.verde { border-color: var(--green); }
.score-ring.ambar { border-color: var(--amber); }
.score-ring.vermelho { border-color: var(--red); }
.score-num { font-size: 46px; font-weight: 600; align-self: center; letter-spacing: -0.03em; }
.score-max { color: var(--muted-2); font-size: 15px; align-self: center; }
.report-hero h1 { margin-bottom: 6px; }
.report-hero p { color: var(--muted); margin: 0 auto; max-width: 460px; }
.metas-line { color: var(--muted); margin-top: 10px !important; }
.metas-line strong { color: var(--text); }

.resumo { font-size: 17px; margin: 0; color: var(--text); }

.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.report-cols .card { margin-bottom: 0; }

.perfil-dom { font-size: 26px; font-weight: 600; color: var(--accent); letter-spacing: -0.02em; }
.perfil-desc { color: var(--muted); font-size: 15px; margin: 6px 0 18px; }
.perfil-mix { display: flex; flex-direction: column; gap: 12px; }
.mix-row { display: grid; grid-template-columns: 100px 1fr 42px; align-items: center; gap: 12px; font-size: 14px; }
.mix-row strong { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.tag-group { margin-bottom: 18px; }
.tag-group:last-child { margin-bottom: 0; }
.tag-title { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; font-weight: 600; }
.tag-title.verde { color: #1a7f37; }
.tag-title.vermelho { color: #c4342b; }
.tag { display: inline-block; margin: 0 6px 6px 0; padding: 7px 13px; border-radius: 980px; font-size: 14px; font-weight: 500; }
.tag.ok { background: rgba(52,199,89,.14); color: #157a33; }
.tag.warn { background: rgba(255,59,48,.12); color: #c4342b; }
.tag-inline { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  background: rgba(0,0,0,.05); padding: 2px 7px; border-radius: 6px; }

.dim { margin-bottom: 20px; }
.dim:last-child { margin-bottom: 0; }
.dim-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; margin-bottom: 8px; }
.dim-top strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.dim-interp { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

.meta-table { width: 100%; border-collapse: collapse; }
.meta-table td { padding: 12px 6px; border-bottom: 1px solid var(--line-soft); font-size: 15px; vertical-align: top; }
.meta-table tr:last-child td { border-bottom: none; }
.meta-table td:first-child { width: 22px; font-weight: 700; }
.meta-table tr.hit td:first-child { color: var(--green); }
.meta-table tr.miss td:first-child { color: var(--red); }
.meta-nums { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.meta-nums span { color: var(--muted); font-weight: 400; }

.ind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ind-item { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; }
.ind-item span { font-size: 13px; color: var(--muted); }
.ind-item strong { font-size: 17px; margin-top: 3px; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -0.01em; }

.timeline { display: flex; flex-direction: column; gap: 14px; }
.tl-item { display: flex; gap: 14px; align-items: flex-start; }
.tl-idx { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.tl-item strong { font-weight: 600; }
.tl-state { font-size: 13px; color: var(--muted); margin-top: 2px; }

.thanks-check { width: 64px; height: 64px; border-radius: 50%; background: rgba(52,199,89,.15);
  color: var(--green); font-size: 32px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; margin: 4px auto 16px; }

.pdf-hint { text-align: center; color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.pdf-hint strong { color: var(--text); font-weight: 600; }
.report-actions { display: flex; gap: 12px; align-items: center; justify-content: center; }
.report-actions .btn { width: auto; }
.report-actions .btn-primary { min-width: 260px; }

/* ---- Responsivo ---- */
@media (max-width: 720px) {
  #app { padding: 32px 18px 72px; }
  .card { padding: 24px; }
  h1 { font-size: 28px; }
  .dashboard { grid-template-columns: repeat(2, 1fr); }
  .context-grid, .report-cols, .how-types, .ind-grid { grid-template-columns: 1fr; }
  .candidate-head { flex-wrap: wrap; }
  .cand-scenario { text-align: left; width: 100%; }
  .peso-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .peso-control { min-width: 0; }
  .peso-range { flex: 1; width: auto; }
  .report-actions { flex-direction: column-reverse; }
  .report-actions .btn { width: 100%; }
}

/* ---- Impressão / PDF ---- */
@media print {
  @page { margin: 14mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; font-size: 12px; }
  #app { max-width: 100%; padding: 0; }
  .screen { animation: none; }
  .btn, .report-actions, .pdf-hint { display: none !important; }
  .card { box-shadow: none; border: 1px solid var(--line); padding: 18px; margin-bottom: 12px; break-inside: avoid; }
  .report-cols { gap: 12px; }
  .dim, .tl-item, .ind-item, .mix-row, .meta-table tr { break-inside: avoid; }
  h1 { font-size: 22px; }
  .score-ring { width: 96px; height: 96px; }
  .score-num { font-size: 34px; }
}
