/* Recrute+ | Início: faixa "Pendências no total" (opção B aprovada em 15/11/2026).
   Substitui os 4 cartões (Registrar presença, Presentes, Ausências, Prévias). Tudo sob #homeView; usa só tokens do painel,
   então o tema claro herda as cores. Dados vêm de homeRenderPendenciasB() em app.js. */
#homeView .hp { flex: 1; min-width: 0; width: 100%; container-type: inline-size; }
#homeView .hp-main { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: stretch; }
/* O bloco do total é um botão: abre o pop-up com todas as pendências e onde estão */
#homeView .hp-total { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; width: 100%; margin: 0; padding: 20px 24px; border: 0; border-right: 1px solid var(--divider); border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s ease; }
#homeView .hp-total:hover { background: var(--row-hover); }
#homeView .hp-total:active { background: var(--bg-elevated); }
#homeView .hp-total:focus-visible { outline: 2px solid rgba(120, 148, 248, .68); outline-offset: -2px; }
#homeView .hp-total-go { margin-top: 2px; color: var(--text-muted); font-size: 12px; transition: color .15s ease; }
#homeView .hp-total:hover .hp-total-go, #homeView .hp-total:focus-visible .hp-total-go { color: var(--text-primary); }
#homeView .hp.is-zero .hp-total { cursor: default; }
#homeView .hp.is-zero .hp-total:hover { background: transparent; }
#homeView .hp.is-zero .hp-total-go { display: none; }
#homeView .hp-label { color: var(--text-muted); font-size: 13px; font-weight: 500; line-height: 1.3; }
#homeView .hp-n { font-family: ui-monospace, 'Cascadia Mono', 'JetBrains Mono', Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.02em; font-weight: 600; }
#homeView .hp-total-n { display: inline-flex; align-items: center; gap: 8px; font-size: 44px; line-height: 1; color: var(--text-primary); }
#homeView .hp.has-pending .hp-total-n { color: rgb(var(--state-warning-rgb)); }
#homeView .hp.is-zero .hp-total-n { font-family: inherit; font-size: 22px; letter-spacing: -.01em; color: rgb(var(--state-success-rgb)); }
#homeView .hp-total-n svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#homeView .hp-sub { color: var(--text-muted); font-size: 12.5px; line-height: 1.3; }

#homeView .hp-comp { display: grid; align-content: center; gap: 16px; padding: 20px 24px 16px; min-width: 0; }
#homeView .hp-seg { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(174, 190, 220, .09); }
#homeView .hp-seg i { display: block; height: 100%; min-width: 4px; }
/* Coluna estreita (a Início divide a tela com o Follow-up): legenda em lista; com espaço, 3 colunas */
#homeView .hp-legend { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
/* LEGENDA_COMPACTA_V1 (02/12/2026): com 5 listas a coluna única ficava alta demais; largura média = 2 colunas (3 linhas) */
@container (min-width: 560px) {
  #homeView .hp-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; }
  #homeView .hp-comp { gap: 12px; padding: 16px 20px 12px; }
  #homeView .hp-it { padding: 5px 12px; }
}
@container (min-width: 940px) {
  #homeView .hp-legend { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
}
#homeView .hp-it { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 14px; margin: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-primary); text-align: left; font: inherit; cursor: pointer; transition: background .15s ease, transform .1s ease; }
#homeView .hp-it:hover { background: var(--row-hover); }
#homeView .hp-it:active { transform: translateY(1px); }
#homeView .hp-it:focus-visible, #homeView .hp-link:focus-visible { outline: 2px solid rgba(120, 148, 248, .68); outline-offset: 2px; }
#homeView .hp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: rgba(174, 190, 220, .3); }
#homeView .hp-it.has-pending .hp-dot.is-info { background: rgb(var(--state-info-rgb)); }
#homeView .hp-it.has-pending .hp-dot.is-warn { background: rgb(var(--state-warning-rgb)); }
#homeView .hp-it.has-pending .hp-dot.is-danger { background: rgb(var(--state-danger-rgb)); }
/* RESULTADO_PENDENTE_V1: "Definir resultado" usa o azul da interface (--accent #3461d1) */
#homeView { --home-resultado-rgb: 52, 97, 209; }
#homeView .hp-it.has-pending .hp-dot.is-res { background: rgb(var(--home-resultado-rgb)); }
/* RETORNO_PENDENTE_V1: "Dar retorno" em verde, a mesma cor do botão Contatado */
#homeView .hp-it.has-pending .hp-dot.is-ret { background: rgb(var(--state-success-rgb)); }
#homeView .hp-nm { color: var(--text-primary); font-size: 13px; line-height: 1.25; min-width: 0; }
#homeView .hp-it.is-zero .hp-nm { color: var(--text-muted); }
#homeView .hp-c { margin-left: auto; font-size: 18px; color: var(--text-primary); }
#homeView .hp-it.is-zero .hp-c { color: var(--text-muted); }
#homeView .hp-it.has-pending .hp-c { color: rgb(var(--state-warning-rgb)); }

/* Rodapé: itens com a mesma tipografia, ícone pequeno e divisores finos. Os números usam seletor reforçado porque o
   index.html tem uma regra antiga que força 22 px em #homeSemRegistro, #homePresentes e #homeAusencias. */
#homeView .hp-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 0; min-height: 44px; padding: 4px 10px; border-top: 1px solid var(--divider); color: var(--text-muted); font-size: 12.5px; }
#homeView .hp-fgroup { display: flex; align-items: center; flex-wrap: wrap; margin-left: auto; }
#homeView .hp-fi { position: relative; display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font: inherit; font-size: 12.5px; line-height: 1.2; white-space: nowrap; }
#homeView button.hp-fi { cursor: pointer; transition: background .15s ease, color .15s ease; }
#homeView button.hp-fi:hover { background: var(--row-hover); color: var(--text-primary); }
#homeView button.hp-fi:active { background: var(--bg-elevated); }
#homeView .hp-fgroup .hp-fi + .hp-fi::before { content: ""; position: absolute; left: 0; top: 26%; bottom: 26%; width: 1px; background: var(--divider); }
#homeView .hp-ico { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
body #homeView#homeView#homeView#homeView .hp-foot .hp-n { font-family: ui-monospace, 'Cascadia Mono', 'JetBrains Mono', Consolas, monospace !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1.2 !important; color: var(--text-primary) !important; }
body #homeView#homeView#homeView#homeView .hp-legend .hp-c { font-family: ui-monospace, 'Cascadia Mono', 'JetBrains Mono', Consolas, monospace !important; font-size: 18px !important; font-weight: 600 !important; line-height: 1.2 !important; }

@container (max-width: 520px) {
  #homeView .hp-main { grid-template-columns: 1fr; }
  #homeView .hp-total { border-right: 0; border-bottom: 1px solid var(--divider); padding: 16px 20px; }
  #homeView .hp-comp { padding: 14px 12px 10px; }
  #homeView .hp-foot { padding: 4px 8px; }
  #homeView .hp-fgroup { margin-left: 0; }
}

/* ---------- Painel de Seletivas (opção A): estado "sem seletiva hoje" e próximas com barra de lotação ---------- */
/* A etiqueta "N pendências em aberto" repetia a faixa "Pendências no total"; o elemento continua no HTML (o JS o atualiza). */
body #homeView#homeView#homeView .home-session-summary-head #homeAttentionMeta { display: none !important; }
#homeView .ih-slot.ih-up { grid-template-columns: 62px minmax(0, 1fr) 130px 54px; }
#homeView .ih-hoje-vazio { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; margin: 0; padding: 14px 20px; border: 0; border-radius: 0; background: transparent; }
#homeView .ih-hv-ic { display: flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(174, 190, 220, .2); background: transparent; color: var(--text-muted); }
#homeView .ih-hv-ic svg { width: 18px; height: 18px; }
#homeView .ih-hv-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#homeView .ih-hv-t b { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
#homeView .ih-hv-t span, #homeView .ih-hv-nx span { color: var(--text-muted); font-size: 12.5px; }
#homeView .ih-hv-nx { display: inline-flex; flex-direction: row; align-items: baseline; gap: 8px; margin-left: auto; padding: 5px 12px; border: 1px solid rgba(174, 190, 220, .2); border-radius: 999px; text-align: right; white-space: nowrap; }
#homeView .ih-hv-nx b { font-size: 12.5px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* ---------- Pop-up "onde estão" das pendências ---------- */
dialog.hpd { width: min(600px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid rgba(174, 190, 220, .18); border-radius: 14px; background: var(--bg-surface, #101727); color: var(--text-primary, #fff); font-family: inherit; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); overflow: hidden; }
dialog.hpd::backdrop { background: rgba(3, 7, 16, .66); }
dialog.hpd[open] { display: flex; flex-direction: column; }
dialog.hpd .hpd-card { display: flex; flex-direction: column; min-height: 0; padding: 18px 8px 10px; }
dialog.hpd .hpd-head { display: flex; align-items: center; gap: 10px; padding: 0 12px 4px 14px; }
dialog.hpd h3 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.3; }
dialog.hpd .hpd-count { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; background: rgba(var(--state-warning-rgb), .12); color: rgb(var(--state-warning-rgb)); }
dialog.hpd .hpd-onde { color: var(--text-muted); font-size: 12.5px; }
dialog.hpd .hpd-x { margin-left: auto; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 22px; line-height: 1; cursor: pointer; }
dialog.hpd .hpd-x:hover { background: var(--row-hover); color: var(--text-primary); }
dialog.hpd .hpd-help { margin: 2px 14px 10px; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
dialog.hpd .hpd-list { display: flex; flex-direction: column; min-height: 0; overflow: auto; overscroll-behavior: contain; }
dialog.hpd .hpd-row { display: grid; grid-template-columns: 104px 58px minmax(0, 1fr) auto 14px; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 11px 14px; border: 0; border-top: 1px solid var(--divider, rgba(174, 190, 220, .08)); border-radius: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; transition: background .15s ease; }
dialog.hpd .hpd-row:hover { background: var(--row-hover); }
dialog.hpd .hpd-row:active { background: var(--bg-elevated); }
dialog.hpd .hpd-dia { display: flex; flex-direction: column; gap: 1px; }
dialog.hpd .hpd-dia b { font-size: 13.5px; font-weight: 600; }
dialog.hpd .hpd-dia i { font-style: normal; color: var(--text-muted); font-size: 12px; }
dialog.hpd .hpd-hora { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 14px; font-weight: 600; }
dialog.hpd .hpd-modo { color: var(--text-muted); font-size: 12.5px; }
dialog.hpd .hpd-qtd { font-size: 13px; font-weight: 600; color: rgb(var(--state-warning-rgb)); text-align: right; white-space: nowrap; }
dialog.hpd .hpd-go { color: var(--text-muted); font-size: 20px; line-height: 1; }
dialog.hpd .hpd-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 2px; border-top: 1px solid var(--divider, rgba(174, 190, 220, .08)); color: var(--text-muted); font-size: 12.5px; }
dialog.hpd .hpd-all { height: 30px; padding: 0 12px; border: 1px solid rgba(174, 190, 220, .18); border-radius: 8px; background: transparent; color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
dialog.hpd .hpd-all:hover { background: var(--row-hover); }
dialog.hpd .hpd-row:focus-visible, dialog.hpd .hpd-x:focus-visible, dialog.hpd .hpd-all:focus-visible { outline: 2px solid rgba(120, 148, 248, .68); outline-offset: -2px; }
@media (max-width: 560px) {
  dialog.hpd .hpd-row { grid-template-columns: minmax(0, 1fr) auto 14px; }
  dialog.hpd .hpd-hora, dialog.hpd .hpd-modo { display: none; }
  dialog.hpd .hpd-foot span { display: none; }
}

/* Pop-up do total: seções por tipo de pendência e a linha de atendimento humano (sem seletiva) */
dialog.hpd .hpd-sec { display: flex; align-items: center; gap: 8px; padding: 14px 14px 6px; color: var(--text-muted); font-size: 12.5px; font-weight: 600; }
dialog.hpd .hpd-sec .hpd-count { height: 20px; font-size: 11.5px; }
dialog.hpd .hpd-row-chat { grid-template-columns: minmax(0, 1fr) auto 14px; }
