/* ============================================================
   M-doc — Admissão Digital
   Paleta da marca: #7E35E4 (roxo), #01FFFF (ciano), #EE8434 (laranja)
   e #C95D63 (rosa). Estrutura de tokens e componentes segue o
   avald-design-system.md; só os valores de cor mudaram.
   ============================================================ */

:root {
  /* Marca — roxo (ação) */
  --roxo-100: #f0e8fd;
  --roxo-300: #c7a6f5;
  --roxo-500: #9b5cec;
  --roxo-700: #7e35e4;  /* cor da marca */
  --roxo-900: #4d1b91;

  /* Marca — ciano (destaque; claro demais para texto sobre branco) */
  --ciano-100: #d9ffff;
  --ciano-300: #7dffff;
  --ciano-500: #01ffff; /* cor da marca */
  --ciano-700: #00a3a3;
  --ciano-900: #00595c;

  /* Marca — laranja (atenção) */
  --laranja-100: #fdecdc;
  --laranja-500: #ee8434; /* cor da marca */
  --laranja-700: #a9530f;

  /* Marca — rosa (erro) */
  --rosa-100: #f9e4e5;
  --rosa-500: #c95d63;    /* cor da marca */
  --rosa-700: #93353b;

  /* Escala Cinza */
  --gray-100: #ffffff;
  --gray-200: #f6f6f6;
  --gray-300: #e7e7e7;
  --gray-400: #d1d1d1;
  --gray-500: #b0b0b0;
  --gray-600: #5d5d5d;
  --gray-900: #3d3d3d;
  --gray-1000: #1f1f1f;

  /* Semânticas */
  --primary: var(--roxo-700);
  --primary-strong: var(--roxo-900); /* hover de CTA */
  --primary-subtle: var(--roxo-100);
  --accent: var(--ciano-700);        /* ciano legível sobre branco */
  --accent-vivo: var(--ciano-500);   /* o ciano puro, só em superfícies escuras */
  --accent-subtle: var(--ciano-100);
  --bg-canvas: var(--gray-100);
  --bg-subtle: var(--gray-200);
  --bg-strong: var(--gray-300);
  --fg: var(--gray-900);
  --fg-strong: var(--gray-1000);
  --fg-soft: var(--gray-500);     /* só legendas decorativas */
  --fg-mid: var(--gray-600);      /* labels informativas (legibilidade) */
  --fg-disabled: var(--gray-400);
  /* verde mantido para "aprovado/conferido": é a convenção que o RH espera */
  --success: #059669;
  --success-subtle: #d1fae5;
  --danger: var(--rosa-700);
  --danger-subtle: var(--rosa-100);
  --warning: var(--laranja-700);
  --warning-subtle: var(--laranja-100);
  --ring: var(--roxo-500);

  /* Superfícies */
  --borda: 0.8px solid rgba(231, 231, 231, 0.6);
  --sombra: rgba(0, 0, 0, 0.06) 0px 1px 3px, rgba(0, 0, 0, 0.04) 0px 4px 12px;
  --radius: 12px;
  --radius-lg: 16px;

  /* Tipografia — Inter é a única fonte do app */
  --font-inter: "Inter", "Inter Fallback", "Segoe UI", sans-serif;
  --fonte-corpo: var(--font-inter);
  --fonte-titulo: var(--font-inter);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-subtle);
  color: var(--fg);
  font-family: var(--font-inter);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-inter);
  color: var(--fg-strong);
  line-height: 1.3;
  margin: 0 0 0.35em;
}

h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }

p { margin: 0 0 0.85em; }

a { color: var(--primary); }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

svg.lucide { display: inline-block; vertical-align: middle; }

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.texto-suave { color: var(--fg-mid); font-size: 14px; }

/* Boas-vindas: único uso do peso 900 (hero, como no login Avald) */
#tela-inicio h1 { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; }

/* ---------- Marca (badge quadrado + duas linhas) ---------- */

.marca {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Símbolo oficial do grupo Multilaser. Fica no azul da marca deles
   (#0094FF) — logo não se recolore; o roxo/ciano segue sendo do M-doc. */
.marca-badge {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.marca-texto { line-height: 1.15; min-width: 0; }

.marca-nome {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fg-strong);
  white-space: nowrap;
}

.marca-sub {
  display: block;
  font-size: 11px;
  color: var(--fg-soft);
  white-space: nowrap;
}

/* ---------- Cabeçalho fixo (marca + progresso) ---------- */

.topo {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 -20px 18px;
  padding: 10px 20px;
  background: rgba(246, 246, 246, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bg-strong);
}

/* ---------- Progresso (pontos + pílula do passo atual) ---------- */

.progresso { margin-top: 10px; }

.progresso-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progresso-passo { color: var(--primary); }
.progresso-feitos { color: var(--fg-soft); }

.progresso-trilha {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
}

.p-ponto {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-strong);
  flex-shrink: 0;
  transition: background 0.25s ease;
}

/* passos concluídos em ciano, passo atual em roxo — as duas cores da marca */
.p-ponto.feito { background: var(--accent); }

.p-atual {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(126, 53, 228, 0.32);
  animation: pilula 0.25s ease;
}

.p-atual svg.lucide { width: 14px; height: 14px; }

@keyframes pilula {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Botões ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-inter);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn svg.lucide { width: 18px; height: 18px; }

.btn:active { transform: scale(0.985); }

.btn-primario {
  background-color: var(--primary);
  color: #fff;
}
.btn-primario:hover {
  background-color: var(--primary-strong);
  box-shadow: 0 2px 8px rgba(126, 53, 228, 0.32);
}
.btn-primario:disabled {
  background-color: var(--fg-disabled);
  box-shadow: none;
  cursor: default;
}

.btn-secundario {
  background-color: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secundario:hover { background-color: var(--primary-subtle); }

.btn-texto {
  background: none;
  border: none;
  color: var(--primary);
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 10px;
}

/* ---------- Telas ---------- */

.tela { display: none; }
.tela.ativa {
  display: block;
  animation: entrar 0.3s ease;
}

@keyframes entrar {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.cartao {
  background-color: var(--bg-canvas);
  border: var(--borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--sombra);
  padding: 20px;
  margin-bottom: 16px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}

/* Lista de documentos (tela inicial) */

.lista-docs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 20px;
}

.lista-docs li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

.icone-chip {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--primary-subtle);
  color: var(--primary);
  border-radius: 10px;
  flex-shrink: 0;
}

.icone-chip svg.lucide { width: 17px; height: 17px; }

.lista-docs .feito-check {
  margin-left: auto;
  color: var(--success);
  display: grid;
  place-items: center;
}

.lista-docs .feito-check svg.lucide { width: 18px; height: 18px; }

@media (min-width: 500px) {
  .lista-docs { grid-template-columns: 1fr 1fr; }
}

/* Cabeçalho do passo */

.passo-cabecalho {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.passo-cabecalho .icone-chip { width: 46px; height: 46px; border-radius: 13px; }
.passo-cabecalho .icone-chip svg.lucide { width: 22px; height: 22px; }
.passo-cabecalho .eyebrow { margin-bottom: 1px; }
.passo-cabecalho h1 { margin: 0; font-size: 20px; }

.dica {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--primary-subtle);
  border-radius: var(--radius);
  padding: 10px 13px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.dica svg.lucide { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* ---------- Área de envio ---------- */

.area-envio {
  border: 2px dashed var(--ring);
  border-radius: var(--radius-lg);
  background: var(--bg-canvas);
  box-shadow: var(--sombra);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  margin-bottom: 12px;
}

.area-envio:hover, .area-envio.arrastando {
  border-color: var(--primary);
  background-color: var(--primary-subtle);
}

.area-envio .icone-chip {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  margin: 0 auto 10px;
}

.area-envio .icone-chip svg.lucide { width: 26px; height: 26px; }

/* ---------- Leitura (scanner) ---------- */

.leitura-preview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--fg-strong);
  box-shadow: var(--sombra);
  margin-bottom: 16px;
}

.leitura-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.leitura-preview .pdf-placeholder {
  display: grid;
  place-items: center;
  height: 200px;
  color: #fff;
}

.leitura-preview .pdf-placeholder svg.lucide { width: 52px; height: 52px; }

.feixe {
  position: absolute;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(to bottom, transparent, rgba(1, 255, 255, 0.35), rgba(126, 53, 228, 0.85), rgba(1, 255, 255, 0.35), transparent);
  animation: varrer 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes varrer {
  0% { top: -90px; }
  50% { top: 100%; }
  100% { top: -90px; }
}

.lendo-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  color: var(--primary);
  font-size: 16px;
}

.pontinhos::after {
  content: "";
  animation: pontos 1.4s steps(4) infinite;
}

@keyframes pontos {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

/* ---------- Formulários ---------- */

.campo { margin-bottom: 13px; }

.campo label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--fg-strong);
}

.campo input, .campo select {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--font-inter);
  font-size: 16px;
  color: var(--fg);
  background: var(--bg-canvas);
  border: 1.5px solid var(--fg-disabled);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.campo input:hover, .campo select:hover { border-color: var(--fg-soft); }

.campo input:focus, .campo select:focus {
  outline: 3px solid rgba(126, 53, 228, 0.35);
  outline-offset: 0;
  border-color: var(--primary);
}

.campo input.numero { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }

.campo input.invalido, .campo select.invalido { border-color: var(--danger); }

.erro-campo {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.linha-campos { display: flex; gap: 10px; }
.linha-campos .campo { flex: 1; }

/* ---------- Foto do crachá ---------- */

.foto-cracha-preview {
  width: 200px;
  aspect-ratio: 3 / 4;
  margin: 0 auto 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--borda);
  box-shadow: var(--sombra);
}

.foto-cracha-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Mensagens de feedback ---------- */

.aviso {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: var(--radius);
  padding: 11px 13px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.aviso .simbolo { font-size: 17px; line-height: 1.2; }

.aviso-erro { background: var(--danger-subtle); border-left: 4px solid var(--danger); }
.aviso-atencao { background: var(--warning-subtle); border-left: 4px solid var(--warning); }
.aviso-info { background: var(--primary-subtle); border-left: 4px solid var(--primary); }
.aviso-sucesso { background: var(--success-subtle); border-left: 4px solid var(--success); }

/* ---------- Revisão ---------- */

.revisao-secao {
  background-color: var(--bg-canvas);
  border: var(--borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--sombra);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.revisao-secao .topo-secao {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.revisao-secao .topo-secao h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 14px;
}

.revisao-secao .topo-secao .icone-chip { width: 30px; height: 30px; border-radius: 9px; }
.revisao-secao .topo-secao .icone-chip svg.lucide { width: 15px; height: 15px; }

.revisao-secao dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.revisao-secao .par { min-width: 0; }

.revisao-secao dt {
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

.revisao-secao dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: break-word;
}

/* ---------- Carimbo ---------- */

.carimbo-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 60;
  pointer-events: none;
  background: rgba(246, 246, 246, 0.7);
  backdrop-filter: blur(3px);
}

.carimbo {
  position: relative;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 4px solid currentColor;
  color: var(--primary);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-inter);
  font-weight: 700;
  transform: rotate(-10deg);
  animation: carimbar 0.45s cubic-bezier(0.2, 1.45, 0.4, 1) forwards;
}

.carimbo::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed currentColor;
  border-radius: 50%;
  opacity: 0.85;
}

.carimbo .mini {
  display: block;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  opacity: 0.85;
}

.carimbo .grande {
  display: block;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  margin: 3px 0;
}

.carimbo .check { display: block; font-size: 26px; line-height: 1; }

@keyframes carimbar {
  0% { opacity: 0; transform: rotate(-10deg) scale(2.4); }
  55% { opacity: 1; transform: rotate(-10deg) scale(0.95); }
  100% { opacity: 1; transform: rotate(-10deg) scale(1); }
}

.carimbo-overlay.saindo { animation: sumir 0.22s ease forwards; }

@keyframes sumir { to { opacity: 0; } }

/* variante estática da tela final */
.carimbo-estatico {
  width: 170px;
  height: 170px;
  margin: 0 auto 18px;
  color: var(--success);
}

/* ---------- Tela final ---------- */

.final {
  text-align: center;
  padding-top: 24px;
}

.protocolo {
  display: inline-block;
  background-color: var(--bg-canvas);
  border: var(--borda);
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 9px 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin: 6px 0 20px;
}

/* ---------- Crédito MultiDigital ---------- */

.rodape-marca {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: var(--borda);
}

.rodape-logo {
  height: 26px;
  width: auto;
  opacity: 0.95;
}

.rodape-credito {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--fg-soft);
}

.rodape-credito svg.lucide { width: 13px; height: 13px; }
.rodape-credito strong { color: var(--fg-mid); font-weight: 600; }


/* ============================================================
   Painel RH
   ============================================================ */

body.rh { font-size: 14px; }

/* Painel é tela de trabalho com tabela densa: ocupa a largura disponível em
   vez de uma coluna estreita no meio do monitor. */
.rh-container {
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px clamp(20px, 3vw, 44px) 44px;
}

.rh-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.rh-topo h1 { margin: 8px 0 0; font-size: 24px; }

/* Títulos de seção discretos (a informação está nos cards) */
.rh h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-mid);
  margin: 22px 0 10px;
}

/* Cartões de métrica */

/* Os cards são também os filtros da lista, então a quantidade acompanha os
   recortes que o RH usa — o grid se ajusta em vez de fixar 4 colunas. */
.rh-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.rh-stat {
  background-color: var(--bg-canvas);
  border: var(--borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--sombra);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rh-stat .icone-chip { width: 38px; height: 38px; border-radius: 10px; }
.rh-stat .icone-chip svg.lucide { width: 18px; height: 18px; }

.rh-stat .valor {
  font-size: 26px;
  font-weight: 700;
  color: var(--fg-strong);
  line-height: 1.1;
}

.rh-stat .rotulo { font-size: 12px; font-weight: 400; color: var(--fg-mid); }

.chip-amarelo { background: var(--warning-subtle); color: var(--warning); }
.chip-verde { background: var(--success-subtle); color: var(--success); }
.chip-vermelho { background: var(--danger-subtle); color: var(--danger); }

/* Tabela */

.rh-tabela-card {
  background-color: var(--bg-canvas);
  border-radius: var(--radius-lg);
  border: var(--borda);
  box-shadow: var(--sombra);
  /* rola em vez de cortar: com overflow hidden a última coluna sumia */
  overflow-x: auto;
}

table.rh-tabela {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
  font-size: 14px;
}

.rh-tabela th {
  text-align: left;
  background: var(--bg-subtle);
  padding: 11px 18px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 1px solid var(--bg-strong);
}

.rh-tabela td {
  padding: 12px 18px;
  color: var(--fg);
  vertical-align: middle;
  border-bottom: 1px solid rgba(231, 231, 231, 0.5);
}

/* Hierarquia dentro da célula: o dado que identifica em cima, o apoio embaixo */
.celula-principal {
  display: block;
  font-weight: 600;
  color: var(--fg-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.celula-sub {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 400;
  color: var(--fg-mid);
  white-space: nowrap;
}

.celula-numero {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rh-tabela .col-pessoa { min-width: 250px; max-width: 320px; }
.rh-tabela .col-local { min-width: 150px; }
.rh-tabela .col-contratacao { min-width: 160px; }
.rh-tabela .col-data { white-space: nowrap; color: var(--fg-mid); }

.rh-tabela tbody tr { cursor: pointer; transition: background-color 0.1s ease; }
.rh-tabela tbody tr:hover { background-color: var(--bg-subtle); }
.rh-tabela tbody tr:last-child td { border-bottom: none; }

.pessoa {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 600;
}

.pessoa > .avatar { flex-shrink: 0; }
.pessoa > div { min-width: 0; }

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Badges — subtle background + cor de status; "Enviado" é sólido */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primario { background: var(--primary); color: #fff; }
.badge-ciano { background: var(--accent-subtle); color: var(--ciano-900); }
.badge-verde { background: var(--success-subtle); color: var(--success); }
.badge-amarelo { background: var(--warning-subtle); color: var(--warning); }
.badge-vermelho { background: var(--danger-subtle); color: var(--danger); }
.badge-cinza { background: var(--bg-strong); color: var(--fg-mid); }

/* Detalhe */

.rh-cabecalho-detalhe {
  background-color: var(--bg-canvas);
  border: var(--borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--sombra);
  padding: 20px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.rh-cabecalho-detalhe h1 { margin: 0 0 3px; font-size: 22px; }

/* Cards de documento têm alturas muito diferentes (o RG tem 8 campos, o SUS
   tem 3). Em grid, cada linha assume a altura do mais alto e os curtos viram
   caixas vazias; em colunas eles se encaixam e a página encolhe. */
.rh-detalhe-grid {
  columns: 300px;
  column-gap: 12px;
}

.rh-detalhe-grid > * {
  break-inside: avoid;
  margin-bottom: 12px;
}

.rh-doc {
  background-color: var(--bg-canvas);
  border: var(--borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--sombra);
  padding: 14px 16px;
}

.rh-doc h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 3px;
  font-size: 14px;
}

.rh-doc h3 .badge { margin-left: auto; }
.rh-doc h3 .icone-chip { width: 30px; height: 30px; border-radius: 9px; }
.rh-doc h3 .icone-chip svg.lucide { width: 15px; height: 15px; }

.rh-doc dl { margin: 0; font-size: 13px; }
.rh-doc dt {
  font-weight: 600;
  color: var(--fg-mid);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 7px;
}
.rh-doc dd { margin: 0; overflow-wrap: break-word; }

.rh-foto-cracha {
  display: block;
  width: 110px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--bg-strong);
  margin-top: 10px;
}

.rh-doc .link-arquivo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 600;
  font-size: 12px;
}

.rh-doc .link-arquivo svg.lucide { width: 14px; height: 14px; }

.rh-acoes { display: flex; gap: 10px; margin: 14px 0 8px; flex-wrap: wrap; }
.rh-acoes .btn { width: auto; min-height: 40px; font-size: 14px; padding: 10px 20px; }

/* Login do RH — card elevado sobre fundo subtle, conforme login Avald */

/* ============================================================
   Entrada do painel — a "mesa de conferência"
   Duas superfícies: a mesa escura, onde o ciano da marca
   finalmente é legível, e o papel claro, onde se trabalha.
   ============================================================ */

.login-tela {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
}

.login-mesa {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: clamp(28px, 3.5vw, 56px);
  overflow: hidden;
  color: #ede6f7;
  background: radial-gradient(115% 85% at 18% 8%, #3a1a63 0%, #1c0a35 58%, #0e0419 100%);
}

/* Grão fino sobre o gradiente: sem isso a superfície fica com aquele
   aspecto chapado de degradê digital. */
.login-mesa::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='0.4'/%3E%3C/svg%3E");
}

.login-mesa > * { position: relative; z-index: 1; }

.login-mesa .marca-nome { color: #fff; }
.login-mesa .marca-sub { color: rgba(237, 230, 247, 0.6); }

.login-mesa-centro {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 20px 0;
}

.login-frase {
  position: relative;
  margin: 0;
  padding-top: 20px;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(237, 230, 247, 0.72);
}

/* Fio curto de ciano: ancora o texto na base em vez de deixá-lo solto */
.login-frase::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--ciano-500);
}

.login-frase strong { color: #fff; font-weight: 600; }

.login-rodape {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(237, 230, 247, 0.38);
}

/* O azul da Multilaser sobre a mesa escura fica em ~4,8:1 — suficiente para
   marca gráfica, e sem repintar a logo. */
.login-rodape-logo { height: 30px; width: auto; align-self: flex-start; }

/* O carimbo: mesmo objeto que marca os documentos do colaborador, agora
   desenhado como carimbo de verdade — texto curvado no anel. */
.carimbo-palco {
  position: relative;
  display: grid;
  place-items: center;
  padding: 40px;
}

/* Halo e anéis de fundo: eco da roseta gravada em papel de segurança.
   Ficam quase invisíveis; só dão profundidade à mesa. */
.carimbo-palco::before,
.carimbo-palco::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.carimbo-palco::before {
  inset: -14%;
  background: radial-gradient(circle, rgba(1, 255, 255, 0.16) 0%, rgba(1, 255, 255, 0) 68%);
}

.carimbo-palco::after {
  inset: -6%;
  border: 1px solid rgba(1, 255, 255, 0.1);
  box-shadow: 0 0 0 18px rgba(1, 255, 255, 0.045), 0 0 0 40px rgba(1, 255, 255, 0.03);
}

.carimbo-marca {
  position: relative;
  width: clamp(176px, 17vw, 232px);
  height: auto;
  color: var(--ciano-500);
  transform: rotate(-9deg);
  filter: drop-shadow(0 0 22px rgba(1, 255, 255, 0.28));
}

.carimbo-marca .anel { fill: none; stroke: currentColor; stroke-width: 3; }

.carimbo-marca .anel-fino {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
  opacity: 0.75;
}

.carimbo-marca text { fill: currentColor; font-family: var(--font-inter); }

.carimbo-marca .volta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  opacity: 0.9;
}

.carimbo-marca .miolo {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.carimbo-marca .base {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  opacity: 0.85;
}

.carimbo-marca .risco { stroke: currentColor; stroke-width: 1.4; opacity: 0.55; }
.carimbo-marca .pino { fill: currentColor; opacity: 0.8; }

/* Enquanto o login está em voo o carimbo baixa: o estado de
   carregamento é o momento de marca, sem atrasar ninguém. */
.carimbo-marca.carimbando { animation: bater-carimbo 0.55s cubic-bezier(0.2, 1.4, 0.4, 1); }

@keyframes bater-carimbo {
  0% { transform: rotate(-9deg) scale(1.55); opacity: 0.25; }
  55% { transform: rotate(-9deg) scale(0.94); opacity: 1; }
  100% { transform: rotate(-9deg) scale(1); opacity: 1; }
}

.login-papel {
  display: grid;
  place-items: center;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 40px);
  background: var(--bg-canvas);
}

.login-campos { width: 100%; max-width: 384px; }

.login-campos h1 {
  margin: 2px 0 6px;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.login-campos > p {
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--fg-mid);
}

/* Microrrótulo de formulário — o registro tipográfico de um documento */
.login-campos label,
.rotulo-forte {
  display: block;
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mid);
}

.login-campos .campo { margin-bottom: 16px; }
.login-campos .btn { margin-top: 6px; }

.login-ajuda {
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: var(--borda);
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-mid);
}

@media (max-width: 900px) {
  .login-tela { grid-template-columns: 1fr; }
  .login-mesa { gap: 20px; padding: 24px 20px 28px; }
  .login-mesa-centro { padding: 4px 0; }
  .carimbo-marca { width: 132px; }
  .login-rodape { display: none; }
}

/* ---------- Responsivo / acessibilidade ---------- */

@media (max-width: 768px) {
  .rh-resumo { grid-template-columns: 1fr; }
  .rh-container { padding: 16px 16px 40px; }
}

@media (max-width: 420px) {
  .progresso-trilha { gap: 4px; }
  .p-ponto { width: 8px; height: 8px; }
  .p-atual { padding: 4px 10px; font-size: 11px; }
  .linha-campos { flex-direction: column; gap: 0; }
  .revisao-secao dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Passos novos do wizard: dependentes, local de trabalho,
   nome social e documentos com vários arquivos
   ============================================================ */

/* Pergunta de sim/não em destaque (nome social) */
.pergunta-grande {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-strong);
  margin: 18px 0 12px;
}

.escolha-dupla { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.escolha-dupla .btn { flex: 1 1 200px; width: auto; }

/* Valor definido pelo cadastro, que a pessoa não escolhe */
.valor-fixo {
  padding: 12px 14px;
  border: var(--borda);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--fg-strong);
}

.acoes-linha { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.acoes-linha .btn { flex: 1 1 200px; width: auto; min-height: 46px; }

/* Cartão de um dependente com a lista de documentos dele */
.cartao-dependente {
  background: var(--bg-canvas);
  border: var(--borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--sombra);
  padding: 16px;
  margin-bottom: 12px;
}

.cartao-dependente.completo { border-left: 4px solid var(--success); }

.cartao-dependente .topo-secao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cartao-dependente .topo-secao h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
}

.cartao-dependente .icone-chip { width: 30px; height: 30px; border-radius: 9px; }
.cartao-dependente .icone-chip svg.lucide { width: 15px; height: 15px; }

.lista-itens-doc { display: flex; flex-direction: column; gap: 6px; }

.item-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: var(--borda);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  font: inherit;
  font-size: 14px;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.item-doc:hover { background: var(--primary-subtle); border-color: var(--primary); }
.item-doc.pronto { background: var(--success-subtle); border-color: transparent; }
.item-doc .icone-chip { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; }
.item-doc .icone-chip svg.lucide { width: 14px; height: 14px; }
.item-doc-nome { flex: 1; min-width: 0; }
.item-doc-status { display: flex; color: var(--fg-mid); }
.item-doc.pronto .item-doc-status { color: var(--success); }
.item-doc-status svg.lucide { width: 18px; height: 18px; }

/* Documento com vários arquivos (escolaridade) */
.lista-arquivos { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.item-arquivo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: var(--borda);
  border-radius: var(--radius);
  background: var(--bg-canvas);
  box-shadow: var(--sombra);
}

.item-arquivo .icone-chip { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; }
.item-arquivo .icone-chip svg.lucide { width: 16px; height: 16px; }
.item-arquivo-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.item-arquivo-texto strong { color: var(--fg-strong); overflow-wrap: break-word; }
.item-arquivo-texto .texto-suave { font-size: 12px; }

.area-envio.compacta { padding: 20px 16px; }
.area-envio.compacta .icone-chip { width: 40px; height: 40px; }
.area-envio.compacta .icone-chip svg.lucide { width: 20px; height: 20px; }

/* ============================================================
   Painel do RH: usuário logado, abas e telas de cadastro
   ============================================================ */

.rh-usuario { display: flex; align-items: center; gap: 12px; }
.rh-usuario-info { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.rh-usuario-info strong { font-size: 14px; color: var(--fg-strong); }
.rh-usuario .btn-texto { width: auto; min-height: 36px; padding: 6px 10px; }

.rh-abas {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 18px 0 16px;
  border-bottom: 1px solid var(--bg-strong);
}

.rh-aba {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-mid);
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.rh-aba:hover { color: var(--primary); }
.rh-aba.ativa { color: var(--primary); border-bottom-color: var(--primary); }
.rh-aba svg.lucide { width: 16px; height: 16px; }

.rh-barra-acoes {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.rh-barra-acoes .btn { width: auto; min-height: 40px; font-size: 14px; padding: 10px 18px; }

.rh-form-card {
  background: var(--bg-canvas);
  border: var(--borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--sombra);
  padding: 20px;
  margin-top: 16px;
  max-width: 640px;
}

.rh-form-card h3 { margin: 0 0 14px; font-size: 16px; }

.grupo-selecao { display: flex; flex-direction: column; gap: 8px; }

.caixa-selecao {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: var(--borda);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  font-size: 14px;
  cursor: pointer;
}

.caixa-selecao:hover { border-color: var(--primary); }
.caixa-selecao input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

.acoes-tabela { white-space: nowrap; }
.acoes-tabela .btn-texto { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.btn-texto.perigo { color: var(--danger); }

/* Cartões de documento no detalhe: itens múltiplos e dependentes */
.rh-item-multiplo {
  padding: 10px 0;
  border-top: 1px solid var(--bg-strong);
}

.rh-item-multiplo:first-of-type { border-top: none; padding-top: 0; }
.rh-item-titulo { font-size: 12px; font-weight: 600; color: var(--fg-mid); margin-bottom: 4px; }

.rh-dependente {
  background: var(--bg-canvas);
  border: var(--borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--sombra);
  padding: 16px;
  margin-bottom: 14px;
}

.rh-dependente > h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; }
.rh-dependente .icone-chip { width: 30px; height: 30px; border-radius: 9px; }
.rh-dependente .icone-chip svg.lucide { width: 15px; height: 15px; }
.rh-dependente .rh-doc { box-shadow: none; background: var(--bg-subtle); }

@media (max-width: 600px) {
  .rh-usuario { width: 100%; justify-content: space-between; }
  .rh-usuario-info { align-items: flex-start; }
  .rh-abas { overflow-x: auto; flex-wrap: nowrap; }
  .rh-aba { white-space: nowrap; }
}

/* ============================================================
   Navegação do painel: encontrar uma admissão e julgá-la
   sem caçar informação na rolagem
   ============================================================ */

.lista-controles {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.busca {
  position: relative;
  flex: 1 1 300px;
  max-width: 420px;
}

.busca svg.lucide {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--fg-soft);
  pointer-events: none;
}

.busca input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: var(--borda);
  border-radius: var(--radius);
  background: var(--bg-canvas);
  font-family: var(--font-inter);
  font-size: 14px;
  color: var(--fg);
}

.busca input:focus {
  outline: 3px solid rgba(126, 53, 228, 0.35);
  border-color: var(--primary);
}

.lista-controles .btn { width: auto; min-height: 42px; padding: 10px 18px; font-size: 14px; }

.filtro {
  padding: 8px 14px;
  border: var(--borda);
  border-radius: 999px;
  background: var(--bg-canvas);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-mid);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.filtro:hover { border-color: var(--primary); color: var(--primary); }
.filtro.ativo { background: var(--primary); border-color: var(--primary); color: #fff; }
.filtro .conta { opacity: 0.65; font-variant-numeric: tabular-nums; }

.rh-stat { font: inherit; text-align: left; color: inherit; }
.rh-stat.clicavel { cursor: pointer; transition: border-color 0.12s ease, transform 0.1s ease; }
.rh-stat.clicavel:hover { border-color: var(--primary); }
.rh-stat.clicavel:active { transform: scale(0.99); }
.rh-stat.selecionado { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--sombra); }

.lista-vazia-filtro {
  padding: 28px 20px;
  text-align: center;
  color: var(--fg-mid);
}

/* Barra fixa do detalhe: quem é, como está e o que fazer —
   sempre à mão numa página de 2500px */
.rh-barra-fixa {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 10px 0;
  background: rgba(246, 246, 246, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bg-strong);
}

.rh-barra-fixa .voltar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 8px;
  border: none;
  border-radius: var(--radius);
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.rh-barra-fixa .voltar:hover { background: var(--primary-subtle); }
.rh-barra-fixa .voltar svg.lucide { width: 16px; height: 16px; }

.rh-barra-fixa .quem {
  min-width: 0;
  font-weight: 700;
  color: var(--fg-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rh-barra-fixa .separador { width: 1px; height: 22px; background: var(--bg-strong); }
.rh-barra-fixa .acoes { margin-left: auto; display: flex; gap: 8px; }

.rh-barra-fixa .acoes .btn {
  width: auto;
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
}

/* Índice dos documentos: salta direto para o card em vez de rolar */
.indice-docs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chip-doc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: var(--borda);
  border-radius: 999px;
  background: var(--bg-canvas);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-mid);
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.chip-doc:hover { border-color: var(--primary); color: var(--primary); }

/* O ponto diz o estado sem depender de cor sozinha: cada estado
   tem também um rótulo no title */
.chip-doc .ponto {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg-strong);
  flex-shrink: 0;
}

.chip-doc.ok .ponto { background: var(--success); }
.chip-doc.alerta .ponto { background: var(--danger); }
.chip-doc.alerta { color: var(--danger); border-color: var(--danger-subtle); }
.chip-doc.ausente { opacity: 0.6; }

/* compensa a barra fixa quando o índice rola até o card */
.rh-doc[id], #secao-dependentes { scroll-margin-top: 84px; }

@media (max-width: 700px) {
  .rh-barra-fixa .quem { flex-basis: 100%; order: -1; }
  .rh-barra-fixa .acoes { margin-left: 0; width: 100%; }
  .rh-barra-fixa .acoes .btn { flex: 1; }
  .rh-barra-fixa .separador { display: none; }
}
