/* ==========================================================================
   FICHA DE EMPREGO (formulário público do candidato)
   Mobile-first · tema claro/escuro · animações com propósito
   Também usado por candidato/sucesso.html (variáveis e .mobile-app-wrapper).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root,
[data-theme="light"] {
  color-scheme: light;

  --app-bg: #e9eef5;
  --card-bg: #ffffff;
  --header-bg: #0d47a1;
  --header-text: #ffffff;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #566479;
  --placeholder: #66758b;

  --border-color: #d5dde8;      /* divisores */
  --field-border: #8695a9;      /* contorno de controles (≥3:1) */
  --hairline: rgba(15, 23, 42, 0.08);
  --border-focus: #1d4ed8;

  --input-bg: #ffffff;
  --input-text: #0f172a;
  --box-bloco-bg: #f3f6fb;
  --box-bloco-border: #e2e8f0;

  --accent: #1d4ed8;
  --accent-strong: #1e40af;
  --accent-soft: #e8f0fe;
  --btn-bg: #1d4ed8;
  --btn-bg-hover: #1e40af;
  --ring: rgba(29, 78, 216, 0.22);
  --ring-strong: rgba(29, 78, 216, 0.55);

  --error: #b91c1c;
  --error-soft: #fef2f2;
  --error-ring: rgba(185, 28, 28, 0.2);
  --success: #15803d;
  --warn-soft: #fff7e6;
  --warn-line: #f3d9a4;

  --progress-track: #dbe3ee;
  --progress-fill: #1d4ed8;

  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.06), 0 28px 70px -24px rgba(15, 23, 42, 0.3);
  --shadow-sheet: 0 -12px 48px rgba(2, 6, 23, 0.22);

  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23566479' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

[data-theme="dark"] {
  color-scheme: dark;

  --app-bg: #060a12;
  --card-bg: #0e1522;
  --header-bg: #0b1d3f;
  --header-text: #f8fafc;

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #9aa9bf;
  --placeholder: #8392a8;

  --border-color: #26334a;
  --field-border: #5b6c86;
  --hairline: rgba(255, 255, 255, 0.08);
  --border-focus: #60a5fa;

  --input-bg: #151e2f;
  --input-text: #f1f5f9;
  --box-bloco-bg: #131c2c;
  --box-bloco-border: #26334a;

  --accent: #7cb3ff;
  --accent-strong: #bfdbfe;
  --accent-soft: rgba(96, 165, 250, 0.14);
  --btn-bg: #2563eb;
  --btn-bg-hover: #3b73f0;
  --ring: rgba(96, 165, 250, 0.3);
  --ring-strong: rgba(147, 197, 253, 0.7);

  --error: #fca5a5;
  --error-soft: rgba(248, 113, 113, 0.1);
  --error-ring: rgba(248, 113, 113, 0.28);
  --success: #4ade80;
  --warn-soft: rgba(245, 158, 11, 0.1);
  --warn-line: rgba(245, 158, 11, 0.32);

  --progress-track: #212d44;
  --progress-fill: #60a5fa;

  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 28px 70px -24px rgba(0, 0, 0, 0.7);
  --shadow-sheet: 0 -12px 48px rgba(0, 0, 0, 0.6);

  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa9bf' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-pop: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* ---------- Base ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--app-bg);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mobile-app-wrapper {
  position: relative;
  max-width: 640px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  overflow: clip;
  transition: background-color 0.3s ease;
}

@media (min-width: 700px) {
  body { padding: 32px 16px; }
  .mobile-app-wrapper {
    min-height: calc(100dvh - 64px);
    border-radius: 28px;
    box-shadow: var(--shadow-card);
  }
}

/* ---------- Cabeçalho ---------- */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) 14px calc(20px + env(safe-area-inset-left));
  background: var(--header-bg);
  color: var(--header-text);
  animation: fade-down 0.55s var(--ease-out) both;
}

.header-brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-logo-img {
  display: block;
  flex: none;
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  padding: 3px;
  border-radius: 10px;
  background: #fff;
}

.header-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}
.header-icon svg { width: 20px; height: 20px; }

.header-titles h1 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.header-titles p {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  opacity: 0.82;
}

.theme-toggle-btn {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.2s var(--ease-out), transform 0.12s var(--ease-out);
}
.theme-toggle-btn:active { transform: scale(0.94); }
.theme-toggle-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .theme-toggle-btn:hover { background: rgba(255, 255, 255, 0.22); }
}

.theme-icon {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease-out), opacity 0.2s ease;
}
/* Claro → mostra a lua (ação: ir ao escuro). Escuro → mostra o sol. */
.theme-sun { opacity: 0; transform: rotate(-70deg); }
[data-theme="dark"] .theme-moon { opacity: 0; transform: rotate(70deg); }
[data-theme="dark"] .theme-sun { opacity: 1; transform: none; }

/* ---------- Mensagens do servidor ---------- */
.mf-flash-wrap {
  display: grid;
  gap: 8px;
  padding: 14px 20px 0;
}
.mf-flash {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  background: var(--box-bloco-bg);
  color: var(--text-primary);
  animation: rise 0.45s var(--ease-out) both;
}
.mf-flash svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mf-flash--danger { background: var(--error-soft); color: var(--error); }
.mf-flash--warning { background: var(--warn-soft); color: var(--text-primary); }
.mf-flash--success { background: rgba(21, 128, 61, 0.1); color: var(--success); }
.mf-flash--info { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- Progresso ---------- */
.progress-container {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 20px 4px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--hairline);
  animation: fade-in 0.5s 0.08s var(--ease-out) both;
}
@supports (backdrop-filter: blur(1px)) {
  .progress-container {
    background: color-mix(in srgb, var(--card-bg) 84%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
  }
}

.progress-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.progress-count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.progress-name {
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-align: right;
}

.progress-steps {
  display: flex;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.progress-steps li { flex: 1; min-width: 0; }

.pstep {
  position: relative;
  display: block;
  width: 100%;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  cursor: default;
}
.pstep::before,
.pstep::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
}
.pstep::before { background: var(--progress-track); }
.pstep::after {
  background: var(--progress-fill);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out), opacity 0.3s ease;
}
.pstep.is-done::after { transform: scaleX(1); opacity: 0.5; }
.pstep.is-current::after { transform: scaleX(1); opacity: 1; }
.pstep:not(:disabled) { cursor: pointer; }
.pstep:focus-visible { outline: 3px solid var(--ring-strong); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .pstep:not(:disabled):hover::after { opacity: 0.85; }
}

.progress-steps.is-boot .pstep.is-current::after {
  animation: seg-fill 0.8s 0.4s var(--ease-out) both;
}
@keyframes seg-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- Corpo / etapas ---------- */
.form-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.step-viewport {
  flex: 1;
  padding: 26px calc(20px + env(safe-area-inset-right)) 36px calc(20px + env(safe-area-inset-left));
}

.step-panel { display: none; }
.step-panel.active { display: block; }

.step-panel.is-entering > * {
  animation: rise 0.55s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes rise {
  from { opacity: 0; transform: translate3d(var(--dx, 0px), 12px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-down {
  from { opacity: 0; transform: translate3d(0, -10px, 0); }
  to { opacity: 1; transform: none; }
}

/* Cabeçalho da etapa */
.step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}
.step-icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.step-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step-icon .draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.step-panel.is-entering .step-icon .draw {
  animation: draw 0.9s var(--ease-out) calc(var(--i, 0) * 45ms + 0.18s) both;
}
@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.step-head h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.step-head h2:focus { outline: none; }
.step-head p {
  margin: 6px 0 0;
  font-size: 0.96875rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-wrap: pretty;
}

.req-note {
  margin: -12px 0 22px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.block { margin-top: 38px; }
.block-head { margin-bottom: 18px; }
.block-title {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.2;
}
.block-sub {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- Campos ---------- */
.form-group {
  position: relative;
  min-width: 0;
  margin: 0 0 20px;
}
fieldset.form-group {
  border: 0;
  padding: 0;
  min-inline-size: 0;
}

.form-label {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  float: none;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  transition: color 0.2s ease;
}
.form-label .required { margin-left: 2px; color: var(--error); }
.form-group:focus-within > .form-label { color: var(--accent); }

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--field-border);
  border-radius: 12px;
  background-color: var(--input-bg);
  color: var(--input-text);
  font: inherit;
  font-size: 1rem; /* 16px: evita zoom automático no iOS */
  line-height: 1.35;
  caret-color: var(--accent);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background-color 0.18s ease;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--placeholder); opacity: 1; }

.form-textarea { min-height: 96px; resize: vertical; }

.form-select {
  padding-right: 44px;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  text-overflow: ellipsis;
  cursor: pointer;
}

.form-input[readonly] { background-color: var(--box-bloco-bg); border-color: var(--border-color); color: var(--text-secondary); }
.form-input.uppercase { text-transform: uppercase; }
.form-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.form-input[type="number"]::-webkit-outer-spin-button,
.form-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (hover: hover) and (pointer: fine) {
  .form-input:hover:not(:focus):not([readonly]),
  .form-select:hover:not(:focus),
  .form-textarea:hover:not(:focus) { border-color: var(--text-muted); }
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--ring);
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--error);
  background-color: var(--error-soft);
}
.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus { box-shadow: 0 0 0 4px var(--error-ring); }

.form-input.is-valid {
  border-color: var(--success);
  padding-right: 44px;
  background-image: var(--check-icon);
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}

/* Autofill do navegador respeita o tema */
.form-input:-webkit-autofill,
.form-select:-webkit-autofill {
  -webkit-text-fill-color: var(--input-text);
  box-shadow: 0 0 0 1000px var(--input-bg) inset;
  caret-color: var(--accent);
}

/* Campos preenchidos pelo CEP */
.form-input.autofilled { animation: autofill 1.1s var(--ease-out); }
@keyframes autofill {
  0% { background-color: var(--accent-soft); border-color: var(--border-focus); }
  100% { background-color: var(--input-bg); }
}

.input-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Mensagem de campo: expande com grid-template-rows, sem medir altura */
.field-msg,
.input-error {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.22s var(--ease-out), opacity 0.2s ease;
}
.field-msg > div { min-height: 0; overflow: hidden; }
.field-msg > div > span {
  display: block;
  padding-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}
.field-msg.show { grid-template-rows: 1fr; opacity: 1; }
.field-msg.is-error { color: var(--error); }
.field-msg.is-info { color: var(--text-muted); }
.field-msg.is-ok { color: var(--success); }

.shake { animation: shake 0.34s var(--ease-out); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.form-row > * { min-width: 0; }
.form-row--side { grid-template-columns: minmax(0, 1fr) 112px; }
.form-row--uf { grid-template-columns: minmax(0, 1fr) 96px; }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.block--first { margin-top: 8px; }
@media (max-width: 479px) {
  .form-row:not(.form-row--keep):not(.form-row--side):not(.form-row--uf) { grid-template-columns: 1fr; }
}

/* ---------- Cartões de rádio ---------- */
.radio-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}
.radio-group-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.radio-group-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.radio-group-cards--3 .radio-card { gap: 6px; padding: 10px 8px; font-size: 0.9rem; }
.radio-group-cards--3 .radio-card::before { width: 16px; height: 16px; }
.radio-group-cards--3 .radio-card:has(input:checked)::before, .radio-group-cards--3 .radio-card.selected::before { background-size: 8px 8px, auto; }

.radio-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1.5px solid var(--field-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 0.96875rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 0.18s var(--ease-out), background-color 0.18s var(--ease-out), color 0.18s ease, transform 0.12s var(--ease-out);
}
.radio-card input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.radio-card::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--field-border);
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, var(--accent) 96%, transparent) center / 0 0 no-repeat,
    var(--input-bg);
  transition: border-color 0.18s var(--ease-out), background-size 0.28s var(--ease-pop);
}
.radio-card:active { transform: scale(0.97); }
.radio-card:has(input:checked),
.radio-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.radio-card:has(input:checked)::before,
.radio-card.selected::before {
  border-color: var(--accent);
  background-size: 10px 10px, auto;
}
.radio-card:has(input:focus-visible) { outline: 3px solid var(--ring-strong); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .radio-card:hover { border-color: var(--accent); }
}
.radio-group-cards.is-invalid .radio-card { border-color: var(--error); }

/* ---------- Revelar campos condicionais ---------- */
.reveal {
  display: grid;
  grid-template-rows: 0fr;
  margin: 0 -4px;
  transition: grid-template-rows 0.22s var(--ease-out);
}
.reveal > .reveal-inner { min-height: 0; overflow: hidden; }
.reveal-body {
  padding: 12px 4px 4px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.22s var(--ease-out);
}
.reveal.is-open { grid-template-rows: 1fr; transition-duration: 0.36s; }
.reveal.is-open .reveal-body {
  opacity: 1;
  transform: none;
  transition: opacity 0.28s var(--ease-out) 0.05s, transform 0.36s var(--ease-out) 0.03s;
}
.reveal-body > .form-group:last-child { margin-bottom: 8px; }
.reveal > .reveal-inner > .reveal-body > .btn-link { margin-bottom: 4px; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: opacity 0.15s ease, transform 0.12s var(--ease-out);
}
.btn-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-link:active { transform: scale(0.97); }
.btn-link:focus-visible { outline: 3px solid var(--ring-strong); outline-offset: 2px; }

/* ---------- Vagas da unidade (etapa 1) ---------- */
.vagas-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  margin: 8px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-secondary);
}
.vagas-status[hidden] { display: none; }
.vagas-status .btn-link { min-height: 44px; }
.vagas-status .btn-link[hidden] { display: none; }
.form-select:disabled { cursor: not-allowed; opacity: 0.72; }

/* ---------- Experiências ---------- */
.card-bloco {
  margin: 0 0 16px;
  padding: 18px 16px 2px;
  border-radius: 18px;
  background: var(--box-bloco-bg);
  scroll-margin-bottom: 120px;
}
.exp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.exp-num {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--btn-bg);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}
.exp-title { flex: 1; min-width: 0; font-weight: 650; letter-spacing: -0.01em; }

.btn-remove-exp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: -8px -6px -8px 0;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--error);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s var(--ease-out);
}
.btn-remove-exp svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-remove-exp:active { transform: scale(0.96); }
.btn-remove-exp:focus-visible { outline: 3px solid var(--error-ring); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .btn-remove-exp:hover { background: var(--error-soft); }
}

.btn-add-exp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1.5px dashed var(--accent);
  border-radius: 14px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.96875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.12s var(--ease-out);
}
.btn-add-exp svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-add-exp:active { transform: scale(0.98); }
.btn-add-exp:focus-visible { outline: 3px solid var(--ring-strong); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .btn-add-exp:hover { background: var(--accent-soft); }
}

/* ---------- Termo, consentimento e assinatura ---------- */
.declaration {
  margin: 0 0 14px;
  padding: 16px;
  border-radius: 14px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-primary);
  text-wrap: pretty;
}

.lgpd-box {
  max-height: 172px;
  margin-bottom: 16px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 14px;
  background: var(--box-bloco-bg);
  color: var(--text-secondary);
  font-size: 0.84375rem;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: var(--field-border) transparent;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 30px), transparent);
}
.lgpd-box.at-end { -webkit-mask-image: none; mask-image: none; }
.lgpd-box--short { max-height: none; overflow: visible; }
.lgpd-box:focus-visible { outline: 3px solid var(--ring-strong); outline-offset: 2px; }
.lgpd-box strong { color: var(--text-primary); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1.5px solid var(--field-border);
  border-radius: 14px;
  background: var(--input-bg);
  font-size: 0.9375rem;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.18s var(--ease-out), background-color 0.18s var(--ease-out), transform 0.12s var(--ease-out);
}
.consent:active { transform: scale(0.99); }
.consent input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  border: 2px solid var(--field-border);
  border-radius: 7px;
  background: transparent center / 0 0 no-repeat;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.18s var(--ease-out), border-color 0.18s var(--ease-out), background-size 0.28s var(--ease-pop);
}
.consent input:checked {
  border-color: var(--btn-bg);
  background-color: var(--btn-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 16px 16px;
}
.consent:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.consent:has(input:focus-visible) { outline: 3px solid var(--ring-strong); outline-offset: 2px; }
.consent.is-invalid { border-color: var(--error); background: var(--error-soft); }

.signature-box {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--field-border);
  border-radius: 16px;
  background: #ffffff; /* papel: tinta escura sempre legível, nos dois temas */
  touch-action: none;
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.signature-box.is-signing { border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--ring); }
.signature-box.is-invalid { border-color: var(--error); box-shadow: 0 0 0 4px var(--error-ring); }

.signature-canvas {
  display: block;
  width: 100%;
  height: 200px;
  cursor: crosshair;
  touch-action: none;
  background: transparent;
}

.signature-hint {
  position: absolute;
  inset: auto 20px 46px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px dashed #b6c1d1;
  color: #7a889c;
  font-size: 0.875rem;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}
.signature-hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.signature-box.has-ink .signature-hint { opacity: 0; }

.signature-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.signature-actions span { font-size: 0.8125rem; color: var(--text-muted); }

/* ---------- Rodapé de navegação ---------- */
.mobile-footer {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 10px;
  padding: 12px calc(20px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  background: var(--card-bg);
  border-top: 1px solid var(--hairline);
}
@supports (backdrop-filter: blur(1px)) {
  .mobile-footer {
    background: color-mix(in srgb, var(--card-bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
  }
}

.mf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.12s var(--ease-out), background-color 0.18s var(--ease-out), border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), opacity 0.2s ease;
}
.mf-btn svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease-out); }
.mf-btn:active { transform: scale(0.97); }
.mf-btn:focus-visible { outline: 3px solid var(--ring-strong); outline-offset: 2px; }
.mf-btn[hidden] { display: none; }

.mf-btn--primary {
  flex: 1;
  background: var(--btn-bg);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px -8px var(--btn-bg);
}
.mf-btn--ghost {
  flex: none;
  background: transparent;
  border-color: var(--field-border);
  color: var(--text-primary);
}
@media (hover: hover) and (pointer: fine) {
  .mf-btn--primary:hover { background: var(--btn-bg-hover); }
  .mf-btn--primary:hover svg.nudge-right { transform: translateX(3px); }
  .mf-btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
  .mf-btn--ghost:hover svg.nudge-left { transform: translateX(-3px); }
}
.mf-btn.is-loading { cursor: progress; pointer-events: none; }
.mf-btn:disabled { opacity: 0.85; cursor: progress; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bottom sheet: informações do cargo ---------- */
dialog.sheet-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  overflow: hidden;
}
dialog.sheet-dialog:not([open]) { display: none; }
dialog.sheet-dialog::backdrop { background: transparent; }

.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  opacity: 0;
}
.sheet {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  max-height: min(84dvh, 680px);
  margin: 0 auto;
  padding: 0 calc(24px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
  border-radius: 26px 26px 0 0;
  background: var(--card-bg);
  box-shadow: var(--shadow-sheet);
  will-change: transform;
}
.sheet-grab {
  flex: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.sheet-grab:active { cursor: grabbing; }
.sheet-handle {
  width: 40px;
  height: 5px;
  margin: 0 auto;
  border-radius: 3px;
  background: var(--field-border);
  opacity: 0.55;
}
.sheet-handle-area { padding: 10px 0 14px; }

.sheet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
}
.sheet-eyebrow {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.sheet-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.sheet-close {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: -6px -10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s var(--ease-out);
}
.sheet-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sheet-close:active { transform: scale(0.92); }
.sheet-close:focus-visible { outline: 3px solid var(--ring-strong); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .sheet-close:hover { background: var(--box-bloco-bg); }
}

.sheet-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--box-bloco-bg);
  scrollbar-width: thin;
}
.sheet-label {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sheet-desc {
  margin: 0;
  font-size: 0.96875rem;
  line-height: 1.7;
  white-space: pre-line;
  color: var(--text-primary);
}
.sheet .mf-btn { width: 100%; margin-top: 18px; }

/* ---------- Variações de acessibilidade ---------- */
@media (prefers-reduced-motion: reduce) {
  .mobile-header,
  .progress-container,
  .mf-flash { animation: fade-in 0.2s ease both; }

  .step-panel.is-entering > * {
    animation: fade-in 0.22s ease both;
    animation-delay: 0s;
  }
  .step-panel.is-entering .step-icon .draw { animation: none; }
  .progress-steps.is-boot .pstep.is-current::after { animation: none; }
  .pstep::after { transition: opacity 0.2s ease; }
  .reveal,
  .reveal.is-open { transition: none; }
  .reveal-body,
  .reveal.is-open .reveal-body { transform: none; transition: opacity 0.2s ease; }
  .shake { animation: none; }
  .form-input.autofilled { animation: none; }
  .radio-card::before,
  .consent input { transition: border-color 0.15s ease, background-color 0.15s ease; }
  .theme-icon { transition: opacity 0.2s ease; transform: none !important; }
  .mf-btn:active,
  .radio-card:active,
  .consent:active { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .progress-container,
  .mobile-footer {
    background: var(--card-bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root, [data-theme="light"] { --field-border: #475569; --hairline: rgba(15, 23, 42, 0.4); }
  [data-theme="dark"] { --field-border: #94a3b8; --hairline: rgba(255, 255, 255, 0.4); }
  .progress-container,
  .mobile-footer { background: var(--card-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .form-input, .form-select, .form-textarea, .radio-card { border-width: 2px; }
}
