/* Site de Admissão — Design System "Loreto AI" (mesmos tokens do Portal-serviços).
 * Preto + laranja Loreto, Clash Display (títulos), Satoshi (texto), JetBrains Mono (rótulos/dados). */

:root {
  --bg: #0A0A0B;
  --bg-2: #141416;
  --bg-3: #1E1E22;
  --surface-2: #1A1A1E;
  --border: #1E1E22;
  --border-strong: #2A2A30;
  --text: #EBEBEB;
  --text-2: #9A9AA2;
  --muted: #5A5A62;
  --subtle: #3A3A42;
  --orange: #F2611C;
  --orange-bg: #F2611C1A;
  --accent-hover: #FF7A3C;
  --accent-dim: #C94E10;
  --accent-glow: rgba(242, 97, 28, .26);
  --border-accent: rgba(242, 97, 28, .32);
  --green: #22C55E;  --green-bg: #22C55E1A;
  --red: #EF4444;    --red-bg: #EF44441A;
  --yellow: #EAB308; --yellow-bg: #EAB3081A;
  --brand-fg: #0A0A0B;
  --hover: rgba(255, 255, 255, .035);
  --shadow-lift: 0 24px 60px -12px rgba(0,0,0,.62), 0 8px 24px -8px rgba(0,0,0,.5);

  --font-display: "Clash Display", "Sora", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-body: "Satoshi", "Outfit", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --tr: .18s cubic-bezier(.16, 1, .3, 1);
  --topbar-h: 54px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #FAF8F4;
  --bg-2: #FFFFFF;
  --bg-3: #F1EDE7;
  --surface-2: #F5F2ED;
  --border: #E2DDD7;
  --border-strong: #CFC7BE;
  --text: #14110E;
  --text-2: #7A6F65;
  --muted: #9C9289;
  --subtle: #B8AFA6;
  --orange: #D44F0E;
  --orange-bg: #D44F0E18;
  --accent-hover: #E8631F;
  --accent-dim: #B23E08;
  --accent-glow: rgba(212, 79, 14, .22);
  --border-accent: rgba(212, 79, 14, .34);
  --green: #15803D;  --green-bg: #15803D18;
  --red: #DC2626;    --red-bg: #DC262618;
  --yellow: #B45309; --yellow-bg: #B4530918;
  --brand-fg: #FFFFFF;
  --hover: rgba(20, 17, 14, .04);
  --shadow-lift: 0 24px 60px -12px rgba(20,17,14,.18), 0 8px 24px -8px rgba(20,17,14,.1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.mono, .eyebrow { font-family: var(--font-mono); }

/* Rótulo mono maiúsculo (padrão do Portal: "COMPETÊNCIA", "INSS · FECHAMENTO") */
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow b { color: var(--orange); font-weight: 600; }

/* ─── Topo ─── */
.topnav {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding-right: 20px; border-right: 1px solid var(--border); height: 100%; }
.cube { color: var(--orange); flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.brand-sub { font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; color: var(--orange); margin-top: 3px; }
.topnav-title { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--text); position: relative; height: 100%; }
.topnav-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--orange); }
.topnav-title .ti { color: var(--orange); font-size: 17px; }
.icon-btn {
  margin-left: auto; width: 34px; height: 34px; border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-2);
  display: grid; place-items: center; cursor: pointer; transition: var(--tr); font-size: 17px;
}
.icon-btn:hover { color: var(--text); background: var(--hover); }

/* ─── Estrutura ─── */
/* Barra lateral encostada à esquerda (como o Portal) + conteúdo centralizado no espaço restante */
.shell { flex: 1; display: grid; grid-template-columns: 280px minmax(0, 1fr); width: 100%; }

.rail {
  padding: 32px 24px; border-right: 1px solid var(--border); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: var(--topbar-h); align-self: start;
  height: calc(100vh - var(--topbar-h) - 33px); overflow-y: auto;
}
:root:not([data-theme="light"]) .rail { background: #0D0D0F; }
.rail-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rail-steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md);
  color: var(--muted); font-size: 14px; font-weight: 500; position: relative; transition: var(--tr);
}
.rail-steps .num {
  font-family: var(--font-mono); font-size: 11px; width: 26px; height: 26px; flex: none;
  border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  display: grid; place-items: center; transition: var(--tr);
}
.rail-steps li.active { color: var(--text); background: var(--orange-bg); }
.rail-steps li.active::before { content: ""; position: absolute; left: -24px; top: 8px; bottom: 8px; width: 2px; background: var(--orange); }
.rail-steps li.active .num { background: var(--orange); border-color: var(--orange); color: var(--brand-fg); font-weight: 600; }
.rail-steps li.done { color: var(--text-2); }
.rail-steps li.done .num { border-color: var(--green); color: var(--green); }
.rail-note { margin-top: 6px; display: flex; gap: 10px; font-size: 12.5px; line-height: 1.5; color: var(--muted); padding-top: 18px; border-top: 1px solid var(--border); }
.rail-note .ti { color: var(--green); font-size: 16px; margin-top: 1px; }

.content { padding: 32px 56px 40px; min-width: 0; }
.content > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.progress-mobile { display: none; }

/* Cabeçalho de página com traço laranja (igual "Visão geral" do Portal) */
.page-head { position: relative; padding-bottom: 18px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.page-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 2px; background: var(--orange); }
.page-head h1 { font-family: var(--font-display); font-weight: 600; font-size: 30px; letter-spacing: -.01em; margin: 0 0 6px; }

.step { animation: enter .28s cubic-bezier(.16, 1, .3, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }

.panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; }
.panel.empty { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.panel.empty .ti { color: var(--orange); font-size: 18px; }

/* ─── Campos ─── */
.field + .field, .company + .field { margin-top: 22px; }
.field > label, .label-row label { display: block; margin-bottom: 8px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label-row label { margin-bottom: 8px; }

input, textarea, select {
  width: 100%; height: 46px; padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  outline: none; transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
}
:root[data-theme="light"] :is(input, textarea, select) { background: var(--surface-2); }
:is(input, textarea)::placeholder { color: var(--subtle); }
:is(input, textarea, select):hover { border-color: var(--muted); }
:is(input, textarea, select):focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-bg); }
input.mono { font-family: var(--font-mono); font-size: 15px; letter-spacing: .04em; }
:is(input, textarea, select).filled { border-color: var(--border-accent); background: var(--orange-bg); }
:is(input, textarea, select).invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
/* Textarea que cresce com o texto (nomes longos aparecem inteiros, sem cortar) */
textarea.autogrow { display: block; resize: none; overflow: hidden; min-height: 46px; padding: 12px 14px; line-height: 1.4; }
.label-row label { white-space: nowrap; }

/* Listas (select) com seta própria */
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  text-overflow: ellipsis; white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23F2611C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option { background: var(--bg-2); color: var(--text); }
select:has(option[value=""]:checked) { color: var(--subtle); }
.opc { font-size: 10px; color: var(--subtle); letter-spacing: .06em; }

/* Botão N/D e S/N ao lado do campo */
.btn-nd { flex: none; min-width: 58px; padding: 0 12px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; }
.btn-nd[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--brand-fg); }

/* Cidade com busca (lista do IBGE) */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px; list-style: none;
  max-height: 260px; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-lift);
}
.combo-list li { padding: 10px 12px; border-radius: var(--r-sm); font-size: 14.5px; cursor: pointer; }
.combo-list li.ativo, .combo-list li:hover { background: var(--orange-bg); color: var(--text); }
.combo-list li.vazio { color: var(--muted); cursor: default; background: none; }
.combo-list mark { background: none; color: var(--orange); font-weight: 700; }

.input-row { display: flex; gap: 10px; }
.input-icon { position: relative; flex: 1; min-width: 0; }
.input-icon .ti { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; pointer-events: none; }
.input-icon input { padding-left: 42px; }

.hint { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.hint.err { color: var(--red); }
.hint.ok { color: var(--green); }
.hint.warn { color: var(--yellow); }
.hint.loading { color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.hint.loading::before { content: ""; width: 12px; height: 12px; border: 2px solid var(--orange); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex: none; }

.link { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); text-decoration: none; white-space: nowrap; }
.link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* Cartão da empresa encontrada */
.company { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--border); border-left: 2px solid var(--green); border-radius: var(--r-md); background: var(--surface-2); }
.company-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.company-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); letter-spacing: .04em; }
.company-fantasia { margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.company-fantasia:empty { display: none; }
.chip { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--r-sm); background: var(--green-bg); color: var(--green); }
.chip.warn { background: var(--yellow-bg); color: var(--yellow); }
.company.warn { border-left-color: var(--yellow); }

/* ─── Etapa 2: blocos ─── */
.panel + .panel { margin-top: 16px; }
.panel-title { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; font-family: var(--font-body); font-weight: 700; font-size: 16px; letter-spacing: -.005em; }
.panel-title .ti { color: var(--orange); font-size: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 .field + .field { margin-top: 0; }
.panel > :is(.field, .grid-2, .grid-tit, .grid-end, .hint) + :is(.field, .grid-2, .grid-tit, .grid-end) { margin-top: 22px; }
.grid-tit { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; margin-top: 4px; }
.grid-end { display: grid; grid-template-columns: 1fr 220px; gap: 16px; }
.grid-tit .field + .field, .grid-end .field + .field { margin-top: 0; }
.tip.tip-warn { margin: 12px 0 0; background: var(--yellow-bg); border-color: var(--yellow); }
.tip-warn .ti { color: var(--yellow); }

/* Aviso LGPD (consulta CPF via Serpro) */
.lgpd { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.lgpd summary { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer; list-style: none; }
.lgpd summary::-webkit-details-marker { display: none; }
.lgpd summary .ti { color: var(--green); font-size: 16px; margin-top: 1px; flex: none; }
.lgpd summary b { color: var(--text); font-weight: 600; }
.lgpd summary u { color: var(--orange); text-decoration: none; font-weight: 600; white-space: nowrap; }
.lgpd[open] summary u { display: none; }
.lgpd-body { padding: 0 12px 12px 38px; }
.lgpd-body p { margin: 0 0 8px; }
.lgpd-body b { color: var(--text); font-weight: 600; }
.nowrap { white-space: nowrap; }
.lgpd-nota { color: var(--muted); font-style: italic; margin-bottom: 0 !important; }

.receita { margin-top: 16px; }
.btn-block { width: 100%; }
.guia { list-style: none; margin: 14px 0 0; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.guia li { display: flex; gap: 12px; }
.guia b { color: var(--text); font-weight: 600; }
.guia-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; background: var(--orange-bg); color: var(--orange); margin-top: 1px; }
kbd { font-family: var(--font-mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; color: var(--text); }
.so-mob { display: none; }
@media (hover: none) and (pointer: coarse) { .so-mob { display: inline; } .so-desk { display: none; } }

.colar { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.colar-area { height: auto; min-height: 0; padding: 10px 12px; font-size: 13px; resize: none; border-style: dashed; color: var(--text-2); }
.colar.pulse .btn-primary { animation: pulse 1.4s ease 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--orange-bg); } }

.link-btn { background: none; border: 0; padding: 0; cursor: pointer; }
.tip { display: flex; gap: 10px; margin: 0 0 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--orange-bg); border: 1px solid var(--border-accent); font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.tip b { color: var(--text); font-weight: 600; }
.tip .ti { color: var(--orange); font-size: 17px; margin-top: 1px; }
.tip-sub { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
:is(input, select, textarea):disabled { opacity: .45; cursor: not-allowed; }

.check { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); cursor: pointer; font-size: 14px; color: var(--text-2); transition: var(--tr); user-select: none; }
.check:hover { background: var(--hover); }
.check b { color: var(--text); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { flex: none; width: 22px; height: 22px; border-radius: var(--r-sm); border: 1.5px solid var(--muted); display: grid; place-items: center; transition: var(--tr); }
.check-box .ti { font-size: 15px; color: var(--brand-fg); opacity: 0; transition: var(--tr); }
.check input:checked + .check-box { background: var(--orange); border-color: var(--orange); }
.check input:checked + .check-box .ti { opacity: 1; }
.check:has(input:checked) { border-color: var(--border-accent); background: var(--orange-bg); color: var(--text); }
.check input:focus-visible + .check-box { box-shadow: 0 0 0 3px var(--orange-bg); }


/* ─── Etapa 3: contrato ─── */
.panel-sub { margin: -8px 0 16px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.panel-sub b { color: var(--text); }
.lbl { display: block; margin-bottom: 8px; }
.prefixo { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 14px; color: var(--muted); pointer-events: none; }
.input-icon input.com-prefixo { padding-left: 46px; }

/* Botões Sim/Não e escolhas (segmented) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.seg button, .chips button {
  height: 42px; min-width: 76px; padding: 0 16px; border-radius: var(--r-md); cursor: pointer;
  font: inherit; font-weight: 600; font-size: 14px; color: var(--text-2);
  background: transparent; border: 1px solid var(--border-strong); transition: var(--tr);
}
.seg button:hover, .chips button:hover { background: var(--hover); color: var(--text); }
.seg button[aria-checked="true"], .chips button.on { background: var(--orange-bg); border-color: var(--orange); color: var(--orange); }
.seg.invalid button { border-color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips button { height: 36px; min-width: 0; padding: 0 12px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; }

/* Caixa que abre ao marcar "Sim" */
.sub-box { margin-top: 14px; padding: 16px; border: 1px solid var(--border-accent); border-left: 2px solid var(--orange); border-radius: var(--r-md); background: var(--surface-2); }
.sub-box > .hint .ti { color: var(--orange); }

/* Jornada: cada faixa = dias + horários */
#jorFixo, #jorEscala { margin-top: 18px; }
.faixa { position: relative; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.faixa + .faixa { margin-top: 12px; }
.faixa-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.faixa-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; padding: 4px; }
.faixa-del:hover { color: var(--red); }
.dias { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dias button {
  width: 46px; height: 40px; border-radius: var(--r-sm); cursor: pointer; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  background: transparent; color: var(--text-2); border: 1px solid var(--border-strong); transition: var(--tr);
}
.dias button.on { background: var(--orange); border-color: var(--orange); color: var(--brand-fg); }
.dias button:disabled { opacity: .3; cursor: not-allowed; }
.dias.invalid button:not(.on) { border-color: var(--red); }
.horas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; }
.int-q { margin-top: 14px; }
.int-q + .horas, .int-q + .int-min { margin-top: 14px; }
.int-min { max-width: 520px; }
.int-min .chips { margin: 10px 0 0; }
.sufixo { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 13px; color: var(--muted); pointer-events: none; }
.input-icon input.com-sufixo { padding-left: 14px; padding-right: 48px; }
.horas .field + .field { margin-top: 0; }
.horas label { font-size: 10.5px; }
.sem-int { margin-top: 12px; padding: 10px 12px; font-size: 13px; }
.btn-add { margin-top: 12px; border-style: dashed; }
.resumo { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-md); background: var(--orange-bg); border: 1px solid var(--border-accent); }
.resumo .eyebrow { margin: 0 0 6px; }
.resumo-txt { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.5; color: var(--text); }
.resumo-total { margin: 6px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--orange); letter-spacing: .04em; }

/* Dependentes */
.dep-qtd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dep-qtd .lbl { margin: 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; }
.stepper button { width: 44px; height: 42px; background: transparent; border: 0; color: var(--orange); cursor: pointer; font-size: 16px; }
.stepper button:hover:not(:disabled) { background: var(--hover); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 40px; text-align: center; font-family: var(--font-mono); font-size: 16px; font-weight: 600; }
.dep { margin-top: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-2); }
.dep-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dep-top .eyebrow { margin: 0; color: var(--orange); }
.dep .chip { font-size: 10px; }
.dep .grid-2 .field + .field { margin-top: 0; }
.dep > .field + .field { margin-top: 14px; }
.dep .grid-2 + .field, .dep .hint + .field { margin-top: 14px; }

/* ─── Etapa 4: exame ─── */
.parceiro { display: flex; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--border); font-size: 14px; line-height: 1.55; color: var(--text-2); }
.parceiro b { color: var(--text); }
.parceiro .ti { color: var(--orange); font-size: 22px; flex: none; margin-top: 1px; }
#agendarBox .hint .ti, #exameSimMsg .ti { color: var(--orange); }
#pixBox { margin-top: 16px; }
.pix { padding: 14px 16px; border-radius: var(--r-md); border: 1px dashed var(--border-accent); background: var(--bg-2); margin-bottom: 18px; }
.pix .eyebrow { margin: 0 0 8px; color: var(--orange); }
.pix-linha { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; flex-wrap: wrap; }
.pix-linha + .pix-linha { border-top: 1px solid var(--border); }
.pix-linha > span { width: 90px; color: var(--muted); font-size: 12.5px; }
.pix-linha b { color: var(--text); overflow-wrap: anywhere; }
.pix-linha b.vazio { font-family: var(--font-body); font-weight: 500; color: var(--text-2); font-size: 13.5px; }
.pix-linha .link { margin-left: auto; }
.upload { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); cursor: pointer; transition: var(--tr); color: var(--text-2); font-size: 14px; line-height: 1.45; }
.upload:hover, .upload.arrastando { border-color: var(--orange); background: var(--orange-bg); }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload .ti { font-size: 30px; color: var(--orange); flex: none; }
.upload b { color: var(--text); }
.upload small { color: var(--muted); font-size: 12px; }
.upload.invalid { border-color: var(--red); background: var(--red-bg); }
.upload.enviando { pointer-events: none; opacity: .6; }
.arquivo { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-accent); border-left: 2px solid var(--green); border-radius: var(--r-md); background: var(--bg-2); }
.arquivo-ico { flex: none; width: 52px; height: 52px; border-radius: var(--r-sm); overflow: hidden; display: grid; place-items: center; background: var(--orange-bg); color: var(--orange); font-size: 24px; }
.arquivo-ico img { width: 100%; height: 100%; object-fit: cover; }
.arquivo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arquivo-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arquivo-info small { font-family: var(--font-mono); font-size: 11px; color: var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arquivo .btn-sm { flex: none; padding: 0 10px; }
@media (max-width: 420px) { .arquivo { gap: 10px; padding: 8px 10px; } .arquivo-ico { width: 44px; height: 44px; } .pix-linha > span { width: 100%; } }
.btn-sm { height: 36px !important; padding: 0 12px; font-size: 13px; }

/* ─── Etapa 5: documentos ─── */
.docs-sub { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; }
.docs-sub .ti { color: var(--orange); font-size: 17px; margin-top: 1px; flex: none; }
.doc { padding: 18px 0; }
.doc + .doc { border-top: 1px solid var(--border); }
.doc:last-child { padding-bottom: 0; }
.doc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.doc-top .eyebrow { margin: 0; }
.doc-top .eyebrow b { color: var(--orange); }
.doc-cont { font-family: var(--font-mono); font-size: 11.5px; color: var(--green); white-space: nowrap; }
.doc-dica { margin: 4px 0 10px; font-size: 12.5px; color: var(--muted); }
.doc .arquivo + .arquivo, .doc .arquivo + .upload { margin-top: 8px; }
.upload-mais { padding: 12px 18px; }
.upload-mais .ti { font-size: 22px; }

/* Cadastro enviado */
.fim { text-align: center; padding: 40px 24px; }
.fim-ico { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--green-bg); color: var(--green); font-size: 40px; }
.fim h1 { font-family: var(--font-display); font-weight: 600; font-size: 28px; margin: 0 0 8px; }
.fim p { max-width: 520px; margin: 0 auto 12px; color: var(--text-2); line-height: 1.55; }
.fim b { color: var(--text); }
.fim-proto { font-size: 15px; }
.fim-proto b { color: var(--orange); letter-spacing: .04em; }
.fim .ti-stethoscope { color: var(--orange); }
.fim .btn { margin-top: 12px; }

/* ─── Botões ─── */
.btn {
  height: 46px; padding: 0 18px; border-radius: var(--r-md);
  font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; transition: var(--tr); white-space: nowrap;
}
.btn .ti { font-size: 17px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: var(--brand-fg); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 8px 24px -8px var(--accent-glow); }
.btn-outline { background: transparent; color: var(--orange); border-color: var(--border-accent); }
.btn-outline:hover:not(:disabled) { background: var(--orange-bg); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text); background: var(--hover); }
.btn[hidden] { display: none; }
.spinner { display: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.loading .spinner { display: inline-block; }
.btn.loading .ti { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.actions .btn-primary { min-width: 180px; }

/* ─── Rodapé de status (igual Portal) ─── */
.statusbar {
  display: flex; gap: 20px; padding: 8px 24px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
}
.statusbar span { display: inline-flex; align-items: center; gap: 6px; }
.statusbar-right { margin-left: auto; color: var(--subtle); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 48px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--bg-3); color: var(--text); border: 1px solid var(--border-strong);
  padding: 10px 16px; border-radius: var(--r-md); font-size: 13.5px; box-shadow: var(--shadow-lift);
  transition: var(--tr); max-width: calc(100% - 32px); z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ─── Mobile ─── */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topnav { padding: 0 16px; gap: 12px; }
  .brand { padding-right: 12px; }
  .topnav-title { font-size: 13px; }
  .content { padding: 20px 16px 104px; }
  .progress-mobile { display: block; margin-bottom: 20px; }
  .progress-mobile .eyebrow { display: none; }
  .progress-track { height: 3px; background: var(--border-strong); border-radius: 3px; overflow: hidden; }
  .progress-track span { display: block; height: 100%; background: var(--orange); transition: width var(--tr); }
  .page-head h1 { font-size: 24px; }
  .panel { padding: 18px 16px; }
  .actions {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 15;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border);
  }
  /* iPhone dá zoom automático em campos com fonte < 16px */
  input, input.mono, textarea, select { font-size: 16px; }
  input, select, .btn { height: 50px; }
  textarea.autogrow { min-height: 50px; padding-top: 14px; padding-bottom: 14px; }
  .content { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  /* Ao focar/rolar até um campo, ele nunca fica escondido atrás da barra fixa */
  html { scroll-padding-bottom: calc(110px + env(safe-area-inset-bottom)); scroll-padding-top: 70px; }
  .actions .btn-primary { flex: 1; min-width: 0; }
  .statusbar { display: none; }
  .toast { bottom: 84px; }
}
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .grid-2 .field + .field { margin-top: 22px; }
  .grid-tit { grid-template-columns: 1fr 1fr; row-gap: 22px; }
  .grid-tit .field:first-child { grid-column: 1 / -1; }
  .grid-end { grid-template-columns: 1fr; row-gap: 22px; }
  .horas { max-width: none; }
  .int-min { max-width: none; }
  .int-q .seg { display: grid; grid-template-columns: 1fr 1fr 1.6fr; }
  .int-q .seg button { min-width: 0; padding: 0 8px; font-size: 13px; }
  .dias { display: grid; grid-template-columns: repeat(7, 1fr); }
  .dias button { width: auto; padding: 0; font-size: 11px; }
  .seg[role=radiogroup][data-sn] button { flex: 1; }
  .seg[data-sn] { display: flex; }
  #jorTipo { display: grid; grid-template-columns: 1fr 1fr; }
  #jorTipo button { padding: 0 8px; font-size: 13px; }
}
@media (max-width: 420px) {
  .hide-sm { display: none; }
  .input-icon .ti { display: none; }
  .input-icon input { padding-left: 14px; }
  input.mono { letter-spacing: 0; }
  .btn-outline span:not(.spinner) { display: none; }
  .btn-outline { padding: 0 14px; }
}

/* ─── Admin ─── */
.admin { max-width: 980px; margin: 0 auto; padding: 28px 24px 60px; display: flex; flex-direction: column; gap: 16px; }
.admin .panel + .panel { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head .panel-title { margin: 0; }
.chip.err { background: var(--red-bg); color: var(--red); }
.admin-acoes { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.admin-acoes .hint { margin: 0; }
.wa-qr { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.wa-qr img { width: 240px; height: 240px; background: #fff; padding: 8px; border-radius: var(--r-md); }
.wa-qr .guia { flex: 1; min-width: 240px; margin: 0; }
.wa-teste { margin-top: 18px; max-width: 520px; }
.wa-teste label { display: block; margin-bottom: 8px; }
.cad-lista { display: flex; flex-direction: column; gap: 10px; }
.cad { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.cad-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.cad-prot { font-size: 12px; color: var(--orange); }
.cad-sub { margin: 4px 0 10px; font-size: 13px; color: var(--muted); }
.cad-passos { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.passo { display: inline-flex; align-items: center; gap: 6px; }
.passo .link-btn { font-size: 14px; }
body.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login-box { width: 100%; max-width: 380px; text-align: center; }
.login-box .cube { color: var(--text); margin-bottom: 10px; }
.login-box h1 { font-family: var(--font-display); font-size: 24px; margin: 0 0 4px; }
.login-box .field { text-align: left; margin: 22px 0 14px; }
.login-box .btn { margin-top: 6px; }
@media (max-width: 560px) { .admin { padding: 18px 16px 40px; } .wa-qr img { width: 100%; height: auto; max-width: 280px; } }
.topnav > form { margin-left: auto; }
.ts-box { display: flex; justify-content: center; margin-top: 16px; } .ts-box:empty { display: none; }
